@galaxyproject/locuszoom 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/static/index.js +62 -62
- package/static/locuszoom.xml +1 -1
package/static/index.js
CHANGED
|
@@ -2,42 +2,42 @@
|
|
|
2
2
|
* @vue/shared v3.4.38
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Tg(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Mt={},Oa=[],sr=()=>{},
|
|
5
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Tg(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Mt={},Oa=[],sr=()=>{},nS=()=>!1,sd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Eg=e=>e.startsWith("onUpdate:"),nn=Object.assign,Ag=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},rS=Object.prototype.hasOwnProperty,_t=(e,t)=>rS.call(e,t),tt=Array.isArray,Na=e=>ld(e)==="[object Map]",zx=e=>ld(e)==="[object Set]",it=e=>typeof e=="function",Yt=e=>typeof e=="string",io=e=>typeof e=="symbol",Rt=e=>e!==null&&typeof e=="object",Ix=e=>(Rt(e)||it(e))&&it(e.then)&&it(e.catch),Fx=Object.prototype.toString,ld=e=>Fx.call(e),iS=e=>ld(e).slice(8,-1),Bx=e=>ld(e)==="[object Object]",Pg=e=>Yt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ul=Tg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ud=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},oS=/-(\w)/g,Yi=ud(e=>e.replace(oS,(t,n)=>n?n.toUpperCase():"")),aS=/\B([A-Z])/g,oo=ud(e=>e.replace(aS,"-$1").toLowerCase()),Ox=ud(e=>e.charAt(0).toUpperCase()+e.slice(1)),mh=ud(e=>e?`on${Ox(e)}`:""),Hn=(e,t)=>!Object.is(e,t),yh=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Nx=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},sS=e=>{const t=parseFloat(e);return isNaN(t)?e:t},lS=e=>{const t=Yt(e)?Number(e):NaN;return isNaN(t)?e:t};let rm;const Lx=()=>rm||(rm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Rg(e){if(tt(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=Yt(r)?dS(r):Rg(r);if(i)for(const o in i)t[o]=i[o]}return t}else if(Yt(e)||Rt(e))return e}const uS=/;(?![^(]*\))/g,cS=/:([^]+)/,fS=/\/\*[^]*?\*\//g;function dS(e){const t={};return e.replace(fS,"").split(uS).forEach(n=>{if(n){const r=n.split(cS);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function pu(e){let t="";if(Yt(e))t=e;else if(tt(e))for(let n=0;n<e.length;n++){const r=pu(e[n]);r&&(t+=r+" ")}else if(Rt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const hS="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",pS=Tg(hS);function Dx(e){return!!e||e===""}const Hx=e=>!!(e&&e.__v_isRef===!0),hi=e=>Yt(e)?e:e==null?"":tt(e)||Rt(e)&&(e.toString===Fx||!it(e.toString))?Hx(e)?hi(e.value):JSON.stringify(e,Ux,2):String(e),Ux=(e,t)=>Hx(t)?Ux(e,t.value):Na(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i],o)=>(n[_h(r,o)+" =>"]=i,n),{})}:zx(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>_h(n))}:io(t)?_h(t):Rt(t)&&!tt(t)&&!Bx(t)?String(t):t,_h=(e,t="")=>{var n;return io(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
6
|
* @vue/reactivity v3.4.38
|
|
7
7
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
8
|
* @license MIT
|
|
9
|
-
**/let vr;class pS{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=vr,!t&&vr&&(this.index=(vr.scopes||(vr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=vr;try{return vr=this,t()}finally{vr=n}}}on(){vr=this}off(){vr=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function gS(e,t=vr){t&&t.active&&t.effects.push(e)}function vS(){return vr}let Fo;class zg{constructor(t,n,r,i){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,gS(this,i)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,ao();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(bS(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),so()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Li,n=Fo;try{return Li=!0,Fo=this,this._runnings++,im(this),this.fn()}finally{om(this),this._runnings--,Fo=n,Li=t}}stop(){this.active&&(im(this),om(this),this.onStop&&this.onStop(),this.active=!1)}}function bS(e){return e.value}function im(e){e._trackId++,e._depsLength=0}function om(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Ux(e.deps[t],e);e.deps.length=e._depsLength}}function Ux(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Li=!0,Gp=0;const jx=[];function ao(){jx.push(Li),Li=!1}function so(){const e=jx.pop();Li=e===void 0?!0:e}function Ig(){Gp++}function Fg(){for(Gp--;!Gp&&Xp.length;)Xp.shift()()}function Wx(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&Ux(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Xp=[];function Vx(e,t,n){Ig();for(const r of e.keys()){let i;r._dirtyLevel<t&&(i??(i=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(i??(i=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Xp.push(r.scheduler)))}Fg()}const qx=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},qc=new WeakMap,Bo=Symbol(""),Kp=Symbol("");function Wn(e,t,n){if(Li&&Fo){let r=qc.get(e);r||qc.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=qx(()=>r.delete(n))),Wx(Fo,i)}}function ci(e,t,n,r,i,o){const a=qc.get(e);if(!a)return;let s=[];if(t==="clear")s=[...a.values()];else if(n==="length"&&tt(e)){const l=Number(r);a.forEach((u,c)=>{(c==="length"||!io(c)&&c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),t){case"add":tt(e)?Pg(n)&&s.push(a.get("length")):(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Kp)));break;case"delete":tt(e)||(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Kp)));break;case"set":Na(e)&&s.push(a.get(Bo));break}Ig();for(const l of s)l&&Vx(l,4);Fg()}function mS(e,t){const n=qc.get(e);return n&&n.get(t)}const yS=Tg("__proto__,__v_isRef,__isVue"),Yx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(io)),am=_S();function _S(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=wt(this);for(let o=0,a=this.length;o<a;o++)Wn(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(wt)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ao(),Ig();const r=wt(this)[t].apply(this,n);return Fg(),so(),r}}),e}function xS(e){io(e)||(e=String(e));const t=wt(this);return Wn(t,"has",e),t.hasOwnProperty(e)}class Gx{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(i?o?IS:Jx:o?Zx:Kx).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=tt(t);if(!i){if(a&&_t(am,n))return Reflect.get(am,n,r);if(n==="hasOwnProperty")return xS}const s=Reflect.get(t,n,r);return(io(n)?Yx.has(n):yS(n))||(i||Wn(t,"get",n),o)?s:wn(s)?a&&Pg(n)?s:s.value:Rt(s)?i?El(s):Ng(s):s}}class Xx extends Gx{constructor(t=!1){super(!1,t)}set(t,n,r,i){let o=t[n];if(!this._isShallow){const l=jo(o);if(!Ka(r)&&!jo(r)&&(o=wt(o),r=wt(r)),!tt(t)&&wn(o)&&!wn(r))return l?!1:(o.value=r,!0)}const a=tt(t)&&Pg(n)?Number(n)<t.length:_t(t,n),s=Reflect.set(t,n,r,i);return t===wt(i)&&(a?Hn(r,o)&&ci(t,"set",n,r):ci(t,"add",n,r)),s}deleteProperty(t,n){const r=_t(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&r&&ci(t,"delete",n,void 0),i}has(t,n){const r=Reflect.has(t,n);return(!io(n)||!Yx.has(n))&&Wn(t,"has",n),r}ownKeys(t){return Wn(t,"iterate",tt(t)?"length":Bo),Reflect.ownKeys(t)}}class wS extends Gx{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const CS=new Xx,SS=new wS,$S=new Xx(!0);const Bg=e=>e,cd=e=>Reflect.getPrototypeOf(e);function Ou(e,t,n=!1,r=!1){e=e.__v_raw;const i=wt(e),o=wt(t);n||(Hn(t,o)&&Wn(i,"get",t),Wn(i,"get",o));const{has:a}=cd(i),s=r?Bg:n?Dg:Al;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Nu(e,t=!1){const n=this.__v_raw,r=wt(n),i=wt(e);return t||(Hn(e,i)&&Wn(r,"has",e),Wn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Lu(e,t=!1){return e=e.__v_raw,!t&&Wn(wt(e),"iterate",Bo),Reflect.get(e,"size",e)}function sm(e,t=!1){!t&&!Ka(e)&&!jo(e)&&(e=wt(e));const n=wt(this);return cd(n).has.call(n,e)||(n.add(e),ci(n,"add",e,e)),this}function lm(e,t,n=!1){!n&&!Ka(t)&&!jo(t)&&(t=wt(t));const r=wt(this),{has:i,get:o}=cd(r);let a=i.call(r,e);a||(e=wt(e),a=i.call(r,e));const s=o.call(r,e);return r.set(e,t),a?Hn(t,s)&&ci(r,"set",e,t):ci(r,"add",e,t),this}function um(e){const t=wt(this),{has:n,get:r}=cd(t);let i=n.call(t,e);i||(e=wt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&ci(t,"delete",e,void 0),o}function cm(){const e=wt(this),t=e.size!==0,n=e.clear();return t&&ci(e,"clear",void 0,void 0),n}function Du(e,t){return function(r,i){const o=this,a=o.__v_raw,s=wt(a),l=t?Bg:e?Dg:Al;return!e&&Wn(s,"iterate",Bo),a.forEach((u,c)=>r.call(i,l(u),l(c),o))}}function Hu(e,t,n){return function(...r){const i=this.__v_raw,o=wt(i),a=Na(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...r),c=n?Bg:t?Dg:Al;return!t&&Wn(o,"iterate",l?Kp:Bo),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:s?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Ci(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function kS(){const e={get(o){return Ou(this,o)},get size(){return Lu(this)},has:Nu,add:sm,set:lm,delete:um,clear:cm,forEach:Du(!1,!1)},t={get(o){return Ou(this,o,!1,!0)},get size(){return Lu(this)},has:Nu,add(o){return sm.call(this,o,!0)},set(o,a){return lm.call(this,o,a,!0)},delete:um,clear:cm,forEach:Du(!1,!0)},n={get(o){return Ou(this,o,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Ci("add"),set:Ci("set"),delete:Ci("delete"),clear:Ci("clear"),forEach:Du(!0,!1)},r={get(o){return Ou(this,o,!0,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Ci("add"),set:Ci("set"),delete:Ci("delete"),clear:Ci("clear"),forEach:Du(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Hu(o,!1,!1),n[o]=Hu(o,!0,!1),t[o]=Hu(o,!1,!0),r[o]=Hu(o,!0,!0)}),[e,n,t,r]}const[MS,TS,ES,AS]=kS();function Og(e,t){const n=t?e?AS:ES:e?TS:MS;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_t(n,i)&&i in r?n:r,i,o)}const PS={get:Og(!1,!1)},RS={get:Og(!1,!0)},zS={get:Og(!0,!1)};const Kx=new WeakMap,Zx=new WeakMap,Jx=new WeakMap,IS=new WeakMap;function FS(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function BS(e){return e.__v_skip||!Object.isExtensible(e)?0:FS(rS(e))}function Ng(e){return jo(e)?e:Lg(e,!1,CS,PS,Kx)}function OS(e){return Lg(e,!1,$S,RS,Zx)}function El(e){return Lg(e,!0,SS,zS,Jx)}function Lg(e,t,n,r,i){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const a=BS(e);if(a===0)return e;const s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function cl(e){return jo(e)?cl(e.__v_raw):!!(e&&e.__v_isReactive)}function jo(e){return!!(e&&e.__v_isReadonly)}function Ka(e){return!!(e&&e.__v_isShallow)}function Qx(e){return e?!!e.__v_raw:!1}function wt(e){const t=e&&e.__v_raw;return t?wt(t):e}function NS(e){return Object.isExtensible(e)&&Ox(e,"__v_skip",!0),e}const Al=e=>Rt(e)?Ng(e):e,Dg=e=>Rt(e)?El(e):e;class ew{constructor(t,n,r,i){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new zg(()=>t(this._value),()=>fl(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=wt(this);return(!t._cacheable||t.effect.dirty)&&Hn(t._value,t._value=t.effect.run())&&fl(t,4),Hg(t),t.effect._dirtyLevel>=2&&fl(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function LS(e,t,n=!1){let r,i;const o=it(e);return o?(r=e,i=sr):(r=e.get,i=e.set),new ew(r,i,o||!i,n)}function Hg(e){var t;Li&&Fo&&(e=wt(e),Wx(Fo,(t=e.dep)!=null?t:e.dep=qx(()=>e.dep=void 0,e instanceof ew?e:void 0)))}function fl(e,t=4,n,r){e=wt(e);const i=e.dep;i&&Vx(i,t)}function wn(e){return!!(e&&e.__v_isRef===!0)}function ne(e){return tw(e,!1)}function DS(e){return tw(e,!0)}function tw(e,t){return wn(e)?e:new HS(e,t)}class HS{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:wt(t),this._value=n?t:Al(t)}get value(){return Hg(this),this._value}set value(t){const n=this.__v_isShallow||Ka(t)||jo(t);t=n?t:wt(t),Hn(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Al(t),fl(this,4))}}function qe(e){return wn(e)?e.value:e}const US={get:(e,t,n)=>qe(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return wn(i)&&!wn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function nw(e){return cl(e)?e:new Proxy(e,US)}class jS{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Hg(this),()=>fl(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function WS(e){return new jS(e)}class VS{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return mS(wt(this._object),this._key)}}class qS{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function et(e,t,n){return wn(e)?e:it(e)?new qS(e):Rt(e)&&arguments.length>1?YS(e,t,n):ne(e)}function YS(e,t,n){const r=e[t];return wn(r)?r:new VS(e,t,n)}/**
|
|
9
|
+
**/let vr;class gS{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=vr,!t&&vr&&(this.index=(vr.scopes||(vr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=vr;try{return vr=this,t()}finally{vr=n}}}on(){vr=this}off(){vr=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function vS(e,t=vr){t&&t.active&&t.effects.push(e)}function bS(){return vr}let Fo;class zg{constructor(t,n,r,i){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,vS(this,i)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,ao();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(mS(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),so()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Li,n=Fo;try{return Li=!0,Fo=this,this._runnings++,im(this),this.fn()}finally{om(this),this._runnings--,Fo=n,Li=t}}stop(){this.active&&(im(this),om(this),this.onStop&&this.onStop(),this.active=!1)}}function mS(e){return e.value}function im(e){e._trackId++,e._depsLength=0}function om(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)jx(e.deps[t],e);e.deps.length=e._depsLength}}function jx(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Li=!0,Gp=0;const Wx=[];function ao(){Wx.push(Li),Li=!1}function so(){const e=Wx.pop();Li=e===void 0?!0:e}function Ig(){Gp++}function Fg(){for(Gp--;!Gp&&Xp.length;)Xp.shift()()}function Vx(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&jx(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Xp=[];function qx(e,t,n){Ig();for(const r of e.keys()){let i;r._dirtyLevel<t&&(i??(i=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(i??(i=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Xp.push(r.scheduler)))}Fg()}const Yx=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},qc=new WeakMap,Bo=Symbol(""),Kp=Symbol("");function Wn(e,t,n){if(Li&&Fo){let r=qc.get(e);r||qc.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=Yx(()=>r.delete(n))),Vx(Fo,i)}}function fi(e,t,n,r,i,o){const a=qc.get(e);if(!a)return;let s=[];if(t==="clear")s=[...a.values()];else if(n==="length"&&tt(e)){const l=Number(r);a.forEach((u,c)=>{(c==="length"||!io(c)&&c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),t){case"add":tt(e)?Pg(n)&&s.push(a.get("length")):(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Kp)));break;case"delete":tt(e)||(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Kp)));break;case"set":Na(e)&&s.push(a.get(Bo));break}Ig();for(const l of s)l&&qx(l,4);Fg()}function yS(e,t){const n=qc.get(e);return n&&n.get(t)}const _S=Tg("__proto__,__v_isRef,__isVue"),Gx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(io)),am=xS();function xS(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=wt(this);for(let o=0,a=this.length;o<a;o++)Wn(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(wt)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ao(),Ig();const r=wt(this)[t].apply(this,n);return Fg(),so(),r}}),e}function wS(e){io(e)||(e=String(e));const t=wt(this);return Wn(t,"has",e),t.hasOwnProperty(e)}class Xx{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(i?o?FS:Qx:o?Jx:Zx).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=tt(t);if(!i){if(a&&_t(am,n))return Reflect.get(am,n,r);if(n==="hasOwnProperty")return wS}const s=Reflect.get(t,n,r);return(io(n)?Gx.has(n):_S(n))||(i||Wn(t,"get",n),o)?s:wn(s)?a&&Pg(n)?s:s.value:Rt(s)?i?El(s):Ng(s):s}}class Kx extends Xx{constructor(t=!1){super(!1,t)}set(t,n,r,i){let o=t[n];if(!this._isShallow){const l=jo(o);if(!Ka(r)&&!jo(r)&&(o=wt(o),r=wt(r)),!tt(t)&&wn(o)&&!wn(r))return l?!1:(o.value=r,!0)}const a=tt(t)&&Pg(n)?Number(n)<t.length:_t(t,n),s=Reflect.set(t,n,r,i);return t===wt(i)&&(a?Hn(r,o)&&fi(t,"set",n,r):fi(t,"add",n,r)),s}deleteProperty(t,n){const r=_t(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&r&&fi(t,"delete",n,void 0),i}has(t,n){const r=Reflect.has(t,n);return(!io(n)||!Gx.has(n))&&Wn(t,"has",n),r}ownKeys(t){return Wn(t,"iterate",tt(t)?"length":Bo),Reflect.ownKeys(t)}}class CS extends Xx{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const SS=new Kx,$S=new CS,kS=new Kx(!0);const Bg=e=>e,cd=e=>Reflect.getPrototypeOf(e);function Ou(e,t,n=!1,r=!1){e=e.__v_raw;const i=wt(e),o=wt(t);n||(Hn(t,o)&&Wn(i,"get",t),Wn(i,"get",o));const{has:a}=cd(i),s=r?Bg:n?Dg:Al;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Nu(e,t=!1){const n=this.__v_raw,r=wt(n),i=wt(e);return t||(Hn(e,i)&&Wn(r,"has",e),Wn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Lu(e,t=!1){return e=e.__v_raw,!t&&Wn(wt(e),"iterate",Bo),Reflect.get(e,"size",e)}function sm(e,t=!1){!t&&!Ka(e)&&!jo(e)&&(e=wt(e));const n=wt(this);return cd(n).has.call(n,e)||(n.add(e),fi(n,"add",e,e)),this}function lm(e,t,n=!1){!n&&!Ka(t)&&!jo(t)&&(t=wt(t));const r=wt(this),{has:i,get:o}=cd(r);let a=i.call(r,e);a||(e=wt(e),a=i.call(r,e));const s=o.call(r,e);return r.set(e,t),a?Hn(t,s)&&fi(r,"set",e,t):fi(r,"add",e,t),this}function um(e){const t=wt(this),{has:n,get:r}=cd(t);let i=n.call(t,e);i||(e=wt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&fi(t,"delete",e,void 0),o}function cm(){const e=wt(this),t=e.size!==0,n=e.clear();return t&&fi(e,"clear",void 0,void 0),n}function Du(e,t){return function(r,i){const o=this,a=o.__v_raw,s=wt(a),l=t?Bg:e?Dg:Al;return!e&&Wn(s,"iterate",Bo),a.forEach((u,c)=>r.call(i,l(u),l(c),o))}}function Hu(e,t,n){return function(...r){const i=this.__v_raw,o=wt(i),a=Na(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...r),c=n?Bg:t?Dg:Al;return!t&&Wn(o,"iterate",l?Kp:Bo),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:s?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Si(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function MS(){const e={get(o){return Ou(this,o)},get size(){return Lu(this)},has:Nu,add:sm,set:lm,delete:um,clear:cm,forEach:Du(!1,!1)},t={get(o){return Ou(this,o,!1,!0)},get size(){return Lu(this)},has:Nu,add(o){return sm.call(this,o,!0)},set(o,a){return lm.call(this,o,a,!0)},delete:um,clear:cm,forEach:Du(!1,!0)},n={get(o){return Ou(this,o,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Si("add"),set:Si("set"),delete:Si("delete"),clear:Si("clear"),forEach:Du(!0,!1)},r={get(o){return Ou(this,o,!0,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Si("add"),set:Si("set"),delete:Si("delete"),clear:Si("clear"),forEach:Du(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Hu(o,!1,!1),n[o]=Hu(o,!0,!1),t[o]=Hu(o,!1,!0),r[o]=Hu(o,!0,!0)}),[e,n,t,r]}const[TS,ES,AS,PS]=MS();function Og(e,t){const n=t?e?PS:AS:e?ES:TS;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_t(n,i)&&i in r?n:r,i,o)}const RS={get:Og(!1,!1)},zS={get:Og(!1,!0)},IS={get:Og(!0,!1)};const Zx=new WeakMap,Jx=new WeakMap,Qx=new WeakMap,FS=new WeakMap;function BS(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function OS(e){return e.__v_skip||!Object.isExtensible(e)?0:BS(iS(e))}function Ng(e){return jo(e)?e:Lg(e,!1,SS,RS,Zx)}function NS(e){return Lg(e,!1,kS,zS,Jx)}function El(e){return Lg(e,!0,$S,IS,Qx)}function Lg(e,t,n,r,i){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const a=OS(e);if(a===0)return e;const s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function cl(e){return jo(e)?cl(e.__v_raw):!!(e&&e.__v_isReactive)}function jo(e){return!!(e&&e.__v_isReadonly)}function Ka(e){return!!(e&&e.__v_isShallow)}function ew(e){return e?!!e.__v_raw:!1}function wt(e){const t=e&&e.__v_raw;return t?wt(t):e}function LS(e){return Object.isExtensible(e)&&Nx(e,"__v_skip",!0),e}const Al=e=>Rt(e)?Ng(e):e,Dg=e=>Rt(e)?El(e):e;class tw{constructor(t,n,r,i){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new zg(()=>t(this._value),()=>fl(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=wt(this);return(!t._cacheable||t.effect.dirty)&&Hn(t._value,t._value=t.effect.run())&&fl(t,4),Hg(t),t.effect._dirtyLevel>=2&&fl(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function DS(e,t,n=!1){let r,i;const o=it(e);return o?(r=e,i=sr):(r=e.get,i=e.set),new tw(r,i,o||!i,n)}function Hg(e){var t;Li&&Fo&&(e=wt(e),Vx(Fo,(t=e.dep)!=null?t:e.dep=Yx(()=>e.dep=void 0,e instanceof tw?e:void 0)))}function fl(e,t=4,n,r){e=wt(e);const i=e.dep;i&&qx(i,t)}function wn(e){return!!(e&&e.__v_isRef===!0)}function ne(e){return nw(e,!1)}function HS(e){return nw(e,!0)}function nw(e,t){return wn(e)?e:new US(e,t)}class US{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:wt(t),this._value=n?t:Al(t)}get value(){return Hg(this),this._value}set value(t){const n=this.__v_isShallow||Ka(t)||jo(t);t=n?t:wt(t),Hn(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Al(t),fl(this,4))}}function qe(e){return wn(e)?e.value:e}const jS={get:(e,t,n)=>qe(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return wn(i)&&!wn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function rw(e){return cl(e)?e:new Proxy(e,jS)}class WS{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Hg(this),()=>fl(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function VS(e){return new WS(e)}class qS{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return yS(wt(this._object),this._key)}}class YS{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function et(e,t,n){return wn(e)?e:it(e)?new YS(e):Rt(e)&&arguments.length>1?GS(e,t,n):ne(e)}function GS(e,t,n){const r=e[t];return wn(r)?r:new qS(e,t,n)}/**
|
|
10
10
|
* @vue/runtime-core v3.4.38
|
|
11
11
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
12
|
* @license MIT
|
|
13
|
-
**/function Di(e,t,n,r){try{return r?e(...r):e()}catch(i){fd(i,t,n)}}function fr(e,t,n,r){if(it(e)){const i=Di(e,t,n,r);return i&&zx(i)&&i.catch(o=>{fd(o,t,n)}),i}if(tt(e)){const i=[];for(let o=0;o<e.length;o++)i.push(fr(e[o],t,n,r));return i}}function fd(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const a=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const u=o.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,a,s)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){ao(),Di(l,null,10,[e,a,s]),so();return}}GS(e,n,i,r)}function GS(e,t,n,r=!0){console.error(e)}let Pl=!1,Zp=!1;const yn=[];let Ir=0;const La=[];let Ti=null,Eo=0;const rw=Promise.resolve();let Ug=null;function fn(e){const t=Ug||rw;return e?t.then(this?e.bind(this):e):t}function XS(e){let t=Ir+1,n=yn.length;for(;t<n;){const r=t+n>>>1,i=yn[r],o=Rl(i);o<e||o===e&&i.pre?t=r+1:n=r}return t}function jg(e){(!yn.length||!yn.includes(e,Pl&&e.allowRecurse?Ir+1:Ir))&&(e.id==null?yn.push(e):yn.splice(XS(e.id),0,e),iw())}function iw(){!Pl&&!Zp&&(Zp=!0,Ug=rw.then(aw))}function KS(e){const t=yn.indexOf(e);t>Ir&&yn.splice(t,1)}function ZS(e){tt(e)?La.push(...e):(!Ti||!Ti.includes(e,e.allowRecurse?Eo+1:Eo))&&La.push(e),iw()}function fm(e,t,n=Pl?Ir+1:0){for(;n<yn.length;n++){const r=yn[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;yn.splice(n,1),n--,r()}}}function ow(e){if(La.length){const t=[...new Set(La)].sort((n,r)=>Rl(n)-Rl(r));if(La.length=0,Ti){Ti.push(...t);return}for(Ti=t,Eo=0;Eo<Ti.length;Eo++){const n=Ti[Eo];n.active!==!1&&n()}Ti=null,Eo=0}}const Rl=e=>e.id==null?1/0:e.id,JS=(e,t)=>{const n=Rl(e)-Rl(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function aw(e){Zp=!1,Pl=!0,yn.sort(JS);try{for(Ir=0;Ir<yn.length;Ir++){const t=yn[Ir];t&&t.active!==!1&&Di(t,t.i,t.i?15:14)}}finally{Ir=0,yn.length=0,ow(),Pl=!1,Ug=null,(yn.length||La.length)&&aw()}}let ln=null,sw=null;function Yc(e){const t=ln;return ln=e,sw=e&&e.type.__scopeId||null,t}function mt(e,t=ln,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&wm(-1);const o=Yc(t);let a;try{a=e(...i)}finally{Yc(o),r._d&&wm(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function lo(e,t){if(ln===null)return e;const n=md(ln),r=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,s,l=Mt]=t[i];o&&(it(o)&&(o={mounted:o,updated:o}),o.deep&&Fi(a),r.push({dir:o,instance:n,value:a,oldValue:void 0,arg:s,modifiers:l}))}return e}function mo(e,t,n,r){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[r];l&&(ao(),fr(l,n,8,[e.el,s,e,t]),so())}}const Ei=Symbol("_leaveCb"),Uu=Symbol("_enterCb");function lw(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return dn(()=>{e.isMounted=!0}),Bn(()=>{e.isUnmounting=!0}),e}const Qn=[Function,Array],uw={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qn,onEnter:Qn,onAfterEnter:Qn,onEnterCancelled:Qn,onBeforeLeave:Qn,onLeave:Qn,onAfterLeave:Qn,onLeaveCancelled:Qn,onBeforeAppear:Qn,onAppear:Qn,onAfterAppear:Qn,onAppearCancelled:Qn},cw=e=>{const t=e.subTree;return t.component?cw(t.component):t},QS={name:"BaseTransition",props:uw,setup(e,{slots:t}){const n=ps(),r=lw();return()=>{const i=t.default&&Wg(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const f of i)if(f.type!==sn){o=f;break}}const a=wt(e),{mode:s}=a;if(r.isLeaving)return xh(o);const l=dm(o);if(!l)return xh(o);let u=zl(l,a,r,n,f=>u=f);Za(l,u);const c=n.subTree,d=c&&dm(c);if(d&&d.type!==sn&&!Ao(l,d)&&cw(n).type!==sn){const f=zl(d,a,r,n);if(Za(d,f),s==="out-in"&&l.type!==sn)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},xh(o);s==="in-out"&&l.type!==sn&&(f.delayLeave=(h,p,g)=>{const b=fw(r,d);b[String(d.key)]=d,h[Ei]=()=>{p(),h[Ei]=void 0,delete u.delayedLeave},u.delayedLeave=g})}return o}}},e$=QS;function fw(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function zl(e,t,n,r,i){const{appear:o,mode:a,persisted:s=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:b,onAppear:v,onAfterAppear:x,onAppearCancelled:y}=t,_=String(e.key),S=fw(n,e),$=(M,P)=>{M&&fr(M,r,9,P)},w=(M,P)=>{const R=P[1];$(M,P),tt(M)?M.every(C=>C.length<=1)&&R():M.length<=1&&R()},T={mode:a,persisted:s,beforeEnter(M){let P=l;if(!n.isMounted)if(o)P=b||l;else return;M[Ei]&&M[Ei](!0);const R=S[_];R&&Ao(e,R)&&R.el[Ei]&&R.el[Ei](),$(P,[M])},enter(M){let P=u,R=c,C=d;if(!n.isMounted)if(o)P=v||u,R=x||c,C=y||d;else return;let E=!1;const I=M[Uu]=z=>{E||(E=!0,z?$(C,[M]):$(R,[M]),T.delayedLeave&&T.delayedLeave(),M[Uu]=void 0)};P?w(P,[M,I]):I()},leave(M,P){const R=String(e.key);if(M[Uu]&&M[Uu](!0),n.isUnmounting)return P();$(f,[M]);let C=!1;const E=M[Ei]=I=>{C||(C=!0,P(),I?$(g,[M]):$(p,[M]),M[Ei]=void 0,S[R]===e&&delete S[R])};S[R]=e,h?w(h,[M,E]):E()},clone(M){const P=zl(M,t,n,r,i);return i&&i(P),P}};return T}function xh(e){if(dd(e))return e=Vr(e),e.children=null,e}function dm(e){if(!dd(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&it(n.default))return n.default()}}function Za(e,t){e.shapeFlag&6&&e.component?Za(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Wg(e,t=!1,n){let r=[],i=0;for(let o=0;o<e.length;o++){let a=e[o];const s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===Tt?(a.patchFlag&128&&i++,r=r.concat(Wg(a.children,t,s))):(t||a.type!==sn)&&r.push(s!=null?Vr(a,{key:s}):a)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Ie(e,t){return it(e)?nn({name:e.name},t,{setup:e}):e}const dl=e=>!!e.type.__asyncLoader,dd=e=>e.type.__isKeepAlive;function Vg(e,t){dw(e,"a",t)}function qg(e,t){dw(e,"da",t)}function dw(e,t,n=_n){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(hd(t,r,n),n){let i=n.parent;for(;i&&i.parent;)dd(i.parent.vnode)&&t$(r,t,n,i),i=i.parent}}function t$(e,t,n,r){const i=hd(t,e,r,!0);gw(()=>{Ag(r[t],i)},n)}function hd(e,t,n=_n,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{ao();const s=vu(n),l=fr(t,n,e,a);return s(),so(),l});return r?i.unshift(o):i.push(o),o}}const mi=e=>(t,n=_n)=>{(!bd||e==="sp")&&hd(e,(...r)=>t(...r),n)},pd=mi("bm"),dn=mi("m"),hw=mi("bu"),pw=mi("u"),Bn=mi("bum"),gw=mi("um"),n$=mi("sp"),r$=mi("rtg"),i$=mi("rtc");function o$(e,t=_n){hd("ec",e,t)}const a$=Symbol.for("v-ndc");function vw(e,t,n,r){let i;const o=n;if(tt(e)||Yt(e)){i=new Array(e.length);for(let a=0,s=e.length;a<s;a++)i[a]=t(e[a],a,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=t(a+1,a,void 0,o)}else if(Rt(e))if(e[Symbol.iterator])i=Array.from(e,(a,s)=>t(a,s,void 0,o));else{const a=Object.keys(e);i=new Array(a.length);for(let s=0,l=a.length;s<l;s++){const u=a[s];i[s]=t(e[u],u,s,o)}}else i=[];return i}function Yg(e,t,n={},r,i){if(ln.isCE||ln.parent&&dl(ln.parent)&&ln.parent.isCE)return Ye("slot",n,r);let o=e[t];o&&o._c&&(o._d=!1),We();const a=o&&bw(o(n)),s=Ft(Tt,{key:(n.key||a&&a.key||`_${t}`)+""},a||[],a&&e._===1?64:-2);return s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function bw(e){return e.some(t=>Fl(t)?!(t.type===sn||t.type===Tt&&!bw(t.children)):!0)?e:null}const Jp=e=>e?Lw(e)?md(e):Jp(e.parent):null,hl=nn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Jp(e.parent),$root:e=>Jp(e.root),$emit:e=>e.emit,$options:e=>yw(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,jg(e.update)}),$nextTick:e=>e.n||(e.n=fn.bind(e.proxy)),$watch:e=>R$.bind(e)}),wh=(e,t)=>e!==Mt&&!e.__isScriptSetup&&_t(e,t),s$={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const h=a[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(wh(r,t))return a[t]=1,r[t];if(i!==Mt&&_t(i,t))return a[t]=2,i[t];if((u=e.propsOptions[0])&&_t(u,t))return a[t]=3,o[t];if(n!==Mt&&_t(n,t))return a[t]=4,n[t];Qp&&(a[t]=0)}}const c=hl[t];let d,f;if(c)return t==="$attrs"&&Wn(e.attrs,"get",""),c(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==Mt&&_t(n,t))return a[t]=4,n[t];if(f=l.config.globalProperties,_t(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return wh(i,t)?(i[t]=n,!0):r!==Mt&&_t(r,t)?(r[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||e!==Mt&&_t(e,a)||wh(t,a)||(s=o[0])&&_t(s,a)||_t(r,a)||_t(hl,a)||_t(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Gc(e){return tt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Xc(e,t){return!e||!t?e||t:tt(e)&&tt(t)?e.concat(t):nn({},Gc(e),Gc(t))}let Qp=!0;function l$(e){const t=yw(e),n=e.proxy,r=e.ctx;Qp=!1,t.beforeCreate&&hm(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:g,deactivated:b,beforeDestroy:v,beforeUnmount:x,destroyed:y,unmounted:_,render:S,renderTracked:$,renderTriggered:w,errorCaptured:T,serverPrefetch:M,expose:P,inheritAttrs:R,components:C,directives:E,filters:I}=t;if(u&&u$(u,r,null),a)for(const Z in a){const J=a[Z];it(J)&&(r[Z]=J.bind(n))}if(i){const Z=i.call(n,n);Rt(Z)&&(e.data=Ng(Z))}if(Qp=!0,o)for(const Z in o){const J=o[Z],ie=it(J)?J.bind(n,n):it(J.get)?J.get.bind(n,n):sr,he=!it(J)&&it(J.set)?J.set.bind(n):sr,_e=pe({get:ie,set:he});Object.defineProperty(r,Z,{enumerable:!0,configurable:!0,get:()=>_e.value,set:oe=>_e.value=oe})}if(s)for(const Z in s)mw(s[Z],r,n,Z);if(l){const Z=it(l)?l.call(n):l;Reflect.ownKeys(Z).forEach(J=>{jn(J,Z[J])})}c&&hm(c,e,"c");function j(Z,J){tt(J)?J.forEach(ie=>Z(ie.bind(n))):J&&Z(J.bind(n))}if(j(pd,d),j(dn,f),j(hw,h),j(pw,p),j(Vg,g),j(qg,b),j(o$,T),j(i$,$),j(r$,w),j(Bn,x),j(gw,_),j(n$,M),tt(P))if(P.length){const Z=e.exposed||(e.exposed={});P.forEach(J=>{Object.defineProperty(Z,J,{get:()=>n[J],set:ie=>n[J]=ie})})}else e.exposed||(e.exposed={});S&&e.render===sr&&(e.render=S),R!=null&&(e.inheritAttrs=R),C&&(e.components=C),E&&(e.directives=E)}function u$(e,t,n=sr){tt(e)&&(e=e0(e));for(const r in e){const i=e[r];let o;Rt(i)?"default"in i?o=$t(i.from||r,i.default,!0):o=$t(i.from||r):o=$t(i),wn(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[r]=o}}function hm(e,t,n){fr(tt(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function mw(e,t,n,r){const i=r.includes(".")?Iw(n,r):()=>n[r];if(Yt(e)){const o=t[e];it(o)&&vt(i,o)}else if(it(e))vt(i,e.bind(n));else if(Rt(e))if(tt(e))e.forEach(o=>mw(o,t,n,r));else{const o=it(e.handler)?e.handler.bind(n):t[e.handler];it(o)&&vt(i,o,e)}}function yw(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(t);let l;return s?l=s:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(u=>Kc(l,u,a,!0)),Kc(l,t,a)),Rt(t)&&o.set(t,l),l}function Kc(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&Kc(e,o,n,!0),i&&i.forEach(a=>Kc(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const s=c$[a]||n&&n[a];e[a]=s?s(e[a],t[a]):t[a]}return e}const c$={data:pm,props:gm,emits:gm,methods:Vs,computed:Vs,beforeCreate:$n,created:$n,beforeMount:$n,mounted:$n,beforeUpdate:$n,updated:$n,beforeDestroy:$n,beforeUnmount:$n,destroyed:$n,unmounted:$n,activated:$n,deactivated:$n,errorCaptured:$n,serverPrefetch:$n,components:Vs,directives:Vs,watch:d$,provide:pm,inject:f$};function pm(e,t){return t?e?function(){return nn(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function f$(e,t){return Vs(e0(e),e0(t))}function e0(e){if(tt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function $n(e,t){return e?[...new Set([].concat(e,t))]:t}function Vs(e,t){return e?nn(Object.create(null),e,t):t}function gm(e,t){return e?tt(e)&&tt(t)?[...new Set([...e,...t])]:nn(Object.create(null),Gc(e),Gc(t??{})):t}function d$(e,t){if(!e)return t;if(!t)return e;const n=nn(Object.create(null),e);for(const r in t)n[r]=$n(e[r],t[r]);return n}function _w(){return{app:null,config:{isNativeTag:tS,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let h$=0;function p$(e,t){return function(r,i=null){it(r)||(r=nn({},r)),i!=null&&!Rt(i)&&(i=null);const o=_w(),a=new WeakSet;let s=!1;const l=o.app={_uid:h$++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:Z$,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&it(u.install)?(a.add(u),u.install(l,...c)):it(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,d){if(!s){const f=Ye(r,i);return f.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),e(f,u,d),s=!0,l._container=u,u.__vue_app__=l,md(f.component)}},unmount(){s&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l},runWithContext(u){const c=Da;Da=l;try{return u()}finally{Da=c}}};return l}}let Da=null;function jn(e,t){if(_n){let n=_n.provides;const r=_n.parent&&_n.parent.provides;r===n&&(n=_n.provides=Object.create(r)),n[e]=t}}function $t(e,t,n=!1){const r=_n||ln;if(r||Da){const i=Da?Da._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&it(t)?t.call(r&&r.proxy):t}}const xw={},ww=()=>Object.create(xw),Cw=e=>Object.getPrototypeOf(e)===xw;function g$(e,t,n,r=!1){const i={},o=ww();e.propsDefaults=Object.create(null),Sw(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:OS(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function v$(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,s=wt(i),[l]=e.propsOptions;let u=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(vd(e.emitsOptions,f))continue;const h=t[f];if(l)if(_t(o,f))h!==o[f]&&(o[f]=h,u=!0);else{const p=Yi(f);i[p]=t0(l,s,p,h,e,!1)}else h!==o[f]&&(o[f]=h,u=!0)}}}else{Sw(e,t,i,o)&&(u=!0);let c;for(const d in s)(!t||!_t(t,d)&&((c=oo(d))===d||!_t(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=t0(l,s,d,void 0,e,!0)):delete i[d]);if(o!==s)for(const d in o)(!t||!_t(t,d))&&(delete o[d],u=!0)}u&&ci(e.attrs,"set","")}function Sw(e,t,n,r){const[i,o]=e.propsOptions;let a=!1,s;if(t)for(let l in t){if(ul(l))continue;const u=t[l];let c;i&&_t(i,c=Yi(l))?!o||!o.includes(c)?n[c]=u:(s||(s={}))[c]=u:vd(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,a=!0)}if(o){const l=wt(n),u=s||Mt;for(let c=0;c<o.length;c++){const d=o[c];n[d]=t0(i,l,d,u[d],e,!_t(u,d))}}return a}function t0(e,t,n,r,i,o){const a=e[n];if(a!=null){const s=_t(a,"default");if(s&&r===void 0){const l=a.default;if(a.type!==Function&&!a.skipFactory&&it(l)){const{propsDefaults:u}=i;if(n in u)r=u[n];else{const c=vu(i);r=u[n]=l.call(null,t),c()}}else r=l}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===oo(n))&&(r=!0))}return r}const b$=new WeakMap;function $w(e,t,n=!1){const r=n?b$:t.propsCache,i=r.get(e);if(i)return i;const o=e.props,a={},s=[];let l=!1;if(!it(e)){const c=d=>{l=!0;const[f,h]=$w(d,t,!0);nn(a,f),h&&s.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!l)return Rt(e)&&r.set(e,Oa),Oa;if(tt(o))for(let c=0;c<o.length;c++){const d=Yi(o[c]);vm(d)&&(a[d]=Mt)}else if(o)for(const c in o){const d=Yi(c);if(vm(d)){const f=o[c],h=a[d]=tt(f)||it(f)?{type:f}:nn({},f),p=h.type;let g=!1,b=!0;if(tt(p))for(let v=0;v<p.length;++v){const x=p[v],y=it(x)&&x.name;if(y==="Boolean"){g=!0;break}else y==="String"&&(b=!1)}else g=it(p)&&p.name==="Boolean";h[0]=g,h[1]=b,(g||_t(h,"default"))&&s.push(d)}}const u=[a,s];return Rt(e)&&r.set(e,u),u}function vm(e){return e[0]!=="$"&&!ul(e)}const kw=e=>e[0]==="_"||e==="$stable",Gg=e=>tt(e)?e.map(zr):[zr(e)],m$=(e,t,n)=>{if(t._n)return t;const r=mt((...i)=>Gg(t(...i)),n);return r._c=!1,r},Mw=(e,t,n)=>{const r=e._ctx;for(const i in e){if(kw(i))continue;const o=e[i];if(it(o))t[i]=m$(i,o,r);else if(o!=null){const a=Gg(o);t[i]=()=>a}}},Tw=(e,t)=>{const n=Gg(t);e.slots.default=()=>n},Ew=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},y$=(e,t,n)=>{const r=e.slots=ww();if(e.vnode.shapeFlag&32){const i=t._;i?(Ew(r,t,n),n&&Ox(r,"_",i,!0)):Mw(t,r)}else t&&Tw(e,t)},_$=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,a=Mt;if(r.shapeFlag&32){const s=t._;s?n&&s===1?o=!1:Ew(i,t,n):(o=!t.$stable,Mw(t,i)),a=t}else t&&(Tw(e,t),a={default:1});if(o)for(const s in i)!kw(s)&&a[s]==null&&delete i[s]};function n0(e,t,n,r,i=!1){if(tt(e)){e.forEach((f,h)=>n0(f,t&&(tt(t)?t[h]:t),n,r,i));return}if(dl(r)&&!i)return;const o=r.shapeFlag&4?md(r.component):r.el,a=i?null:o,{i:s,r:l}=e,u=t&&t.r,c=s.refs===Mt?s.refs={}:s.refs,d=s.setupState;if(u!=null&&u!==l&&(Yt(u)?(c[u]=null,_t(d,u)&&(d[u]=null)):wn(u)&&(u.value=null)),it(l))Di(l,s,12,[a,c]);else{const f=Yt(l),h=wn(l);if(f||h){const p=()=>{if(e.f){const g=f?_t(d,l)?d[l]:c[l]:l.value;i?tt(g)&&Ag(g,o):tt(g)?g.includes(o)||g.push(o):f?(c[l]=[o],_t(d,l)&&(d[l]=c[l])):(l.value=[o],e.k&&(c[e.k]=l.value))}else f?(c[l]=a,_t(d,l)&&(d[l]=a)):h&&(l.value=a,e.k&&(c[e.k]=a))};a?(p.id=-1,Ln(p,n)):p()}}}const Aw=Symbol("_vte"),x$=e=>e.__isTeleport,pl=e=>e&&(e.disabled||e.disabled===""),bm=e=>typeof SVGElement<"u"&&e instanceof SVGElement,mm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,r0=(e,t)=>{const n=e&&e.to;return Yt(n)?t?t(n):null:n},w$={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,o,a,s,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:g,createComment:b}}=u,v=pl(t.props);let{shapeFlag:x,children:y,dynamicChildren:_}=t;if(e==null){const S=t.el=g(""),$=t.anchor=g("");h(S,n,r),h($,n,r);const w=t.target=r0(t.props,p),T=Rw(w,t,g,h);w&&(a==="svg"||bm(w)?a="svg":(a==="mathml"||mm(w))&&(a="mathml"));const M=(P,R)=>{x&16&&c(y,P,R,i,o,a,s,l)};v?M(n,$):w&&M(w,T)}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,$=t.target=e.target,w=t.targetAnchor=e.targetAnchor,T=pl(e.props),M=T?n:$,P=T?S:w;if(a==="svg"||bm($)?a="svg":(a==="mathml"||mm($))&&(a="mathml"),_?(f(e.dynamicChildren,_,M,i,o,a,s),Xg(e,t,!0)):l||d(e,t,M,P,i,o,a,s,!1),v)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ju(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=r0(t.props,p);R&&ju(t,R,null,u,0)}else T&&ju(t,$,w,u,1)}Pw(t)},remove(e,t,n,{um:r,o:{remove:i}},o){const{shapeFlag:a,children:s,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(i(u),i(c)),o&&i(l),a&16){const h=o||!pl(f);for(let p=0;p<s.length;p++){const g=s[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:ju,hydrate:C$};function ju(e,t,n,{o:{insert:r},m:i},o=2){o===0&&r(e.targetAnchor,t,n);const{el:a,anchor:s,shapeFlag:l,children:u,props:c}=e,d=o===2;if(d&&r(a,t,n),(!d||pl(c))&&l&16)for(let f=0;f<u.length;f++)i(u[f],t,n,2);d&&r(s,t,n)}function C$(e,t,n,r,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l,insert:u,createText:c}},d){const f=t.target=r0(t.props,l);if(f){const h=f._lpa||f.firstChild;if(t.shapeFlag&16)if(pl(t.props))t.anchor=d(a(e),t,s(e),n,r,i,o),t.targetStart=h,t.targetAnchor=h&&a(h);else{t.anchor=a(e);let p=h;for(;p;){if(p&&p.nodeType===8){if(p.data==="teleport start anchor")t.targetStart=p;else if(p.data==="teleport anchor"){t.targetAnchor=p,f._lpa=t.targetAnchor&&a(t.targetAnchor);break}}p=a(p)}t.targetAnchor||Rw(f,t,c,u),d(h&&a(h),t,f,n,r,i,o)}Pw(t)}return t.anchor&&a(t.anchor)}const S$=w$;function Pw(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Rw(e,t,n,r){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[Aw]=o,e&&(r(i,e),r(o,e)),o}const Ln=L$;function $$(e){return k$(e)}function k$(e,t){const n=Nx();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=sr,insertStaticContent:p}=e,g=(A,H,G,de=null,le=null,q=null,N=void 0,re=null,L=!!H.dynamicChildren)=>{if(A===H)return;A&&!Ao(A,H)&&(de=Xe(A),oe(A,le,q,!0),A=null),H.patchFlag===-2&&(L=!1,H.dynamicChildren=null);const{type:O,ref:ee,shapeFlag:U}=H;switch(O){case gu:b(A,H,G,de);break;case sn:v(A,H,G,de);break;case Sh:A==null&&x(H,G,de,N);break;case Tt:C(A,H,G,de,le,q,N,re,L);break;default:U&1?S(A,H,G,de,le,q,N,re,L):U&6?E(A,H,G,de,le,q,N,re,L):(U&64||U&128)&&O.process(A,H,G,de,le,q,N,re,L,Ee)}ee!=null&&le&&n0(ee,A&&A.ref,q,H||A,!H)},b=(A,H,G,de)=>{if(A==null)r(H.el=s(H.children),G,de);else{const le=H.el=A.el;H.children!==A.children&&u(le,H.children)}},v=(A,H,G,de)=>{A==null?r(H.el=l(H.children||""),G,de):H.el=A.el},x=(A,H,G,de)=>{[A.el,A.anchor]=p(A.children,H,G,de,A.el,A.anchor)},y=({el:A,anchor:H},G,de)=>{let le;for(;A&&A!==H;)le=f(A),r(A,G,de),A=le;r(H,G,de)},_=({el:A,anchor:H})=>{let G;for(;A&&A!==H;)G=f(A),i(A),A=G;i(H)},S=(A,H,G,de,le,q,N,re,L)=>{H.type==="svg"?N="svg":H.type==="math"&&(N="mathml"),A==null?$(H,G,de,le,q,N,re,L):M(A,H,le,q,N,re,L)},$=(A,H,G,de,le,q,N,re)=>{let L,O;const{props:ee,shapeFlag:U,transition:B,dirs:V}=A;if(L=A.el=a(A.type,q,ee&&ee.is,ee),U&8?c(L,A.children):U&16&&T(A.children,L,null,de,le,Ch(A,q),N,re),V&&mo(A,null,de,"created"),w(L,A,A.scopeId,N,de),ee){for(const Ae in ee)Ae!=="value"&&!ul(Ae)&&o(L,Ae,null,ee[Ae],q,de);"value"in ee&&o(L,"value",null,ee.value,q),(O=ee.onVnodeBeforeMount)&&Er(O,de,A)}V&&mo(A,null,de,"beforeMount");const me=M$(le,B);me&&B.beforeEnter(L),r(L,H,G),((O=ee&&ee.onVnodeMounted)||me||V)&&Ln(()=>{O&&Er(O,de,A),me&&B.enter(L),V&&mo(A,null,de,"mounted")},le)},w=(A,H,G,de,le)=>{if(G&&h(A,G),de)for(let q=0;q<de.length;q++)h(A,de[q]);if(le){let q=le.subTree;if(H===q){const N=le.vnode;w(A,N,N.scopeId,N.slotScopeIds,le.parent)}}},T=(A,H,G,de,le,q,N,re,L=0)=>{for(let O=L;O<A.length;O++){const ee=A[O]=re?Ai(A[O]):zr(A[O]);g(null,ee,H,G,de,le,q,N,re)}},M=(A,H,G,de,le,q,N)=>{const re=H.el=A.el;let{patchFlag:L,dynamicChildren:O,dirs:ee}=H;L|=A.patchFlag&16;const U=A.props||Mt,B=H.props||Mt;let V;if(G&&yo(G,!1),(V=B.onVnodeBeforeUpdate)&&Er(V,G,H,A),ee&&mo(H,A,G,"beforeUpdate"),G&&yo(G,!0),(U.innerHTML&&B.innerHTML==null||U.textContent&&B.textContent==null)&&c(re,""),O?P(A.dynamicChildren,O,re,G,de,Ch(H,le),q):N||J(A,H,re,null,G,de,Ch(H,le),q,!1),L>0){if(L&16)R(re,U,B,G,le);else if(L&2&&U.class!==B.class&&o(re,"class",null,B.class,le),L&4&&o(re,"style",U.style,B.style,le),L&8){const me=H.dynamicProps;for(let Ae=0;Ae<me.length;Ae++){const Re=me[Ae],rt=U[Re],lt=B[Re];(lt!==rt||Re==="value")&&o(re,Re,rt,lt,le,G)}}L&1&&A.children!==H.children&&c(re,H.children)}else!N&&O==null&&R(re,U,B,G,le);((V=B.onVnodeUpdated)||ee)&&Ln(()=>{V&&Er(V,G,H,A),ee&&mo(H,A,G,"updated")},de)},P=(A,H,G,de,le,q,N)=>{for(let re=0;re<H.length;re++){const L=A[re],O=H[re],ee=L.el&&(L.type===Tt||!Ao(L,O)||L.shapeFlag&70)?d(L.el):G;g(L,O,ee,null,de,le,q,N,!0)}},R=(A,H,G,de,le)=>{if(H!==G){if(H!==Mt)for(const q in H)!ul(q)&&!(q in G)&&o(A,q,H[q],null,le,de);for(const q in G){if(ul(q))continue;const N=G[q],re=H[q];N!==re&&q!=="value"&&o(A,q,re,N,le,de)}"value"in G&&o(A,"value",H.value,G.value,le)}},C=(A,H,G,de,le,q,N,re,L)=>{const O=H.el=A?A.el:s(""),ee=H.anchor=A?A.anchor:s("");let{patchFlag:U,dynamicChildren:B,slotScopeIds:V}=H;V&&(re=re?re.concat(V):V),A==null?(r(O,G,de),r(ee,G,de),T(H.children||[],G,ee,le,q,N,re,L)):U>0&&U&64&&B&&A.dynamicChildren?(P(A.dynamicChildren,B,G,le,q,N,re),(H.key!=null||le&&H===le.subTree)&&Xg(A,H,!0)):J(A,H,G,ee,le,q,N,re,L)},E=(A,H,G,de,le,q,N,re,L)=>{H.slotScopeIds=re,A==null?H.shapeFlag&512?le.ctx.activate(H,G,de,N,L):I(H,G,de,le,q,N,L):z(A,H,L)},I=(A,H,G,de,le,q,N)=>{const re=A.component=V$(A,de,le);if(dd(A)&&(re.ctx.renderer=Ee),q$(re,!1,N),re.asyncDep){if(le&&le.registerDep(re,j,N),!A.el){const L=re.subTree=Ye(sn);v(null,L,H,G)}}else j(re,A,H,G,le,q,N)},z=(A,H,G)=>{const de=H.component=A.component;if(B$(A,H,G))if(de.asyncDep&&!de.asyncResolved){Z(de,H,G);return}else de.next=H,KS(de.update),de.effect.dirty=!0,de.update();else H.el=A.el,de.vnode=H},j=(A,H,G,de,le,q,N)=>{const re=()=>{if(A.isMounted){let{next:ee,bu:U,u:B,parent:V,vnode:me}=A;{const ft=zw(A);if(ft){ee&&(ee.el=me.el,Z(A,ee,N)),ft.asyncDep.then(()=>{A.isUnmounted||re()});return}}let Ae=ee,Re;yo(A,!1),ee?(ee.el=me.el,Z(A,ee,N)):ee=me,U&&yh(U),(Re=ee.props&&ee.props.onVnodeBeforeUpdate)&&Er(Re,V,ee,me),yo(A,!0);const rt=_m(A),lt=A.subTree;A.subTree=rt,g(lt,rt,d(lt.el),Xe(lt),A,le,q),ee.el=rt.el,Ae===null&&O$(A,rt.el),B&&Ln(B,le),(Re=ee.props&&ee.props.onVnodeUpdated)&&Ln(()=>Er(Re,V,ee,me),le)}else{let ee;const{el:U,props:B}=H,{bm:V,m:me,parent:Ae}=A,Re=dl(H);yo(A,!1),V&&yh(V),!Re&&(ee=B&&B.onVnodeBeforeMount)&&Er(ee,Ae,H),yo(A,!0);{const rt=A.subTree=_m(A);g(null,rt,G,de,A,le,q),H.el=rt.el}if(me&&Ln(me,le),!Re&&(ee=B&&B.onVnodeMounted)){const rt=H;Ln(()=>Er(ee,Ae,rt),le)}(H.shapeFlag&256||Ae&&dl(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&A.a&&Ln(A.a,le),A.isMounted=!0,H=G=de=null}},L=A.effect=new zg(re,sr,()=>jg(O),A.scope),O=A.update=()=>{L.dirty&&L.run()};O.i=A,O.id=A.uid,yo(A,!0),O()},Z=(A,H,G)=>{H.component=A;const de=A.vnode.props;A.vnode=H,A.next=null,v$(A,H.props,de,G),_$(A,H.children,G),ao(),fm(A),so()},J=(A,H,G,de,le,q,N,re,L=!1)=>{const O=A&&A.children,ee=A?A.shapeFlag:0,U=H.children,{patchFlag:B,shapeFlag:V}=H;if(B>0){if(B&128){he(O,U,G,de,le,q,N,re,L);return}else if(B&256){ie(O,U,G,de,le,q,N,re,L);return}}V&8?(ee&16&&xe(O,le,q),U!==O&&c(G,U)):ee&16?V&16?he(O,U,G,de,le,q,N,re,L):xe(O,le,q,!0):(ee&8&&c(G,""),V&16&&T(U,G,de,le,q,N,re,L))},ie=(A,H,G,de,le,q,N,re,L)=>{A=A||Oa,H=H||Oa;const O=A.length,ee=H.length,U=Math.min(O,ee);let B;for(B=0;B<U;B++){const V=H[B]=L?Ai(H[B]):zr(H[B]);g(A[B],V,G,null,le,q,N,re,L)}O>ee?xe(A,le,q,!0,!1,U):T(H,G,de,le,q,N,re,L,U)},he=(A,H,G,de,le,q,N,re,L)=>{let O=0;const ee=H.length;let U=A.length-1,B=ee-1;for(;O<=U&&O<=B;){const V=A[O],me=H[O]=L?Ai(H[O]):zr(H[O]);if(Ao(V,me))g(V,me,G,null,le,q,N,re,L);else break;O++}for(;O<=U&&O<=B;){const V=A[U],me=H[B]=L?Ai(H[B]):zr(H[B]);if(Ao(V,me))g(V,me,G,null,le,q,N,re,L);else break;U--,B--}if(O>U){if(O<=B){const V=B+1,me=V<ee?H[V].el:de;for(;O<=B;)g(null,H[O]=L?Ai(H[O]):zr(H[O]),G,me,le,q,N,re,L),O++}}else if(O>B)for(;O<=U;)oe(A[O],le,q,!0),O++;else{const V=O,me=O,Ae=new Map;for(O=me;O<=B;O++){const ye=H[O]=L?Ai(H[O]):zr(H[O]);ye.key!=null&&Ae.set(ye.key,O)}let Re,rt=0;const lt=B-me+1;let ft=!1,zt=0;const yt=new Array(lt);for(O=0;O<lt;O++)yt[O]=0;for(O=V;O<=U;O++){const ye=A[O];if(rt>=lt){oe(ye,le,q,!0);continue}let Y;if(ye.key!=null)Y=Ae.get(ye.key);else for(Re=me;Re<=B;Re++)if(yt[Re-me]===0&&Ao(ye,H[Re])){Y=Re;break}Y===void 0?oe(ye,le,q,!0):(yt[Y-me]=O+1,Y>=zt?zt=Y:ft=!0,g(ye,H[Y],G,null,le,q,N,re,L),rt++)}const Lt=ft?T$(yt):Oa;for(Re=Lt.length-1,O=lt-1;O>=0;O--){const ye=me+O,Y=H[ye],m=ye+1<ee?H[ye+1].el:de;yt[O]===0?g(null,Y,G,m,le,q,N,re,L):ft&&(Re<0||O!==Lt[Re]?_e(Y,G,m,2):Re--)}}},_e=(A,H,G,de,le=null)=>{const{el:q,type:N,transition:re,children:L,shapeFlag:O}=A;if(O&6){_e(A.component.subTree,H,G,de);return}if(O&128){A.suspense.move(H,G,de);return}if(O&64){N.move(A,H,G,Ee);return}if(N===Tt){r(q,H,G);for(let U=0;U<L.length;U++)_e(L[U],H,G,de);r(A.anchor,H,G);return}if(N===Sh){y(A,H,G);return}if(de!==2&&O&1&&re)if(de===0)re.beforeEnter(q),r(q,H,G),Ln(()=>re.enter(q),le);else{const{leave:U,delayLeave:B,afterLeave:V}=re,me=()=>r(q,H,G),Ae=()=>{U(q,()=>{me(),V&&V()})};B?B(q,me,Ae):Ae()}else r(q,H,G)},oe=(A,H,G,de=!1,le=!1)=>{const{type:q,props:N,ref:re,children:L,dynamicChildren:O,shapeFlag:ee,patchFlag:U,dirs:B,cacheIndex:V}=A;if(U===-2&&(le=!1),re!=null&&n0(re,null,G,A,!0),V!=null&&(H.renderCache[V]=void 0),ee&256){H.ctx.deactivate(A);return}const me=ee&1&&B,Ae=!dl(A);let Re;if(Ae&&(Re=N&&N.onVnodeBeforeUnmount)&&Er(Re,H,A),ee&6)Oe(A.component,G,de);else{if(ee&128){A.suspense.unmount(G,de);return}me&&mo(A,null,H,"beforeUnmount"),ee&64?A.type.remove(A,H,G,Ee,de):O&&!O.hasOnce&&(q!==Tt||U>0&&U&64)?xe(O,H,G,!1,!0):(q===Tt&&U&384||!le&&ee&16)&&xe(L,H,G),de&&ve(A)}(Ae&&(Re=N&&N.onVnodeUnmounted)||me)&&Ln(()=>{Re&&Er(Re,H,A),me&&mo(A,null,H,"unmounted")},G)},ve=A=>{const{type:H,el:G,anchor:de,transition:le}=A;if(H===Tt){we(G,de);return}if(H===Sh){_(A);return}const q=()=>{i(G),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(A.shapeFlag&1&&le&&!le.persisted){const{leave:N,delayLeave:re}=le,L=()=>N(G,q);re?re(A.el,q,L):L()}else q()},we=(A,H)=>{let G;for(;A!==H;)G=f(A),i(A),A=G;i(H)},Oe=(A,H,G)=>{const{bum:de,scope:le,update:q,subTree:N,um:re,m:L,a:O}=A;ym(L),ym(O),de&&yh(de),le.stop(),q&&(q.active=!1,oe(N,A,H,G)),re&&Ln(re,H),Ln(()=>{A.isUnmounted=!0},H),H&&H.pendingBranch&&!H.isUnmounted&&A.asyncDep&&!A.asyncResolved&&A.suspenseId===H.pendingId&&(H.deps--,H.deps===0&&H.resolve())},xe=(A,H,G,de=!1,le=!1,q=0)=>{for(let N=q;N<A.length;N++)oe(A[N],H,G,de,le)},Xe=A=>{if(A.shapeFlag&6)return Xe(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const H=f(A.anchor||A.el),G=H&&H[Aw];return G?f(G):H};let Ve=!1;const fe=(A,H,G)=>{A==null?H._vnode&&oe(H._vnode,null,null,!0):g(H._vnode||null,A,H,null,null,null,G),H._vnode=A,Ve||(Ve=!0,fm(),ow(),Ve=!1)},Ee={p:g,um:oe,m:_e,r:ve,mt:I,mc:T,pc:J,pbc:P,n:Xe,o:e};return{render:fe,hydrate:void 0,createApp:p$(fe)}}function Ch({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function yo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function M$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Xg(e,t,n=!1){const r=e.children,i=t.children;if(tt(r)&&tt(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Ai(i[o]),s.el=a.el),!n&&s.patchFlag!==-2&&Xg(a,s)),s.type===gu&&(s.el=a.el)}}function T$(e){const t=e.slice(),n=[0];let r,i,o,a,s;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(i=n[n.length-1],e[i]<u){t[r]=i,n.push(r);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,e[n[s]]<u?o=s+1:a=s;u<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function zw(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zw(t)}function ym(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const E$=Symbol.for("v-scx"),A$=()=>$t(E$);function xr(e,t){return gd(e,null,t)}function P$(e,t){return gd(e,null,{flush:"sync"})}const Wu={};function vt(e,t,n){return gd(e,t,n)}function gd(e,t,{immediate:n,deep:r,flush:i,once:o,onTrack:a,onTrigger:s}=Mt){if(t&&o){const $=t;t=(...w)=>{$(...w),S()}}const l=_n,u=$=>r===!0?$:Fi($,r===!1?1:void 0);let c,d=!1,f=!1;if(wn(e)?(c=()=>e.value,d=Ka(e)):cl(e)?(c=()=>u(e),d=!0):tt(e)?(f=!0,d=e.some($=>cl($)||Ka($)),c=()=>e.map($=>{if(wn($))return $.value;if(cl($))return u($);if(it($))return Di($,l,2)})):it(e)?t?c=()=>Di(e,l,2):c=()=>(h&&h(),fr(e,l,3,[p])):c=sr,t&&r){const $=c;c=()=>Fi($())}let h,p=$=>{h=y.onStop=()=>{Di($,l,4),h=y.onStop=void 0}},g;if(bd)if(p=sr,t?n&&fr(t,l,3,[c(),f?[]:void 0,p]):c(),i==="sync"){const $=A$();g=$.__watcherHandles||($.__watcherHandles=[])}else return sr;let b=f?new Array(e.length).fill(Wu):Wu;const v=()=>{if(!(!y.active||!y.dirty))if(t){const $=y.run();(r||d||(f?$.some((w,T)=>Hn(w,b[T])):Hn($,b)))&&(h&&h(),fr(t,l,3,[$,b===Wu?void 0:f&&b[0]===Wu?[]:b,p]),b=$)}else y.run()};v.allowRecurse=!!t;let x;i==="sync"?x=v:i==="post"?x=()=>Ln(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),x=()=>jg(v));const y=new zg(c,sr,x),_=vS(),S=()=>{y.stop(),_&&Ag(_.effects,y)};return t?n?v():b=y.run():i==="post"?Ln(y.run.bind(y),l&&l.suspense):y.run(),g&&g.push(S),S}function R$(e,t,n){const r=this.proxy,i=Yt(e)?e.includes(".")?Iw(r,e):()=>r[e]:e.bind(r,r);let o;it(t)?o=t:(o=t.handler,n=t);const a=vu(this),s=gd(i,o.bind(r),n);return a(),s}function Iw(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Fi(e,t=1/0,n){if(t<=0||!Rt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,wn(e))Fi(e.value,t,n);else if(tt(e))for(let r=0;r<e.length;r++)Fi(e[r],t,n);else if(Rx(e)||Na(e))e.forEach(r=>{Fi(r,t,n)});else if(Fx(e)){for(const r in e)Fi(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Fi(e[r],t,n)}return e}function Kg(e,t,n=Mt){const r=ps(),i=Yi(t),o=oo(t),a=Fw(e,t),s=WS((l,u)=>{let c,d=Mt,f;return P$(()=>{const h=e[t];Hn(c,h)&&(c=h,u())}),{get(){return l(),n.get?n.get(c):c},set(h){const p=n.set?n.set(h):h;if(!Hn(p,c)&&!(d!==Mt&&Hn(h,d)))return;const g=r.vnode.props;g&&(t in g||i in g||o in g)&&(`onUpdate:${t}`in g||`onUpdate:${i}`in g||`onUpdate:${o}`in g)||(c=h,u()),r.emit(`update:${t}`,p),Hn(h,p)&&Hn(h,d)&&!Hn(p,f)&&u(),d=h,f=p}}});return s[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?a||Mt:s,done:!1}:{done:!0}}}},s}const Fw=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Yi(t)}Modifiers`]||e[`${oo(t)}Modifiers`];function z$(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Mt;let i=n;const o=t.startsWith("update:"),a=o&&Fw(r,t.slice(7));a&&(a.trim&&(i=n.map(c=>Yt(c)?c.trim():c)),a.number&&(i=n.map(aS)));let s,l=r[s=mh(t)]||r[s=mh(Yi(t))];!l&&o&&(l=r[s=mh(oo(t))]),l&&fr(l,e,6,i);const u=r[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,fr(u,e,6,i)}}function Bw(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let a={},s=!1;if(!it(e)){const l=u=>{const c=Bw(u,t,!0);c&&(s=!0,nn(a,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!s?(Rt(e)&&r.set(e,null),null):(tt(o)?o.forEach(l=>a[l]=null):nn(a,o),Rt(e)&&r.set(e,a),a)}function vd(e,t){return!e||!sd(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,oo(t))||_t(e,t))}function _m(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[o],slots:a,attrs:s,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:p,inheritAttrs:g}=e,b=Yc(e);let v,x;try{if(n.shapeFlag&4){const _=i||r,S=_;v=zr(u.call(S,_,c,d,h,f,p)),x=s}else{const _=t;v=zr(_.length>1?_(d,{attrs:s,slots:a,emit:l}):_(d,null)),x=t.props?s:I$(s)}}catch(_){gl.length=0,fd(_,e,1),v=Ye(sn)}let y=v;if(x&&g!==!1){const _=Object.keys(x),{shapeFlag:S}=y;_.length&&S&7&&(o&&_.some(Eg)&&(x=F$(x,o)),y=Vr(y,x,!1,!0))}return n.dirs&&(y=Vr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),v=y,Yc(b),v}const I$=e=>{let t;for(const n in e)(n==="class"||n==="style"||sd(n))&&((t||(t={}))[n]=e[n]);return t},F$=(e,t)=>{const n={};for(const r in e)(!Eg(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function B$(e,t,n){const{props:r,children:i,component:o}=e,{props:a,children:s,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?xm(r,a,u):!!a;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(a[f]!==r[f]&&!vd(u,f))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?xm(r,a,u):!0:!!a;return!1}function xm(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(t[o]!==e[o]&&!vd(n,o))return!0}return!1}function O$({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const N$=e=>e.__isSuspense;function L$(e,t){t&&t.pendingBranch?tt(e)?t.effects.push(...e):t.effects.push(e):ZS(e)}const Tt=Symbol.for("v-fgt"),gu=Symbol.for("v-txt"),sn=Symbol.for("v-cmt"),Sh=Symbol.for("v-stc"),gl=[];let Gn=null;function We(e=!1){gl.push(Gn=e?null:[])}function D$(){gl.pop(),Gn=gl[gl.length-1]||null}let Il=1;function wm(e){Il+=e,e<0&&Gn&&(Gn.hasOnce=!0)}function Ow(e){return e.dynamicChildren=Il>0?Gn||Oa:null,D$(),Il>0&&Gn&&Gn.push(e),e}function xt(e,t,n,r,i,o){return Ow(ot(e,t,n,r,i,o,!0))}function Ft(e,t,n,r,i){return Ow(Ye(e,t,n,r,i,!0))}function Fl(e){return e?e.__v_isVNode===!0:!1}function Ao(e,t){return e.type===t.type&&e.key===t.key}const Nw=({key:e})=>e??null,Tc=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Yt(e)||wn(e)||it(e)?{i:ln,r:e,k:t,f:!!n}:e:null);function ot(e,t=null,n=null,r=0,i=null,o=e===Tt?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Nw(t),ref:t&&Tc(t),scopeId:sw,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ln};return s?(Zg(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Yt(n)?8:16),Il>0&&!a&&Gn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Gn.push(l),l}const Ye=H$;function H$(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===a$)&&(e=sn),Fl(e)){const s=Vr(e,t,!0);return n&&Zg(s,n),Il>0&&!o&&Gn&&(s.shapeFlag&6?Gn[Gn.indexOf(e)]=s:Gn.push(s)),s.patchFlag=-2,s}if(K$(e)&&(e=e.__vccOpts),t){t=U$(t);let{class:s,style:l}=t;s&&!Yt(s)&&(t.class=pu(s)),Rt(l)&&(Qx(l)&&!tt(l)&&(l=nn({},l)),t.style=Rg(l))}const a=Yt(e)?1:N$(e)?128:x$(e)?64:Rt(e)?4:it(e)?2:0;return ot(e,t,n,r,i,a,o,!0)}function U$(e){return e?Qx(e)||Cw(e)?nn({},e):e:null}function Vr(e,t,n=!1,r=!1){const{props:i,ref:o,patchFlag:a,children:s,transition:l}=e,u=t?ia(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Nw(u),ref:t&&t.ref?n&&o?tt(o)?o.concat(Tc(t)):[o,Tc(t)]:Tc(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Tt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vr(e.ssContent),ssFallback:e.ssFallback&&Vr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Za(c,l.clone(c)),c}function Wo(e=" ",t=0){return Ye(gu,null,e,t)}function Xn(e="",t=!1){return t?(We(),Ft(sn,null,e)):Ye(sn,null,e)}function zr(e){return e==null||typeof e=="boolean"?Ye(sn):tt(e)?Ye(Tt,null,e.slice()):typeof e=="object"?Ai(e):Ye(gu,null,String(e))}function Ai(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vr(e)}function Zg(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(tt(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Zg(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Cw(t)?t._ctx=ln:i===3&&ln&&(ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:ln},n=32):(t=String(t),r&64?(n=16,t=[Wo(t)]):n=8);e.children=t,e.shapeFlag|=n}function ia(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=pu([t.class,r.class]));else if(i==="style")t.style=Rg([t.style,r.style]);else if(sd(i)){const o=t[i],a=r[i];a&&o!==a&&!(tt(o)&&o.includes(a))&&(t[i]=o?[].concat(o,a):a)}else i!==""&&(t[i]=r[i])}return t}function Er(e,t,n,r=null){fr(e,t,7,[n,r])}const j$=_w();let W$=0;function V$(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||j$,o={uid:W$++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new pS(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$w(r,i),emitsOptions:Bw(r,i),emit:null,emitted:null,propsDefaults:Mt,inheritAttrs:r.inheritAttrs,ctx:Mt,data:Mt,props:Mt,attrs:Mt,slots:Mt,refs:Mt,setupState:Mt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=z$.bind(null,o),e.ce&&e.ce(o),o}let _n=null;const ps=()=>_n||ln;let Zc,i0;{const e=Nx(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};Zc=t("__VUE_INSTANCE_SETTERS__",n=>_n=n),i0=t("__VUE_SSR_SETTERS__",n=>bd=n)}const vu=e=>{const t=_n;return Zc(e),e.scope.on(),()=>{e.scope.off(),Zc(t)}},Cm=()=>{_n&&_n.scope.off(),Zc(null)};function Lw(e){return e.vnode.shapeFlag&4}let bd=!1;function q$(e,t=!1,n=!1){t&&i0(t);const{props:r,children:i}=e.vnode,o=Lw(e);g$(e,r,o,t),y$(e,i,n);const a=o?Y$(e,t):void 0;return t&&i0(!1),a}function Y$(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,s$);const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?X$(e):null,o=vu(e);ao();const a=Di(r,e,0,[e.props,i]);if(so(),o(),zx(a)){if(a.then(Cm,Cm),t)return a.then(s=>{Sm(e,s)}).catch(s=>{fd(s,e,0)});e.asyncDep=a}else Sm(e,a)}else Dw(e)}function Sm(e,t,n){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=nw(t)),Dw(e)}function Dw(e,t,n){const r=e.type;e.render||(e.render=r.render||sr);{const i=vu(e);ao();try{l$(e)}finally{so(),i()}}}const G$={get(e,t){return Wn(e,"get",""),e[t]}};function X$(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,G$),slots:e.slots,emit:e.emit,expose:t}}function md(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(nw(NS(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hl)return hl[n](e)},has(t,n){return n in t||n in hl}})):e.proxy}function K$(e){return it(e)&&"__vccOpts"in e}const pe=(e,t)=>LS(e,t,bd);function k(e,t,n){const r=arguments.length;return r===2?Rt(t)&&!tt(t)?Fl(t)?Ye(e,null,[t]):Ye(e,t):Ye(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Fl(n)&&(n=[n]),Ye(e,t,n))}const Z$="3.4.38";/**
|
|
13
|
+
**/function Di(e,t,n,r){try{return r?e(...r):e()}catch(i){fd(i,t,n)}}function fr(e,t,n,r){if(it(e)){const i=Di(e,t,n,r);return i&&Ix(i)&&i.catch(o=>{fd(o,t,n)}),i}if(tt(e)){const i=[];for(let o=0;o<e.length;o++)i.push(fr(e[o],t,n,r));return i}}function fd(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const a=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const u=o.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,a,s)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){ao(),Di(l,null,10,[e,a,s]),so();return}}XS(e,n,i,r)}function XS(e,t,n,r=!0){console.error(e)}let Pl=!1,Zp=!1;const yn=[];let Ir=0;const La=[];let Ei=null,Eo=0;const iw=Promise.resolve();let Ug=null;function fn(e){const t=Ug||iw;return e?t.then(this?e.bind(this):e):t}function KS(e){let t=Ir+1,n=yn.length;for(;t<n;){const r=t+n>>>1,i=yn[r],o=Rl(i);o<e||o===e&&i.pre?t=r+1:n=r}return t}function jg(e){(!yn.length||!yn.includes(e,Pl&&e.allowRecurse?Ir+1:Ir))&&(e.id==null?yn.push(e):yn.splice(KS(e.id),0,e),ow())}function ow(){!Pl&&!Zp&&(Zp=!0,Ug=iw.then(sw))}function ZS(e){const t=yn.indexOf(e);t>Ir&&yn.splice(t,1)}function JS(e){tt(e)?La.push(...e):(!Ei||!Ei.includes(e,e.allowRecurse?Eo+1:Eo))&&La.push(e),ow()}function fm(e,t,n=Pl?Ir+1:0){for(;n<yn.length;n++){const r=yn[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;yn.splice(n,1),n--,r()}}}function aw(e){if(La.length){const t=[...new Set(La)].sort((n,r)=>Rl(n)-Rl(r));if(La.length=0,Ei){Ei.push(...t);return}for(Ei=t,Eo=0;Eo<Ei.length;Eo++){const n=Ei[Eo];n.active!==!1&&n()}Ei=null,Eo=0}}const Rl=e=>e.id==null?1/0:e.id,QS=(e,t)=>{const n=Rl(e)-Rl(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function sw(e){Zp=!1,Pl=!0,yn.sort(QS);try{for(Ir=0;Ir<yn.length;Ir++){const t=yn[Ir];t&&t.active!==!1&&Di(t,t.i,t.i?15:14)}}finally{Ir=0,yn.length=0,aw(),Pl=!1,Ug=null,(yn.length||La.length)&&sw()}}let ln=null,lw=null;function Yc(e){const t=ln;return ln=e,lw=e&&e.type.__scopeId||null,t}function mt(e,t=ln,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&wm(-1);const o=Yc(t);let a;try{a=e(...i)}finally{Yc(o),r._d&&wm(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function lo(e,t){if(ln===null)return e;const n=md(ln),r=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,s,l=Mt]=t[i];o&&(it(o)&&(o={mounted:o,updated:o}),o.deep&&Fi(a),r.push({dir:o,instance:n,value:a,oldValue:void 0,arg:s,modifiers:l}))}return e}function mo(e,t,n,r){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[r];l&&(ao(),fr(l,n,8,[e.el,s,e,t]),so())}}const Ai=Symbol("_leaveCb"),Uu=Symbol("_enterCb");function uw(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return dn(()=>{e.isMounted=!0}),Bn(()=>{e.isUnmounting=!0}),e}const Qn=[Function,Array],cw={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qn,onEnter:Qn,onAfterEnter:Qn,onEnterCancelled:Qn,onBeforeLeave:Qn,onLeave:Qn,onAfterLeave:Qn,onLeaveCancelled:Qn,onBeforeAppear:Qn,onAppear:Qn,onAfterAppear:Qn,onAppearCancelled:Qn},fw=e=>{const t=e.subTree;return t.component?fw(t.component):t},e$={name:"BaseTransition",props:cw,setup(e,{slots:t}){const n=ps(),r=uw();return()=>{const i=t.default&&Wg(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const f of i)if(f.type!==sn){o=f;break}}const a=wt(e),{mode:s}=a;if(r.isLeaving)return xh(o);const l=dm(o);if(!l)return xh(o);let u=zl(l,a,r,n,f=>u=f);Za(l,u);const c=n.subTree,d=c&&dm(c);if(d&&d.type!==sn&&!Ao(l,d)&&fw(n).type!==sn){const f=zl(d,a,r,n);if(Za(d,f),s==="out-in"&&l.type!==sn)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},xh(o);s==="in-out"&&l.type!==sn&&(f.delayLeave=(h,p,g)=>{const b=dw(r,d);b[String(d.key)]=d,h[Ai]=()=>{p(),h[Ai]=void 0,delete u.delayedLeave},u.delayedLeave=g})}return o}}},t$=e$;function dw(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function zl(e,t,n,r,i){const{appear:o,mode:a,persisted:s=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:b,onAppear:v,onAfterAppear:_,onAppearCancelled:y}=t,x=String(e.key),S=dw(n,e),$=(k,P)=>{k&&fr(k,r,9,P)},w=(k,P)=>{const R=P[1];$(k,P),tt(k)?k.every(C=>C.length<=1)&&R():k.length<=1&&R()},T={mode:a,persisted:s,beforeEnter(k){let P=l;if(!n.isMounted)if(o)P=b||l;else return;k[Ai]&&k[Ai](!0);const R=S[x];R&&Ao(e,R)&&R.el[Ai]&&R.el[Ai](),$(P,[k])},enter(k){let P=u,R=c,C=d;if(!n.isMounted)if(o)P=v||u,R=_||c,C=y||d;else return;let E=!1;const I=k[Uu]=z=>{E||(E=!0,z?$(C,[k]):$(R,[k]),T.delayedLeave&&T.delayedLeave(),k[Uu]=void 0)};P?w(P,[k,I]):I()},leave(k,P){const R=String(e.key);if(k[Uu]&&k[Uu](!0),n.isUnmounting)return P();$(f,[k]);let C=!1;const E=k[Ai]=I=>{C||(C=!0,P(),I?$(g,[k]):$(p,[k]),k[Ai]=void 0,S[R]===e&&delete S[R])};S[R]=e,h?w(h,[k,E]):E()},clone(k){const P=zl(k,t,n,r,i);return i&&i(P),P}};return T}function xh(e){if(dd(e))return e=Vr(e),e.children=null,e}function dm(e){if(!dd(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&it(n.default))return n.default()}}function Za(e,t){e.shapeFlag&6&&e.component?Za(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Wg(e,t=!1,n){let r=[],i=0;for(let o=0;o<e.length;o++){let a=e[o];const s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===Tt?(a.patchFlag&128&&i++,r=r.concat(Wg(a.children,t,s))):(t||a.type!==sn)&&r.push(s!=null?Vr(a,{key:s}):a)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Ie(e,t){return it(e)?nn({name:e.name},t,{setup:e}):e}const dl=e=>!!e.type.__asyncLoader,dd=e=>e.type.__isKeepAlive;function Vg(e,t){hw(e,"a",t)}function qg(e,t){hw(e,"da",t)}function hw(e,t,n=_n){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(hd(t,r,n),n){let i=n.parent;for(;i&&i.parent;)dd(i.parent.vnode)&&n$(r,t,n,i),i=i.parent}}function n$(e,t,n,r){const i=hd(t,e,r,!0);vw(()=>{Ag(r[t],i)},n)}function hd(e,t,n=_n,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{ao();const s=vu(n),l=fr(t,n,e,a);return s(),so(),l});return r?i.unshift(o):i.push(o),o}}const yi=e=>(t,n=_n)=>{(!bd||e==="sp")&&hd(e,(...r)=>t(...r),n)},pd=yi("bm"),dn=yi("m"),pw=yi("bu"),gw=yi("u"),Bn=yi("bum"),vw=yi("um"),r$=yi("sp"),i$=yi("rtg"),o$=yi("rtc");function a$(e,t=_n){hd("ec",e,t)}const s$=Symbol.for("v-ndc");function bw(e,t,n,r){let i;const o=n;if(tt(e)||Yt(e)){i=new Array(e.length);for(let a=0,s=e.length;a<s;a++)i[a]=t(e[a],a,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=t(a+1,a,void 0,o)}else if(Rt(e))if(e[Symbol.iterator])i=Array.from(e,(a,s)=>t(a,s,void 0,o));else{const a=Object.keys(e);i=new Array(a.length);for(let s=0,l=a.length;s<l;s++){const u=a[s];i[s]=t(e[u],u,s,o)}}else i=[];return i}function Yg(e,t,n={},r,i){if(ln.isCE||ln.parent&&dl(ln.parent)&&ln.parent.isCE)return Ye("slot",n,r);let o=e[t];o&&o._c&&(o._d=!1),We();const a=o&&mw(o(n)),s=Ft(Tt,{key:(n.key||a&&a.key||`_${t}`)+""},a||[],a&&e._===1?64:-2);return s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function mw(e){return e.some(t=>Fl(t)?!(t.type===sn||t.type===Tt&&!mw(t.children)):!0)?e:null}const Jp=e=>e?Dw(e)?md(e):Jp(e.parent):null,hl=nn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Jp(e.parent),$root:e=>Jp(e.root),$emit:e=>e.emit,$options:e=>_w(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,jg(e.update)}),$nextTick:e=>e.n||(e.n=fn.bind(e.proxy)),$watch:e=>z$.bind(e)}),wh=(e,t)=>e!==Mt&&!e.__isScriptSetup&&_t(e,t),l$={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const h=a[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(wh(r,t))return a[t]=1,r[t];if(i!==Mt&&_t(i,t))return a[t]=2,i[t];if((u=e.propsOptions[0])&&_t(u,t))return a[t]=3,o[t];if(n!==Mt&&_t(n,t))return a[t]=4,n[t];Qp&&(a[t]=0)}}const c=hl[t];let d,f;if(c)return t==="$attrs"&&Wn(e.attrs,"get",""),c(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==Mt&&_t(n,t))return a[t]=4,n[t];if(f=l.config.globalProperties,_t(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return wh(i,t)?(i[t]=n,!0):r!==Mt&&_t(r,t)?(r[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||e!==Mt&&_t(e,a)||wh(t,a)||(s=o[0])&&_t(s,a)||_t(r,a)||_t(hl,a)||_t(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Gc(e){return tt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Xc(e,t){return!e||!t?e||t:tt(e)&&tt(t)?e.concat(t):nn({},Gc(e),Gc(t))}let Qp=!0;function u$(e){const t=_w(e),n=e.proxy,r=e.ctx;Qp=!1,t.beforeCreate&&hm(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:g,deactivated:b,beforeDestroy:v,beforeUnmount:_,destroyed:y,unmounted:x,render:S,renderTracked:$,renderTriggered:w,errorCaptured:T,serverPrefetch:k,expose:P,inheritAttrs:R,components:C,directives:E,filters:I}=t;if(u&&c$(u,r,null),a)for(const Z in a){const J=a[Z];it(J)&&(r[Z]=J.bind(n))}if(i){const Z=i.call(n,n);Rt(Z)&&(e.data=Ng(Z))}if(Qp=!0,o)for(const Z in o){const J=o[Z],ie=it(J)?J.bind(n,n):it(J.get)?J.get.bind(n,n):sr,he=!it(J)&&it(J.set)?J.set.bind(n):sr,_e=pe({get:ie,set:he});Object.defineProperty(r,Z,{enumerable:!0,configurable:!0,get:()=>_e.value,set:oe=>_e.value=oe})}if(s)for(const Z in s)yw(s[Z],r,n,Z);if(l){const Z=it(l)?l.call(n):l;Reflect.ownKeys(Z).forEach(J=>{jn(J,Z[J])})}c&&hm(c,e,"c");function j(Z,J){tt(J)?J.forEach(ie=>Z(ie.bind(n))):J&&Z(J.bind(n))}if(j(pd,d),j(dn,f),j(pw,h),j(gw,p),j(Vg,g),j(qg,b),j(a$,T),j(o$,$),j(i$,w),j(Bn,_),j(vw,x),j(r$,k),tt(P))if(P.length){const Z=e.exposed||(e.exposed={});P.forEach(J=>{Object.defineProperty(Z,J,{get:()=>n[J],set:ie=>n[J]=ie})})}else e.exposed||(e.exposed={});S&&e.render===sr&&(e.render=S),R!=null&&(e.inheritAttrs=R),C&&(e.components=C),E&&(e.directives=E)}function c$(e,t,n=sr){tt(e)&&(e=e0(e));for(const r in e){const i=e[r];let o;Rt(i)?"default"in i?o=$t(i.from||r,i.default,!0):o=$t(i.from||r):o=$t(i),wn(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[r]=o}}function hm(e,t,n){fr(tt(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function yw(e,t,n,r){const i=r.includes(".")?Fw(n,r):()=>n[r];if(Yt(e)){const o=t[e];it(o)&&vt(i,o)}else if(it(e))vt(i,e.bind(n));else if(Rt(e))if(tt(e))e.forEach(o=>yw(o,t,n,r));else{const o=it(e.handler)?e.handler.bind(n):t[e.handler];it(o)&&vt(i,o,e)}}function _w(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(t);let l;return s?l=s:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(u=>Kc(l,u,a,!0)),Kc(l,t,a)),Rt(t)&&o.set(t,l),l}function Kc(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&Kc(e,o,n,!0),i&&i.forEach(a=>Kc(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const s=f$[a]||n&&n[a];e[a]=s?s(e[a],t[a]):t[a]}return e}const f$={data:pm,props:gm,emits:gm,methods:Vs,computed:Vs,beforeCreate:$n,created:$n,beforeMount:$n,mounted:$n,beforeUpdate:$n,updated:$n,beforeDestroy:$n,beforeUnmount:$n,destroyed:$n,unmounted:$n,activated:$n,deactivated:$n,errorCaptured:$n,serverPrefetch:$n,components:Vs,directives:Vs,watch:h$,provide:pm,inject:d$};function pm(e,t){return t?e?function(){return nn(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function d$(e,t){return Vs(e0(e),e0(t))}function e0(e){if(tt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function $n(e,t){return e?[...new Set([].concat(e,t))]:t}function Vs(e,t){return e?nn(Object.create(null),e,t):t}function gm(e,t){return e?tt(e)&&tt(t)?[...new Set([...e,...t])]:nn(Object.create(null),Gc(e),Gc(t??{})):t}function h$(e,t){if(!e)return t;if(!t)return e;const n=nn(Object.create(null),e);for(const r in t)n[r]=$n(e[r],t[r]);return n}function xw(){return{app:null,config:{isNativeTag:nS,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let p$=0;function g$(e,t){return function(r,i=null){it(r)||(r=nn({},r)),i!=null&&!Rt(i)&&(i=null);const o=xw(),a=new WeakSet;let s=!1;const l=o.app={_uid:p$++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:J$,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&it(u.install)?(a.add(u),u.install(l,...c)):it(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,d){if(!s){const f=Ye(r,i);return f.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),e(f,u,d),s=!0,l._container=u,u.__vue_app__=l,md(f.component)}},unmount(){s&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l},runWithContext(u){const c=Da;Da=l;try{return u()}finally{Da=c}}};return l}}let Da=null;function jn(e,t){if(_n){let n=_n.provides;const r=_n.parent&&_n.parent.provides;r===n&&(n=_n.provides=Object.create(r)),n[e]=t}}function $t(e,t,n=!1){const r=_n||ln;if(r||Da){const i=Da?Da._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&it(t)?t.call(r&&r.proxy):t}}const ww={},Cw=()=>Object.create(ww),Sw=e=>Object.getPrototypeOf(e)===ww;function v$(e,t,n,r=!1){const i={},o=Cw();e.propsDefaults=Object.create(null),$w(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:NS(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function b$(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,s=wt(i),[l]=e.propsOptions;let u=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(vd(e.emitsOptions,f))continue;const h=t[f];if(l)if(_t(o,f))h!==o[f]&&(o[f]=h,u=!0);else{const p=Yi(f);i[p]=t0(l,s,p,h,e,!1)}else h!==o[f]&&(o[f]=h,u=!0)}}}else{$w(e,t,i,o)&&(u=!0);let c;for(const d in s)(!t||!_t(t,d)&&((c=oo(d))===d||!_t(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=t0(l,s,d,void 0,e,!0)):delete i[d]);if(o!==s)for(const d in o)(!t||!_t(t,d))&&(delete o[d],u=!0)}u&&fi(e.attrs,"set","")}function $w(e,t,n,r){const[i,o]=e.propsOptions;let a=!1,s;if(t)for(let l in t){if(ul(l))continue;const u=t[l];let c;i&&_t(i,c=Yi(l))?!o||!o.includes(c)?n[c]=u:(s||(s={}))[c]=u:vd(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,a=!0)}if(o){const l=wt(n),u=s||Mt;for(let c=0;c<o.length;c++){const d=o[c];n[d]=t0(i,l,d,u[d],e,!_t(u,d))}}return a}function t0(e,t,n,r,i,o){const a=e[n];if(a!=null){const s=_t(a,"default");if(s&&r===void 0){const l=a.default;if(a.type!==Function&&!a.skipFactory&&it(l)){const{propsDefaults:u}=i;if(n in u)r=u[n];else{const c=vu(i);r=u[n]=l.call(null,t),c()}}else r=l}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===oo(n))&&(r=!0))}return r}const m$=new WeakMap;function kw(e,t,n=!1){const r=n?m$:t.propsCache,i=r.get(e);if(i)return i;const o=e.props,a={},s=[];let l=!1;if(!it(e)){const c=d=>{l=!0;const[f,h]=kw(d,t,!0);nn(a,f),h&&s.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!l)return Rt(e)&&r.set(e,Oa),Oa;if(tt(o))for(let c=0;c<o.length;c++){const d=Yi(o[c]);vm(d)&&(a[d]=Mt)}else if(o)for(const c in o){const d=Yi(c);if(vm(d)){const f=o[c],h=a[d]=tt(f)||it(f)?{type:f}:nn({},f),p=h.type;let g=!1,b=!0;if(tt(p))for(let v=0;v<p.length;++v){const _=p[v],y=it(_)&&_.name;if(y==="Boolean"){g=!0;break}else y==="String"&&(b=!1)}else g=it(p)&&p.name==="Boolean";h[0]=g,h[1]=b,(g||_t(h,"default"))&&s.push(d)}}const u=[a,s];return Rt(e)&&r.set(e,u),u}function vm(e){return e[0]!=="$"&&!ul(e)}const Mw=e=>e[0]==="_"||e==="$stable",Gg=e=>tt(e)?e.map(zr):[zr(e)],y$=(e,t,n)=>{if(t._n)return t;const r=mt((...i)=>Gg(t(...i)),n);return r._c=!1,r},Tw=(e,t,n)=>{const r=e._ctx;for(const i in e){if(Mw(i))continue;const o=e[i];if(it(o))t[i]=y$(i,o,r);else if(o!=null){const a=Gg(o);t[i]=()=>a}}},Ew=(e,t)=>{const n=Gg(t);e.slots.default=()=>n},Aw=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},_$=(e,t,n)=>{const r=e.slots=Cw();if(e.vnode.shapeFlag&32){const i=t._;i?(Aw(r,t,n),n&&Nx(r,"_",i,!0)):Tw(t,r)}else t&&Ew(e,t)},x$=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,a=Mt;if(r.shapeFlag&32){const s=t._;s?n&&s===1?o=!1:Aw(i,t,n):(o=!t.$stable,Tw(t,i)),a=t}else t&&(Ew(e,t),a={default:1});if(o)for(const s in i)!Mw(s)&&a[s]==null&&delete i[s]};function n0(e,t,n,r,i=!1){if(tt(e)){e.forEach((f,h)=>n0(f,t&&(tt(t)?t[h]:t),n,r,i));return}if(dl(r)&&!i)return;const o=r.shapeFlag&4?md(r.component):r.el,a=i?null:o,{i:s,r:l}=e,u=t&&t.r,c=s.refs===Mt?s.refs={}:s.refs,d=s.setupState;if(u!=null&&u!==l&&(Yt(u)?(c[u]=null,_t(d,u)&&(d[u]=null)):wn(u)&&(u.value=null)),it(l))Di(l,s,12,[a,c]);else{const f=Yt(l),h=wn(l);if(f||h){const p=()=>{if(e.f){const g=f?_t(d,l)?d[l]:c[l]:l.value;i?tt(g)&&Ag(g,o):tt(g)?g.includes(o)||g.push(o):f?(c[l]=[o],_t(d,l)&&(d[l]=c[l])):(l.value=[o],e.k&&(c[e.k]=l.value))}else f?(c[l]=a,_t(d,l)&&(d[l]=a)):h&&(l.value=a,e.k&&(c[e.k]=a))};a?(p.id=-1,Ln(p,n)):p()}}}const Pw=Symbol("_vte"),w$=e=>e.__isTeleport,pl=e=>e&&(e.disabled||e.disabled===""),bm=e=>typeof SVGElement<"u"&&e instanceof SVGElement,mm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,r0=(e,t)=>{const n=e&&e.to;return Yt(n)?t?t(n):null:n},C$={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,o,a,s,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:g,createComment:b}}=u,v=pl(t.props);let{shapeFlag:_,children:y,dynamicChildren:x}=t;if(e==null){const S=t.el=g(""),$=t.anchor=g("");h(S,n,r),h($,n,r);const w=t.target=r0(t.props,p),T=zw(w,t,g,h);w&&(a==="svg"||bm(w)?a="svg":(a==="mathml"||mm(w))&&(a="mathml"));const k=(P,R)=>{_&16&&c(y,P,R,i,o,a,s,l)};v?k(n,$):w&&k(w,T)}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,$=t.target=e.target,w=t.targetAnchor=e.targetAnchor,T=pl(e.props),k=T?n:$,P=T?S:w;if(a==="svg"||bm($)?a="svg":(a==="mathml"||mm($))&&(a="mathml"),x?(f(e.dynamicChildren,x,k,i,o,a,s),Xg(e,t,!0)):l||d(e,t,k,P,i,o,a,s,!1),v)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ju(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=r0(t.props,p);R&&ju(t,R,null,u,0)}else T&&ju(t,$,w,u,1)}Rw(t)},remove(e,t,n,{um:r,o:{remove:i}},o){const{shapeFlag:a,children:s,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(i(u),i(c)),o&&i(l),a&16){const h=o||!pl(f);for(let p=0;p<s.length;p++){const g=s[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:ju,hydrate:S$};function ju(e,t,n,{o:{insert:r},m:i},o=2){o===0&&r(e.targetAnchor,t,n);const{el:a,anchor:s,shapeFlag:l,children:u,props:c}=e,d=o===2;if(d&&r(a,t,n),(!d||pl(c))&&l&16)for(let f=0;f<u.length;f++)i(u[f],t,n,2);d&&r(s,t,n)}function S$(e,t,n,r,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l,insert:u,createText:c}},d){const f=t.target=r0(t.props,l);if(f){const h=f._lpa||f.firstChild;if(t.shapeFlag&16)if(pl(t.props))t.anchor=d(a(e),t,s(e),n,r,i,o),t.targetStart=h,t.targetAnchor=h&&a(h);else{t.anchor=a(e);let p=h;for(;p;){if(p&&p.nodeType===8){if(p.data==="teleport start anchor")t.targetStart=p;else if(p.data==="teleport anchor"){t.targetAnchor=p,f._lpa=t.targetAnchor&&a(t.targetAnchor);break}}p=a(p)}t.targetAnchor||zw(f,t,c,u),d(h&&a(h),t,f,n,r,i,o)}Rw(t)}return t.anchor&&a(t.anchor)}const $$=C$;function Rw(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function zw(e,t,n,r){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[Pw]=o,e&&(r(i,e),r(o,e)),o}const Ln=D$;function k$(e){return M$(e)}function M$(e,t){const n=Lx();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=sr,insertStaticContent:p}=e,g=(A,H,G,de=null,le=null,q=null,N=void 0,re=null,L=!!H.dynamicChildren)=>{if(A===H)return;A&&!Ao(A,H)&&(de=Xe(A),oe(A,le,q,!0),A=null),H.patchFlag===-2&&(L=!1,H.dynamicChildren=null);const{type:O,ref:ee,shapeFlag:U}=H;switch(O){case gu:b(A,H,G,de);break;case sn:v(A,H,G,de);break;case Sh:A==null&&_(H,G,de,N);break;case Tt:C(A,H,G,de,le,q,N,re,L);break;default:U&1?S(A,H,G,de,le,q,N,re,L):U&6?E(A,H,G,de,le,q,N,re,L):(U&64||U&128)&&O.process(A,H,G,de,le,q,N,re,L,Ee)}ee!=null&&le&&n0(ee,A&&A.ref,q,H||A,!H)},b=(A,H,G,de)=>{if(A==null)r(H.el=s(H.children),G,de);else{const le=H.el=A.el;H.children!==A.children&&u(le,H.children)}},v=(A,H,G,de)=>{A==null?r(H.el=l(H.children||""),G,de):H.el=A.el},_=(A,H,G,de)=>{[A.el,A.anchor]=p(A.children,H,G,de,A.el,A.anchor)},y=({el:A,anchor:H},G,de)=>{let le;for(;A&&A!==H;)le=f(A),r(A,G,de),A=le;r(H,G,de)},x=({el:A,anchor:H})=>{let G;for(;A&&A!==H;)G=f(A),i(A),A=G;i(H)},S=(A,H,G,de,le,q,N,re,L)=>{H.type==="svg"?N="svg":H.type==="math"&&(N="mathml"),A==null?$(H,G,de,le,q,N,re,L):k(A,H,le,q,N,re,L)},$=(A,H,G,de,le,q,N,re)=>{let L,O;const{props:ee,shapeFlag:U,transition:B,dirs:V}=A;if(L=A.el=a(A.type,q,ee&&ee.is,ee),U&8?c(L,A.children):U&16&&T(A.children,L,null,de,le,Ch(A,q),N,re),V&&mo(A,null,de,"created"),w(L,A,A.scopeId,N,de),ee){for(const Ae in ee)Ae!=="value"&&!ul(Ae)&&o(L,Ae,null,ee[Ae],q,de);"value"in ee&&o(L,"value",null,ee.value,q),(O=ee.onVnodeBeforeMount)&&Er(O,de,A)}V&&mo(A,null,de,"beforeMount");const me=T$(le,B);me&&B.beforeEnter(L),r(L,H,G),((O=ee&&ee.onVnodeMounted)||me||V)&&Ln(()=>{O&&Er(O,de,A),me&&B.enter(L),V&&mo(A,null,de,"mounted")},le)},w=(A,H,G,de,le)=>{if(G&&h(A,G),de)for(let q=0;q<de.length;q++)h(A,de[q]);if(le){let q=le.subTree;if(H===q){const N=le.vnode;w(A,N,N.scopeId,N.slotScopeIds,le.parent)}}},T=(A,H,G,de,le,q,N,re,L=0)=>{for(let O=L;O<A.length;O++){const ee=A[O]=re?Pi(A[O]):zr(A[O]);g(null,ee,H,G,de,le,q,N,re)}},k=(A,H,G,de,le,q,N)=>{const re=H.el=A.el;let{patchFlag:L,dynamicChildren:O,dirs:ee}=H;L|=A.patchFlag&16;const U=A.props||Mt,B=H.props||Mt;let V;if(G&&yo(G,!1),(V=B.onVnodeBeforeUpdate)&&Er(V,G,H,A),ee&&mo(H,A,G,"beforeUpdate"),G&&yo(G,!0),(U.innerHTML&&B.innerHTML==null||U.textContent&&B.textContent==null)&&c(re,""),O?P(A.dynamicChildren,O,re,G,de,Ch(H,le),q):N||J(A,H,re,null,G,de,Ch(H,le),q,!1),L>0){if(L&16)R(re,U,B,G,le);else if(L&2&&U.class!==B.class&&o(re,"class",null,B.class,le),L&4&&o(re,"style",U.style,B.style,le),L&8){const me=H.dynamicProps;for(let Ae=0;Ae<me.length;Ae++){const Re=me[Ae],rt=U[Re],lt=B[Re];(lt!==rt||Re==="value")&&o(re,Re,rt,lt,le,G)}}L&1&&A.children!==H.children&&c(re,H.children)}else!N&&O==null&&R(re,U,B,G,le);((V=B.onVnodeUpdated)||ee)&&Ln(()=>{V&&Er(V,G,H,A),ee&&mo(H,A,G,"updated")},de)},P=(A,H,G,de,le,q,N)=>{for(let re=0;re<H.length;re++){const L=A[re],O=H[re],ee=L.el&&(L.type===Tt||!Ao(L,O)||L.shapeFlag&70)?d(L.el):G;g(L,O,ee,null,de,le,q,N,!0)}},R=(A,H,G,de,le)=>{if(H!==G){if(H!==Mt)for(const q in H)!ul(q)&&!(q in G)&&o(A,q,H[q],null,le,de);for(const q in G){if(ul(q))continue;const N=G[q],re=H[q];N!==re&&q!=="value"&&o(A,q,re,N,le,de)}"value"in G&&o(A,"value",H.value,G.value,le)}},C=(A,H,G,de,le,q,N,re,L)=>{const O=H.el=A?A.el:s(""),ee=H.anchor=A?A.anchor:s("");let{patchFlag:U,dynamicChildren:B,slotScopeIds:V}=H;V&&(re=re?re.concat(V):V),A==null?(r(O,G,de),r(ee,G,de),T(H.children||[],G,ee,le,q,N,re,L)):U>0&&U&64&&B&&A.dynamicChildren?(P(A.dynamicChildren,B,G,le,q,N,re),(H.key!=null||le&&H===le.subTree)&&Xg(A,H,!0)):J(A,H,G,ee,le,q,N,re,L)},E=(A,H,G,de,le,q,N,re,L)=>{H.slotScopeIds=re,A==null?H.shapeFlag&512?le.ctx.activate(H,G,de,N,L):I(H,G,de,le,q,N,L):z(A,H,L)},I=(A,H,G,de,le,q,N)=>{const re=A.component=q$(A,de,le);if(dd(A)&&(re.ctx.renderer=Ee),Y$(re,!1,N),re.asyncDep){if(le&&le.registerDep(re,j,N),!A.el){const L=re.subTree=Ye(sn);v(null,L,H,G)}}else j(re,A,H,G,le,q,N)},z=(A,H,G)=>{const de=H.component=A.component;if(O$(A,H,G))if(de.asyncDep&&!de.asyncResolved){Z(de,H,G);return}else de.next=H,ZS(de.update),de.effect.dirty=!0,de.update();else H.el=A.el,de.vnode=H},j=(A,H,G,de,le,q,N)=>{const re=()=>{if(A.isMounted){let{next:ee,bu:U,u:B,parent:V,vnode:me}=A;{const ft=Iw(A);if(ft){ee&&(ee.el=me.el,Z(A,ee,N)),ft.asyncDep.then(()=>{A.isUnmounted||re()});return}}let Ae=ee,Re;yo(A,!1),ee?(ee.el=me.el,Z(A,ee,N)):ee=me,U&&yh(U),(Re=ee.props&&ee.props.onVnodeBeforeUpdate)&&Er(Re,V,ee,me),yo(A,!0);const rt=_m(A),lt=A.subTree;A.subTree=rt,g(lt,rt,d(lt.el),Xe(lt),A,le,q),ee.el=rt.el,Ae===null&&N$(A,rt.el),B&&Ln(B,le),(Re=ee.props&&ee.props.onVnodeUpdated)&&Ln(()=>Er(Re,V,ee,me),le)}else{let ee;const{el:U,props:B}=H,{bm:V,m:me,parent:Ae}=A,Re=dl(H);yo(A,!1),V&&yh(V),!Re&&(ee=B&&B.onVnodeBeforeMount)&&Er(ee,Ae,H),yo(A,!0);{const rt=A.subTree=_m(A);g(null,rt,G,de,A,le,q),H.el=rt.el}if(me&&Ln(me,le),!Re&&(ee=B&&B.onVnodeMounted)){const rt=H;Ln(()=>Er(ee,Ae,rt),le)}(H.shapeFlag&256||Ae&&dl(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&A.a&&Ln(A.a,le),A.isMounted=!0,H=G=de=null}},L=A.effect=new zg(re,sr,()=>jg(O),A.scope),O=A.update=()=>{L.dirty&&L.run()};O.i=A,O.id=A.uid,yo(A,!0),O()},Z=(A,H,G)=>{H.component=A;const de=A.vnode.props;A.vnode=H,A.next=null,b$(A,H.props,de,G),x$(A,H.children,G),ao(),fm(A),so()},J=(A,H,G,de,le,q,N,re,L=!1)=>{const O=A&&A.children,ee=A?A.shapeFlag:0,U=H.children,{patchFlag:B,shapeFlag:V}=H;if(B>0){if(B&128){he(O,U,G,de,le,q,N,re,L);return}else if(B&256){ie(O,U,G,de,le,q,N,re,L);return}}V&8?(ee&16&&xe(O,le,q),U!==O&&c(G,U)):ee&16?V&16?he(O,U,G,de,le,q,N,re,L):xe(O,le,q,!0):(ee&8&&c(G,""),V&16&&T(U,G,de,le,q,N,re,L))},ie=(A,H,G,de,le,q,N,re,L)=>{A=A||Oa,H=H||Oa;const O=A.length,ee=H.length,U=Math.min(O,ee);let B;for(B=0;B<U;B++){const V=H[B]=L?Pi(H[B]):zr(H[B]);g(A[B],V,G,null,le,q,N,re,L)}O>ee?xe(A,le,q,!0,!1,U):T(H,G,de,le,q,N,re,L,U)},he=(A,H,G,de,le,q,N,re,L)=>{let O=0;const ee=H.length;let U=A.length-1,B=ee-1;for(;O<=U&&O<=B;){const V=A[O],me=H[O]=L?Pi(H[O]):zr(H[O]);if(Ao(V,me))g(V,me,G,null,le,q,N,re,L);else break;O++}for(;O<=U&&O<=B;){const V=A[U],me=H[B]=L?Pi(H[B]):zr(H[B]);if(Ao(V,me))g(V,me,G,null,le,q,N,re,L);else break;U--,B--}if(O>U){if(O<=B){const V=B+1,me=V<ee?H[V].el:de;for(;O<=B;)g(null,H[O]=L?Pi(H[O]):zr(H[O]),G,me,le,q,N,re,L),O++}}else if(O>B)for(;O<=U;)oe(A[O],le,q,!0),O++;else{const V=O,me=O,Ae=new Map;for(O=me;O<=B;O++){const ye=H[O]=L?Pi(H[O]):zr(H[O]);ye.key!=null&&Ae.set(ye.key,O)}let Re,rt=0;const lt=B-me+1;let ft=!1,zt=0;const yt=new Array(lt);for(O=0;O<lt;O++)yt[O]=0;for(O=V;O<=U;O++){const ye=A[O];if(rt>=lt){oe(ye,le,q,!0);continue}let Y;if(ye.key!=null)Y=Ae.get(ye.key);else for(Re=me;Re<=B;Re++)if(yt[Re-me]===0&&Ao(ye,H[Re])){Y=Re;break}Y===void 0?oe(ye,le,q,!0):(yt[Y-me]=O+1,Y>=zt?zt=Y:ft=!0,g(ye,H[Y],G,null,le,q,N,re,L),rt++)}const Lt=ft?E$(yt):Oa;for(Re=Lt.length-1,O=lt-1;O>=0;O--){const ye=me+O,Y=H[ye],m=ye+1<ee?H[ye+1].el:de;yt[O]===0?g(null,Y,G,m,le,q,N,re,L):ft&&(Re<0||O!==Lt[Re]?_e(Y,G,m,2):Re--)}}},_e=(A,H,G,de,le=null)=>{const{el:q,type:N,transition:re,children:L,shapeFlag:O}=A;if(O&6){_e(A.component.subTree,H,G,de);return}if(O&128){A.suspense.move(H,G,de);return}if(O&64){N.move(A,H,G,Ee);return}if(N===Tt){r(q,H,G);for(let U=0;U<L.length;U++)_e(L[U],H,G,de);r(A.anchor,H,G);return}if(N===Sh){y(A,H,G);return}if(de!==2&&O&1&&re)if(de===0)re.beforeEnter(q),r(q,H,G),Ln(()=>re.enter(q),le);else{const{leave:U,delayLeave:B,afterLeave:V}=re,me=()=>r(q,H,G),Ae=()=>{U(q,()=>{me(),V&&V()})};B?B(q,me,Ae):Ae()}else r(q,H,G)},oe=(A,H,G,de=!1,le=!1)=>{const{type:q,props:N,ref:re,children:L,dynamicChildren:O,shapeFlag:ee,patchFlag:U,dirs:B,cacheIndex:V}=A;if(U===-2&&(le=!1),re!=null&&n0(re,null,G,A,!0),V!=null&&(H.renderCache[V]=void 0),ee&256){H.ctx.deactivate(A);return}const me=ee&1&&B,Ae=!dl(A);let Re;if(Ae&&(Re=N&&N.onVnodeBeforeUnmount)&&Er(Re,H,A),ee&6)Oe(A.component,G,de);else{if(ee&128){A.suspense.unmount(G,de);return}me&&mo(A,null,H,"beforeUnmount"),ee&64?A.type.remove(A,H,G,Ee,de):O&&!O.hasOnce&&(q!==Tt||U>0&&U&64)?xe(O,H,G,!1,!0):(q===Tt&&U&384||!le&&ee&16)&&xe(L,H,G),de&&ve(A)}(Ae&&(Re=N&&N.onVnodeUnmounted)||me)&&Ln(()=>{Re&&Er(Re,H,A),me&&mo(A,null,H,"unmounted")},G)},ve=A=>{const{type:H,el:G,anchor:de,transition:le}=A;if(H===Tt){we(G,de);return}if(H===Sh){x(A);return}const q=()=>{i(G),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(A.shapeFlag&1&&le&&!le.persisted){const{leave:N,delayLeave:re}=le,L=()=>N(G,q);re?re(A.el,q,L):L()}else q()},we=(A,H)=>{let G;for(;A!==H;)G=f(A),i(A),A=G;i(H)},Oe=(A,H,G)=>{const{bum:de,scope:le,update:q,subTree:N,um:re,m:L,a:O}=A;ym(L),ym(O),de&&yh(de),le.stop(),q&&(q.active=!1,oe(N,A,H,G)),re&&Ln(re,H),Ln(()=>{A.isUnmounted=!0},H),H&&H.pendingBranch&&!H.isUnmounted&&A.asyncDep&&!A.asyncResolved&&A.suspenseId===H.pendingId&&(H.deps--,H.deps===0&&H.resolve())},xe=(A,H,G,de=!1,le=!1,q=0)=>{for(let N=q;N<A.length;N++)oe(A[N],H,G,de,le)},Xe=A=>{if(A.shapeFlag&6)return Xe(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const H=f(A.anchor||A.el),G=H&&H[Pw];return G?f(G):H};let Ve=!1;const fe=(A,H,G)=>{A==null?H._vnode&&oe(H._vnode,null,null,!0):g(H._vnode||null,A,H,null,null,null,G),H._vnode=A,Ve||(Ve=!0,fm(),aw(),Ve=!1)},Ee={p:g,um:oe,m:_e,r:ve,mt:I,mc:T,pc:J,pbc:P,n:Xe,o:e};return{render:fe,hydrate:void 0,createApp:g$(fe)}}function Ch({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function yo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function T$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Xg(e,t,n=!1){const r=e.children,i=t.children;if(tt(r)&&tt(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Pi(i[o]),s.el=a.el),!n&&s.patchFlag!==-2&&Xg(a,s)),s.type===gu&&(s.el=a.el)}}function E$(e){const t=e.slice(),n=[0];let r,i,o,a,s;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(i=n[n.length-1],e[i]<u){t[r]=i,n.push(r);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,e[n[s]]<u?o=s+1:a=s;u<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function Iw(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Iw(t)}function ym(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const A$=Symbol.for("v-scx"),P$=()=>$t(A$);function xr(e,t){return gd(e,null,t)}function R$(e,t){return gd(e,null,{flush:"sync"})}const Wu={};function vt(e,t,n){return gd(e,t,n)}function gd(e,t,{immediate:n,deep:r,flush:i,once:o,onTrack:a,onTrigger:s}=Mt){if(t&&o){const $=t;t=(...w)=>{$(...w),S()}}const l=_n,u=$=>r===!0?$:Fi($,r===!1?1:void 0);let c,d=!1,f=!1;if(wn(e)?(c=()=>e.value,d=Ka(e)):cl(e)?(c=()=>u(e),d=!0):tt(e)?(f=!0,d=e.some($=>cl($)||Ka($)),c=()=>e.map($=>{if(wn($))return $.value;if(cl($))return u($);if(it($))return Di($,l,2)})):it(e)?t?c=()=>Di(e,l,2):c=()=>(h&&h(),fr(e,l,3,[p])):c=sr,t&&r){const $=c;c=()=>Fi($())}let h,p=$=>{h=y.onStop=()=>{Di($,l,4),h=y.onStop=void 0}},g;if(bd)if(p=sr,t?n&&fr(t,l,3,[c(),f?[]:void 0,p]):c(),i==="sync"){const $=P$();g=$.__watcherHandles||($.__watcherHandles=[])}else return sr;let b=f?new Array(e.length).fill(Wu):Wu;const v=()=>{if(!(!y.active||!y.dirty))if(t){const $=y.run();(r||d||(f?$.some((w,T)=>Hn(w,b[T])):Hn($,b)))&&(h&&h(),fr(t,l,3,[$,b===Wu?void 0:f&&b[0]===Wu?[]:b,p]),b=$)}else y.run()};v.allowRecurse=!!t;let _;i==="sync"?_=v:i==="post"?_=()=>Ln(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),_=()=>jg(v));const y=new zg(c,sr,_),x=bS(),S=()=>{y.stop(),x&&Ag(x.effects,y)};return t?n?v():b=y.run():i==="post"?Ln(y.run.bind(y),l&&l.suspense):y.run(),g&&g.push(S),S}function z$(e,t,n){const r=this.proxy,i=Yt(e)?e.includes(".")?Fw(r,e):()=>r[e]:e.bind(r,r);let o;it(t)?o=t:(o=t.handler,n=t);const a=vu(this),s=gd(i,o.bind(r),n);return a(),s}function Fw(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Fi(e,t=1/0,n){if(t<=0||!Rt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,wn(e))Fi(e.value,t,n);else if(tt(e))for(let r=0;r<e.length;r++)Fi(e[r],t,n);else if(zx(e)||Na(e))e.forEach(r=>{Fi(r,t,n)});else if(Bx(e)){for(const r in e)Fi(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Fi(e[r],t,n)}return e}function Kg(e,t,n=Mt){const r=ps(),i=Yi(t),o=oo(t),a=Bw(e,t),s=VS((l,u)=>{let c,d=Mt,f;return R$(()=>{const h=e[t];Hn(c,h)&&(c=h,u())}),{get(){return l(),n.get?n.get(c):c},set(h){const p=n.set?n.set(h):h;if(!Hn(p,c)&&!(d!==Mt&&Hn(h,d)))return;const g=r.vnode.props;g&&(t in g||i in g||o in g)&&(`onUpdate:${t}`in g||`onUpdate:${i}`in g||`onUpdate:${o}`in g)||(c=h,u()),r.emit(`update:${t}`,p),Hn(h,p)&&Hn(h,d)&&!Hn(p,f)&&u(),d=h,f=p}}});return s[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?a||Mt:s,done:!1}:{done:!0}}}},s}const Bw=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Yi(t)}Modifiers`]||e[`${oo(t)}Modifiers`];function I$(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Mt;let i=n;const o=t.startsWith("update:"),a=o&&Bw(r,t.slice(7));a&&(a.trim&&(i=n.map(c=>Yt(c)?c.trim():c)),a.number&&(i=n.map(sS)));let s,l=r[s=mh(t)]||r[s=mh(Yi(t))];!l&&o&&(l=r[s=mh(oo(t))]),l&&fr(l,e,6,i);const u=r[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,fr(u,e,6,i)}}function Ow(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let a={},s=!1;if(!it(e)){const l=u=>{const c=Ow(u,t,!0);c&&(s=!0,nn(a,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!s?(Rt(e)&&r.set(e,null),null):(tt(o)?o.forEach(l=>a[l]=null):nn(a,o),Rt(e)&&r.set(e,a),a)}function vd(e,t){return!e||!sd(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,oo(t))||_t(e,t))}function _m(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[o],slots:a,attrs:s,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:p,inheritAttrs:g}=e,b=Yc(e);let v,_;try{if(n.shapeFlag&4){const x=i||r,S=x;v=zr(u.call(S,x,c,d,h,f,p)),_=s}else{const x=t;v=zr(x.length>1?x(d,{attrs:s,slots:a,emit:l}):x(d,null)),_=t.props?s:F$(s)}}catch(x){gl.length=0,fd(x,e,1),v=Ye(sn)}let y=v;if(_&&g!==!1){const x=Object.keys(_),{shapeFlag:S}=y;x.length&&S&7&&(o&&x.some(Eg)&&(_=B$(_,o)),y=Vr(y,_,!1,!0))}return n.dirs&&(y=Vr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),v=y,Yc(b),v}const F$=e=>{let t;for(const n in e)(n==="class"||n==="style"||sd(n))&&((t||(t={}))[n]=e[n]);return t},B$=(e,t)=>{const n={};for(const r in e)(!Eg(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function O$(e,t,n){const{props:r,children:i,component:o}=e,{props:a,children:s,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?xm(r,a,u):!!a;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(a[f]!==r[f]&&!vd(u,f))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?xm(r,a,u):!0:!!a;return!1}function xm(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(t[o]!==e[o]&&!vd(n,o))return!0}return!1}function N$({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const L$=e=>e.__isSuspense;function D$(e,t){t&&t.pendingBranch?tt(e)?t.effects.push(...e):t.effects.push(e):JS(e)}const Tt=Symbol.for("v-fgt"),gu=Symbol.for("v-txt"),sn=Symbol.for("v-cmt"),Sh=Symbol.for("v-stc"),gl=[];let Gn=null;function We(e=!1){gl.push(Gn=e?null:[])}function H$(){gl.pop(),Gn=gl[gl.length-1]||null}let Il=1;function wm(e){Il+=e,e<0&&Gn&&(Gn.hasOnce=!0)}function Nw(e){return e.dynamicChildren=Il>0?Gn||Oa:null,H$(),Il>0&&Gn&&Gn.push(e),e}function xt(e,t,n,r,i,o){return Nw(ot(e,t,n,r,i,o,!0))}function Ft(e,t,n,r,i){return Nw(Ye(e,t,n,r,i,!0))}function Fl(e){return e?e.__v_isVNode===!0:!1}function Ao(e,t){return e.type===t.type&&e.key===t.key}const Lw=({key:e})=>e??null,Tc=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Yt(e)||wn(e)||it(e)?{i:ln,r:e,k:t,f:!!n}:e:null);function ot(e,t=null,n=null,r=0,i=null,o=e===Tt?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lw(t),ref:t&&Tc(t),scopeId:lw,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ln};return s?(Zg(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Yt(n)?8:16),Il>0&&!a&&Gn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Gn.push(l),l}const Ye=U$;function U$(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===s$)&&(e=sn),Fl(e)){const s=Vr(e,t,!0);return n&&Zg(s,n),Il>0&&!o&&Gn&&(s.shapeFlag&6?Gn[Gn.indexOf(e)]=s:Gn.push(s)),s.patchFlag=-2,s}if(Z$(e)&&(e=e.__vccOpts),t){t=j$(t);let{class:s,style:l}=t;s&&!Yt(s)&&(t.class=pu(s)),Rt(l)&&(ew(l)&&!tt(l)&&(l=nn({},l)),t.style=Rg(l))}const a=Yt(e)?1:L$(e)?128:w$(e)?64:Rt(e)?4:it(e)?2:0;return ot(e,t,n,r,i,a,o,!0)}function j$(e){return e?ew(e)||Sw(e)?nn({},e):e:null}function Vr(e,t,n=!1,r=!1){const{props:i,ref:o,patchFlag:a,children:s,transition:l}=e,u=t?ia(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Lw(u),ref:t&&t.ref?n&&o?tt(o)?o.concat(Tc(t)):[o,Tc(t)]:Tc(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Tt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vr(e.ssContent),ssFallback:e.ssFallback&&Vr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Za(c,l.clone(c)),c}function Wo(e=" ",t=0){return Ye(gu,null,e,t)}function Xn(e="",t=!1){return t?(We(),Ft(sn,null,e)):Ye(sn,null,e)}function zr(e){return e==null||typeof e=="boolean"?Ye(sn):tt(e)?Ye(Tt,null,e.slice()):typeof e=="object"?Pi(e):Ye(gu,null,String(e))}function Pi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vr(e)}function Zg(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(tt(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Zg(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Sw(t)?t._ctx=ln:i===3&&ln&&(ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:ln},n=32):(t=String(t),r&64?(n=16,t=[Wo(t)]):n=8);e.children=t,e.shapeFlag|=n}function ia(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=pu([t.class,r.class]));else if(i==="style")t.style=Rg([t.style,r.style]);else if(sd(i)){const o=t[i],a=r[i];a&&o!==a&&!(tt(o)&&o.includes(a))&&(t[i]=o?[].concat(o,a):a)}else i!==""&&(t[i]=r[i])}return t}function Er(e,t,n,r=null){fr(e,t,7,[n,r])}const W$=xw();let V$=0;function q$(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||W$,o={uid:V$++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new gS(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:kw(r,i),emitsOptions:Ow(r,i),emit:null,emitted:null,propsDefaults:Mt,inheritAttrs:r.inheritAttrs,ctx:Mt,data:Mt,props:Mt,attrs:Mt,slots:Mt,refs:Mt,setupState:Mt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=I$.bind(null,o),e.ce&&e.ce(o),o}let _n=null;const ps=()=>_n||ln;let Zc,i0;{const e=Lx(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};Zc=t("__VUE_INSTANCE_SETTERS__",n=>_n=n),i0=t("__VUE_SSR_SETTERS__",n=>bd=n)}const vu=e=>{const t=_n;return Zc(e),e.scope.on(),()=>{e.scope.off(),Zc(t)}},Cm=()=>{_n&&_n.scope.off(),Zc(null)};function Dw(e){return e.vnode.shapeFlag&4}let bd=!1;function Y$(e,t=!1,n=!1){t&&i0(t);const{props:r,children:i}=e.vnode,o=Dw(e);v$(e,r,o,t),_$(e,i,n);const a=o?G$(e,t):void 0;return t&&i0(!1),a}function G$(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,l$);const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?K$(e):null,o=vu(e);ao();const a=Di(r,e,0,[e.props,i]);if(so(),o(),Ix(a)){if(a.then(Cm,Cm),t)return a.then(s=>{Sm(e,s)}).catch(s=>{fd(s,e,0)});e.asyncDep=a}else Sm(e,a)}else Hw(e)}function Sm(e,t,n){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=rw(t)),Hw(e)}function Hw(e,t,n){const r=e.type;e.render||(e.render=r.render||sr);{const i=vu(e);ao();try{u$(e)}finally{so(),i()}}}const X$={get(e,t){return Wn(e,"get",""),e[t]}};function K$(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,X$),slots:e.slots,emit:e.emit,expose:t}}function md(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(rw(LS(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hl)return hl[n](e)},has(t,n){return n in t||n in hl}})):e.proxy}function Z$(e){return it(e)&&"__vccOpts"in e}const pe=(e,t)=>DS(e,t,bd);function M(e,t,n){const r=arguments.length;return r===2?Rt(t)&&!tt(t)?Fl(t)?Ye(e,null,[t]):Ye(e,t):Ye(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Fl(n)&&(n=[n]),Ye(e,t,n))}const J$="3.4.38";/**
|
|
14
14
|
* @vue/runtime-dom v3.4.38
|
|
15
15
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
16
|
* @license MIT
|
|
17
|
-
**/const J$="http://www.w3.org/2000/svg",Q$="http://www.w3.org/1998/Math/MathML",oi=typeof document<"u"?document:null,$m=oi&&oi.createElement("template"),ek={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?oi.createElementNS(J$,e):t==="mathml"?oi.createElementNS(Q$,e):n?oi.createElement(e,{is:n}):oi.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>oi.createTextNode(e),createComment:e=>oi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>oi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const a=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{$m.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const s=$m.content;if(r==="svg"||r==="mathml"){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Si="transition",$s="animation",Ja=Symbol("_vtc"),wr=(e,{slots:t})=>k(e$,Uw(e),t);wr.displayName="Transition";const Hw={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},tk=wr.props=nn({},uw,Hw),_o=(e,t=[])=>{tt(e)?e.forEach(n=>n(...t)):e&&e(...t)},km=e=>e?tt(e)?e.some(t=>t.length>1):e.length>1:!1;function Uw(e){const t={};for(const C in e)C in Hw||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=nk(i),g=p&&p[0],b=p&&p[1],{onBeforeEnter:v,onEnter:x,onEnterCancelled:y,onLeave:_,onLeaveCancelled:S,onBeforeAppear:$=v,onAppear:w=x,onAppearCancelled:T=y}=t,M=(C,E,I)=>{Mi(C,E?c:s),Mi(C,E?u:a),I&&I()},P=(C,E)=>{C._isLeaving=!1,Mi(C,d),Mi(C,h),Mi(C,f),E&&E()},R=C=>(E,I)=>{const z=C?w:x,j=()=>M(E,C,I);_o(z,[E,j]),Mm(()=>{Mi(E,C?l:o),ii(E,C?c:s),km(z)||Tm(E,r,g,j)})};return nn(t,{onBeforeEnter(C){_o(v,[C]),ii(C,o),ii(C,a)},onBeforeAppear(C){_o($,[C]),ii(C,l),ii(C,u)},onEnter:R(!1),onAppear:R(!0),onLeave(C,E){C._isLeaving=!0;const I=()=>P(C,E);ii(C,d),ii(C,f),Ww(),Mm(()=>{C._isLeaving&&(Mi(C,d),ii(C,h),km(_)||Tm(C,r,b,I))}),_o(_,[C,I])},onEnterCancelled(C){M(C,!1),_o(y,[C])},onAppearCancelled(C){M(C,!0),_o(T,[C])},onLeaveCancelled(C){P(C),_o(S,[C])}})}function nk(e){if(e==null)return null;if(Rt(e))return[$h(e.enter),$h(e.leave)];{const t=$h(e);return[t,t]}}function $h(e){return sS(e)}function ii(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ja]||(e[Ja]=new Set)).add(t)}function Mi(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ja];n&&(n.delete(t),n.size||(e[Ja]=void 0))}function Mm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let rk=0;function Tm(e,t,n,r){const i=e._endId=++rk,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:s,propCount:l}=jw(e,t);if(!a)return r();const u=a+"end";let c=0;const d=()=>{e.removeEventListener(u,f),o()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},s+1),e.addEventListener(u,f)}function jw(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),i=r(`${Si}Delay`),o=r(`${Si}Duration`),a=Em(i,o),s=r(`${$s}Delay`),l=r(`${$s}Duration`),u=Em(s,l);let c=null,d=0,f=0;t===Si?a>0&&(c=Si,d=a,f=o.length):t===$s?u>0&&(c=$s,d=u,f=l.length):(d=Math.max(a,u),c=d>0?a>u?Si:$s:null,f=c?c===Si?o.length:l.length:0);const h=c===Si&&/\b(transform|all)(,|$)/.test(r(`${Si}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Em(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Am(n)+Am(e[r])))}function Am(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ww(){return document.body.offsetHeight}function ik(e,t,n){const r=e[Ja];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Jc=Symbol("_vod"),Vw=Symbol("_vsh"),yd={beforeMount(e,{value:t},{transition:n}){e[Jc]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ks(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ks(e,!0),r.enter(e)):r.leave(e,()=>{ks(e,!1)}):ks(e,t))},beforeUnmount(e,{value:t}){ks(e,t)}};function ks(e,t){e.style.display=t?e[Jc]:"none",e[Vw]=!t}const ok=Symbol(""),ak=/(^|;)\s*display\s*:/;function sk(e,t,n){const r=e.style,i=Yt(n);let o=!1;if(n&&!i){if(t)if(Yt(t))for(const a of t.split(";")){const s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&Ec(r,s,"")}else for(const a in t)n[a]==null&&Ec(r,a,"");for(const a in n)a==="display"&&(o=!0),Ec(r,a,n[a])}else if(i){if(t!==n){const a=r[ok];a&&(n+=";"+a),r.cssText=n,o=ak.test(n)}}else t&&e.removeAttribute("style");Jc in e&&(e[Jc]=o?r.display:"",e[Vw]&&(r.display="none"))}const Pm=/\s*!important$/;function Ec(e,t,n){if(tt(n))n.forEach(r=>Ec(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=lk(e,t);Pm.test(n)?e.setProperty(oo(r),n.replace(Pm,""),"important"):e[r]=n}}const Rm=["Webkit","Moz","ms"],kh={};function lk(e,t){const n=kh[t];if(n)return n;let r=Yi(t);if(r!=="filter"&&r in e)return kh[t]=r;r=Bx(r);for(let i=0;i<Rm.length;i++){const o=Rm[i]+r;if(o in e)return kh[t]=o}return t}const zm="http://www.w3.org/1999/xlink";function Im(e,t,n,r,i,o=hS(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(zm,t.slice(6,t.length)):e.setAttributeNS(zm,t,n):n==null||o&&!Lx(n)?e.removeAttribute(t):e.setAttribute(t,o?"":io(n)?String(n):n)}function uk(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=n;return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,s=n==null?"":String(n);(a!==s||!("_value"in e))&&(e.value=s),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Lx(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(t)}function ck(e,t,n,r){e.addEventListener(t,n,r)}function fk(e,t,n,r){e.removeEventListener(t,n,r)}const Fm=Symbol("_vei");function dk(e,t,n,r,i=null){const o=e[Fm]||(e[Fm]={}),a=o[t];if(r&&a)a.value=r;else{const[s,l]=hk(t);if(r){const u=o[t]=vk(r,i);ck(e,s,u,l)}else a&&(fk(e,s,a,l),o[t]=void 0)}}const Bm=/(?:Once|Passive|Capture)$/;function hk(e){let t;if(Bm.test(e)){t={};let r;for(;r=e.match(Bm);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):oo(e.slice(2)),t]}let Mh=0;const pk=Promise.resolve(),gk=()=>Mh||(pk.then(()=>Mh=0),Mh=Date.now());function vk(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;fr(bk(r,n.value),t,5,[r])};return n.value=e,n.attached=gk(),n}function bk(e,t){if(tt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Om=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,mk=(e,t,n,r,i,o)=>{const a=i==="svg";t==="class"?ik(e,r,a):t==="style"?sk(e,n,r):sd(t)?Eg(t)||dk(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):yk(e,t,r,a))?(uk(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Im(e,t,r,a,o,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Im(e,t,r,a))};function yk(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Om(t)&&it(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Om(t)&&Yt(n)?!1:t in e}const qw=new WeakMap,Yw=new WeakMap,Qc=Symbol("_moveCb"),Nm=Symbol("_enterCb"),Gw={name:"TransitionGroup",props:nn({},tk,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ps(),r=lw();let i,o;return pw(()=>{if(!i.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!Sk(i[0].el,n.vnode.el,a))return;i.forEach(xk),i.forEach(wk);const s=i.filter(Ck);Ww(),s.forEach(l=>{const u=l.el,c=u.style;ii(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Qc]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Qc]=null,Mi(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=wt(e),s=Uw(a);let l=a.tag||Tt;if(i=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&(i.push(c),Za(c,zl(c,s,r,n)),qw.set(c,c.el.getBoundingClientRect()))}o=t.default?Wg(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&Za(c,zl(c,s,r,n))}return Ye(l,null,o)}}},_k=e=>delete e.mode;Gw.props;const Xw=Gw;function xk(e){const t=e.el;t[Qc]&&t[Qc](),t[Nm]&&t[Nm]()}function wk(e){Yw.set(e,e.el.getBoundingClientRect())}function Ck(e){const t=qw.get(e),n=Yw.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",e}}function Sk(e,t,n){const r=e.cloneNode(),i=e[Ja];i&&i.forEach(s=>{s.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(s=>s&&r.classList.add(s)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:a}=jw(r);return o.removeChild(r),a}const $k=nn({patchProp:mk},ek);let Lm;function kk(){return Lm||(Lm=$$($k))}const Mk=(...e)=>{const t=kk().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=Ek(r);if(!i)return;const o=t._component;!it(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,Tk(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function Tk(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ek(e){return Yt(e)?document.querySelector(e):e}function Kw(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function Bl(e){throw Error(Kw(e))}const Dm=ne("/"),Hm=ne("include");function Zw(){function e(){return Hm.value}function t(i){Hm.value=i}function n(){return Dm.value}function r(i){Dm.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}let Um=Promise.resolve();async function Th(e,t){const n=Zw(),r=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});if(i.ok)return{data:await i.json(),response:i};Bl(i)}catch(i){Bl(i)}}function Eh(e){const t=Um.then(()=>e());return Um=t.then(()=>{},()=>{}),t}function bu(){function e(r){return Eh(()=>Th(r,{method:"GET"}))}function t(r,i){return Eh(()=>Th(r,{body:JSON.stringify(i),method:"POST"}))}function n(r,i){return Eh(()=>Th(r,{body:JSON.stringify(i),method:"PUT"}))}return{GET:e,POST:t,PUT:n}}function Ak(e,t){return`${e}api/datasets/${t}/display`}ne({});function Pk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function Rk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function zk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function Ik(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function Fk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function Bk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Jw(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function Qw(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function Ok(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function Nk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function Lk(e){let t=".",n="__",r="--",i;if(e){let c=e.blockPrefix;c&&(t=c),c=e.elementPrefix,c&&(n=c),c=e.modifierPrefix,c&&(r=c)}const o={install(c){i=c.c;const d=c.context;d.bem={},d.bem.b=null,d.bem.els=null}};function a(c){let d,f;return{before(h){d=h.bem.b,f=h.bem.els,h.bem.els=null},after(h){h.bem.b=d,h.bem.els=f},$({context:h,props:p}){return c=typeof c=="string"?c:c({context:h,props:p}),h.bem.b=c,`${(p==null?void 0:p.bPrefix)||t}${h.bem.b}`}}}function s(c){let d;return{before(f){d=f.bem.els},after(f){f.bem.els=d},$({context:f,props:h}){return c=typeof c=="string"?c:c({context:f,props:h}),f.bem.els=c.split(",").map(p=>p.trim()),f.bem.els.map(p=>`${(h==null?void 0:h.bPrefix)||t}${f.bem.b}${n}${p}`).join(", ")}}}function l(c){return{$({context:d,props:f}){c=typeof c=="string"?c:c({context:d,props:f});const h=c.split(",").map(b=>b.trim());function p(b){return h.map(v=>`&${(f==null?void 0:f.bPrefix)||t}${d.bem.b}${b!==void 0?`${n}${b}`:""}${r}${v}`).join(", ")}const g=d.bem.els;return g!==null?p(g[0]):p()}}}function u(c){return{$({context:d,props:f}){c=typeof c=="string"?c:c({context:d,props:f});const h=d.bem.els;return`&:not(${(f==null?void 0:f.bPrefix)||t}${d.bem.b}${h!==null&&h.length>0?`${n}${h[0]}`:""}${r}${c})`}}}return Object.assign(o,{cB:(...c)=>i(a(c[0]),c[1],c[2]),cE:(...c)=>i(s(c[0]),c[1],c[2]),cM:(...c)=>i(l(c[0]),c[1],c[2]),cNotM:(...c)=>i(u(c[0]),c[1],c[2])}),o}function Dk(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const e2=/\s*,(?![^(]*\))\s*/g,Hk=/\s+/g;function Uk(e,t){const n=[];return t.split(e2).forEach(r=>{let i=Dk(r);if(i){if(i===1){e.forEach(a=>{n.push(r.replace("&",a))});return}}else{e.forEach(a=>{n.push((a&&a+" ")+r)});return}let o=[r];for(;i--;){const a=[];o.forEach(s=>{e.forEach(l=>{a.push(s.replace("&",l))})}),o=a}o.forEach(a=>n.push(a))}),n}function jk(e,t){const n=[];return t.split(e2).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function Wk(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=Uk(t,n):t=jk(t,n))}),t.join(", ").replace(Hk," ")}function jm(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function _d(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function Vk(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Vu(e){return e?/^\s*@(s|m)/.test(e):!1}const qk=/[A-Z]/g;function t2(e){return e.replace(qk,t=>"-"+t.toLowerCase())}function Yk(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
18
|
-
`+Object.entries(e).map(n=>t+` ${
|
|
17
|
+
**/const Q$="http://www.w3.org/2000/svg",ek="http://www.w3.org/1998/Math/MathML",oi=typeof document<"u"?document:null,$m=oi&&oi.createElement("template"),tk={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?oi.createElementNS(Q$,e):t==="mathml"?oi.createElementNS(ek,e):n?oi.createElement(e,{is:n}):oi.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>oi.createTextNode(e),createComment:e=>oi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>oi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const a=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{$m.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const s=$m.content;if(r==="svg"||r==="mathml"){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},$i="transition",$s="animation",Ja=Symbol("_vtc"),wr=(e,{slots:t})=>M(t$,jw(e),t);wr.displayName="Transition";const Uw={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},nk=wr.props=nn({},cw,Uw),_o=(e,t=[])=>{tt(e)?e.forEach(n=>n(...t)):e&&e(...t)},km=e=>e?tt(e)?e.some(t=>t.length>1):e.length>1:!1;function jw(e){const t={};for(const C in e)C in Uw||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=rk(i),g=p&&p[0],b=p&&p[1],{onBeforeEnter:v,onEnter:_,onEnterCancelled:y,onLeave:x,onLeaveCancelled:S,onBeforeAppear:$=v,onAppear:w=_,onAppearCancelled:T=y}=t,k=(C,E,I)=>{Ti(C,E?c:s),Ti(C,E?u:a),I&&I()},P=(C,E)=>{C._isLeaving=!1,Ti(C,d),Ti(C,h),Ti(C,f),E&&E()},R=C=>(E,I)=>{const z=C?w:_,j=()=>k(E,C,I);_o(z,[E,j]),Mm(()=>{Ti(E,C?l:o),ii(E,C?c:s),km(z)||Tm(E,r,g,j)})};return nn(t,{onBeforeEnter(C){_o(v,[C]),ii(C,o),ii(C,a)},onBeforeAppear(C){_o($,[C]),ii(C,l),ii(C,u)},onEnter:R(!1),onAppear:R(!0),onLeave(C,E){C._isLeaving=!0;const I=()=>P(C,E);ii(C,d),ii(C,f),Vw(),Mm(()=>{C._isLeaving&&(Ti(C,d),ii(C,h),km(x)||Tm(C,r,b,I))}),_o(x,[C,I])},onEnterCancelled(C){k(C,!1),_o(y,[C])},onAppearCancelled(C){k(C,!0),_o(T,[C])},onLeaveCancelled(C){P(C),_o(S,[C])}})}function rk(e){if(e==null)return null;if(Rt(e))return[$h(e.enter),$h(e.leave)];{const t=$h(e);return[t,t]}}function $h(e){return lS(e)}function ii(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ja]||(e[Ja]=new Set)).add(t)}function Ti(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ja];n&&(n.delete(t),n.size||(e[Ja]=void 0))}function Mm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ik=0;function Tm(e,t,n,r){const i=e._endId=++ik,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:s,propCount:l}=Ww(e,t);if(!a)return r();const u=a+"end";let c=0;const d=()=>{e.removeEventListener(u,f),o()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},s+1),e.addEventListener(u,f)}function Ww(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),i=r(`${$i}Delay`),o=r(`${$i}Duration`),a=Em(i,o),s=r(`${$s}Delay`),l=r(`${$s}Duration`),u=Em(s,l);let c=null,d=0,f=0;t===$i?a>0&&(c=$i,d=a,f=o.length):t===$s?u>0&&(c=$s,d=u,f=l.length):(d=Math.max(a,u),c=d>0?a>u?$i:$s:null,f=c?c===$i?o.length:l.length:0);const h=c===$i&&/\b(transform|all)(,|$)/.test(r(`${$i}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Em(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Am(n)+Am(e[r])))}function Am(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Vw(){return document.body.offsetHeight}function ok(e,t,n){const r=e[Ja];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Jc=Symbol("_vod"),qw=Symbol("_vsh"),yd={beforeMount(e,{value:t},{transition:n}){e[Jc]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ks(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ks(e,!0),r.enter(e)):r.leave(e,()=>{ks(e,!1)}):ks(e,t))},beforeUnmount(e,{value:t}){ks(e,t)}};function ks(e,t){e.style.display=t?e[Jc]:"none",e[qw]=!t}const ak=Symbol(""),sk=/(^|;)\s*display\s*:/;function lk(e,t,n){const r=e.style,i=Yt(n);let o=!1;if(n&&!i){if(t)if(Yt(t))for(const a of t.split(";")){const s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&Ec(r,s,"")}else for(const a in t)n[a]==null&&Ec(r,a,"");for(const a in n)a==="display"&&(o=!0),Ec(r,a,n[a])}else if(i){if(t!==n){const a=r[ak];a&&(n+=";"+a),r.cssText=n,o=sk.test(n)}}else t&&e.removeAttribute("style");Jc in e&&(e[Jc]=o?r.display:"",e[qw]&&(r.display="none"))}const Pm=/\s*!important$/;function Ec(e,t,n){if(tt(n))n.forEach(r=>Ec(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=uk(e,t);Pm.test(n)?e.setProperty(oo(r),n.replace(Pm,""),"important"):e[r]=n}}const Rm=["Webkit","Moz","ms"],kh={};function uk(e,t){const n=kh[t];if(n)return n;let r=Yi(t);if(r!=="filter"&&r in e)return kh[t]=r;r=Ox(r);for(let i=0;i<Rm.length;i++){const o=Rm[i]+r;if(o in e)return kh[t]=o}return t}const zm="http://www.w3.org/1999/xlink";function Im(e,t,n,r,i,o=pS(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(zm,t.slice(6,t.length)):e.setAttributeNS(zm,t,n):n==null||o&&!Dx(n)?e.removeAttribute(t):e.setAttribute(t,o?"":io(n)?String(n):n)}function ck(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=n;return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,s=n==null?"":String(n);(a!==s||!("_value"in e))&&(e.value=s),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Dx(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(t)}function fk(e,t,n,r){e.addEventListener(t,n,r)}function dk(e,t,n,r){e.removeEventListener(t,n,r)}const Fm=Symbol("_vei");function hk(e,t,n,r,i=null){const o=e[Fm]||(e[Fm]={}),a=o[t];if(r&&a)a.value=r;else{const[s,l]=pk(t);if(r){const u=o[t]=bk(r,i);fk(e,s,u,l)}else a&&(dk(e,s,a,l),o[t]=void 0)}}const Bm=/(?:Once|Passive|Capture)$/;function pk(e){let t;if(Bm.test(e)){t={};let r;for(;r=e.match(Bm);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):oo(e.slice(2)),t]}let Mh=0;const gk=Promise.resolve(),vk=()=>Mh||(gk.then(()=>Mh=0),Mh=Date.now());function bk(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;fr(mk(r,n.value),t,5,[r])};return n.value=e,n.attached=vk(),n}function mk(e,t){if(tt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Om=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,yk=(e,t,n,r,i,o)=>{const a=i==="svg";t==="class"?ok(e,r,a):t==="style"?lk(e,n,r):sd(t)?Eg(t)||hk(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):_k(e,t,r,a))?(ck(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Im(e,t,r,a,o,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Im(e,t,r,a))};function _k(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Om(t)&&it(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Om(t)&&Yt(n)?!1:t in e}const Yw=new WeakMap,Gw=new WeakMap,Qc=Symbol("_moveCb"),Nm=Symbol("_enterCb"),Xw={name:"TransitionGroup",props:nn({},nk,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ps(),r=uw();let i,o;return gw(()=>{if(!i.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!$k(i[0].el,n.vnode.el,a))return;i.forEach(wk),i.forEach(Ck);const s=i.filter(Sk);Vw(),s.forEach(l=>{const u=l.el,c=u.style;ii(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Qc]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Qc]=null,Ti(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=wt(e),s=jw(a);let l=a.tag||Tt;if(i=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&(i.push(c),Za(c,zl(c,s,r,n)),Yw.set(c,c.el.getBoundingClientRect()))}o=t.default?Wg(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&Za(c,zl(c,s,r,n))}return Ye(l,null,o)}}},xk=e=>delete e.mode;Xw.props;const Kw=Xw;function wk(e){const t=e.el;t[Qc]&&t[Qc](),t[Nm]&&t[Nm]()}function Ck(e){Gw.set(e,e.el.getBoundingClientRect())}function Sk(e){const t=Yw.get(e),n=Gw.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",e}}function $k(e,t,n){const r=e.cloneNode(),i=e[Ja];i&&i.forEach(s=>{s.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(s=>s&&r.classList.add(s)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:a}=Ww(r);return o.removeChild(r),a}const kk=nn({patchProp:yk},tk);let Lm;function Mk(){return Lm||(Lm=k$(kk))}const Tk=(...e)=>{const t=Mk().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=Ak(r);if(!i)return;const o=t._component;!it(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,Ek(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function Ek(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ak(e){return Yt(e)?document.querySelector(e):e}function Zw(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function Bl(e){throw Error(Zw(e))}const Dm=ne("/"),Hm=ne("include");function Jw(){function e(){return Hm.value}function t(i){Hm.value=i}function n(){return Dm.value}function r(i){Dm.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}let Um=Promise.resolve();async function Th(e,t){const n=Jw(),r=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});if(i.ok)return{data:await i.json(),response:i};Bl(i)}catch(i){Bl(i)}}function Eh(e){const t=Um.then(()=>e());return Um=t.then(()=>{},()=>{}),t}function bu(){function e(r){return Eh(()=>Th(r,{method:"GET"}))}function t(r,i){return Eh(()=>Th(r,{body:JSON.stringify(i),method:"POST"}))}function n(r,i){return Eh(()=>Th(r,{body:JSON.stringify(i),method:"PUT"}))}return{GET:e,POST:t,PUT:n}}function Pk(e,t){return`${e}api/datasets/${t}/display`}ne({});function Rk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function zk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Ik(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function Fk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function Bk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function Ok(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Qw(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function e2(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function Nk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function Lk(e,t){return We(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function Dk(e){let t=".",n="__",r="--",i;if(e){let c=e.blockPrefix;c&&(t=c),c=e.elementPrefix,c&&(n=c),c=e.modifierPrefix,c&&(r=c)}const o={install(c){i=c.c;const d=c.context;d.bem={},d.bem.b=null,d.bem.els=null}};function a(c){let d,f;return{before(h){d=h.bem.b,f=h.bem.els,h.bem.els=null},after(h){h.bem.b=d,h.bem.els=f},$({context:h,props:p}){return c=typeof c=="string"?c:c({context:h,props:p}),h.bem.b=c,`${(p==null?void 0:p.bPrefix)||t}${h.bem.b}`}}}function s(c){let d;return{before(f){d=f.bem.els},after(f){f.bem.els=d},$({context:f,props:h}){return c=typeof c=="string"?c:c({context:f,props:h}),f.bem.els=c.split(",").map(p=>p.trim()),f.bem.els.map(p=>`${(h==null?void 0:h.bPrefix)||t}${f.bem.b}${n}${p}`).join(", ")}}}function l(c){return{$({context:d,props:f}){c=typeof c=="string"?c:c({context:d,props:f});const h=c.split(",").map(b=>b.trim());function p(b){return h.map(v=>`&${(f==null?void 0:f.bPrefix)||t}${d.bem.b}${b!==void 0?`${n}${b}`:""}${r}${v}`).join(", ")}const g=d.bem.els;return g!==null?p(g[0]):p()}}}function u(c){return{$({context:d,props:f}){c=typeof c=="string"?c:c({context:d,props:f});const h=d.bem.els;return`&:not(${(f==null?void 0:f.bPrefix)||t}${d.bem.b}${h!==null&&h.length>0?`${n}${h[0]}`:""}${r}${c})`}}}return Object.assign(o,{cB:(...c)=>i(a(c[0]),c[1],c[2]),cE:(...c)=>i(s(c[0]),c[1],c[2]),cM:(...c)=>i(l(c[0]),c[1],c[2]),cNotM:(...c)=>i(u(c[0]),c[1],c[2])}),o}function Hk(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const t2=/\s*,(?![^(]*\))\s*/g,Uk=/\s+/g;function jk(e,t){const n=[];return t.split(t2).forEach(r=>{let i=Hk(r);if(i){if(i===1){e.forEach(a=>{n.push(r.replace("&",a))});return}}else{e.forEach(a=>{n.push((a&&a+" ")+r)});return}let o=[r];for(;i--;){const a=[];o.forEach(s=>{e.forEach(l=>{a.push(s.replace("&",l))})}),o=a}o.forEach(a=>n.push(a))}),n}function Wk(e,t){const n=[];return t.split(t2).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function Vk(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=jk(t,n):t=Wk(t,n))}),t.join(", ").replace(Uk," ")}function jm(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function _d(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function qk(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Vu(e){return e?/^\s*@(s|m)/.test(e):!1}const Yk=/[A-Z]/g;function n2(e){return e.replace(Yk,t=>"-"+t.toLowerCase())}function Gk(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
18
|
+
`+Object.entries(e).map(n=>t+` ${n2(n[0])}: ${n[1]};`).join(`
|
|
19
19
|
`)+`
|
|
20
|
-
`+t+"}":`: ${e};`}function
|
|
20
|
+
`+t+"}":`: ${e};`}function Xk(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function Wm(e,t,n,r){if(!t)return"";const i=Xk(t,n,r);if(!i)return"";if(typeof i=="string")return`${e} {
|
|
21
21
|
${i}
|
|
22
22
|
}`;const o=Object.keys(i);if(o.length===0)return n.config.keepEmptyBlock?e+` {
|
|
23
23
|
}`:"";const a=e?[e+" {"]:[];return o.forEach(s=>{const l=i[s];if(s==="raw"){a.push(`
|
|
24
24
|
`+l+`
|
|
25
|
-
`);return}s=
|
|
26
|
-
`)}function o0(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))o0(r,t,n);else if(typeof r=="function"){const i=r(t);Array.isArray(i)?o0(i,t,n):i&&n(i)}else r&&n(r)})}function
|
|
25
|
+
`);return}s=n2(s),l!=null&&a.push(` ${s}${Gk(l)}`)}),e&&a.push("}"),a.join(`
|
|
26
|
+
`)}function o0(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))o0(r,t,n);else if(typeof r=="function"){const i=r(t);Array.isArray(i)?o0(i,t,n):i&&n(i)}else r&&n(r)})}function r2(e,t,n,r,i){const o=e.$;let a="";if(!o||typeof o=="string")Vu(o)?a=o:t.push(o);else if(typeof o=="function"){const u=o({context:r.context,props:i});Vu(u)?a=u:t.push(u)}else if(o.before&&o.before(r.context),!o.$||typeof o.$=="string")Vu(o.$)?a=o.$:t.push(o.$);else if(o.$){const u=o.$({context:r.context,props:i});Vu(u)?a=u:t.push(u)}const s=Vk(t),l=Wm(s,e.props,r,i);a?n.push(`${a} {`):l.length&&n.push(l),e.children&&o0(e.children,{context:r.context,props:i},u=>{if(typeof u=="string"){const c=Wm(s,{raw:u},r,i);n.push(c)}else r2(u,t,n,r,i)}),t.pop(),a&&n.push("}"),o&&o.after&&o.after(r.context)}function Kk(e,t,n){const r=[];return r2(e,[],r,t,n),r.join(`
|
|
27
27
|
|
|
28
|
-
`)}function a0(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Kk(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(jm),t.els=[];else{const o=_d(n,r);o&&i.includes(o)&&(jm(o),t.els=i.filter(a=>a!==o))}}function Vm(e,t){e.push(t)}function Zk(e,t,n,r,i,o,a,s,l){let u;if(n===void 0&&(u=t.render(r),n=a0(u)),l){l.adapter(n,u??t.render(r));return}s===void 0&&(s=document.head);const c=_d(n,s);if(c!==null&&!o)return c;const d=c??Vk(n);if(u===void 0&&(u=t.render(r)),d.textContent=u,c!==null)return c;if(a){const f=s.querySelector(`meta[name="${a}"]`);if(f)return s.insertBefore(d,f),Vm(t.els,d),d}return i?s.insertBefore(d,s.querySelector("style, link")):s.appendChild(d),Vm(t.els,d),d}function Jk(e){return Xk(this,this.instance,e)}function Qk(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:o=!1,anchorMetaName:a,parent:s}=e;return Zk(this.instance,this,t,r,i,o,a,s,n)}function e7(e={}){const{id:t,parent:n}=e;Kk(this.instance,this,t,n)}const qu=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Jk,mount:Qk,unmount:e7}},t7=function(e,t,n,r){return Array.isArray(t)?qu(e,{$:null},null,t):Array.isArray(n)?qu(e,t,null,n):Array.isArray(r)?qu(e,t,n,r):qu(e,t,n,null)};function r2(e={}){const t={c:(...n)=>t7(t,...n),use:(n,...r)=>n.install(t,...r),find:_d,context:{},config:e};return t}function n7(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return _d(e)!==null}const r7="n",ef=`.${r7}-`,i7="__",o7="--",i2=r2(),o2=Lk({blockPrefix:ef,elementPrefix:i7,modifierPrefix:o7});i2.use(o2);const{c:ce,find:CZ}=i2,{cB:W,cE:Q,cM:ge,cNotM:Vt}=o2;function a7(e){return ce(({props:{bPrefix:t}})=>`${t||ef}modal, ${t||ef}drawer`,[e])}function s7(e){return ce(({props:{bPrefix:t}})=>`${t||ef}popover`,[e])}const l7=(...e)=>ce(">",[W(...e)]);function Se(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let tf=[];const a2=new WeakMap;function u7(){tf.forEach(e=>e(...a2.get(e))),tf=[]}function s2(e,...t){a2.set(e,t),!tf.includes(e)&&tf.push(e)===1&&requestAnimationFrame(u7)}function vl(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function Qa(e){return e.composedPath()[0]||null}function kn(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Bi(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function Kn(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const qm={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function l2(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function Ac(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function si(e,t,n){t/=100,n/=100;let r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function s0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(o<0?o+6:o),r&&i/r*100,r*100]}function l0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=1-Math.abs(r+r-i-1),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),o?i/o*100:0,(r+r-i)*50]}function nf(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const Kr="^\\s*",Zr="\\s*$",Gi="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",Zn="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",Ro="([0-9A-Fa-f])",zo="([0-9A-Fa-f]{2})",u2=new RegExp(`${Kr}hsl\\s*\\(${Zn},${Gi},${Gi}\\)${Zr}`),c2=new RegExp(`${Kr}hsv\\s*\\(${Zn},${Gi},${Gi}\\)${Zr}`),f2=new RegExp(`${Kr}hsla\\s*\\(${Zn},${Gi},${Gi},${Zn}\\)${Zr}`),d2=new RegExp(`${Kr}hsva\\s*\\(${Zn},${Gi},${Gi},${Zn}\\)${Zr}`),c7=new RegExp(`${Kr}rgb\\s*\\(${Zn},${Zn},${Zn}\\)${Zr}`),f7=new RegExp(`${Kr}rgba\\s*\\(${Zn},${Zn},${Zn},${Zn}\\)${Zr}`),Jg=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Zr}`),Qg=new RegExp(`${Kr}#${zo}${zo}${zo}${Zr}`),ev=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Ro}${Zr}`),tv=new RegExp(`${Kr}#${zo}${zo}${zo}${zo}${Zr}`);function Nn(e){return parseInt(e,16)}function Oo(e){try{let t;if(t=f2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),fi(t[13])];if(t=u2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function Hi(e){try{let t;if(t=d2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),fi(t[13])];if(t=c2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function en(e){try{let t;if(t=Qg.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),1];if(t=c7.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),1];if(t=f7.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),fi(t[13])];if(t=Jg.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),1];if(t=tv.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),fi(Nn(t[4])/255)];if(t=ev.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),fi(Nn(t[4]+t[4])/255)];if(e in qm)return en(qm[e]);if(u2.test(e)||f2.test(e)){const[n,r,i,o]=Oo(e);return[...nf(n,r,i),o]}else if(c2.test(e)||d2.test(e)){const[n,r,i,o]=Hi(e);return[...si(n,r,i),o]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function d7(e){return e>1?1:e<0?0:e}function h7(e,t,n){return`rgb(${Ut(e)}, ${Ut(t)}, ${Ut(n)})`}function u0(e,t,n,r){return`rgba(${Ut(e)}, ${Ut(t)}, ${Ut(n)}, ${d7(r)})`}function Ah(e,t,n,r,i){return Ut((e*t*(1-r)+n*r)/i)}function ir(e,t){Array.isArray(e)||(e=en(e)),Array.isArray(t)||(t=en(t));const n=e[3],r=t[3],i=fi(n+r-n*r);return u0(Ah(e[0],n,t[0],r,i),Ah(e[1],n,t[1],r,i),Ah(e[2],n,t[2],r,i),i)}function nt(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e);return typeof t.alpha=="number"?u0(n,r,i,t.alpha):u0(n,r,i,o)}function Yu(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e),{lightness:a=1,alpha:s=1}=t;return Hr([n*a,r*a,i*a,o*s])}function fi(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function qr(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Ut(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Xt(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function c0(e){const[t,n,r]=Array.isArray(e)?e:en(e);return h7(t,n,r)}function Hr(e){const[t,n,r]=e;return 3 in e?`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, ${fi(e[3])})`:`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, 1)`}function f0(e){return`hsv(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function No(e){const[t,n,r]=e;return 3 in e?`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${fi(e[3])})`:`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function d0(e){return`hsl(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function Ui(e){const[t,n,r]=e;return 3 in e?`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${fi(e[3])})`:`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function ji(e){if(typeof e=="string"){let r;if(r=Qg.exec(e))return`${r[0]}FF`;if(r=tv.exec(e))return r[0];if(r=Jg.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=ev.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>Ut(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":Ut(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function bl(e){if(typeof e=="string"){let t;if(t=Qg.exec(e))return t[0];if(t=tv.exec(e))return t[0].slice(0,7);if(t=Jg.exec(e)||ev.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>Ut(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function p7(e=8){return Math.random().toString(16).slice(2,2+e)}function Pc(e){return e.composedPath()[0]}const g7={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function v7(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(Pc(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=a=>{r=!t.contains(Pc(a))},o=a=>{r&&(t.contains(Pc(a))||n(a))};return{mousedown:i,mouseup:o,touchstart:i,touchend:o}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function h2(e,t,n){const r=g7[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let o=i.get(n);return o===void 0&&i.set(n,o=v7(e,t,n)),o}function b7(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=h2(e,t,n);return Object.keys(i).forEach(o=>{kt(o,document,i[o],r)}),!0}return!1}function m7(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=h2(e,t,n);return Object.keys(i).forEach(o=>{St(o,document,i[o],r)}),!0}return!1}function y7(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(w,T,M){const P=w[T];return w[T]=function(){return M.apply(w,arguments),P.apply(w,arguments)},w}function o(w,T){w[T]=Event.prototype[T]}const a=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function l(){var w;return(w=a.get(this))!==null&&w!==void 0?w:null}function u(w,T){s!==void 0&&Object.defineProperty(w,"currentTarget",{configurable:!0,enumerable:!0,get:T??s.get})}const c={bubble:{},capture:{}},d={};function f(){const w=function(T){const{type:M,eventPhase:P,bubbles:R}=T,C=Pc(T);if(P===2)return;const E=P===1?"capture":"bubble";let I=C;const z=[];for(;I===null&&(I=window),z.push(I),I!==window;)I=I.parentNode||null;const j=c.capture[M],Z=c.bubble[M];if(i(T,"stopPropagation",n),i(T,"stopImmediatePropagation",r),u(T,l),E==="capture"){if(j===void 0)return;for(let J=z.length-1;J>=0&&!e.has(T);--J){const ie=z[J],he=j.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}if(J===0&&!R&&Z!==void 0){const _e=Z.get(ie);if(_e!==void 0)for(const oe of _e){if(t.has(T))break;oe(T)}}}}else if(E==="bubble"){if(Z===void 0)return;for(let J=0;J<z.length&&!e.has(T);++J){const ie=z[J],he=Z.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}}}o(T,"stopPropagation"),o(T,"stopImmediatePropagation"),u(T)};return w.displayName="evtdUnifiedHandler",w}function h(){const w=function(T){const{type:M,eventPhase:P}=T;if(P!==2)return;const R=d[M];R!==void 0&&R.forEach(C=>C(T))};return w.displayName="evtdUnifiedWindowEventHandler",w}const p=f(),g=h();function b(w,T){const M=c[w];return M[T]===void 0&&(M[T]=new Map,window.addEventListener(T,p,w==="capture")),M[T]}function v(w){return d[w]===void 0&&(d[w]=new Set,window.addEventListener(w,g)),d[w]}function x(w,T){let M=w.get(T);return M===void 0&&w.set(T,M=new Set),M}function y(w,T,M,P){const R=c[T][M];if(R!==void 0){const C=R.get(w);if(C!==void 0&&C.has(P))return!0}return!1}function _(w,T){const M=d[w];return!!(M!==void 0&&M.has(T))}function S(w,T,M,P){let R;if(typeof P=="object"&&P.once===!0?R=z=>{$(w,T,R,P),M(z)}:R=M,b7(w,T,R,P))return;const C=P===!0||typeof P=="object"&&P.capture===!0?"capture":"bubble",E=b(C,w),I=x(E,T);if(I.has(R)||I.add(R),T===window){const z=v(w);z.has(R)||z.add(R)}}function $(w,T,M,P){if(m7(w,T,M,P))return;const R=P===!0||typeof P=="object"&&P.capture===!0,C=R?"capture":"bubble",E=b(C,w),I=x(E,T);if(T===window&&!y(T,R?"bubble":"capture",w,M)&&_(w,M)){const z=d[w];z.delete(M),z.size===0&&(window.removeEventListener(w,g),d[w]=void 0)}I.has(M)&&I.delete(M),I.size===0&&E.delete(T),E.size===0&&(window.removeEventListener(w,p,C==="capture"),c[C][w]=void 0)}return{on:S,off:$}}const{on:kt,off:St}=y7();function _7(e){const t=ne(!!e.value);if(t.value)return El(t);const n=vt(e,r=>{r&&(t.value=!0,n())});return El(t)}function Ht(e){const t=pe(e),n=ne(t.value);return vt(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const x7=typeof window<"u";let ml,yl;const w7=()=>{var e,t;ml=x7?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,yl=!1,ml!==void 0?ml.then(()=>{yl=!0}):yl=!0};w7();function p2(e){if(yl)return;let t=!1;dn(()=>{yl||ml==null||ml.then(()=>{t||e()})}),Bn(()=>{t=!0})}function Yr(e,t){return vt(e,n=>{n!==void 0&&(t.value=n)}),pe(()=>e.value===void 0?t.value:e.value)}function gs(){const e=ne(!1);return dn(()=>{e.value=!0}),El(e)}function rf(e,t){return pe(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const C7=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function S7(){return C7}const nv="n-internal-select-menu",g2="n-internal-select-menu-body",v2="n-drawer-body",b2="n-modal-body",m2="n-popover-body",y2="__disabled__";function Pn(e){const t=$t(b2,null),n=$t(v2,null),r=$t(m2,null),i=$t(g2,null),o=ne();if(typeof document<"u"){o.value=document.fullscreenElement;const a=()=>{o.value=document.fullscreenElement};dn(()=>{kt("fullscreenchange",document,a)}),Bn(()=>{St("fullscreenchange",document,a)})}return Ht(()=>{var a;const{to:s}=e;return s!==void 0?s===!1?y2:s===!0?o.value||"body":s:t!=null&&t.value?(a=t.value.$el)!==null&&a!==void 0?a:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(o.value||"body")})}Pn.tdkey=y2;Pn.propTo={type:[String,Object,Boolean],default:void 0};const xd=typeof document<"u"&&typeof window<"u";function $7(e){const t={isDeactivated:!1};let n=!1;return Vg(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),qg(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function h0(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function p0(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){p0(r,t,n);return}if(r.type===Tt){if(r.children===null)return;Array.isArray(r.children)&&p0(r.children,t,n)}else r.type!==sn&&n.push(r)}}),n}function Ym(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=p0(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let $i=null;function _2(){if($i===null&&($i=document.getElementById("v-binder-view-measurer"),$i===null)){$i=document.createElement("div"),$i.id="v-binder-view-measurer";const{style:e}=$i;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild($i)}return $i.getBoundingClientRect()}function k7(e,t){const n=_2();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Ph(e){const t=e.getBoundingClientRect(),n=_2();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function M7(e){return e.nodeType===9?null:e.parentNode}function x2(e){if(e===null)return null;const t=M7(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return x2(t)}const wd=Ie({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;jn("VBinder",(t=ps())===null||t===void 0?void 0:t.proxy);const n=$t("VBinder",null),r=ne(null),i=v=>{r.value=v,n&&e.syncTargetWithParent&&n.setTargetRef(v)};let o=[];const a=()=>{let v=r.value;for(;v=x2(v),v!==null;)o.push(v);for(const x of o)kt("scroll",x,d,!0)},s=()=>{for(const v of o)St("scroll",v,d,!0);o=[]},l=new Set,u=v=>{l.size===0&&a(),l.has(v)||l.add(v)},c=v=>{l.has(v)&&l.delete(v),l.size===0&&s()},d=()=>{s2(f)},f=()=>{l.forEach(v=>v())},h=new Set,p=v=>{h.size===0&&kt("resize",window,b),h.has(v)||h.add(v)},g=v=>{h.has(v)&&h.delete(v),h.size===0&&St("resize",window,b)},b=()=>{h.forEach(v=>v())};return Bn(()=>{St("resize",window,b),s()}),{targetRef:r,setTargetRef:i,addScrollListener:u,removeScrollListener:c,addResizeListener:p,removeResizeListener:g}},render(){return h0("binder",this.$slots)}}),Cd=Ie({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=$t("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?lo(Ym("follower",this.$slots),[[t]]):Ym("follower",this.$slots)}}),Ca="@@mmoContext",T7={mounted(e,{value:t}){e[Ca]={handler:void 0},typeof t=="function"&&(e[Ca].handler=t,kt("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Ca];typeof t=="function"?n.handler?n.handler!==t&&(St("mousemoveoutside",e,n.handler),n.handler=t,kt("mousemoveoutside",e,t)):(e[Ca].handler=t,kt("mousemoveoutside",e,t)):n.handler&&(St("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Ca];t&&St("mousemoveoutside",e,t),e[Ca].handler=void 0}},Sa="@@coContext",Ol={mounted(e,{value:t,modifiers:n}){e[Sa]={handler:void 0},typeof t=="function"&&(e[Sa].handler=t,kt("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Sa];typeof t=="function"?r.handler?r.handler!==t&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,kt("clickoutside",e,t,{capture:n.capture})):(e[Sa].handler=t,kt("clickoutside",e,t,{capture:n.capture})):r.handler&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Sa];n&&St("clickoutside",e,n,{capture:t.capture}),e[Sa].handler=void 0}};function E7(e,t){console.error(`[vdirs/${e}]: ${t}`)}class A7{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&E7("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const Rh=new A7,$a="@@ziContext",w2={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[$a]={enabled:!!i,initialized:!1},i&&(Rh.ensureZIndex(e,r),e[$a].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,o=e[$a].enabled;i&&!o&&(Rh.ensureZIndex(e,r),e[$a].initialized=!0),e[$a].enabled=!!i},unmounted(e,t){if(!e[$a].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Rh.unregister(e,r)}},P7="@css-render/vue3-ssr";function R7(e,t){return`<style cssr-id="${e}">
|
|
28
|
+
`)}function a0(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Zk(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(jm),t.els=[];else{const o=_d(n,r);o&&i.includes(o)&&(jm(o),t.els=i.filter(a=>a!==o))}}function Vm(e,t){e.push(t)}function Jk(e,t,n,r,i,o,a,s,l){let u;if(n===void 0&&(u=t.render(r),n=a0(u)),l){l.adapter(n,u??t.render(r));return}s===void 0&&(s=document.head);const c=_d(n,s);if(c!==null&&!o)return c;const d=c??qk(n);if(u===void 0&&(u=t.render(r)),d.textContent=u,c!==null)return c;if(a){const f=s.querySelector(`meta[name="${a}"]`);if(f)return s.insertBefore(d,f),Vm(t.els,d),d}return i?s.insertBefore(d,s.querySelector("style, link")):s.appendChild(d),Vm(t.els,d),d}function Qk(e){return Kk(this,this.instance,e)}function e7(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:o=!1,anchorMetaName:a,parent:s}=e;return Jk(this.instance,this,t,r,i,o,a,s,n)}function t7(e={}){const{id:t,parent:n}=e;Zk(this.instance,this,t,n)}const qu=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Qk,mount:e7,unmount:t7}},n7=function(e,t,n,r){return Array.isArray(t)?qu(e,{$:null},null,t):Array.isArray(n)?qu(e,t,null,n):Array.isArray(r)?qu(e,t,n,r):qu(e,t,n,null)};function i2(e={}){const t={c:(...n)=>n7(t,...n),use:(n,...r)=>n.install(t,...r),find:_d,context:{},config:e};return t}function r7(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return _d(e)!==null}const i7="n",ef=`.${i7}-`,o7="__",a7="--",o2=i2(),a2=Dk({blockPrefix:ef,elementPrefix:o7,modifierPrefix:a7});o2.use(a2);const{c:ce,find:CZ}=o2,{cB:W,cE:Q,cM:ge,cNotM:Vt}=a2;function s7(e){return ce(({props:{bPrefix:t}})=>`${t||ef}modal, ${t||ef}drawer`,[e])}function l7(e){return ce(({props:{bPrefix:t}})=>`${t||ef}popover`,[e])}const u7=(...e)=>ce(">",[W(...e)]);function Se(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let tf=[];const s2=new WeakMap;function c7(){tf.forEach(e=>e(...s2.get(e))),tf=[]}function l2(e,...t){s2.set(e,t),!tf.includes(e)&&tf.push(e)===1&&requestAnimationFrame(c7)}function vl(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function Qa(e){return e.composedPath()[0]||null}function kn(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Bi(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function Kn(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const qm={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function u2(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function Ac(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function li(e,t,n){t/=100,n/=100;let r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function s0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(o<0?o+6:o),r&&i/r*100,r*100]}function l0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=1-Math.abs(r+r-i-1),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),o?i/o*100:0,(r+r-i)*50]}function nf(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const Kr="^\\s*",Zr="\\s*$",Gi="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",Zn="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",Ro="([0-9A-Fa-f])",zo="([0-9A-Fa-f]{2})",c2=new RegExp(`${Kr}hsl\\s*\\(${Zn},${Gi},${Gi}\\)${Zr}`),f2=new RegExp(`${Kr}hsv\\s*\\(${Zn},${Gi},${Gi}\\)${Zr}`),d2=new RegExp(`${Kr}hsla\\s*\\(${Zn},${Gi},${Gi},${Zn}\\)${Zr}`),h2=new RegExp(`${Kr}hsva\\s*\\(${Zn},${Gi},${Gi},${Zn}\\)${Zr}`),f7=new RegExp(`${Kr}rgb\\s*\\(${Zn},${Zn},${Zn}\\)${Zr}`),d7=new RegExp(`${Kr}rgba\\s*\\(${Zn},${Zn},${Zn},${Zn}\\)${Zr}`),Jg=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Zr}`),Qg=new RegExp(`${Kr}#${zo}${zo}${zo}${Zr}`),ev=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Ro}${Zr}`),tv=new RegExp(`${Kr}#${zo}${zo}${zo}${zo}${Zr}`);function Nn(e){return parseInt(e,16)}function Oo(e){try{let t;if(t=d2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),di(t[13])];if(t=c2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function Hi(e){try{let t;if(t=h2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),di(t[13])];if(t=f2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function en(e){try{let t;if(t=Qg.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),1];if(t=f7.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),1];if(t=d7.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),di(t[13])];if(t=Jg.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),1];if(t=tv.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),di(Nn(t[4])/255)];if(t=ev.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),di(Nn(t[4]+t[4])/255)];if(e in qm)return en(qm[e]);if(c2.test(e)||d2.test(e)){const[n,r,i,o]=Oo(e);return[...nf(n,r,i),o]}else if(f2.test(e)||h2.test(e)){const[n,r,i,o]=Hi(e);return[...li(n,r,i),o]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function h7(e){return e>1?1:e<0?0:e}function p7(e,t,n){return`rgb(${Ut(e)}, ${Ut(t)}, ${Ut(n)})`}function u0(e,t,n,r){return`rgba(${Ut(e)}, ${Ut(t)}, ${Ut(n)}, ${h7(r)})`}function Ah(e,t,n,r,i){return Ut((e*t*(1-r)+n*r)/i)}function ir(e,t){Array.isArray(e)||(e=en(e)),Array.isArray(t)||(t=en(t));const n=e[3],r=t[3],i=di(n+r-n*r);return u0(Ah(e[0],n,t[0],r,i),Ah(e[1],n,t[1],r,i),Ah(e[2],n,t[2],r,i),i)}function nt(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e);return typeof t.alpha=="number"?u0(n,r,i,t.alpha):u0(n,r,i,o)}function Yu(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e),{lightness:a=1,alpha:s=1}=t;return Hr([n*a,r*a,i*a,o*s])}function di(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function qr(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Ut(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Xt(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function c0(e){const[t,n,r]=Array.isArray(e)?e:en(e);return p7(t,n,r)}function Hr(e){const[t,n,r]=e;return 3 in e?`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, ${di(e[3])})`:`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, 1)`}function f0(e){return`hsv(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function No(e){const[t,n,r]=e;return 3 in e?`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${di(e[3])})`:`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function d0(e){return`hsl(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function Ui(e){const[t,n,r]=e;return 3 in e?`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${di(e[3])})`:`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function ji(e){if(typeof e=="string"){let r;if(r=Qg.exec(e))return`${r[0]}FF`;if(r=tv.exec(e))return r[0];if(r=Jg.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=ev.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>Ut(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":Ut(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function bl(e){if(typeof e=="string"){let t;if(t=Qg.exec(e))return t[0];if(t=tv.exec(e))return t[0].slice(0,7);if(t=Jg.exec(e)||ev.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>Ut(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function g7(e=8){return Math.random().toString(16).slice(2,2+e)}function Pc(e){return e.composedPath()[0]}const v7={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function b7(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(Pc(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=a=>{r=!t.contains(Pc(a))},o=a=>{r&&(t.contains(Pc(a))||n(a))};return{mousedown:i,mouseup:o,touchstart:i,touchend:o}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function p2(e,t,n){const r=v7[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let o=i.get(n);return o===void 0&&i.set(n,o=b7(e,t,n)),o}function m7(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=p2(e,t,n);return Object.keys(i).forEach(o=>{kt(o,document,i[o],r)}),!0}return!1}function y7(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=p2(e,t,n);return Object.keys(i).forEach(o=>{St(o,document,i[o],r)}),!0}return!1}function _7(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(w,T,k){const P=w[T];return w[T]=function(){return k.apply(w,arguments),P.apply(w,arguments)},w}function o(w,T){w[T]=Event.prototype[T]}const a=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function l(){var w;return(w=a.get(this))!==null&&w!==void 0?w:null}function u(w,T){s!==void 0&&Object.defineProperty(w,"currentTarget",{configurable:!0,enumerable:!0,get:T??s.get})}const c={bubble:{},capture:{}},d={};function f(){const w=function(T){const{type:k,eventPhase:P,bubbles:R}=T,C=Pc(T);if(P===2)return;const E=P===1?"capture":"bubble";let I=C;const z=[];for(;I===null&&(I=window),z.push(I),I!==window;)I=I.parentNode||null;const j=c.capture[k],Z=c.bubble[k];if(i(T,"stopPropagation",n),i(T,"stopImmediatePropagation",r),u(T,l),E==="capture"){if(j===void 0)return;for(let J=z.length-1;J>=0&&!e.has(T);--J){const ie=z[J],he=j.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}if(J===0&&!R&&Z!==void 0){const _e=Z.get(ie);if(_e!==void 0)for(const oe of _e){if(t.has(T))break;oe(T)}}}}else if(E==="bubble"){if(Z===void 0)return;for(let J=0;J<z.length&&!e.has(T);++J){const ie=z[J],he=Z.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}}}o(T,"stopPropagation"),o(T,"stopImmediatePropagation"),u(T)};return w.displayName="evtdUnifiedHandler",w}function h(){const w=function(T){const{type:k,eventPhase:P}=T;if(P!==2)return;const R=d[k];R!==void 0&&R.forEach(C=>C(T))};return w.displayName="evtdUnifiedWindowEventHandler",w}const p=f(),g=h();function b(w,T){const k=c[w];return k[T]===void 0&&(k[T]=new Map,window.addEventListener(T,p,w==="capture")),k[T]}function v(w){return d[w]===void 0&&(d[w]=new Set,window.addEventListener(w,g)),d[w]}function _(w,T){let k=w.get(T);return k===void 0&&w.set(T,k=new Set),k}function y(w,T,k,P){const R=c[T][k];if(R!==void 0){const C=R.get(w);if(C!==void 0&&C.has(P))return!0}return!1}function x(w,T){const k=d[w];return!!(k!==void 0&&k.has(T))}function S(w,T,k,P){let R;if(typeof P=="object"&&P.once===!0?R=z=>{$(w,T,R,P),k(z)}:R=k,m7(w,T,R,P))return;const C=P===!0||typeof P=="object"&&P.capture===!0?"capture":"bubble",E=b(C,w),I=_(E,T);if(I.has(R)||I.add(R),T===window){const z=v(w);z.has(R)||z.add(R)}}function $(w,T,k,P){if(y7(w,T,k,P))return;const R=P===!0||typeof P=="object"&&P.capture===!0,C=R?"capture":"bubble",E=b(C,w),I=_(E,T);if(T===window&&!y(T,R?"bubble":"capture",w,k)&&x(w,k)){const z=d[w];z.delete(k),z.size===0&&(window.removeEventListener(w,g),d[w]=void 0)}I.has(k)&&I.delete(k),I.size===0&&E.delete(T),E.size===0&&(window.removeEventListener(w,p,C==="capture"),c[C][w]=void 0)}return{on:S,off:$}}const{on:kt,off:St}=_7();function x7(e){const t=ne(!!e.value);if(t.value)return El(t);const n=vt(e,r=>{r&&(t.value=!0,n())});return El(t)}function Ht(e){const t=pe(e),n=ne(t.value);return vt(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const w7=typeof window<"u";let ml,yl;const C7=()=>{var e,t;ml=w7?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,yl=!1,ml!==void 0?ml.then(()=>{yl=!0}):yl=!0};C7();function g2(e){if(yl)return;let t=!1;dn(()=>{yl||ml==null||ml.then(()=>{t||e()})}),Bn(()=>{t=!0})}function Yr(e,t){return vt(e,n=>{n!==void 0&&(t.value=n)}),pe(()=>e.value===void 0?t.value:e.value)}function gs(){const e=ne(!1);return dn(()=>{e.value=!0}),El(e)}function rf(e,t){return pe(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const S7=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function $7(){return S7}const nv="n-internal-select-menu",v2="n-internal-select-menu-body",b2="n-drawer-body",m2="n-modal-body",y2="n-popover-body",_2="__disabled__";function Pn(e){const t=$t(m2,null),n=$t(b2,null),r=$t(y2,null),i=$t(v2,null),o=ne();if(typeof document<"u"){o.value=document.fullscreenElement;const a=()=>{o.value=document.fullscreenElement};dn(()=>{kt("fullscreenchange",document,a)}),Bn(()=>{St("fullscreenchange",document,a)})}return Ht(()=>{var a;const{to:s}=e;return s!==void 0?s===!1?_2:s===!0?o.value||"body":s:t!=null&&t.value?(a=t.value.$el)!==null&&a!==void 0?a:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(o.value||"body")})}Pn.tdkey=_2;Pn.propTo={type:[String,Object,Boolean],default:void 0};const xd=typeof document<"u"&&typeof window<"u";function k7(e){const t={isDeactivated:!1};let n=!1;return Vg(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),qg(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function h0(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function p0(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){p0(r,t,n);return}if(r.type===Tt){if(r.children===null)return;Array.isArray(r.children)&&p0(r.children,t,n)}else r.type!==sn&&n.push(r)}}),n}function Ym(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=p0(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let ki=null;function x2(){if(ki===null&&(ki=document.getElementById("v-binder-view-measurer"),ki===null)){ki=document.createElement("div"),ki.id="v-binder-view-measurer";const{style:e}=ki;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(ki)}return ki.getBoundingClientRect()}function M7(e,t){const n=x2();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Ph(e){const t=e.getBoundingClientRect(),n=x2();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function T7(e){return e.nodeType===9?null:e.parentNode}function w2(e){if(e===null)return null;const t=T7(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return w2(t)}const wd=Ie({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;jn("VBinder",(t=ps())===null||t===void 0?void 0:t.proxy);const n=$t("VBinder",null),r=ne(null),i=v=>{r.value=v,n&&e.syncTargetWithParent&&n.setTargetRef(v)};let o=[];const a=()=>{let v=r.value;for(;v=w2(v),v!==null;)o.push(v);for(const _ of o)kt("scroll",_,d,!0)},s=()=>{for(const v of o)St("scroll",v,d,!0);o=[]},l=new Set,u=v=>{l.size===0&&a(),l.has(v)||l.add(v)},c=v=>{l.has(v)&&l.delete(v),l.size===0&&s()},d=()=>{l2(f)},f=()=>{l.forEach(v=>v())},h=new Set,p=v=>{h.size===0&&kt("resize",window,b),h.has(v)||h.add(v)},g=v=>{h.has(v)&&h.delete(v),h.size===0&&St("resize",window,b)},b=()=>{h.forEach(v=>v())};return Bn(()=>{St("resize",window,b),s()}),{targetRef:r,setTargetRef:i,addScrollListener:u,removeScrollListener:c,addResizeListener:p,removeResizeListener:g}},render(){return h0("binder",this.$slots)}}),Cd=Ie({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=$t("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?lo(Ym("follower",this.$slots),[[t]]):Ym("follower",this.$slots)}}),Ca="@@mmoContext",E7={mounted(e,{value:t}){e[Ca]={handler:void 0},typeof t=="function"&&(e[Ca].handler=t,kt("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Ca];typeof t=="function"?n.handler?n.handler!==t&&(St("mousemoveoutside",e,n.handler),n.handler=t,kt("mousemoveoutside",e,t)):(e[Ca].handler=t,kt("mousemoveoutside",e,t)):n.handler&&(St("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Ca];t&&St("mousemoveoutside",e,t),e[Ca].handler=void 0}},Sa="@@coContext",Ol={mounted(e,{value:t,modifiers:n}){e[Sa]={handler:void 0},typeof t=="function"&&(e[Sa].handler=t,kt("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Sa];typeof t=="function"?r.handler?r.handler!==t&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,kt("clickoutside",e,t,{capture:n.capture})):(e[Sa].handler=t,kt("clickoutside",e,t,{capture:n.capture})):r.handler&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Sa];n&&St("clickoutside",e,n,{capture:t.capture}),e[Sa].handler=void 0}};function A7(e,t){console.error(`[vdirs/${e}]: ${t}`)}class P7{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&A7("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const Rh=new P7,$a="@@ziContext",C2={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[$a]={enabled:!!i,initialized:!1},i&&(Rh.ensureZIndex(e,r),e[$a].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,o=e[$a].enabled;i&&!o&&(Rh.ensureZIndex(e,r),e[$a].initialized=!0),e[$a].enabled=!!i},unmounted(e,t){if(!e[$a].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Rh.unregister(e,r)}},R7="@css-render/vue3-ssr";function z7(e,t){return`<style cssr-id="${e}">
|
|
29
29
|
${t}
|
|
30
|
-
</style>`}function z7(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(R7(e,t)))}const I7=typeof document<"u";function uo(){if(I7)return;const e=$t(P7,null);if(e!==null)return{adapter:(t,n)=>z7(t,n,e),context:e}}function Gm(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:Nr}=r2(),Sd="vueuc-style";function Xm(e){return e&-e}class C2{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=Xm(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let o=t*r;for(;t>0;)o+=n[t],t-=Xm(t);return o}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),o=this.sum(i);if(o>t){r=i;continue}else if(o<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function Km(e){return typeof e=="string"?document.querySelector(e):e()}const F7=Ie({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:_7(et(e,"show")),mergedTo:pe(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?h0("lazy-teleport",this.$slots):k(S$,{disabled:this.disabled,to:this.mergedTo},h0("lazy-teleport",this.$slots)):null}}),Gu={top:"bottom",bottom:"top",left:"right",right:"left"},Zm={start:"end",center:"center",end:"start"},zh={top:"height",bottom:"height",left:"width",right:"width"},B7={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},O7={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},N7={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Jm={top:!0,bottom:!1,left:!0,right:!1},Qm={top:"end",bottom:"start",left:"end",right:"start"};function L7(e,t,n,r,i,o){if(!i||o)return{placement:e,top:0,left:0};const[a,s]=e.split("-");let l=s??"center",u={top:0,left:0};const c=(h,p,g)=>{let b=0,v=0;const x=n[h]-t[p]-t[h];return x>0&&r&&(g?v=Jm[p]?x:-x:b=Jm[p]?x:-x),{left:b,top:v}},d=a==="left"||a==="right";if(l!=="center"){const h=N7[e],p=Gu[h],g=zh[h];if(n[g]>t[g]){if(t[h]+t[g]<n[g]){const b=(n[g]-t[g])/2;t[h]<b||t[p]<b?t[h]<t[p]?(l=Zm[s],u=c(g,p,d)):u=c(g,h,d):l="center"}}else n[g]<t[g]&&t[p]<0&&t[h]>t[p]&&(l=Zm[s])}else{const h=a==="bottom"||a==="top"?"left":"top",p=Gu[h],g=zh[h],b=(n[g]-t[g])/2;(t[h]<b||t[p]<b)&&(t[h]>t[p]?(l=Qm[h],u=c(g,h,d)):(l=Qm[p],u=c(g,p,d)))}let f=a;return t[a]<n[zh[a]]&&t[a]<t[Gu[a]]&&(f=Gu[a]),{placement:l!=="center"?`${f}-${l}`:f,left:u.left,top:u.top}}function D7(e,t){return t?O7[e]:B7[e]}function H7(e,t,n,r,i,o){if(o)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const U7=Nr([Nr(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Nr(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Nr("> *",{pointerEvents:"all"})])]),$d=Ie({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=$t("VBinder"),n=Ht(()=>e.enabled!==void 0?e.enabled:e.show),r=ne(null),i=ne(null),o=()=>{const{syncTrigger:f}=e;f.includes("scroll")&&t.addScrollListener(l),f.includes("resize")&&t.addResizeListener(l)},a=()=>{t.removeScrollListener(l),t.removeResizeListener(l)};dn(()=>{n.value&&(l(),o())});const s=uo();U7.mount({id:"vueuc/binder",head:!0,anchorMetaName:Sd,ssr:s}),Bn(()=>{a()}),p2(()=>{n.value&&l()});const l=()=>{if(!n.value)return;const f=r.value;if(f===null)return;const h=t.targetRef,{x:p,y:g,overlap:b}=e,v=p!==void 0&&g!==void 0?k7(p,g):Ph(h);f.style.setProperty("--v-target-width",`${Math.round(v.width)}px`),f.style.setProperty("--v-target-height",`${Math.round(v.height)}px`);const{width:x,minWidth:y,placement:_,internalShift:S,flip:$}=e;f.setAttribute("v-placement",_),b?f.setAttribute("v-overlap",""):f.removeAttribute("v-overlap");const{style:w}=f;x==="target"?w.width=`${v.width}px`:x!==void 0?w.width=x:w.width="",y==="target"?w.minWidth=`${v.width}px`:y!==void 0?w.minWidth=y:w.minWidth="";const T=Ph(f),M=Ph(i.value),{left:P,top:R,placement:C}=L7(_,v,T,S,$,b),E=D7(C,b),{left:I,top:z,transform:j}=H7(C,M,v,R,P,b);f.setAttribute("v-placement",C),f.style.setProperty("--v-offset-left",`${Math.round(P)}px`),f.style.setProperty("--v-offset-top",`${Math.round(R)}px`),f.style.transform=`translateX(${I}) translateY(${z}) ${j}`,f.style.setProperty("--v-transform-origin",E),f.style.transformOrigin=E};vt(n,f=>{f?(o(),u()):a()});const u=()=>{fn().then(l).catch(f=>console.error(f))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(f=>{vt(et(e,f),l)}),["teleportDisabled"].forEach(f=>{vt(et(e,f),u)}),vt(et(e,"syncTrigger"),f=>{f.includes("resize")?t.addResizeListener(l):t.removeResizeListener(l),f.includes("scroll")?t.addScrollListener(l):t.removeScrollListener(l)});const c=gs(),d=Ht(()=>{const{to:f}=e;if(f!==void 0)return f;c.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:d,syncPosition:l}},render(){return k(F7,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=k("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[k("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?lo(n,[[w2,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var Lo=[],j7=function(){return Lo.some(function(e){return e.activeTargets.length>0})},W7=function(){return Lo.some(function(e){return e.skippedTargets.length>0})},e1="ResizeObserver loop completed with undelivered notifications.",V7=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:e1}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=e1),window.dispatchEvent(e)},Nl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Nl||(Nl={}));var Do=function(e){return Object.freeze(e)},q7=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Do(this)}return e}(),S2=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Do(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),rv=function(e){return e instanceof SVGElement&&"getBBox"in e},$2=function(e){if(rv(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},t1=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Y7=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},_l=typeof window<"u"?window:{},Xu=new WeakMap,n1=/auto|scroll/,G7=/^tb|vertical/,X7=/msie|trident/i.test(_l.navigator&&_l.navigator.userAgent),Ar=function(e){return parseFloat(e||"0")},Ha=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new q7((n?t:e)||0,(n?e:t)||0)},r1=Do({devicePixelContentBoxSize:Ha(),borderBoxSize:Ha(),contentBoxSize:Ha(),contentRect:new S2(0,0,0,0)}),k2=function(e,t){if(t===void 0&&(t=!1),Xu.has(e)&&!t)return Xu.get(e);if($2(e))return Xu.set(e,r1),r1;var n=getComputedStyle(e),r=rv(e)&&e.ownerSVGElement&&e.getBBox(),i=!X7&&n.boxSizing==="border-box",o=G7.test(n.writingMode||""),a=!r&&n1.test(n.overflowY||""),s=!r&&n1.test(n.overflowX||""),l=r?0:Ar(n.paddingTop),u=r?0:Ar(n.paddingRight),c=r?0:Ar(n.paddingBottom),d=r?0:Ar(n.paddingLeft),f=r?0:Ar(n.borderTopWidth),h=r?0:Ar(n.borderRightWidth),p=r?0:Ar(n.borderBottomWidth),g=r?0:Ar(n.borderLeftWidth),b=d+u,v=l+c,x=g+h,y=f+p,_=s?e.offsetHeight-y-e.clientHeight:0,S=a?e.offsetWidth-x-e.clientWidth:0,$=i?b+x:0,w=i?v+y:0,T=r?r.width:Ar(n.width)-$-S,M=r?r.height:Ar(n.height)-w-_,P=T+b+S+x,R=M+v+_+y,C=Do({devicePixelContentBoxSize:Ha(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Ha(P,R,o),contentBoxSize:Ha(T,M,o),contentRect:new S2(d,l,T,M)});return Xu.set(e,C),C},M2=function(e,t,n){var r=k2(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Nl.DEVICE_PIXEL_CONTENT_BOX:return a;case Nl.BORDER_BOX:return i;default:return o}},K7=function(){function e(t){var n=k2(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Do([n.borderBoxSize]),this.contentBoxSize=Do([n.contentBoxSize]),this.devicePixelContentBoxSize=Do([n.devicePixelContentBoxSize])}return e}(),T2=function(e){if($2(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Z7=function(){var e=1/0,t=[];Lo.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(s){var l=new K7(s.target),u=T2(s.target);a.push(l),s.lastReportedSize=M2(s.target,s.observedBox),u<e&&(e=u)}),t.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},i1=function(e){Lo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(T2(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},J7=function(){var e=0;for(i1(e);j7();)e=Z7(),i1(e);return W7()&&V7(),e>0},Ih,E2=[],Q7=function(){return E2.splice(0).forEach(function(e){return e()})},e9=function(e){if(!Ih){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Q7()}).observe(n,r),Ih=function(){n.textContent="".concat(t?t--:t++)}}E2.push(e),Ih()},t9=function(e){e9(function(){requestAnimationFrame(e)})},Rc=0,n9=function(){return!!Rc},r9=250,i9={attributes:!0,characterData:!0,childList:!0,subtree:!0},o1=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],a1=function(e){return e===void 0&&(e=0),Date.now()+e},Fh=!1,o9=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=r9),!Fh){Fh=!0;var r=a1(t);t9(function(){var i=!1;try{i=J7()}finally{if(Fh=!1,t=r-a1(),!n9())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,i9)};document.body?n():_l.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),o1.forEach(function(n){return _l.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),o1.forEach(function(n){return _l.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),g0=new o9,s1=function(e){!Rc&&e>0&&g0.start(),Rc+=e,!Rc&&g0.stop()},a9=function(e){return!rv(e)&&!Y7(e)&&getComputedStyle(e).display==="inline"},s9=function(){function e(t,n){this.target=t,this.observedBox=n||Nl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=M2(this.target,this.observedBox,!0);return a9(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),l9=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Ku=new WeakMap,l1=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Zu=function(){function e(){}return e.connect=function(t,n){var r=new l9(t,n);Ku.set(t,r)},e.observe=function(t,n,r){var i=Ku.get(t),o=i.observationTargets.length===0;l1(i.observationTargets,n)<0&&(o&&Lo.push(i),i.observationTargets.push(new s9(n,r&&r.box)),s1(1),g0.schedule())},e.unobserve=function(t,n){var r=Ku.get(t),i=l1(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Lo.splice(Lo.indexOf(r),1),r.observationTargets.splice(i,1),s1(-1))},e.disconnect=function(t){var n=this,r=Ku.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),u9=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Zu.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!t1(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!t1(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.unobserve(this,t)},e.prototype.disconnect=function(){Zu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class c9{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||u9)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const of=new c9,Wi=Ie({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=ps().proxy;function r(i){const{onResize:o}=e;o!==void 0&&o(i)}dn(()=>{const i=n.$el;if(i===void 0){Gm("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){Gm("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(of.registerHandler(i.nextElementSibling,r),t=!0)}),Bn(()=>{t&&of.unregisterHandler(n.$el.nextElementSibling)})},render(){return Yg(this.$slots,"default")}});let Ju;function f9(){return typeof document>"u"?!1:(Ju===void 0&&("matchMedia"in window?Ju=window.matchMedia("(pointer:coarse)").matches:Ju=!1),Ju)}let Bh;function u1(){return typeof document>"u"?1:(Bh===void 0&&(Bh="chrome"in window?window.devicePixelRatio:1),Bh)}const A2="VVirtualListXScroll";function d9({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const r=ne(0),i=ne(0),o=pe(()=>{const u=e.value;if(u.length===0)return null;const c=new C2(u.length,0);return u.forEach((d,f)=>{c.add(f,d.width)}),c}),a=Ht(()=>{const u=o.value;return u!==null?Math.max(u.getBound(i.value)-1,0):0}),s=u=>{const c=o.value;return c!==null?c.sum(u):0},l=Ht(()=>{const u=o.value;return u!==null?Math.min(u.getBound(i.value+r.value)+1,e.value.length-1):0});return jn(A2,{startIndexRef:a,endIndexRef:l,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:s}),{listWidthRef:r,scrollLeftRef:i}}const c1=Ie({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:o}=$t(A2);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:o,getLeft:r}},render(){const{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:o,item:a}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:a,getLeft:o});if(r!=null){const s=[];for(let l=e;l<=t;++l){const u=n[l];s.push(r({column:u,left:o(l),item:a}))}return s}return null}}),h9=Nr(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Nr("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),p9=Ie({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=uo();h9.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Sd,ssr:t}),dn(()=>{const{defaultScrollIndex:E,defaultScrollKey:I}=e;E!=null?b({index:E}):I!=null&&b({key:I})});let n=!1,r=!1;Vg(()=>{if(n=!1,!r){r=!0;return}b({top:h.value,left:a.value})}),qg(()=>{n=!0,r||(r=!0)});const i=Ht(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let E=0;return e.columns.forEach(I=>{E+=I.width}),E}),o=pe(()=>{const E=new Map,{keyField:I}=e;return e.items.forEach((z,j)=>{E.set(z[I],j)}),E}),{scrollLeftRef:a,listWidthRef:s}=d9({columnsRef:et(e,"columns"),renderColRef:et(e,"renderCol"),renderItemWithColsRef:et(e,"renderItemWithCols")}),l=ne(null),u=ne(void 0),c=new Map,d=pe(()=>{const{items:E,itemSize:I,keyField:z}=e,j=new C2(E.length,I);return E.forEach((Z,J)=>{const ie=Z[z],he=c.get(ie);he!==void 0&&j.add(J,he)}),j}),f=ne(0),h=ne(0),p=Ht(()=>Math.max(d.value.getBound(h.value-kn(e.paddingTop))-1,0)),g=pe(()=>{const{value:E}=u;if(E===void 0)return[];const{items:I,itemSize:z}=e,j=p.value,Z=Math.min(j+Math.ceil(E/z+1),I.length-1),J=[];for(let ie=j;ie<=Z;++ie)J.push(I[ie]);return J}),b=(E,I)=>{if(typeof E=="number"){_(E,I,"auto");return}const{left:z,top:j,index:Z,key:J,position:ie,behavior:he,debounce:_e=!0}=E;if(z!==void 0||j!==void 0)_(z,j,he);else if(Z!==void 0)y(Z,he,_e);else if(J!==void 0){const oe=o.value.get(J);oe!==void 0&&y(oe,he,_e)}else ie==="bottom"?_(0,Number.MAX_SAFE_INTEGER,he):ie==="top"&&_(0,0,he)};let v,x=null;function y(E,I,z){const{value:j}=d,Z=j.sum(E)+kn(e.paddingTop);if(!z)l.value.scrollTo({left:0,top:Z,behavior:I});else{v=E,x!==null&&window.clearTimeout(x),x=window.setTimeout(()=>{v=void 0,x=null},16);const{scrollTop:J,offsetHeight:ie}=l.value;if(Z>J){const he=j.get(E);Z+he<=J+ie||l.value.scrollTo({left:0,top:Z+he-ie,behavior:I})}else l.value.scrollTo({left:0,top:Z,behavior:I})}}function _(E,I,z){l.value.scrollTo({left:E,top:I,behavior:z})}function S(E,I){var z,j,Z;if(n||e.ignoreItemResize||C(I.target))return;const{value:J}=d,ie=o.value.get(E),he=J.get(ie),_e=(Z=(j=(z=I.borderBoxSize)===null||z===void 0?void 0:z[0])===null||j===void 0?void 0:j.blockSize)!==null&&Z!==void 0?Z:I.contentRect.height;if(_e===he)return;_e-e.itemSize===0?c.delete(E):c.set(E,_e-e.itemSize);const oe=_e-he;if(oe===0)return;J.add(ie,oe);const ve=l.value;if(ve!=null){if(v===void 0){const we=J.sum(ie);ve.scrollTop>we&&ve.scrollBy(0,oe)}else if(ie<v)ve.scrollBy(0,oe);else if(ie===v){const we=J.sum(ie);_e+we>ve.scrollTop+ve.offsetHeight&&ve.scrollBy(0,oe)}R()}f.value++}const $=!f9();let w=!1;function T(E){var I;(I=e.onScroll)===null||I===void 0||I.call(e,E),(!$||!w)&&R()}function M(E){var I;if((I=e.onWheel)===null||I===void 0||I.call(e,E),$){const z=l.value;if(z!=null){if(E.deltaX===0&&(z.scrollTop===0&&E.deltaY<=0||z.scrollTop+z.offsetHeight>=z.scrollHeight&&E.deltaY>=0))return;E.preventDefault(),z.scrollTop+=E.deltaY/u1(),z.scrollLeft+=E.deltaX/u1(),R(),w=!0,s2(()=>{w=!1})}}}function P(E){if(n||C(E.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(E.contentRect.height===u.value)return}else if(E.contentRect.height===u.value&&E.contentRect.width===s.value)return;u.value=E.contentRect.height,s.value=E.contentRect.width;const{onResize:I}=e;I!==void 0&&I(E)}function R(){const{value:E}=l;E!=null&&(h.value=E.scrollTop,a.value=E.scrollLeft)}function C(E){let I=E;for(;I!==null;){if(I.style.display==="none")return!0;I=I.parentElement}return!1}return{listHeight:u,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:pe(()=>{const{itemResizable:E}=e,I=Bi(d.value.sum());return f.value,[e.itemsStyle,{boxSizing:"content-box",width:Bi(i.value),height:E?"":I,minHeight:E?I:"",paddingTop:Bi(e.paddingTop),paddingBottom:Bi(e.paddingBottom)}]}),visibleItemsStyle:pe(()=>(f.value,{transform:`translateY(${Bi(d.value.sum(p.value))})`})),viewportItems:g,listElRef:l,itemsElRef:ne(null),scrollTo:b,handleListResize:P,handleListScroll:T,handleListWheel:M,handleItemResize:S}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return k(Wi,{onResize:this.handleListResize},{default:()=>{var i,o;return k("div",ia(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?k("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[k(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:a,renderItemWithCols:s}=this;return this.viewportItems.map(l=>{const u=l[t],c=n.get(u),d=a!=null?k(c1,{index:c,item:l}):void 0,f=s!=null?k(c1,{index:c,item:l}):void 0,h=this.$slots.default({item:l,renderedCols:d,renderedItemWithCols:f,index:c})[0];return e?k(Wi,{key:u,onResize:p=>this.handleItemResize(u,p)},{default:()=>h}):(h.key=u,h)})}})]):(o=(i=this.$slots).empty)===null||o===void 0?void 0:o.call(i)])}})}}),g9=Nr(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar",{width:0,height:0})]),v9=Ie({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=ne(null);function t(r){!(r.currentTarget.offsetWidth<r.currentTarget.scrollWidth)||r.deltaY===0||(r.currentTarget.scrollLeft+=r.deltaY+r.deltaX,r.preventDefault())}const n=uo();return g9.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Sd,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...r){var i;(i=e.value)===null||i===void 0||i.scrollTo(...r)}})},render(){return k("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),Qr="v-hidden",b9=Nr("[v-hidden]",{display:"none!important"}),f1=Ie({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=ne(null),r=ne(null);function i(a){const{value:s}=n,{getCounter:l,getTail:u}=e;let c;if(l!==void 0?c=l():c=r.value,!s||!c)return;c.hasAttribute(Qr)&&c.removeAttribute(Qr);const{children:d}=s;if(a.showAllItemsBeforeCalculate)for(const y of d)y.hasAttribute(Qr)&&y.removeAttribute(Qr);const f=s.offsetWidth,h=[],p=t.tail?u==null?void 0:u():null;let g=p?p.offsetWidth:0,b=!1;const v=s.children.length-(t.tail?1:0);for(let y=0;y<v-1;++y){if(y<0)continue;const _=d[y];if(b){_.hasAttribute(Qr)||_.setAttribute(Qr,"");continue}else _.hasAttribute(Qr)&&_.removeAttribute(Qr);const S=_.offsetWidth;if(g+=S,h[y]=S,g>f){const{updateCounter:$}=e;for(let w=y;w>=0;--w){const T=v-1-w;$!==void 0?$(T):c.textContent=`${T}`;const M=c.offsetWidth;if(g-=h[w],g+M<=f||w===0){b=!0,y=w-1,p&&(y===-1?(p.style.maxWidth=`${f-M}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:P}=e;P&&P(T);break}}}}const{onUpdateOverflow:x}=e;b?x!==void 0&&x(!0):(x!==void 0&&x(!1),c.setAttribute(Qr,""))}const o=uo();return b9.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Sd,ssr:o}),dn(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return fn(()=>this.sync({showAllItemsBeforeCalculate:!1})),k("div",{class:"v-overflow",ref:"selfRef"},[Yg(e,"default"),e.counter?e.counter():k("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function P2(e){return e instanceof HTMLElement}function R2(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(P2(n)&&(I2(n)||R2(n)))return!0}return!1}function z2(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(P2(n)&&(I2(n)||z2(n)))return!0}return!1}function I2(e){if(!m9(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function m9(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Ms=[];const y9=Ie({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=p7(),n=ne(null),r=ne(null);let i=!1,o=!1;const a=typeof document>"u"?null:document.activeElement;function s(){return Ms[Ms.length-1]===t}function l(b){var v;b.code==="Escape"&&s()&&((v=e.onEsc)===null||v===void 0||v.call(e,b))}dn(()=>{vt(()=>e.active,b=>{b?(d(),kt("keydown",document,l)):(St("keydown",document,l),i&&f())},{immediate:!0})}),Bn(()=>{St("keydown",document,l),i&&f()});function u(b){if(!o&&s()){const v=c();if(v===null||v.contains(Qa(b)))return;h("first")}}function c(){const b=n.value;if(b===null)return null;let v=b;for(;v=v.nextSibling,!(v===null||v instanceof Element&&v.tagName==="DIV"););return v}function d(){var b;if(!e.disabled){if(Ms.push(t),e.autoFocus){const{initialFocusTo:v}=e;v===void 0?h("first"):(b=Km(v))===null||b===void 0||b.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",u,!0)}}function f(){var b;if(e.disabled||(document.removeEventListener("focus",u,!0),Ms=Ms.filter(x=>x!==t),s()))return;const{finalFocusTo:v}=e;v!==void 0?(b=Km(v))===null||b===void 0||b.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&a instanceof HTMLElement&&(o=!0,a.focus({preventScroll:!0}),o=!1)}function h(b){if(s()&&e.active){const v=n.value,x=r.value;if(v!==null&&x!==null){const y=c();if(y==null||y===x){o=!0,v.focus({preventScroll:!0}),o=!1;return}o=!0;const _=b==="first"?R2(y):z2(y);o=!1,_||(o=!0,v.focus({preventScroll:!0}),o=!1)}}}function p(b){if(o)return;const v=c();v!==null&&(b.relatedTarget!==null&&v.contains(b.relatedTarget)?h("last"):h("first"))}function g(b){o||(b.relatedTarget!==null&&b.relatedTarget===n.value?h("last"):h("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:p,handleEndFocus:g}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return k(Tt,null,[k("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),k("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function F2(e,t){t&&(dn(()=>{const{value:n}=e;n&&of.registerHandler(n,t)}),Bn(()=>{const{value:n}=e;n&&of.unregisterHandler(n)}))}function af(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const _9=/^(\d|\.)+$/,d1=/(\d|\.)+/;function zc(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(_9.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=d1.exec(e);return i?e.replace(d1,String((Number(i[0])+n)*t)):e}return e}function h1(e){const{left:t,right:n,top:r,bottom:i}=Kn(e);return`${r} ${n} ${i} ${t}`}let Oh;function x9(){return Oh===void 0&&(Oh=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Oh}const w9=new WeakSet;function C9(e){w9.add(e)}function p1(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function sf(e,t){console.error(`[naive/${e}]: ${t}`)}function B2(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Ge(e,...t){if(Array.isArray(e))e.forEach(n=>Ge(n,...t));else return e(...t)}function Ua(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){Ua(r,t,n);return}if(r.type===Tt){if(r.children===null)return;Array.isArray(r.children)&&Ua(r.children,t,n)}else{if(r.type===sn&&t)return;n.push(r)}}}),n}function g1(e,t="default",n=void 0){const r=e[t];if(!r)return sf("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Ua(r(n));return i.length===1?i[0]:(sf("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function S9(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function Nh(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}function $9(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(i=>{t.includes(i)||(r[i]=e[i])}),Object.assign(r,n)}function Io(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?Wo(e):typeof e=="number"?Wo(String(e)):null}function mu(e){return e.some(t=>Fl(t)?!(t.type===sn||t.type===Tt&&!mu(t.children)):!0)?e:null}function Ur(e,t){return e&&mu(e())||t()}function k9(e,t,n){return e&&mu(e(t))||n(t)}function Bt(e,t){const n=e&&mu(e());return t(n||null)}function ja(e){return!(e&&mu(e()))}const v0=Ie({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),oa="n-config-provider",M9="n";function rn(e={},t={defaultBordered:!0}){const n=$t(oa,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:pe(()=>{var r,i;const{bordered:o}=e;return o!==void 0?o:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:DS(M9),namespaceRef:pe(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function Cn(e,t,n,r){n||B2("useThemeClass","cssVarsRef is not passed");const i=$t(oa,null),o=i==null?void 0:i.mergedThemeHashRef,a=i==null?void 0:i.styleMountTarget,s=ne(""),l=uo();let u;const c=`__${e}`,d=()=>{let f=c;const h=t?t.value:void 0,p=o==null?void 0:o.value;p&&(f+=`-${p}`),h&&(f+=`-${h}`);const{themeOverrides:g,builtinThemeOverrides:b}=r;g&&(f+=`-${a0(JSON.stringify(g))}`),b&&(f+=`-${a0(JSON.stringify(b))}`),s.value=f,u=()=>{const v=n.value;let x="";for(const y in v)x+=`${y}: ${v[y]};`;ce(`.${f}`,x).mount({id:f,ssr:l,parent:a}),u=void 0}};return xr(()=>{d()}),{themeClass:s,onRender:()=>{u==null||u()}}}const v1="n-form-item";function aa(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=$t(v1,null);jn(v1,null);const o=pe(n?()=>n(i):()=>{const{size:l}=e;if(l)return l;if(i){const{mergedSize:u}=i;if(u.value!==void 0)return u.value}return t}),a=pe(r?()=>r(i):()=>{const{disabled:l}=e;return l!==void 0?l:i?i.disabled.value:!1}),s=pe(()=>{const{status:l}=e;return l||(i==null?void 0:i.mergedValidationStatus.value)});return Bn(()=>{i&&i.restoreValidation()}),{mergedSizeRef:o,mergedDisabledRef:a,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}const T9={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Lh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Ts(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}function Es(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?A9(s,d=>d.test(a)):E9(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(a.length);return{value:u,rest:c}}}function E9(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function A9(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function P9(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const R9={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z9=(e,t,n)=>{let r;const i=R9[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},I9={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},F9=(e,t,n,r)=>I9[e],B9={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},O9={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},N9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},L9={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},D9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},H9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},U9=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},j9={ordinalNumber:U9,era:Ts({values:B9,defaultWidth:"wide"}),quarter:Ts({values:O9,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ts({values:N9,defaultWidth:"wide"}),day:Ts({values:L9,defaultWidth:"wide"}),dayPeriod:Ts({values:D9,defaultWidth:"wide",formattingValues:H9,defaultFormattingWidth:"wide"})},W9=/^(\d+)(th|st|nd|rd)?/i,V9=/\d+/i,q9={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Y9={any:[/^b/i,/^(a|c)/i]},G9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},X9={any:[/1/i,/2/i,/3/i,/4/i]},K9={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Z9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J9={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Q9={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eM={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tM={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nM={ordinalNumber:P9({matchPattern:W9,parsePattern:V9,valueCallback:e=>parseInt(e,10)}),era:Es({matchPatterns:q9,defaultMatchWidth:"wide",parsePatterns:Y9,defaultParseWidth:"any"}),quarter:Es({matchPatterns:G9,defaultMatchWidth:"wide",parsePatterns:X9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Es({matchPatterns:K9,defaultMatchWidth:"wide",parsePatterns:Z9,defaultParseWidth:"any"}),day:Es({matchPatterns:J9,defaultMatchWidth:"wide",parsePatterns:Q9,defaultParseWidth:"any"}),dayPeriod:Es({matchPatterns:eM,defaultMatchWidth:"any",parsePatterns:tM,defaultParseWidth:"any"})},rM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},oM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aM={date:Lh({formats:rM,defaultWidth:"full"}),time:Lh({formats:iM,defaultWidth:"full"}),dateTime:Lh({formats:oM,defaultWidth:"full"})},sM={code:"en-US",formatDistance:z9,formatLong:aM,formatRelative:F9,localize:j9,match:nM,options:{weekStartsOn:0,firstWeekContainsDate:1}},lM={name:"en-US",locale:sM};var O2=typeof global=="object"&&global&&global.Object===Object&&global,uM=typeof self=="object"&&self&&self.Object===Object&&self,kr=O2||uM||Function("return this")(),Xi=kr.Symbol,N2=Object.prototype,cM=N2.hasOwnProperty,fM=N2.toString,As=Xi?Xi.toStringTag:void 0;function dM(e){var t=cM.call(e,As),n=e[As];try{e[As]=void 0;var r=!0}catch{}var i=fM.call(e);return r&&(t?e[As]=n:delete e[As]),i}var hM=Object.prototype,pM=hM.toString;function gM(e){return pM.call(e)}var vM="[object Null]",bM="[object Undefined]",b1=Xi?Xi.toStringTag:void 0;function sa(e){return e==null?e===void 0?bM:vM:b1&&b1 in Object(e)?dM(e):gM(e)}function Ki(e){return e!=null&&typeof e=="object"}var mM="[object Symbol]";function kd(e){return typeof e=="symbol"||Ki(e)&&sa(e)==mM}function L2(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var dr=Array.isArray,m1=Xi?Xi.prototype:void 0,y1=m1?m1.toString:void 0;function D2(e){if(typeof e=="string")return e;if(dr(e))return L2(e,D2)+"";if(kd(e))return y1?y1.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var yM=/\s/;function _M(e){for(var t=e.length;t--&&yM.test(e.charAt(t)););return t}var xM=/^\s+/;function wM(e){return e&&e.slice(0,_M(e)+1).replace(xM,"")}function hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _1=NaN,CM=/^[-+]0x[0-9a-f]+$/i,SM=/^0b[01]+$/i,$M=/^0o[0-7]+$/i,kM=parseInt;function x1(e){if(typeof e=="number")return e;if(kd(e))return _1;if(hr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wM(e);var n=SM.test(e);return n||$M.test(e)?kM(e.slice(2),n?2:8):CM.test(e)?_1:+e}function iv(e){return e}var MM="[object AsyncFunction]",TM="[object Function]",EM="[object GeneratorFunction]",AM="[object Proxy]";function ov(e){if(!hr(e))return!1;var t=sa(e);return t==TM||t==EM||t==MM||t==AM}var Dh=kr["__core-js_shared__"],w1=function(){var e=/[^.]+$/.exec(Dh&&Dh.keys&&Dh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function PM(e){return!!w1&&w1 in e}var RM=Function.prototype,zM=RM.toString;function la(e){if(e!=null){try{return zM.call(e)}catch{}try{return e+""}catch{}}return""}var IM=/[\\^$.*+?()[\]{}|]/g,FM=/^\[object .+?Constructor\]$/,BM=Function.prototype,OM=Object.prototype,NM=BM.toString,LM=OM.hasOwnProperty,DM=RegExp("^"+NM.call(LM).replace(IM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HM(e){if(!hr(e)||PM(e))return!1;var t=ov(e)?DM:FM;return t.test(la(e))}function UM(e,t){return e==null?void 0:e[t]}function ua(e,t){var n=UM(e,t);return HM(n)?n:void 0}var b0=ua(kr,"WeakMap"),C1=Object.create,jM=function(){function e(){}return function(t){if(!hr(t))return{};if(C1)return C1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function WM(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function VM(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var qM=800,YM=16,GM=Date.now;function XM(e){var t=0,n=0;return function(){var r=GM(),i=YM-(r-n);if(n=r,i>0){if(++t>=qM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function KM(e){return function(){return e}}var lf=function(){try{var e=ua(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ZM=lf?function(e,t){return lf(e,"toString",{configurable:!0,enumerable:!1,value:KM(t),writable:!0})}:iv,JM=XM(ZM),QM=9007199254740991,eT=/^(?:0|[1-9]\d*)$/;function av(e,t){var n=typeof e;return t=t??QM,!!t&&(n=="number"||n!="symbol"&&eT.test(e))&&e>-1&&e%1==0&&e<t}function sv(e,t,n){t=="__proto__"&&lf?lf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yu(e,t){return e===t||e!==e&&t!==t}var tT=Object.prototype,nT=tT.hasOwnProperty;function rT(e,t,n){var r=e[t];(!(nT.call(e,t)&&yu(r,n))||n===void 0&&!(t in e))&&sv(e,t,n)}function iT(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;l===void 0&&(l=e[s]),i?sv(n,s,l):rT(n,s,l)}return n}var S1=Math.max;function oT(e,t,n){return t=S1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=S1(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),WM(e,this,s)}}function aT(e,t){return JM(oT(e,t,iv),e+"")}var sT=9007199254740991;function lv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sT}function vs(e){return e!=null&&lv(e.length)&&!ov(e)}function lT(e,t,n){if(!hr(n))return!1;var r=typeof t;return(r=="number"?vs(n)&&av(t,n.length):r=="string"&&t in n)?yu(n[t],e):!1}function uT(e){return aT(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&lT(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var cT=Object.prototype;function uv(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cT;return e===n}function fT(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dT="[object Arguments]";function $1(e){return Ki(e)&&sa(e)==dT}var H2=Object.prototype,hT=H2.hasOwnProperty,pT=H2.propertyIsEnumerable,uf=$1(function(){return arguments}())?$1:function(e){return Ki(e)&&hT.call(e,"callee")&&!pT.call(e,"callee")};function gT(){return!1}var U2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,k1=U2&&typeof module=="object"&&module&&!module.nodeType&&module,vT=k1&&k1.exports===U2,M1=vT?kr.Buffer:void 0,bT=M1?M1.isBuffer:void 0,cf=bT||gT,mT="[object Arguments]",yT="[object Array]",_T="[object Boolean]",xT="[object Date]",wT="[object Error]",CT="[object Function]",ST="[object Map]",$T="[object Number]",kT="[object Object]",MT="[object RegExp]",TT="[object Set]",ET="[object String]",AT="[object WeakMap]",PT="[object ArrayBuffer]",RT="[object DataView]",zT="[object Float32Array]",IT="[object Float64Array]",FT="[object Int8Array]",BT="[object Int16Array]",OT="[object Int32Array]",NT="[object Uint8Array]",LT="[object Uint8ClampedArray]",DT="[object Uint16Array]",HT="[object Uint32Array]",It={};It[zT]=It[IT]=It[FT]=It[BT]=It[OT]=It[NT]=It[LT]=It[DT]=It[HT]=!0;It[mT]=It[yT]=It[PT]=It[_T]=It[RT]=It[xT]=It[wT]=It[CT]=It[ST]=It[$T]=It[kT]=It[MT]=It[TT]=It[ET]=It[AT]=!1;function UT(e){return Ki(e)&&lv(e.length)&&!!It[sa(e)]}function jT(e){return function(t){return e(t)}}var j2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xl=j2&&typeof module=="object"&&module&&!module.nodeType&&module,WT=xl&&xl.exports===j2,Hh=WT&&O2.process,T1=function(){try{var e=xl&&xl.require&&xl.require("util").types;return e||Hh&&Hh.binding&&Hh.binding("util")}catch{}}(),E1=T1&&T1.isTypedArray,cv=E1?jT(E1):UT,VT=Object.prototype,qT=VT.hasOwnProperty;function W2(e,t){var n=dr(e),r=!n&&uf(e),i=!n&&!r&&cf(e),o=!n&&!r&&!i&&cv(e),a=n||r||i||o,s=a?fT(e.length,String):[],l=s.length;for(var u in e)(t||qT.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||av(u,l)))&&s.push(u);return s}function V2(e,t){return function(n){return e(t(n))}}var YT=V2(Object.keys,Object),GT=Object.prototype,XT=GT.hasOwnProperty;function KT(e){if(!uv(e))return YT(e);var t=[];for(var n in Object(e))XT.call(e,n)&&n!="constructor"&&t.push(n);return t}function fv(e){return vs(e)?W2(e):KT(e)}function ZT(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var JT=Object.prototype,QT=JT.hasOwnProperty;function eE(e){if(!hr(e))return ZT(e);var t=uv(e),n=[];for(var r in e)r=="constructor"&&(t||!QT.call(e,r))||n.push(r);return n}function q2(e){return vs(e)?W2(e,!0):eE(e)}var tE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nE=/^\w*$/;function dv(e,t){if(dr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||kd(e)?!0:nE.test(e)||!tE.test(e)||t!=null&&e in Object(t)}var Ll=ua(Object,"create");function rE(){this.__data__=Ll?Ll(null):{},this.size=0}function iE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oE="__lodash_hash_undefined__",aE=Object.prototype,sE=aE.hasOwnProperty;function lE(e){var t=this.__data__;if(Ll){var n=t[e];return n===oE?void 0:n}return sE.call(t,e)?t[e]:void 0}var uE=Object.prototype,cE=uE.hasOwnProperty;function fE(e){var t=this.__data__;return Ll?t[e]!==void 0:cE.call(t,e)}var dE="__lodash_hash_undefined__";function hE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ll&&t===void 0?dE:t,this}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vo.prototype.clear=rE;Vo.prototype.delete=iE;Vo.prototype.get=lE;Vo.prototype.has=fE;Vo.prototype.set=hE;function pE(){this.__data__=[],this.size=0}function Md(e,t){for(var n=e.length;n--;)if(yu(e[n][0],t))return n;return-1}var gE=Array.prototype,vE=gE.splice;function bE(e){var t=this.__data__,n=Md(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():vE.call(t,n,1),--this.size,!0}function mE(e){var t=this.__data__,n=Md(t,e);return n<0?void 0:t[n][1]}function yE(e){return Md(this.__data__,e)>-1}function _E(e,t){var n=this.__data__,r=Md(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yi.prototype.clear=pE;yi.prototype.delete=bE;yi.prototype.get=mE;yi.prototype.has=yE;yi.prototype.set=_E;var Dl=ua(kr,"Map");function xE(){this.size=0,this.__data__={hash:new Vo,map:new(Dl||yi),string:new Vo}}function wE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Td(e,t){var n=e.__data__;return wE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function CE(e){var t=Td(this,e).delete(e);return this.size-=t?1:0,t}function SE(e){return Td(this,e).get(e)}function $E(e){return Td(this,e).has(e)}function kE(e,t){var n=Td(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function _i(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_i.prototype.clear=xE;_i.prototype.delete=CE;_i.prototype.get=SE;_i.prototype.has=$E;_i.prototype.set=kE;var ME="Expected a function";function hv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ME);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(hv.Cache||_i),n}hv.Cache=_i;var TE=500;function EE(e){var t=hv(e,function(r){return n.size===TE&&n.clear(),r}),n=t.cache;return t}var AE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PE=/\\(\\)?/g,RE=EE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AE,function(n,r,i,o){t.push(i?o.replace(PE,"$1"):r||n)}),t});function Y2(e){return e==null?"":D2(e)}function G2(e,t){return dr(e)?e:dv(e,t)?[e]:RE(Y2(e))}function Ed(e){if(typeof e=="string"||kd(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function X2(e,t){t=G2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ed(t[n++])];return n&&n==r?e:void 0}function zE(e,t,n){var r=e==null?void 0:X2(e,t);return r===void 0?n:r}function IE(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var K2=V2(Object.getPrototypeOf,Object),FE="[object Object]",BE=Function.prototype,OE=Object.prototype,Z2=BE.toString,NE=OE.hasOwnProperty,LE=Z2.call(Object);function DE(e){if(!Ki(e)||sa(e)!=FE)return!1;var t=K2(e);if(t===null)return!0;var n=NE.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Z2.call(n)==LE}function HE(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function UE(e,t,n){var r=e.length;return n=n===void 0?r:n,HE(e,t,n)}var jE="\\ud800-\\udfff",WE="\\u0300-\\u036f",VE="\\ufe20-\\ufe2f",qE="\\u20d0-\\u20ff",YE=WE+VE+qE,GE="\\ufe0e\\ufe0f",XE="\\u200d",KE=RegExp("["+XE+jE+YE+GE+"]");function J2(e){return KE.test(e)}function ZE(e){return e.split("")}var Q2="\\ud800-\\udfff",JE="\\u0300-\\u036f",QE="\\ufe20-\\ufe2f",eA="\\u20d0-\\u20ff",tA=JE+QE+eA,nA="\\ufe0e\\ufe0f",rA="["+Q2+"]",m0="["+tA+"]",y0="\\ud83c[\\udffb-\\udfff]",iA="(?:"+m0+"|"+y0+")",e5="[^"+Q2+"]",t5="(?:\\ud83c[\\udde6-\\uddff]){2}",n5="[\\ud800-\\udbff][\\udc00-\\udfff]",oA="\\u200d",r5=iA+"?",i5="["+nA+"]?",aA="(?:"+oA+"(?:"+[e5,t5,n5].join("|")+")"+i5+r5+")*",sA=i5+r5+aA,lA="(?:"+[e5+m0+"?",m0,t5,n5,rA].join("|")+")",uA=RegExp(y0+"(?="+y0+")|"+lA+sA,"g");function cA(e){return e.match(uA)||[]}function fA(e){return J2(e)?cA(e):ZE(e)}function dA(e){return function(t){t=Y2(t);var n=J2(t)?fA(t):void 0,r=n?n[0]:t.charAt(0),i=n?UE(n,1).join(""):t.slice(1);return r[e]()+i}}var hA=dA("toUpperCase");function pA(){this.__data__=new yi,this.size=0}function gA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vA(e){return this.__data__.get(e)}function bA(e){return this.__data__.has(e)}var mA=200;function yA(e,t){var n=this.__data__;if(n instanceof yi){var r=n.__data__;if(!Dl||r.length<mA-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _i(r)}return n.set(e,t),this.size=n.size,this}function jr(e){var t=this.__data__=new yi(e);this.size=t.size}jr.prototype.clear=pA;jr.prototype.delete=gA;jr.prototype.get=vA;jr.prototype.has=bA;jr.prototype.set=yA;var o5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,A1=o5&&typeof module=="object"&&module&&!module.nodeType&&module,_A=A1&&A1.exports===o5,P1=_A?kr.Buffer:void 0;P1&&P1.allocUnsafe;function xA(e,t){return e.slice()}function wA(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function CA(){return[]}var SA=Object.prototype,$A=SA.propertyIsEnumerable,R1=Object.getOwnPropertySymbols,kA=R1?function(e){return e==null?[]:(e=Object(e),wA(R1(e),function(t){return $A.call(e,t)}))}:CA;function MA(e,t,n){var r=t(e);return dr(e)?r:IE(r,n(e))}function z1(e){return MA(e,fv,kA)}var _0=ua(kr,"DataView"),x0=ua(kr,"Promise"),w0=ua(kr,"Set"),I1="[object Map]",TA="[object Object]",F1="[object Promise]",B1="[object Set]",O1="[object WeakMap]",N1="[object DataView]",EA=la(_0),AA=la(Dl),PA=la(x0),RA=la(w0),zA=la(b0),Pi=sa;(_0&&Pi(new _0(new ArrayBuffer(1)))!=N1||Dl&&Pi(new Dl)!=I1||x0&&Pi(x0.resolve())!=F1||w0&&Pi(new w0)!=B1||b0&&Pi(new b0)!=O1)&&(Pi=function(e){var t=sa(e),n=t==TA?e.constructor:void 0,r=n?la(n):"";if(r)switch(r){case EA:return N1;case AA:return I1;case PA:return F1;case RA:return B1;case zA:return O1}return t});var ff=kr.Uint8Array;function IA(e){var t=new e.constructor(e.byteLength);return new ff(t).set(new ff(e)),t}function FA(e,t){var n=IA(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function BA(e){return typeof e.constructor=="function"&&!uv(e)?jM(K2(e)):{}}var OA="__lodash_hash_undefined__";function NA(e){return this.__data__.set(e,OA),this}function LA(e){return this.__data__.has(e)}function df(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _i;++t<n;)this.add(e[t])}df.prototype.add=df.prototype.push=NA;df.prototype.has=LA;function DA(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function HA(e,t){return e.has(t)}var UA=1,jA=2;function a5(e,t,n,r,i,o){var a=n&UA,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&jA?new df:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],g=t[d];if(r)var b=a?r(g,p,d,t,e,o):r(p,g,d,e,t,o);if(b!==void 0){if(b)continue;f=!1;break}if(h){if(!DA(t,function(v,x){if(!HA(h,x)&&(p===v||i(p,v,n,r,o)))return h.push(x)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(e),o.delete(t),f}function WA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function VA(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var qA=1,YA=2,GA="[object Boolean]",XA="[object Date]",KA="[object Error]",ZA="[object Map]",JA="[object Number]",QA="[object RegExp]",eP="[object Set]",tP="[object String]",nP="[object Symbol]",rP="[object ArrayBuffer]",iP="[object DataView]",L1=Xi?Xi.prototype:void 0,Uh=L1?L1.valueOf:void 0;function oP(e,t,n,r,i,o,a){switch(n){case iP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rP:return!(e.byteLength!=t.byteLength||!o(new ff(e),new ff(t)));case GA:case XA:case JA:return yu(+e,+t);case KA:return e.name==t.name&&e.message==t.message;case QA:case tP:return e==t+"";case ZA:var s=WA;case eP:var l=r&qA;if(s||(s=VA),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=YA,a.set(e,t);var c=a5(s(e),s(t),r,i,o,a);return a.delete(e),c;case nP:if(Uh)return Uh.call(e)==Uh.call(t)}return!1}var aP=1,sP=Object.prototype,lP=sP.hasOwnProperty;function uP(e,t,n,r,i,o){var a=n&aP,s=z1(e),l=s.length,u=z1(t),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:lP.call(t,f)))return!1}var h=o.get(e),p=o.get(t);if(h&&p)return h==t&&p==e;var g=!0;o.set(e,t),o.set(t,e);for(var b=a;++d<l;){f=s[d];var v=e[f],x=t[f];if(r)var y=a?r(x,v,f,t,e,o):r(v,x,f,e,t,o);if(!(y===void 0?v===x||i(v,x,n,r,o):y)){g=!1;break}b||(b=f=="constructor")}if(g&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(e),o.delete(t),g}var cP=1,D1="[object Arguments]",H1="[object Array]",Qu="[object Object]",fP=Object.prototype,U1=fP.hasOwnProperty;function dP(e,t,n,r,i,o){var a=dr(e),s=dr(t),l=a?H1:Pi(e),u=s?H1:Pi(t);l=l==D1?Qu:l,u=u==D1?Qu:u;var c=l==Qu,d=u==Qu,f=l==u;if(f&&cf(e)){if(!cf(t))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new jr),a||cv(e)?a5(e,t,n,r,i,o):oP(e,t,l,n,r,i,o);if(!(n&cP)){var h=c&&U1.call(e,"__wrapped__"),p=d&&U1.call(t,"__wrapped__");if(h||p){var g=h?e.value():e,b=p?t.value():t;return o||(o=new jr),i(g,b,n,r,o)}}return f?(o||(o=new jr),uP(e,t,n,r,i,o)):!1}function pv(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ki(e)&&!Ki(t)?e!==e&&t!==t:dP(e,t,n,r,pv,i)}var hP=1,pP=2;function gP(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var s=a[0],l=e[s],u=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var c=new jr,d;if(!(d===void 0?pv(u,l,hP|pP,r,c):d))return!1}}return!0}function s5(e){return e===e&&!hr(e)}function vP(e){for(var t=fv(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,s5(i)]}return t}function l5(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function bP(e){var t=vP(e);return t.length==1&&t[0][2]?l5(t[0][0],t[0][1]):function(n){return n===e||gP(n,e,t)}}function mP(e,t){return e!=null&&t in Object(e)}function yP(e,t,n){t=G2(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=Ed(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&lv(i)&&av(a,i)&&(dr(e)||uf(e)))}function _P(e,t){return e!=null&&yP(e,t,mP)}var xP=1,wP=2;function CP(e,t){return dv(e)&&s5(t)?l5(Ed(e),t):function(n){var r=zE(n,e);return r===void 0&&r===t?_P(n,e):pv(t,r,xP|wP)}}function SP(e){return function(t){return t==null?void 0:t[e]}}function $P(e){return function(t){return X2(t,e)}}function kP(e){return dv(e)?SP(Ed(e)):$P(e)}function MP(e){return typeof e=="function"?e:e==null?iv:typeof e=="object"?dr(e)?CP(e[0],e[1]):bP(e):kP(e)}function TP(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[++i];if(n(o[l],l,o)===!1)break}return t}}var u5=TP();function EP(e,t){return e&&u5(e,t,fv)}function AP(e,t){return function(n,r){if(n==null)return n;if(!vs(n))return e(n,r);for(var i=n.length,o=-1,a=Object(n);++o<i&&r(a[o],o,a)!==!1;);return n}}var PP=AP(EP),jh=function(){return kr.Date.now()},RP="Expected a function",zP=Math.max,IP=Math.min;function FP(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(RP);t=x1(t)||0,hr(n)&&(c=!!n.leading,d="maxWait"in n,o=d?zP(x1(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f);function h($){var w=r,T=i;return r=i=void 0,u=$,a=e.apply(T,w),a}function p($){return u=$,s=setTimeout(v,t),c?h($):a}function g($){var w=$-l,T=$-u,M=t-w;return d?IP(M,o-T):M}function b($){var w=$-l,T=$-u;return l===void 0||w>=t||w<0||d&&T>=o}function v(){var $=jh();if(b($))return x($);s=setTimeout(v,g($))}function x($){return s=void 0,f&&r?h($):(r=i=void 0,a)}function y(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function _(){return s===void 0?a:x(jh())}function S(){var $=jh(),w=b($);if(r=arguments,i=this,l=$,w){if(s===void 0)return p(l);if(d)return clearTimeout(s),s=setTimeout(v,t),h(l)}return s===void 0&&(s=setTimeout(v,t)),a}return S.cancel=y,S.flush=_,S}function C0(e,t,n){(n!==void 0&&!yu(e[t],n)||n===void 0&&!(t in e))&&sv(e,t,n)}function BP(e){return Ki(e)&&vs(e)}function S0(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function OP(e){return iT(e,q2(e))}function NP(e,t,n,r,i,o,a){var s=S0(e,n),l=S0(t,n),u=a.get(l);if(u){C0(e,n,u);return}var c=o?o(s,l,n+"",e,t,a):void 0,d=c===void 0;if(d){var f=dr(l),h=!f&&cf(l),p=!f&&!h&&cv(l);c=l,f||h||p?dr(s)?c=s:BP(s)?c=VM(s):h?(d=!1,c=xA(l)):p?(d=!1,c=FA(l)):c=[]:DE(l)||uf(l)?(c=s,uf(s)?c=OP(s):(!hr(s)||ov(s))&&(c=BA(l))):d=!1}d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),C0(e,n,c)}function c5(e,t,n,r,i){e!==t&&u5(t,function(o,a){if(i||(i=new jr),hr(o))NP(e,t,a,n,c5,r,i);else{var s=r?r(S0(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),C0(e,a,s)}},q2)}function LP(e,t){var n=-1,r=vs(e)?Array(e.length):[];return PP(e,function(i,o,a){r[++n]=t(i,o,a)}),r}function DP(e,t){var n=dr(e)?L2:LP;return n(e,MP(t))}var ec=uT(function(e,t,n){c5(e,t,n)}),HP="Expected a function";function Wh(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(HP);return hr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),FP(e,t,{leading:r,maxWait:t,trailing:i})}function _u(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=$t(oa,null)||{},r=pe(()=>{var i,o;return(o=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&o!==void 0?o:T9[e]});return{dateLocaleRef:pe(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:lM}),localeRef:r}}const Hl="naive-ui-style";function co(e,t,n){if(!t)return;const r=uo(),i=pe(()=>{const{value:s}=t;if(!s)return;const l=s[e];if(l)return l}),o=$t(oa,null),a=()=>{xr(()=>{const{value:s}=n,l=`${s}${e}Rtl`;if(n7(l,r))return;const{value:u}=i;u&&u.style.mount({id:l,head:!0,anchorMetaName:Hl,props:{bPrefix:s?`.${s}-`:void 0},ssr:r,parent:o==null?void 0:o.styleMountTarget})})};return r?a():pd(a),i}const ca={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:UP,fontFamily:jP,lineHeight:WP}=ca,f5=ce("body",`
|
|
30
|
+
</style>`}function I7(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(z7(e,t)))}const F7=typeof document<"u";function uo(){if(F7)return;const e=$t(R7,null);if(e!==null)return{adapter:(t,n)=>I7(t,n,e),context:e}}function Gm(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:Nr}=i2(),Sd="vueuc-style";function Xm(e){return e&-e}class S2{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=Xm(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let o=t*r;for(;t>0;)o+=n[t],t-=Xm(t);return o}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),o=this.sum(i);if(o>t){r=i;continue}else if(o<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function Km(e){return typeof e=="string"?document.querySelector(e):e()}const B7=Ie({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:x7(et(e,"show")),mergedTo:pe(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?h0("lazy-teleport",this.$slots):M($$,{disabled:this.disabled,to:this.mergedTo},h0("lazy-teleport",this.$slots)):null}}),Gu={top:"bottom",bottom:"top",left:"right",right:"left"},Zm={start:"end",center:"center",end:"start"},zh={top:"height",bottom:"height",left:"width",right:"width"},O7={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},N7={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},L7={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Jm={top:!0,bottom:!1,left:!0,right:!1},Qm={top:"end",bottom:"start",left:"end",right:"start"};function D7(e,t,n,r,i,o){if(!i||o)return{placement:e,top:0,left:0};const[a,s]=e.split("-");let l=s??"center",u={top:0,left:0};const c=(h,p,g)=>{let b=0,v=0;const _=n[h]-t[p]-t[h];return _>0&&r&&(g?v=Jm[p]?_:-_:b=Jm[p]?_:-_),{left:b,top:v}},d=a==="left"||a==="right";if(l!=="center"){const h=L7[e],p=Gu[h],g=zh[h];if(n[g]>t[g]){if(t[h]+t[g]<n[g]){const b=(n[g]-t[g])/2;t[h]<b||t[p]<b?t[h]<t[p]?(l=Zm[s],u=c(g,p,d)):u=c(g,h,d):l="center"}}else n[g]<t[g]&&t[p]<0&&t[h]>t[p]&&(l=Zm[s])}else{const h=a==="bottom"||a==="top"?"left":"top",p=Gu[h],g=zh[h],b=(n[g]-t[g])/2;(t[h]<b||t[p]<b)&&(t[h]>t[p]?(l=Qm[h],u=c(g,h,d)):(l=Qm[p],u=c(g,p,d)))}let f=a;return t[a]<n[zh[a]]&&t[a]<t[Gu[a]]&&(f=Gu[a]),{placement:l!=="center"?`${f}-${l}`:f,left:u.left,top:u.top}}function H7(e,t){return t?N7[e]:O7[e]}function U7(e,t,n,r,i,o){if(o)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const j7=Nr([Nr(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Nr(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Nr("> *",{pointerEvents:"all"})])]),$d=Ie({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=$t("VBinder"),n=Ht(()=>e.enabled!==void 0?e.enabled:e.show),r=ne(null),i=ne(null),o=()=>{const{syncTrigger:f}=e;f.includes("scroll")&&t.addScrollListener(l),f.includes("resize")&&t.addResizeListener(l)},a=()=>{t.removeScrollListener(l),t.removeResizeListener(l)};dn(()=>{n.value&&(l(),o())});const s=uo();j7.mount({id:"vueuc/binder",head:!0,anchorMetaName:Sd,ssr:s}),Bn(()=>{a()}),g2(()=>{n.value&&l()});const l=()=>{if(!n.value)return;const f=r.value;if(f===null)return;const h=t.targetRef,{x:p,y:g,overlap:b}=e,v=p!==void 0&&g!==void 0?M7(p,g):Ph(h);f.style.setProperty("--v-target-width",`${Math.round(v.width)}px`),f.style.setProperty("--v-target-height",`${Math.round(v.height)}px`);const{width:_,minWidth:y,placement:x,internalShift:S,flip:$}=e;f.setAttribute("v-placement",x),b?f.setAttribute("v-overlap",""):f.removeAttribute("v-overlap");const{style:w}=f;_==="target"?w.width=`${v.width}px`:_!==void 0?w.width=_:w.width="",y==="target"?w.minWidth=`${v.width}px`:y!==void 0?w.minWidth=y:w.minWidth="";const T=Ph(f),k=Ph(i.value),{left:P,top:R,placement:C}=D7(x,v,T,S,$,b),E=H7(C,b),{left:I,top:z,transform:j}=U7(C,k,v,R,P,b);f.setAttribute("v-placement",C),f.style.setProperty("--v-offset-left",`${Math.round(P)}px`),f.style.setProperty("--v-offset-top",`${Math.round(R)}px`),f.style.transform=`translateX(${I}) translateY(${z}) ${j}`,f.style.setProperty("--v-transform-origin",E),f.style.transformOrigin=E};vt(n,f=>{f?(o(),u()):a()});const u=()=>{fn().then(l).catch(f=>console.error(f))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(f=>{vt(et(e,f),l)}),["teleportDisabled"].forEach(f=>{vt(et(e,f),u)}),vt(et(e,"syncTrigger"),f=>{f.includes("resize")?t.addResizeListener(l):t.removeResizeListener(l),f.includes("scroll")?t.addScrollListener(l):t.removeScrollListener(l)});const c=gs(),d=Ht(()=>{const{to:f}=e;if(f!==void 0)return f;c.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:d,syncPosition:l}},render(){return M(B7,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=M("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[M("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?lo(n,[[C2,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var Lo=[],W7=function(){return Lo.some(function(e){return e.activeTargets.length>0})},V7=function(){return Lo.some(function(e){return e.skippedTargets.length>0})},e1="ResizeObserver loop completed with undelivered notifications.",q7=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:e1}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=e1),window.dispatchEvent(e)},Nl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Nl||(Nl={}));var Do=function(e){return Object.freeze(e)},Y7=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Do(this)}return e}(),$2=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Do(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),rv=function(e){return e instanceof SVGElement&&"getBBox"in e},k2=function(e){if(rv(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},t1=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},G7=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},_l=typeof window<"u"?window:{},Xu=new WeakMap,n1=/auto|scroll/,X7=/^tb|vertical/,K7=/msie|trident/i.test(_l.navigator&&_l.navigator.userAgent),Ar=function(e){return parseFloat(e||"0")},Ha=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new Y7((n?t:e)||0,(n?e:t)||0)},r1=Do({devicePixelContentBoxSize:Ha(),borderBoxSize:Ha(),contentBoxSize:Ha(),contentRect:new $2(0,0,0,0)}),M2=function(e,t){if(t===void 0&&(t=!1),Xu.has(e)&&!t)return Xu.get(e);if(k2(e))return Xu.set(e,r1),r1;var n=getComputedStyle(e),r=rv(e)&&e.ownerSVGElement&&e.getBBox(),i=!K7&&n.boxSizing==="border-box",o=X7.test(n.writingMode||""),a=!r&&n1.test(n.overflowY||""),s=!r&&n1.test(n.overflowX||""),l=r?0:Ar(n.paddingTop),u=r?0:Ar(n.paddingRight),c=r?0:Ar(n.paddingBottom),d=r?0:Ar(n.paddingLeft),f=r?0:Ar(n.borderTopWidth),h=r?0:Ar(n.borderRightWidth),p=r?0:Ar(n.borderBottomWidth),g=r?0:Ar(n.borderLeftWidth),b=d+u,v=l+c,_=g+h,y=f+p,x=s?e.offsetHeight-y-e.clientHeight:0,S=a?e.offsetWidth-_-e.clientWidth:0,$=i?b+_:0,w=i?v+y:0,T=r?r.width:Ar(n.width)-$-S,k=r?r.height:Ar(n.height)-w-x,P=T+b+S+_,R=k+v+x+y,C=Do({devicePixelContentBoxSize:Ha(Math.round(T*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:Ha(P,R,o),contentBoxSize:Ha(T,k,o),contentRect:new $2(d,l,T,k)});return Xu.set(e,C),C},T2=function(e,t,n){var r=M2(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Nl.DEVICE_PIXEL_CONTENT_BOX:return a;case Nl.BORDER_BOX:return i;default:return o}},Z7=function(){function e(t){var n=M2(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Do([n.borderBoxSize]),this.contentBoxSize=Do([n.contentBoxSize]),this.devicePixelContentBoxSize=Do([n.devicePixelContentBoxSize])}return e}(),E2=function(e){if(k2(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},J7=function(){var e=1/0,t=[];Lo.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(s){var l=new Z7(s.target),u=E2(s.target);a.push(l),s.lastReportedSize=T2(s.target,s.observedBox),u<e&&(e=u)}),t.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},i1=function(e){Lo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(E2(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Q7=function(){var e=0;for(i1(e);W7();)e=J7(),i1(e);return V7()&&q7(),e>0},Ih,A2=[],e9=function(){return A2.splice(0).forEach(function(e){return e()})},t9=function(e){if(!Ih){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return e9()}).observe(n,r),Ih=function(){n.textContent="".concat(t?t--:t++)}}A2.push(e),Ih()},n9=function(e){t9(function(){requestAnimationFrame(e)})},Rc=0,r9=function(){return!!Rc},i9=250,o9={attributes:!0,characterData:!0,childList:!0,subtree:!0},o1=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],a1=function(e){return e===void 0&&(e=0),Date.now()+e},Fh=!1,a9=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=i9),!Fh){Fh=!0;var r=a1(t);n9(function(){var i=!1;try{i=Q7()}finally{if(Fh=!1,t=r-a1(),!r9())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,o9)};document.body?n():_l.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),o1.forEach(function(n){return _l.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),o1.forEach(function(n){return _l.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),g0=new a9,s1=function(e){!Rc&&e>0&&g0.start(),Rc+=e,!Rc&&g0.stop()},s9=function(e){return!rv(e)&&!G7(e)&&getComputedStyle(e).display==="inline"},l9=function(){function e(t,n){this.target=t,this.observedBox=n||Nl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=T2(this.target,this.observedBox,!0);return s9(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),u9=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Ku=new WeakMap,l1=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Zu=function(){function e(){}return e.connect=function(t,n){var r=new u9(t,n);Ku.set(t,r)},e.observe=function(t,n,r){var i=Ku.get(t),o=i.observationTargets.length===0;l1(i.observationTargets,n)<0&&(o&&Lo.push(i),i.observationTargets.push(new l9(n,r&&r.box)),s1(1),g0.schedule())},e.unobserve=function(t,n){var r=Ku.get(t),i=l1(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Lo.splice(Lo.indexOf(r),1),r.observationTargets.splice(i,1),s1(-1))},e.disconnect=function(t){var n=this,r=Ku.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),c9=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Zu.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!t1(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!t1(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.unobserve(this,t)},e.prototype.disconnect=function(){Zu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class f9{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||c9)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const of=new f9,Wi=Ie({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=ps().proxy;function r(i){const{onResize:o}=e;o!==void 0&&o(i)}dn(()=>{const i=n.$el;if(i===void 0){Gm("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){Gm("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(of.registerHandler(i.nextElementSibling,r),t=!0)}),Bn(()=>{t&&of.unregisterHandler(n.$el.nextElementSibling)})},render(){return Yg(this.$slots,"default")}});let Ju;function d9(){return typeof document>"u"?!1:(Ju===void 0&&("matchMedia"in window?Ju=window.matchMedia("(pointer:coarse)").matches:Ju=!1),Ju)}let Bh;function u1(){return typeof document>"u"?1:(Bh===void 0&&(Bh="chrome"in window?window.devicePixelRatio:1),Bh)}const P2="VVirtualListXScroll";function h9({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const r=ne(0),i=ne(0),o=pe(()=>{const u=e.value;if(u.length===0)return null;const c=new S2(u.length,0);return u.forEach((d,f)=>{c.add(f,d.width)}),c}),a=Ht(()=>{const u=o.value;return u!==null?Math.max(u.getBound(i.value)-1,0):0}),s=u=>{const c=o.value;return c!==null?c.sum(u):0},l=Ht(()=>{const u=o.value;return u!==null?Math.min(u.getBound(i.value+r.value)+1,e.value.length-1):0});return jn(P2,{startIndexRef:a,endIndexRef:l,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:s}),{listWidthRef:r,scrollLeftRef:i}}const c1=Ie({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:o}=$t(P2);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:o,getLeft:r}},render(){const{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:o,item:a}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:a,getLeft:o});if(r!=null){const s=[];for(let l=e;l<=t;++l){const u=n[l];s.push(r({column:u,left:o(l),item:a}))}return s}return null}}),p9=Nr(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Nr("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),g9=Ie({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=uo();p9.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Sd,ssr:t}),dn(()=>{const{defaultScrollIndex:E,defaultScrollKey:I}=e;E!=null?b({index:E}):I!=null&&b({key:I})});let n=!1,r=!1;Vg(()=>{if(n=!1,!r){r=!0;return}b({top:h.value,left:a.value})}),qg(()=>{n=!0,r||(r=!0)});const i=Ht(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let E=0;return e.columns.forEach(I=>{E+=I.width}),E}),o=pe(()=>{const E=new Map,{keyField:I}=e;return e.items.forEach((z,j)=>{E.set(z[I],j)}),E}),{scrollLeftRef:a,listWidthRef:s}=h9({columnsRef:et(e,"columns"),renderColRef:et(e,"renderCol"),renderItemWithColsRef:et(e,"renderItemWithCols")}),l=ne(null),u=ne(void 0),c=new Map,d=pe(()=>{const{items:E,itemSize:I,keyField:z}=e,j=new S2(E.length,I);return E.forEach((Z,J)=>{const ie=Z[z],he=c.get(ie);he!==void 0&&j.add(J,he)}),j}),f=ne(0),h=ne(0),p=Ht(()=>Math.max(d.value.getBound(h.value-kn(e.paddingTop))-1,0)),g=pe(()=>{const{value:E}=u;if(E===void 0)return[];const{items:I,itemSize:z}=e,j=p.value,Z=Math.min(j+Math.ceil(E/z+1),I.length-1),J=[];for(let ie=j;ie<=Z;++ie)J.push(I[ie]);return J}),b=(E,I)=>{if(typeof E=="number"){x(E,I,"auto");return}const{left:z,top:j,index:Z,key:J,position:ie,behavior:he,debounce:_e=!0}=E;if(z!==void 0||j!==void 0)x(z,j,he);else if(Z!==void 0)y(Z,he,_e);else if(J!==void 0){const oe=o.value.get(J);oe!==void 0&&y(oe,he,_e)}else ie==="bottom"?x(0,Number.MAX_SAFE_INTEGER,he):ie==="top"&&x(0,0,he)};let v,_=null;function y(E,I,z){const{value:j}=d,Z=j.sum(E)+kn(e.paddingTop);if(!z)l.value.scrollTo({left:0,top:Z,behavior:I});else{v=E,_!==null&&window.clearTimeout(_),_=window.setTimeout(()=>{v=void 0,_=null},16);const{scrollTop:J,offsetHeight:ie}=l.value;if(Z>J){const he=j.get(E);Z+he<=J+ie||l.value.scrollTo({left:0,top:Z+he-ie,behavior:I})}else l.value.scrollTo({left:0,top:Z,behavior:I})}}function x(E,I,z){l.value.scrollTo({left:E,top:I,behavior:z})}function S(E,I){var z,j,Z;if(n||e.ignoreItemResize||C(I.target))return;const{value:J}=d,ie=o.value.get(E),he=J.get(ie),_e=(Z=(j=(z=I.borderBoxSize)===null||z===void 0?void 0:z[0])===null||j===void 0?void 0:j.blockSize)!==null&&Z!==void 0?Z:I.contentRect.height;if(_e===he)return;_e-e.itemSize===0?c.delete(E):c.set(E,_e-e.itemSize);const oe=_e-he;if(oe===0)return;J.add(ie,oe);const ve=l.value;if(ve!=null){if(v===void 0){const we=J.sum(ie);ve.scrollTop>we&&ve.scrollBy(0,oe)}else if(ie<v)ve.scrollBy(0,oe);else if(ie===v){const we=J.sum(ie);_e+we>ve.scrollTop+ve.offsetHeight&&ve.scrollBy(0,oe)}R()}f.value++}const $=!d9();let w=!1;function T(E){var I;(I=e.onScroll)===null||I===void 0||I.call(e,E),(!$||!w)&&R()}function k(E){var I;if((I=e.onWheel)===null||I===void 0||I.call(e,E),$){const z=l.value;if(z!=null){if(E.deltaX===0&&(z.scrollTop===0&&E.deltaY<=0||z.scrollTop+z.offsetHeight>=z.scrollHeight&&E.deltaY>=0))return;E.preventDefault(),z.scrollTop+=E.deltaY/u1(),z.scrollLeft+=E.deltaX/u1(),R(),w=!0,l2(()=>{w=!1})}}}function P(E){if(n||C(E.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(E.contentRect.height===u.value)return}else if(E.contentRect.height===u.value&&E.contentRect.width===s.value)return;u.value=E.contentRect.height,s.value=E.contentRect.width;const{onResize:I}=e;I!==void 0&&I(E)}function R(){const{value:E}=l;E!=null&&(h.value=E.scrollTop,a.value=E.scrollLeft)}function C(E){let I=E;for(;I!==null;){if(I.style.display==="none")return!0;I=I.parentElement}return!1}return{listHeight:u,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:pe(()=>{const{itemResizable:E}=e,I=Bi(d.value.sum());return f.value,[e.itemsStyle,{boxSizing:"content-box",width:Bi(i.value),height:E?"":I,minHeight:E?I:"",paddingTop:Bi(e.paddingTop),paddingBottom:Bi(e.paddingBottom)}]}),visibleItemsStyle:pe(()=>(f.value,{transform:`translateY(${Bi(d.value.sum(p.value))})`})),viewportItems:g,listElRef:l,itemsElRef:ne(null),scrollTo:b,handleListResize:P,handleListScroll:T,handleListWheel:k,handleItemResize:S}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return M(Wi,{onResize:this.handleListResize},{default:()=>{var i,o;return M("div",ia(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?M("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[M(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:a,renderItemWithCols:s}=this;return this.viewportItems.map(l=>{const u=l[t],c=n.get(u),d=a!=null?M(c1,{index:c,item:l}):void 0,f=s!=null?M(c1,{index:c,item:l}):void 0,h=this.$slots.default({item:l,renderedCols:d,renderedItemWithCols:f,index:c})[0];return e?M(Wi,{key:u,onResize:p=>this.handleItemResize(u,p)},{default:()=>h}):(h.key=u,h)})}})]):(o=(i=this.$slots).empty)===null||o===void 0?void 0:o.call(i)])}})}}),v9=Nr(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar",{width:0,height:0})]),b9=Ie({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=ne(null);function t(r){!(r.currentTarget.offsetWidth<r.currentTarget.scrollWidth)||r.deltaY===0||(r.currentTarget.scrollLeft+=r.deltaY+r.deltaX,r.preventDefault())}const n=uo();return v9.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Sd,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...r){var i;(i=e.value)===null||i===void 0||i.scrollTo(...r)}})},render(){return M("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),Qr="v-hidden",m9=Nr("[v-hidden]",{display:"none!important"}),f1=Ie({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=ne(null),r=ne(null);function i(a){const{value:s}=n,{getCounter:l,getTail:u}=e;let c;if(l!==void 0?c=l():c=r.value,!s||!c)return;c.hasAttribute(Qr)&&c.removeAttribute(Qr);const{children:d}=s;if(a.showAllItemsBeforeCalculate)for(const y of d)y.hasAttribute(Qr)&&y.removeAttribute(Qr);const f=s.offsetWidth,h=[],p=t.tail?u==null?void 0:u():null;let g=p?p.offsetWidth:0,b=!1;const v=s.children.length-(t.tail?1:0);for(let y=0;y<v-1;++y){if(y<0)continue;const x=d[y];if(b){x.hasAttribute(Qr)||x.setAttribute(Qr,"");continue}else x.hasAttribute(Qr)&&x.removeAttribute(Qr);const S=x.offsetWidth;if(g+=S,h[y]=S,g>f){const{updateCounter:$}=e;for(let w=y;w>=0;--w){const T=v-1-w;$!==void 0?$(T):c.textContent=`${T}`;const k=c.offsetWidth;if(g-=h[w],g+k<=f||w===0){b=!0,y=w-1,p&&(y===-1?(p.style.maxWidth=`${f-k}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:P}=e;P&&P(T);break}}}}const{onUpdateOverflow:_}=e;b?_!==void 0&&_(!0):(_!==void 0&&_(!1),c.setAttribute(Qr,""))}const o=uo();return m9.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Sd,ssr:o}),dn(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return fn(()=>this.sync({showAllItemsBeforeCalculate:!1})),M("div",{class:"v-overflow",ref:"selfRef"},[Yg(e,"default"),e.counter?e.counter():M("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function R2(e){return e instanceof HTMLElement}function z2(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(R2(n)&&(F2(n)||z2(n)))return!0}return!1}function I2(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(R2(n)&&(F2(n)||I2(n)))return!0}return!1}function F2(e){if(!y9(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function y9(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Ms=[];const _9=Ie({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=g7(),n=ne(null),r=ne(null);let i=!1,o=!1;const a=typeof document>"u"?null:document.activeElement;function s(){return Ms[Ms.length-1]===t}function l(b){var v;b.code==="Escape"&&s()&&((v=e.onEsc)===null||v===void 0||v.call(e,b))}dn(()=>{vt(()=>e.active,b=>{b?(d(),kt("keydown",document,l)):(St("keydown",document,l),i&&f())},{immediate:!0})}),Bn(()=>{St("keydown",document,l),i&&f()});function u(b){if(!o&&s()){const v=c();if(v===null||v.contains(Qa(b)))return;h("first")}}function c(){const b=n.value;if(b===null)return null;let v=b;for(;v=v.nextSibling,!(v===null||v instanceof Element&&v.tagName==="DIV"););return v}function d(){var b;if(!e.disabled){if(Ms.push(t),e.autoFocus){const{initialFocusTo:v}=e;v===void 0?h("first"):(b=Km(v))===null||b===void 0||b.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",u,!0)}}function f(){var b;if(e.disabled||(document.removeEventListener("focus",u,!0),Ms=Ms.filter(_=>_!==t),s()))return;const{finalFocusTo:v}=e;v!==void 0?(b=Km(v))===null||b===void 0||b.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&a instanceof HTMLElement&&(o=!0,a.focus({preventScroll:!0}),o=!1)}function h(b){if(s()&&e.active){const v=n.value,_=r.value;if(v!==null&&_!==null){const y=c();if(y==null||y===_){o=!0,v.focus({preventScroll:!0}),o=!1;return}o=!0;const x=b==="first"?z2(y):I2(y);o=!1,x||(o=!0,v.focus({preventScroll:!0}),o=!1)}}}function p(b){if(o)return;const v=c();v!==null&&(b.relatedTarget!==null&&v.contains(b.relatedTarget)?h("last"):h("first"))}function g(b){o||(b.relatedTarget!==null&&b.relatedTarget===n.value?h("last"):h("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:p,handleEndFocus:g}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return M(Tt,null,[M("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),M("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function B2(e,t){t&&(dn(()=>{const{value:n}=e;n&&of.registerHandler(n,t)}),Bn(()=>{const{value:n}=e;n&&of.unregisterHandler(n)}))}function af(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const x9=/^(\d|\.)+$/,d1=/(\d|\.)+/;function zc(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(x9.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=d1.exec(e);return i?e.replace(d1,String((Number(i[0])+n)*t)):e}return e}function h1(e){const{left:t,right:n,top:r,bottom:i}=Kn(e);return`${r} ${n} ${i} ${t}`}let Oh;function w9(){return Oh===void 0&&(Oh=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Oh}const C9=new WeakSet;function S9(e){C9.add(e)}function p1(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function sf(e,t){console.error(`[naive/${e}]: ${t}`)}function O2(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Ge(e,...t){if(Array.isArray(e))e.forEach(n=>Ge(n,...t));else return e(...t)}function Ua(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){Ua(r,t,n);return}if(r.type===Tt){if(r.children===null)return;Array.isArray(r.children)&&Ua(r.children,t,n)}else{if(r.type===sn&&t)return;n.push(r)}}}),n}function g1(e,t="default",n=void 0){const r=e[t];if(!r)return sf("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Ua(r(n));return i.length===1?i[0]:(sf("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function $9(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function Nh(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}function k9(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(i=>{t.includes(i)||(r[i]=e[i])}),Object.assign(r,n)}function Io(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?Wo(e):typeof e=="number"?Wo(String(e)):null}function mu(e){return e.some(t=>Fl(t)?!(t.type===sn||t.type===Tt&&!mu(t.children)):!0)?e:null}function Ur(e,t){return e&&mu(e())||t()}function M9(e,t,n){return e&&mu(e(t))||n(t)}function Bt(e,t){const n=e&&mu(e());return t(n||null)}function ja(e){return!(e&&mu(e()))}const v0=Ie({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),oa="n-config-provider",T9="n";function rn(e={},t={defaultBordered:!0}){const n=$t(oa,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:pe(()=>{var r,i;const{bordered:o}=e;return o!==void 0?o:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:HS(T9),namespaceRef:pe(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function Cn(e,t,n,r){n||O2("useThemeClass","cssVarsRef is not passed");const i=$t(oa,null),o=i==null?void 0:i.mergedThemeHashRef,a=i==null?void 0:i.styleMountTarget,s=ne(""),l=uo();let u;const c=`__${e}`,d=()=>{let f=c;const h=t?t.value:void 0,p=o==null?void 0:o.value;p&&(f+=`-${p}`),h&&(f+=`-${h}`);const{themeOverrides:g,builtinThemeOverrides:b}=r;g&&(f+=`-${a0(JSON.stringify(g))}`),b&&(f+=`-${a0(JSON.stringify(b))}`),s.value=f,u=()=>{const v=n.value;let _="";for(const y in v)_+=`${y}: ${v[y]};`;ce(`.${f}`,_).mount({id:f,ssr:l,parent:a}),u=void 0}};return xr(()=>{d()}),{themeClass:s,onRender:()=>{u==null||u()}}}const v1="n-form-item";function aa(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=$t(v1,null);jn(v1,null);const o=pe(n?()=>n(i):()=>{const{size:l}=e;if(l)return l;if(i){const{mergedSize:u}=i;if(u.value!==void 0)return u.value}return t}),a=pe(r?()=>r(i):()=>{const{disabled:l}=e;return l!==void 0?l:i?i.disabled.value:!1}),s=pe(()=>{const{status:l}=e;return l||(i==null?void 0:i.mergedValidationStatus.value)});return Bn(()=>{i&&i.restoreValidation()}),{mergedSizeRef:o,mergedDisabledRef:a,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}const E9={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Lh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Ts(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}function Es(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?P9(s,d=>d.test(a)):A9(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(a.length);return{value:u,rest:c}}}function A9(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function P9(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function R9(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const z9={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},I9=(e,t,n)=>{let r;const i=z9[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},F9={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},B9=(e,t,n,r)=>F9[e],O9={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},N9={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},L9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},D9={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},H9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},U9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},j9=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},W9={ordinalNumber:j9,era:Ts({values:O9,defaultWidth:"wide"}),quarter:Ts({values:N9,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ts({values:L9,defaultWidth:"wide"}),day:Ts({values:D9,defaultWidth:"wide"}),dayPeriod:Ts({values:H9,defaultWidth:"wide",formattingValues:U9,defaultFormattingWidth:"wide"})},V9=/^(\d+)(th|st|nd|rd)?/i,q9=/\d+/i,Y9={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},G9={any:[/^b/i,/^(a|c)/i]},X9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K9={any:[/1/i,/2/i,/3/i,/4/i]},Z9={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},J9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Q9={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},eM={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tM={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},nM={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rM={ordinalNumber:R9({matchPattern:V9,parsePattern:q9,valueCallback:e=>parseInt(e,10)}),era:Es({matchPatterns:Y9,defaultMatchWidth:"wide",parsePatterns:G9,defaultParseWidth:"any"}),quarter:Es({matchPatterns:X9,defaultMatchWidth:"wide",parsePatterns:K9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Es({matchPatterns:Z9,defaultMatchWidth:"wide",parsePatterns:J9,defaultParseWidth:"any"}),day:Es({matchPatterns:Q9,defaultMatchWidth:"wide",parsePatterns:eM,defaultParseWidth:"any"}),dayPeriod:Es({matchPatterns:tM,defaultMatchWidth:"any",parsePatterns:nM,defaultParseWidth:"any"})},iM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},oM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sM={date:Lh({formats:iM,defaultWidth:"full"}),time:Lh({formats:oM,defaultWidth:"full"}),dateTime:Lh({formats:aM,defaultWidth:"full"})},lM={code:"en-US",formatDistance:I9,formatLong:sM,formatRelative:B9,localize:W9,match:rM,options:{weekStartsOn:0,firstWeekContainsDate:1}},uM={name:"en-US",locale:lM};var N2=typeof global=="object"&&global&&global.Object===Object&&global,cM=typeof self=="object"&&self&&self.Object===Object&&self,kr=N2||cM||Function("return this")(),Xi=kr.Symbol,L2=Object.prototype,fM=L2.hasOwnProperty,dM=L2.toString,As=Xi?Xi.toStringTag:void 0;function hM(e){var t=fM.call(e,As),n=e[As];try{e[As]=void 0;var r=!0}catch{}var i=dM.call(e);return r&&(t?e[As]=n:delete e[As]),i}var pM=Object.prototype,gM=pM.toString;function vM(e){return gM.call(e)}var bM="[object Null]",mM="[object Undefined]",b1=Xi?Xi.toStringTag:void 0;function sa(e){return e==null?e===void 0?mM:bM:b1&&b1 in Object(e)?hM(e):vM(e)}function Ki(e){return e!=null&&typeof e=="object"}var yM="[object Symbol]";function kd(e){return typeof e=="symbol"||Ki(e)&&sa(e)==yM}function D2(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var dr=Array.isArray,m1=Xi?Xi.prototype:void 0,y1=m1?m1.toString:void 0;function H2(e){if(typeof e=="string")return e;if(dr(e))return D2(e,H2)+"";if(kd(e))return y1?y1.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var _M=/\s/;function xM(e){for(var t=e.length;t--&&_M.test(e.charAt(t)););return t}var wM=/^\s+/;function CM(e){return e&&e.slice(0,xM(e)+1).replace(wM,"")}function hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _1=NaN,SM=/^[-+]0x[0-9a-f]+$/i,$M=/^0b[01]+$/i,kM=/^0o[0-7]+$/i,MM=parseInt;function x1(e){if(typeof e=="number")return e;if(kd(e))return _1;if(hr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=CM(e);var n=$M.test(e);return n||kM.test(e)?MM(e.slice(2),n?2:8):SM.test(e)?_1:+e}function iv(e){return e}var TM="[object AsyncFunction]",EM="[object Function]",AM="[object GeneratorFunction]",PM="[object Proxy]";function ov(e){if(!hr(e))return!1;var t=sa(e);return t==EM||t==AM||t==TM||t==PM}var Dh=kr["__core-js_shared__"],w1=function(){var e=/[^.]+$/.exec(Dh&&Dh.keys&&Dh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function RM(e){return!!w1&&w1 in e}var zM=Function.prototype,IM=zM.toString;function la(e){if(e!=null){try{return IM.call(e)}catch{}try{return e+""}catch{}}return""}var FM=/[\\^$.*+?()[\]{}|]/g,BM=/^\[object .+?Constructor\]$/,OM=Function.prototype,NM=Object.prototype,LM=OM.toString,DM=NM.hasOwnProperty,HM=RegExp("^"+LM.call(DM).replace(FM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function UM(e){if(!hr(e)||RM(e))return!1;var t=ov(e)?HM:BM;return t.test(la(e))}function jM(e,t){return e==null?void 0:e[t]}function ua(e,t){var n=jM(e,t);return UM(n)?n:void 0}var b0=ua(kr,"WeakMap"),C1=Object.create,WM=function(){function e(){}return function(t){if(!hr(t))return{};if(C1)return C1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function VM(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function qM(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var YM=800,GM=16,XM=Date.now;function KM(e){var t=0,n=0;return function(){var r=XM(),i=GM-(r-n);if(n=r,i>0){if(++t>=YM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function ZM(e){return function(){return e}}var lf=function(){try{var e=ua(Object,"defineProperty");return e({},"",{}),e}catch{}}(),JM=lf?function(e,t){return lf(e,"toString",{configurable:!0,enumerable:!1,value:ZM(t),writable:!0})}:iv,QM=KM(JM),eT=9007199254740991,tT=/^(?:0|[1-9]\d*)$/;function av(e,t){var n=typeof e;return t=t??eT,!!t&&(n=="number"||n!="symbol"&&tT.test(e))&&e>-1&&e%1==0&&e<t}function sv(e,t,n){t=="__proto__"&&lf?lf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yu(e,t){return e===t||e!==e&&t!==t}var nT=Object.prototype,rT=nT.hasOwnProperty;function iT(e,t,n){var r=e[t];(!(rT.call(e,t)&&yu(r,n))||n===void 0&&!(t in e))&&sv(e,t,n)}function oT(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;l===void 0&&(l=e[s]),i?sv(n,s,l):iT(n,s,l)}return n}var S1=Math.max;function aT(e,t,n){return t=S1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=S1(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),VM(e,this,s)}}function sT(e,t){return QM(aT(e,t,iv),e+"")}var lT=9007199254740991;function lv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lT}function vs(e){return e!=null&&lv(e.length)&&!ov(e)}function uT(e,t,n){if(!hr(n))return!1;var r=typeof t;return(r=="number"?vs(n)&&av(t,n.length):r=="string"&&t in n)?yu(n[t],e):!1}function cT(e){return sT(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&uT(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var fT=Object.prototype;function uv(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||fT;return e===n}function dT(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var hT="[object Arguments]";function $1(e){return Ki(e)&&sa(e)==hT}var U2=Object.prototype,pT=U2.hasOwnProperty,gT=U2.propertyIsEnumerable,uf=$1(function(){return arguments}())?$1:function(e){return Ki(e)&&pT.call(e,"callee")&&!gT.call(e,"callee")};function vT(){return!1}var j2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,k1=j2&&typeof module=="object"&&module&&!module.nodeType&&module,bT=k1&&k1.exports===j2,M1=bT?kr.Buffer:void 0,mT=M1?M1.isBuffer:void 0,cf=mT||vT,yT="[object Arguments]",_T="[object Array]",xT="[object Boolean]",wT="[object Date]",CT="[object Error]",ST="[object Function]",$T="[object Map]",kT="[object Number]",MT="[object Object]",TT="[object RegExp]",ET="[object Set]",AT="[object String]",PT="[object WeakMap]",RT="[object ArrayBuffer]",zT="[object DataView]",IT="[object Float32Array]",FT="[object Float64Array]",BT="[object Int8Array]",OT="[object Int16Array]",NT="[object Int32Array]",LT="[object Uint8Array]",DT="[object Uint8ClampedArray]",HT="[object Uint16Array]",UT="[object Uint32Array]",It={};It[IT]=It[FT]=It[BT]=It[OT]=It[NT]=It[LT]=It[DT]=It[HT]=It[UT]=!0;It[yT]=It[_T]=It[RT]=It[xT]=It[zT]=It[wT]=It[CT]=It[ST]=It[$T]=It[kT]=It[MT]=It[TT]=It[ET]=It[AT]=It[PT]=!1;function jT(e){return Ki(e)&&lv(e.length)&&!!It[sa(e)]}function WT(e){return function(t){return e(t)}}var W2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xl=W2&&typeof module=="object"&&module&&!module.nodeType&&module,VT=xl&&xl.exports===W2,Hh=VT&&N2.process,T1=function(){try{var e=xl&&xl.require&&xl.require("util").types;return e||Hh&&Hh.binding&&Hh.binding("util")}catch{}}(),E1=T1&&T1.isTypedArray,cv=E1?WT(E1):jT,qT=Object.prototype,YT=qT.hasOwnProperty;function V2(e,t){var n=dr(e),r=!n&&uf(e),i=!n&&!r&&cf(e),o=!n&&!r&&!i&&cv(e),a=n||r||i||o,s=a?dT(e.length,String):[],l=s.length;for(var u in e)(t||YT.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||av(u,l)))&&s.push(u);return s}function q2(e,t){return function(n){return e(t(n))}}var GT=q2(Object.keys,Object),XT=Object.prototype,KT=XT.hasOwnProperty;function ZT(e){if(!uv(e))return GT(e);var t=[];for(var n in Object(e))KT.call(e,n)&&n!="constructor"&&t.push(n);return t}function fv(e){return vs(e)?V2(e):ZT(e)}function JT(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var QT=Object.prototype,eE=QT.hasOwnProperty;function tE(e){if(!hr(e))return JT(e);var t=uv(e),n=[];for(var r in e)r=="constructor"&&(t||!eE.call(e,r))||n.push(r);return n}function Y2(e){return vs(e)?V2(e,!0):tE(e)}var nE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rE=/^\w*$/;function dv(e,t){if(dr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||kd(e)?!0:rE.test(e)||!nE.test(e)||t!=null&&e in Object(t)}var Ll=ua(Object,"create");function iE(){this.__data__=Ll?Ll(null):{},this.size=0}function oE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var aE="__lodash_hash_undefined__",sE=Object.prototype,lE=sE.hasOwnProperty;function uE(e){var t=this.__data__;if(Ll){var n=t[e];return n===aE?void 0:n}return lE.call(t,e)?t[e]:void 0}var cE=Object.prototype,fE=cE.hasOwnProperty;function dE(e){var t=this.__data__;return Ll?t[e]!==void 0:fE.call(t,e)}var hE="__lodash_hash_undefined__";function pE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ll&&t===void 0?hE:t,this}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vo.prototype.clear=iE;Vo.prototype.delete=oE;Vo.prototype.get=uE;Vo.prototype.has=dE;Vo.prototype.set=pE;function gE(){this.__data__=[],this.size=0}function Md(e,t){for(var n=e.length;n--;)if(yu(e[n][0],t))return n;return-1}var vE=Array.prototype,bE=vE.splice;function mE(e){var t=this.__data__,n=Md(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():bE.call(t,n,1),--this.size,!0}function yE(e){var t=this.__data__,n=Md(t,e);return n<0?void 0:t[n][1]}function _E(e){return Md(this.__data__,e)>-1}function xE(e,t){var n=this.__data__,r=Md(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function _i(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_i.prototype.clear=gE;_i.prototype.delete=mE;_i.prototype.get=yE;_i.prototype.has=_E;_i.prototype.set=xE;var Dl=ua(kr,"Map");function wE(){this.size=0,this.__data__={hash:new Vo,map:new(Dl||_i),string:new Vo}}function CE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Td(e,t){var n=e.__data__;return CE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function SE(e){var t=Td(this,e).delete(e);return this.size-=t?1:0,t}function $E(e){return Td(this,e).get(e)}function kE(e){return Td(this,e).has(e)}function ME(e,t){var n=Td(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function xi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xi.prototype.clear=wE;xi.prototype.delete=SE;xi.prototype.get=$E;xi.prototype.has=kE;xi.prototype.set=ME;var TE="Expected a function";function hv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(TE);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(hv.Cache||xi),n}hv.Cache=xi;var EE=500;function AE(e){var t=hv(e,function(r){return n.size===EE&&n.clear(),r}),n=t.cache;return t}var PE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,RE=/\\(\\)?/g,zE=AE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(PE,function(n,r,i,o){t.push(i?o.replace(RE,"$1"):r||n)}),t});function G2(e){return e==null?"":H2(e)}function X2(e,t){return dr(e)?e:dv(e,t)?[e]:zE(G2(e))}function Ed(e){if(typeof e=="string"||kd(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function K2(e,t){t=X2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ed(t[n++])];return n&&n==r?e:void 0}function IE(e,t,n){var r=e==null?void 0:K2(e,t);return r===void 0?n:r}function FE(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Z2=q2(Object.getPrototypeOf,Object),BE="[object Object]",OE=Function.prototype,NE=Object.prototype,J2=OE.toString,LE=NE.hasOwnProperty,DE=J2.call(Object);function HE(e){if(!Ki(e)||sa(e)!=BE)return!1;var t=Z2(e);if(t===null)return!0;var n=LE.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&J2.call(n)==DE}function UE(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function jE(e,t,n){var r=e.length;return n=n===void 0?r:n,UE(e,t,n)}var WE="\\ud800-\\udfff",VE="\\u0300-\\u036f",qE="\\ufe20-\\ufe2f",YE="\\u20d0-\\u20ff",GE=VE+qE+YE,XE="\\ufe0e\\ufe0f",KE="\\u200d",ZE=RegExp("["+KE+WE+GE+XE+"]");function Q2(e){return ZE.test(e)}function JE(e){return e.split("")}var e5="\\ud800-\\udfff",QE="\\u0300-\\u036f",eA="\\ufe20-\\ufe2f",tA="\\u20d0-\\u20ff",nA=QE+eA+tA,rA="\\ufe0e\\ufe0f",iA="["+e5+"]",m0="["+nA+"]",y0="\\ud83c[\\udffb-\\udfff]",oA="(?:"+m0+"|"+y0+")",t5="[^"+e5+"]",n5="(?:\\ud83c[\\udde6-\\uddff]){2}",r5="[\\ud800-\\udbff][\\udc00-\\udfff]",aA="\\u200d",i5=oA+"?",o5="["+rA+"]?",sA="(?:"+aA+"(?:"+[t5,n5,r5].join("|")+")"+o5+i5+")*",lA=o5+i5+sA,uA="(?:"+[t5+m0+"?",m0,n5,r5,iA].join("|")+")",cA=RegExp(y0+"(?="+y0+")|"+uA+lA,"g");function fA(e){return e.match(cA)||[]}function dA(e){return Q2(e)?fA(e):JE(e)}function hA(e){return function(t){t=G2(t);var n=Q2(t)?dA(t):void 0,r=n?n[0]:t.charAt(0),i=n?jE(n,1).join(""):t.slice(1);return r[e]()+i}}var pA=hA("toUpperCase");function gA(){this.__data__=new _i,this.size=0}function vA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bA(e){return this.__data__.get(e)}function mA(e){return this.__data__.has(e)}var yA=200;function _A(e,t){var n=this.__data__;if(n instanceof _i){var r=n.__data__;if(!Dl||r.length<yA-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xi(r)}return n.set(e,t),this.size=n.size,this}function jr(e){var t=this.__data__=new _i(e);this.size=t.size}jr.prototype.clear=gA;jr.prototype.delete=vA;jr.prototype.get=bA;jr.prototype.has=mA;jr.prototype.set=_A;var a5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,A1=a5&&typeof module=="object"&&module&&!module.nodeType&&module,xA=A1&&A1.exports===a5,P1=xA?kr.Buffer:void 0;P1&&P1.allocUnsafe;function wA(e,t){return e.slice()}function CA(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function SA(){return[]}var $A=Object.prototype,kA=$A.propertyIsEnumerable,R1=Object.getOwnPropertySymbols,MA=R1?function(e){return e==null?[]:(e=Object(e),CA(R1(e),function(t){return kA.call(e,t)}))}:SA;function TA(e,t,n){var r=t(e);return dr(e)?r:FE(r,n(e))}function z1(e){return TA(e,fv,MA)}var _0=ua(kr,"DataView"),x0=ua(kr,"Promise"),w0=ua(kr,"Set"),I1="[object Map]",EA="[object Object]",F1="[object Promise]",B1="[object Set]",O1="[object WeakMap]",N1="[object DataView]",AA=la(_0),PA=la(Dl),RA=la(x0),zA=la(w0),IA=la(b0),Ri=sa;(_0&&Ri(new _0(new ArrayBuffer(1)))!=N1||Dl&&Ri(new Dl)!=I1||x0&&Ri(x0.resolve())!=F1||w0&&Ri(new w0)!=B1||b0&&Ri(new b0)!=O1)&&(Ri=function(e){var t=sa(e),n=t==EA?e.constructor:void 0,r=n?la(n):"";if(r)switch(r){case AA:return N1;case PA:return I1;case RA:return F1;case zA:return B1;case IA:return O1}return t});var ff=kr.Uint8Array;function FA(e){var t=new e.constructor(e.byteLength);return new ff(t).set(new ff(e)),t}function BA(e,t){var n=FA(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function OA(e){return typeof e.constructor=="function"&&!uv(e)?WM(Z2(e)):{}}var NA="__lodash_hash_undefined__";function LA(e){return this.__data__.set(e,NA),this}function DA(e){return this.__data__.has(e)}function df(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new xi;++t<n;)this.add(e[t])}df.prototype.add=df.prototype.push=LA;df.prototype.has=DA;function HA(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function UA(e,t){return e.has(t)}var jA=1,WA=2;function s5(e,t,n,r,i,o){var a=n&jA,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&WA?new df:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],g=t[d];if(r)var b=a?r(g,p,d,t,e,o):r(p,g,d,e,t,o);if(b!==void 0){if(b)continue;f=!1;break}if(h){if(!HA(t,function(v,_){if(!UA(h,_)&&(p===v||i(p,v,n,r,o)))return h.push(_)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(e),o.delete(t),f}function VA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function qA(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var YA=1,GA=2,XA="[object Boolean]",KA="[object Date]",ZA="[object Error]",JA="[object Map]",QA="[object Number]",eP="[object RegExp]",tP="[object Set]",nP="[object String]",rP="[object Symbol]",iP="[object ArrayBuffer]",oP="[object DataView]",L1=Xi?Xi.prototype:void 0,Uh=L1?L1.valueOf:void 0;function aP(e,t,n,r,i,o,a){switch(n){case oP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case iP:return!(e.byteLength!=t.byteLength||!o(new ff(e),new ff(t)));case XA:case KA:case QA:return yu(+e,+t);case ZA:return e.name==t.name&&e.message==t.message;case eP:case nP:return e==t+"";case JA:var s=VA;case tP:var l=r&YA;if(s||(s=qA),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=GA,a.set(e,t);var c=s5(s(e),s(t),r,i,o,a);return a.delete(e),c;case rP:if(Uh)return Uh.call(e)==Uh.call(t)}return!1}var sP=1,lP=Object.prototype,uP=lP.hasOwnProperty;function cP(e,t,n,r,i,o){var a=n&sP,s=z1(e),l=s.length,u=z1(t),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:uP.call(t,f)))return!1}var h=o.get(e),p=o.get(t);if(h&&p)return h==t&&p==e;var g=!0;o.set(e,t),o.set(t,e);for(var b=a;++d<l;){f=s[d];var v=e[f],_=t[f];if(r)var y=a?r(_,v,f,t,e,o):r(v,_,f,e,t,o);if(!(y===void 0?v===_||i(v,_,n,r,o):y)){g=!1;break}b||(b=f=="constructor")}if(g&&!b){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(e),o.delete(t),g}var fP=1,D1="[object Arguments]",H1="[object Array]",Qu="[object Object]",dP=Object.prototype,U1=dP.hasOwnProperty;function hP(e,t,n,r,i,o){var a=dr(e),s=dr(t),l=a?H1:Ri(e),u=s?H1:Ri(t);l=l==D1?Qu:l,u=u==D1?Qu:u;var c=l==Qu,d=u==Qu,f=l==u;if(f&&cf(e)){if(!cf(t))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new jr),a||cv(e)?s5(e,t,n,r,i,o):aP(e,t,l,n,r,i,o);if(!(n&fP)){var h=c&&U1.call(e,"__wrapped__"),p=d&&U1.call(t,"__wrapped__");if(h||p){var g=h?e.value():e,b=p?t.value():t;return o||(o=new jr),i(g,b,n,r,o)}}return f?(o||(o=new jr),cP(e,t,n,r,i,o)):!1}function pv(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ki(e)&&!Ki(t)?e!==e&&t!==t:hP(e,t,n,r,pv,i)}var pP=1,gP=2;function vP(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var s=a[0],l=e[s],u=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var c=new jr,d;if(!(d===void 0?pv(u,l,pP|gP,r,c):d))return!1}}return!0}function l5(e){return e===e&&!hr(e)}function bP(e){for(var t=fv(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,l5(i)]}return t}function u5(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function mP(e){var t=bP(e);return t.length==1&&t[0][2]?u5(t[0][0],t[0][1]):function(n){return n===e||vP(n,e,t)}}function yP(e,t){return e!=null&&t in Object(e)}function _P(e,t,n){t=X2(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=Ed(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&lv(i)&&av(a,i)&&(dr(e)||uf(e)))}function xP(e,t){return e!=null&&_P(e,t,yP)}var wP=1,CP=2;function SP(e,t){return dv(e)&&l5(t)?u5(Ed(e),t):function(n){var r=IE(n,e);return r===void 0&&r===t?xP(n,e):pv(t,r,wP|CP)}}function $P(e){return function(t){return t==null?void 0:t[e]}}function kP(e){return function(t){return K2(t,e)}}function MP(e){return dv(e)?$P(Ed(e)):kP(e)}function TP(e){return typeof e=="function"?e:e==null?iv:typeof e=="object"?dr(e)?SP(e[0],e[1]):mP(e):MP(e)}function EP(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[++i];if(n(o[l],l,o)===!1)break}return t}}var c5=EP();function AP(e,t){return e&&c5(e,t,fv)}function PP(e,t){return function(n,r){if(n==null)return n;if(!vs(n))return e(n,r);for(var i=n.length,o=-1,a=Object(n);++o<i&&r(a[o],o,a)!==!1;);return n}}var RP=PP(AP),jh=function(){return kr.Date.now()},zP="Expected a function",IP=Math.max,FP=Math.min;function BP(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(zP);t=x1(t)||0,hr(n)&&(c=!!n.leading,d="maxWait"in n,o=d?IP(x1(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f);function h($){var w=r,T=i;return r=i=void 0,u=$,a=e.apply(T,w),a}function p($){return u=$,s=setTimeout(v,t),c?h($):a}function g($){var w=$-l,T=$-u,k=t-w;return d?FP(k,o-T):k}function b($){var w=$-l,T=$-u;return l===void 0||w>=t||w<0||d&&T>=o}function v(){var $=jh();if(b($))return _($);s=setTimeout(v,g($))}function _($){return s=void 0,f&&r?h($):(r=i=void 0,a)}function y(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return s===void 0?a:_(jh())}function S(){var $=jh(),w=b($);if(r=arguments,i=this,l=$,w){if(s===void 0)return p(l);if(d)return clearTimeout(s),s=setTimeout(v,t),h(l)}return s===void 0&&(s=setTimeout(v,t)),a}return S.cancel=y,S.flush=x,S}function C0(e,t,n){(n!==void 0&&!yu(e[t],n)||n===void 0&&!(t in e))&&sv(e,t,n)}function OP(e){return Ki(e)&&vs(e)}function S0(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function NP(e){return oT(e,Y2(e))}function LP(e,t,n,r,i,o,a){var s=S0(e,n),l=S0(t,n),u=a.get(l);if(u){C0(e,n,u);return}var c=o?o(s,l,n+"",e,t,a):void 0,d=c===void 0;if(d){var f=dr(l),h=!f&&cf(l),p=!f&&!h&&cv(l);c=l,f||h||p?dr(s)?c=s:OP(s)?c=qM(s):h?(d=!1,c=wA(l)):p?(d=!1,c=BA(l)):c=[]:HE(l)||uf(l)?(c=s,uf(s)?c=NP(s):(!hr(s)||ov(s))&&(c=OA(l))):d=!1}d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),C0(e,n,c)}function f5(e,t,n,r,i){e!==t&&c5(t,function(o,a){if(i||(i=new jr),hr(o))LP(e,t,a,n,f5,r,i);else{var s=r?r(S0(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),C0(e,a,s)}},Y2)}function DP(e,t){var n=-1,r=vs(e)?Array(e.length):[];return RP(e,function(i,o,a){r[++n]=t(i,o,a)}),r}function HP(e,t){var n=dr(e)?D2:DP;return n(e,TP(t))}var ec=cT(function(e,t,n){f5(e,t,n)}),UP="Expected a function";function Wh(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(UP);return hr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),BP(e,t,{leading:r,maxWait:t,trailing:i})}function _u(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=$t(oa,null)||{},r=pe(()=>{var i,o;return(o=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&o!==void 0?o:E9[e]});return{dateLocaleRef:pe(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:uM}),localeRef:r}}const Hl="naive-ui-style";function co(e,t,n){if(!t)return;const r=uo(),i=pe(()=>{const{value:s}=t;if(!s)return;const l=s[e];if(l)return l}),o=$t(oa,null),a=()=>{xr(()=>{const{value:s}=n,l=`${s}${e}Rtl`;if(r7(l,r))return;const{value:u}=i;u&&u.style.mount({id:l,head:!0,anchorMetaName:Hl,props:{bPrefix:s?`.${s}-`:void 0},ssr:r,parent:o==null?void 0:o.styleMountTarget})})};return r?a():pd(a),i}const ca={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:jP,fontFamily:WP,lineHeight:VP}=ca,d5=ce("body",`
|
|
31
31
|
margin: 0;
|
|
32
|
-
font-size: ${
|
|
33
|
-
font-family: ${
|
|
34
|
-
line-height: ${
|
|
32
|
+
font-size: ${jP};
|
|
33
|
+
font-family: ${WP};
|
|
34
|
+
line-height: ${VP};
|
|
35
35
|
-webkit-text-size-adjust: 100%;
|
|
36
36
|
-webkit-tap-highlight-color: transparent;
|
|
37
37
|
`,[ce("input",`
|
|
38
38
|
font-family: inherit;
|
|
39
39
|
font-size: inherit;
|
|
40
|
-
`)]);function fa(e,t,n){if(!t)return;const r=uo(),i=$t(oa,null),o=()=>{const a=n.value;t.mount({id:a===void 0?e:a+e,head:!0,anchorMetaName:Hl,props:{bPrefix:a?`.${a}-`:void 0},ssr:r,parent:i==null?void 0:i.styleMountTarget}),i!=null&&i.preflightStyleDisabled||
|
|
40
|
+
`)]);function fa(e,t,n){if(!t)return;const r=uo(),i=$t(oa,null),o=()=>{const a=n.value;t.mount({id:a===void 0?e:a+e,head:!0,anchorMetaName:Hl,props:{bPrefix:a?`.${a}-`:void 0},ssr:r,parent:i==null?void 0:i.styleMountTarget}),i!=null&&i.preflightStyleDisabled||d5.mount({id:"n-global",head:!0,anchorMetaName:Hl,ssr:r,parent:i==null?void 0:i.styleMountTarget})};r?o():pd(o)}function pt(e,t,n,r,i,o){const a=uo(),s=$t(oa,null);if(n){const l=()=>{const u=o==null?void 0:o.value;n.mount({id:u===void 0?t:u+t,head:!0,props:{bPrefix:u?`.${u}-`:void 0},anchorMetaName:Hl,ssr:a,parent:s==null?void 0:s.styleMountTarget}),s!=null&&s.preflightStyleDisabled||d5.mount({id:"n-global",head:!0,anchorMetaName:Hl,ssr:a,parent:s==null?void 0:s.styleMountTarget})};a?l():pd(l)}return pe(()=>{var l;const{theme:{common:u,self:c,peers:d={}}={},themeOverrides:f={},builtinThemeOverrides:h={}}=i,{common:p,peers:g}=f,{common:b=void 0,[e]:{common:v=void 0,self:_=void 0,peers:y={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:x=void 0,[e]:S={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:$,peers:w={}}=S,T=ec({},u||v||b||r.common,x,$,p),k=ec((l=c||_||r.self)===null||l===void 0?void 0:l(T),h,S,f);return{common:T,self:k,peers:ec({},r.peers,y,d),peerOverrides:ec({},h.peers,w,g)}})}pt.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const qP=W("base-icon",`
|
|
41
41
|
height: 1em;
|
|
42
42
|
width: 1em;
|
|
43
43
|
line-height: 1em;
|
|
@@ -49,13 +49,13 @@ ${t}
|
|
|
49
49
|
`,[ce("svg",`
|
|
50
50
|
height: 1em;
|
|
51
51
|
width: 1em;
|
|
52
|
-
`)]),Cr=Ie({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){fa("-base-icon",VP,et(e,"clsPrefix"))},render(){return k("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),Ad=Ie({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=gs();return()=>k(wr,{name:"icon-switch-transition",appear:n.value},t)}}),d5=Ie({name:"Add",render(){return k("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function bs(e,t){return Ie({name:hA(e),setup(){var n;const r=(n=$t(oa,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const o=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return o?o():t}}})}const qP=Ie({name:"Checkmark",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},k("g",{fill:"none"},k("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),YP=Ie({name:"ChevronDown",render(){return k("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),GP=bs("clear",k("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},k("g",{fill:"currentColor","fill-rule":"nonzero"},k("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),XP=bs("close",k("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},k("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},k("g",{fill:"currentColor","fill-rule":"nonzero"},k("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),KP=Ie({name:"Empty",render(){return k("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),k("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),ZP=bs("error",k("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},k("g",{"fill-rule":"nonzero"},k("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),JP=Ie({name:"Eye",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),k("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),QP=Ie({name:"EyeOff",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),k("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),k("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),k("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),k("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),eR=bs("info",k("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},k("g",{"fill-rule":"nonzero"},k("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),tR=Ie({name:"Remove",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
52
|
+
`)]),Cr=Ie({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){fa("-base-icon",qP,et(e,"clsPrefix"))},render(){return M("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),Ad=Ie({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=gs();return()=>M(wr,{name:"icon-switch-transition",appear:n.value},t)}}),h5=Ie({name:"Add",render(){return M("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function bs(e,t){return Ie({name:pA(e),setup(){var n;const r=(n=$t(oa,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const o=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return o?o():t}}})}const YP=Ie({name:"Checkmark",render(){return M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},M("g",{fill:"none"},M("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),GP=Ie({name:"ChevronDown",render(){return M("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),XP=bs("clear",M("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},M("g",{fill:"currentColor","fill-rule":"nonzero"},M("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),KP=bs("close",M("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},M("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},M("g",{fill:"currentColor","fill-rule":"nonzero"},M("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),ZP=Ie({name:"Empty",render(){return M("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),M("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),JP=bs("error",M("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},M("g",{"fill-rule":"nonzero"},M("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),QP=Ie({name:"Eye",render(){return M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},M("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),M("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),eR=Ie({name:"EyeOff",render(){return M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},M("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),M("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),M("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),M("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),M("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),tR=bs("info",M("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},M("g",{"fill-rule":"nonzero"},M("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),nR=Ie({name:"Remove",render(){return M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},M("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
53
53
|
fill: none;
|
|
54
54
|
stroke: currentColor;
|
|
55
55
|
stroke-linecap: round;
|
|
56
56
|
stroke-linejoin: round;
|
|
57
57
|
stroke-width: 32px;
|
|
58
|
-
`}))}}),
|
|
58
|
+
`}))}}),rR=bs("success",M("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},M("g",{"fill-rule":"nonzero"},M("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),iR=bs("warning",M("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},M("g",{"fill-rule":"nonzero"},M("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),{cubicBezierEaseInOut:oR}=ca;function es({originalTransform:e="",left:t=0,top:n=0,transition:r=`all .3s ${oR} !important`}={}){return[ce("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:`${e} scale(0.75)`,left:t,top:n,opacity:0}),ce("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:n,opacity:1}),ce("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:n,transition:r})]}const aR=W("base-clear",`
|
|
59
59
|
flex-shrink: 0;
|
|
60
60
|
height: 1em;
|
|
61
61
|
width: 1em;
|
|
@@ -79,7 +79,7 @@ ${t}
|
|
|
79
79
|
left: 50%;
|
|
80
80
|
top: 50%;
|
|
81
81
|
transform: translateX(-50%) translateY(-50%);
|
|
82
|
-
`,[es({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),$0=Ie({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return fa("-base-clear",
|
|
82
|
+
`,[es({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),$0=Ie({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return fa("-base-clear",aR,et(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return M("div",{class:`${e}-base-clear`},M(Ad,null,{default:()=>{var t,n;return this.show?M("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},Ur(this.$slots.icon,()=>[M(Cr,{clsPrefix:e},{default:()=>M(XP,null)})])):M("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),sR=W("base-close",`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
justify-content: center;
|
|
@@ -123,7 +123,7 @@ ${t}
|
|
|
123
123
|
background-color: transparent;
|
|
124
124
|
`),ge("round",[ce("&::before",`
|
|
125
125
|
border-radius: 50%;
|
|
126
|
-
`)])]),gv=Ie({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return fa("-base-close",
|
|
126
|
+
`)])]),gv=Ie({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return fa("-base-close",sR,et(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:r,round:i,isButtonTag:o}=e;return M(o?"button":"div",{type:o?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:o?void 0:"button",disabled:n,class:[`${t}-base-close`,r&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,i&&`${t}-base-close--round`],onMousedown:a=>{e.focusable||a.preventDefault()},onClick:e.onClick},M(Cr,{clsPrefix:t},{default:()=>M(KP,null)}))}}}),p5=Ie({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function n(s){e.width?s.style.maxWidth=`${s.offsetWidth}px`:s.style.maxHeight=`${s.offsetHeight}px`,s.offsetWidth}function r(s){e.width?s.style.maxWidth="0":s.style.maxHeight="0",s.offsetWidth;const{onLeave:l}=e;l&&l()}function i(s){e.width?s.style.maxWidth="":s.style.maxHeight="";const{onAfterLeave:l}=e;l&&l()}function o(s){if(s.style.transition="none",e.width){const l=s.offsetWidth;s.style.maxWidth="0",s.offsetWidth,s.style.transition="",s.style.maxWidth=`${l}px`}else if(e.reverse)s.style.maxHeight=`${s.offsetHeight}px`,s.offsetHeight,s.style.transition="",s.style.maxHeight="0";else{const l=s.offsetHeight;s.style.maxHeight="0",s.offsetWidth,s.style.transition="",s.style.maxHeight=`${l}px`}s.offsetWidth}function a(s){var l;e.width?s.style.maxWidth="":e.reverse||(s.style.maxHeight=""),(l=e.onAfterEnter)===null||l===void 0||l.call(e)}return()=>{const{group:s,width:l,appear:u,mode:c}=e,d=s?Kw:wr,f={name:l?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:u,onEnter:o,onAfterEnter:a,onBeforeLeave:n,onLeave:r,onAfterLeave:i};return s||(f.mode=c),M(d,f,t)}}}),lR=Ie({props:{onFocus:Function,onBlur:Function},setup(e){return()=>M("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),uR=ce([ce("@keyframes rotator",`
|
|
127
127
|
0% {
|
|
128
128
|
-webkit-transform: rotate(0deg);
|
|
129
129
|
transform: rotate(0deg);
|
|
@@ -150,7 +150,7 @@ ${t}
|
|
|
150
150
|
`,[Q("icon",`
|
|
151
151
|
height: 1em;
|
|
152
152
|
width: 1em;
|
|
153
|
-
`)])])]),Vh="1.6s",
|
|
153
|
+
`)])])]),Vh="1.6s",cR={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},Pd=Ie({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},cR),setup(e){fa("-base-loading",uR,et(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:r,scale:i}=this,o=t/i;return M("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},M(Ad,null,{default:()=>this.show?M("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},M("div",{class:`${e}-base-loading__container`},M("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*o} ${2*o}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},M("g",null,M("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};270 ${o} ${o}`,begin:"0s",dur:Vh,fill:"freeze",repeatCount:"indefinite"}),M("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:o,cy:o,r:t-n/2,"stroke-dasharray":5.67*t,"stroke-dashoffset":18.48*t},M("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};135 ${o} ${o};450 ${o} ${o}`,begin:"0s",dur:Vh,fill:"freeze",repeatCount:"indefinite"}),M("animate",{attributeName:"stroke-dashoffset",values:`${5.67*t};${1.42*t};${5.67*t}`,begin:"0s",dur:Vh,fill:"freeze",repeatCount:"indefinite"})))))):M("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}}),{cubicBezierEaseInOut:j1}=ca;function fR({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:r=j1,leaveCubicBezier:i=j1}={}){return[ce(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),ce(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),ce(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),ce(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const Ke={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaAvatar:"0.2",alphaProgressRail:".08",alphaInput:"0",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},dR=en(Ke.neutralBase),g5=en(Ke.neutralInvertBase),hR=`rgba(${g5.slice(0,3).join(", ")}, `;function W1(e){return`${hR+String(e)})`}function gn(e){const t=Array.from(g5);return t[3]=Number(e),ir(dR,t)}const hn=Object.assign(Object.assign({name:"common"},ca),{baseColor:Ke.neutralBase,primaryColor:Ke.primaryDefault,primaryColorHover:Ke.primaryHover,primaryColorPressed:Ke.primaryActive,primaryColorSuppl:Ke.primarySuppl,infoColor:Ke.infoDefault,infoColorHover:Ke.infoHover,infoColorPressed:Ke.infoActive,infoColorSuppl:Ke.infoSuppl,successColor:Ke.successDefault,successColorHover:Ke.successHover,successColorPressed:Ke.successActive,successColorSuppl:Ke.successSuppl,warningColor:Ke.warningDefault,warningColorHover:Ke.warningHover,warningColorPressed:Ke.warningActive,warningColorSuppl:Ke.warningSuppl,errorColor:Ke.errorDefault,errorColorHover:Ke.errorHover,errorColorPressed:Ke.errorActive,errorColorSuppl:Ke.errorSuppl,textColorBase:Ke.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:gn(Ke.alpha4),placeholderColor:gn(Ke.alpha4),placeholderColorDisabled:gn(Ke.alpha5),iconColor:gn(Ke.alpha4),iconColorHover:Yu(gn(Ke.alpha4),{lightness:.75}),iconColorPressed:Yu(gn(Ke.alpha4),{lightness:.9}),iconColorDisabled:gn(Ke.alpha5),opacity1:Ke.alpha1,opacity2:Ke.alpha2,opacity3:Ke.alpha3,opacity4:Ke.alpha4,opacity5:Ke.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:gn(Number(Ke.alphaClose)),closeIconColorHover:gn(Number(Ke.alphaClose)),closeIconColorPressed:gn(Number(Ke.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:gn(Ke.alpha4),clearColorHover:Yu(gn(Ke.alpha4),{lightness:.75}),clearColorPressed:Yu(gn(Ke.alpha4),{lightness:.9}),scrollbarColor:W1(Ke.alphaScrollbar),scrollbarColorHover:W1(Ke.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:gn(Ke.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:Ke.neutralPopover,tableColor:Ke.neutralCard,cardColor:Ke.neutralCard,modalColor:Ke.neutralModal,bodyColor:Ke.neutralBody,tagColor:"#eee",avatarColor:gn(Ke.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:gn(Ke.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:Ke.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),pR={railInsetHorizontalBottom:"auto 2px 4px 2px",railInsetHorizontalTop:"4px 2px auto 2px",railInsetVerticalRight:"2px 4px 2px auto",railInsetVerticalLeft:"2px auto 2px 4px",railColor:"transparent"};function gR(e){const{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:o}=e;return Object.assign(Object.assign({},pR),{height:r,width:i,borderRadius:o,color:t,colorHover:n})}const v5={name:"Scrollbar",common:hn,self:gR},vR=W("scrollbar",`
|
|
154
154
|
overflow: hidden;
|
|
155
155
|
position: relative;
|
|
156
156
|
z-index: auto;
|
|
@@ -203,7 +203,7 @@ ${t}
|
|
|
203
203
|
pointer-events: all;
|
|
204
204
|
background-color: var(--n-scrollbar-color);
|
|
205
205
|
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
206
|
-
`,[cR(),ce("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),vR=Object.assign(Object.assign({},pt.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),vv=Ie({name:"Scrollbar",props:vR,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=rn(e),i=co("Scrollbar",r,t),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(null),g=ne(null),b=ne(0),v=ne(0),x=ne(!1),y=ne(!1);let _=!1,S=!1,$,w,T=0,M=0,P=0,R=0;const C=S7(),E=pt("Scrollbar","-scrollbar",gR,g5,e,t),I=pe(()=>{const{value:ye}=f,{value:Y}=c,{value:m}=p;return ye===null||Y===null||m===null?0:Math.min(ye,m*ye/Y+kn(E.value.self.width)*1.5)}),z=pe(()=>`${I.value}px`),j=pe(()=>{const{value:ye}=h,{value:Y}=d,{value:m}=g;return ye===null||Y===null||m===null?0:m*ye/Y+kn(E.value.self.height)*1.5}),Z=pe(()=>`${j.value}px`),J=pe(()=>{const{value:ye}=f,{value:Y}=b,{value:m}=c,{value:F}=p;if(ye===null||m===null||F===null)return 0;{const D=m-ye;return D?Y/D*(F-I.value):0}}),ie=pe(()=>`${J.value}px`),he=pe(()=>{const{value:ye}=h,{value:Y}=v,{value:m}=d,{value:F}=g;if(ye===null||m===null||F===null)return 0;{const D=m-ye;return D?Y/D*(F-j.value):0}}),_e=pe(()=>`${he.value}px`),oe=pe(()=>{const{value:ye}=f,{value:Y}=c;return ye!==null&&Y!==null&&Y>ye}),ve=pe(()=>{const{value:ye}=h,{value:Y}=d;return ye!==null&&Y!==null&&Y>ye}),we=pe(()=>{const{trigger:ye}=e;return ye==="none"||x.value}),Oe=pe(()=>{const{trigger:ye}=e;return ye==="none"||y.value}),xe=pe(()=>{const{container:ye}=e;return ye?ye():a.value}),Xe=pe(()=>{const{content:ye}=e;return ye?ye():s.value}),Ve=(ye,Y)=>{if(!e.scrollable)return;if(typeof ye=="number"){H(ye,Y??0,0,!1,"auto");return}const{left:m,top:F,index:D,elSize:te,position:K,behavior:se,el:ue,debounce:ae=!0}=ye;(m!==void 0||F!==void 0)&&H(m??0,F??0,0,!1,se),ue!==void 0?H(0,ue.offsetTop,ue.offsetHeight,ae,se):D!==void 0&&te!==void 0?H(0,D*te,te,ae,se):K==="bottom"?H(0,Number.MAX_SAFE_INTEGER,0,!1,se):K==="top"&&H(0,0,0,!1,se)},fe=$7(()=>{e.container||Ve({top:b.value,left:v.value})}),Ee=()=>{fe.isDeactivated||V()},Pe=ye=>{if(fe.isDeactivated)return;const{onResize:Y}=e;Y&&Y(ye),V()},A=(ye,Y)=>{if(!e.scrollable)return;const{value:m}=xe;m&&(typeof ye=="object"?m.scrollBy(ye):m.scrollBy(ye,Y||0))};function H(ye,Y,m,F,D){const{value:te}=xe;if(te){if(F){const{scrollTop:K,offsetHeight:se}=te;if(Y>K){Y+m<=K+se||te.scrollTo({left:ye,top:Y+m-se,behavior:D});return}}te.scrollTo({left:ye,top:Y,behavior:D})}}function G(){re(),L(),V()}function de(){le()}function le(){q(),N()}function q(){w!==void 0&&window.clearTimeout(w),w=window.setTimeout(()=>{y.value=!1},e.duration)}function N(){$!==void 0&&window.clearTimeout($),$=window.setTimeout(()=>{x.value=!1},e.duration)}function re(){$!==void 0&&window.clearTimeout($),x.value=!0}function L(){w!==void 0&&window.clearTimeout(w),y.value=!0}function O(ye){const{onScroll:Y}=e;Y&&Y(ye),ee()}function ee(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1))}function U(){const{value:ye}=Xe;ye&&(c.value=ye.offsetHeight,d.value=ye.offsetWidth);const{value:Y}=xe;Y&&(f.value=Y.offsetHeight,h.value=Y.offsetWidth);const{value:m}=u,{value:F}=l;m&&(g.value=m.offsetWidth),F&&(p.value=F.offsetHeight)}function B(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1),f.value=ye.offsetHeight,h.value=ye.offsetWidth,c.value=ye.scrollHeight,d.value=ye.scrollWidth);const{value:Y}=u,{value:m}=l;Y&&(g.value=Y.offsetWidth),m&&(p.value=m.offsetHeight)}function V(){e.scrollable&&(e.useUnifiedContainer?B():(U(),ee()))}function me(ye){var Y;return!(!((Y=o.value)===null||Y===void 0)&&Y.contains(Qa(ye)))}function Ae(ye){ye.preventDefault(),ye.stopPropagation(),S=!0,kt("mousemove",window,Re,!0),kt("mouseup",window,rt,!0),M=v.value,P=i!=null&&i.value?window.innerWidth-ye.clientX:ye.clientX}function Re(ye){if(!S)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:Y}=h,{value:m}=d,{value:F}=j;if(Y===null||m===null)return;const D=(i!=null&&i.value?window.innerWidth-ye.clientX-P:ye.clientX-P)*(m-Y)/(Y-F),te=m-Y;let K=M+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;if(se){se.scrollLeft=K*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ue}=e;ue&&ue(K)}}function rt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,Re,!0),St("mouseup",window,rt,!0),S=!1,V(),me(ye)&&le()}function lt(ye){ye.preventDefault(),ye.stopPropagation(),_=!0,kt("mousemove",window,ft,!0),kt("mouseup",window,zt,!0),T=b.value,R=ye.clientY}function ft(ye){if(!_)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:Y}=f,{value:m}=c,{value:F}=I;if(Y===null||m===null)return;const D=(ye.clientY-R)*(m-Y)/(Y-F),te=m-Y;let K=T+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;se&&(se.scrollTop=K)}function zt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,ft,!0),St("mouseup",window,zt,!0),_=!1,V(),me(ye)&&le()}xr(()=>{const{value:ye}=ve,{value:Y}=oe,{value:m}=t,{value:F}=u,{value:D}=l;F&&(ye?F.classList.remove(`${m}-scrollbar-rail--disabled`):F.classList.add(`${m}-scrollbar-rail--disabled`)),D&&(Y?D.classList.remove(`${m}-scrollbar-rail--disabled`):D.classList.add(`${m}-scrollbar-rail--disabled`))}),dn(()=>{e.container||V()}),Bn(()=>{$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w),St("mousemove",window,ft,!0),St("mouseup",window,zt,!0)});const yt=pe(()=>{const{common:{cubicBezierEaseInOut:ye},self:{color:Y,colorHover:m,height:F,width:D,borderRadius:te,railInsetHorizontalTop:K,railInsetHorizontalBottom:se,railInsetVerticalRight:ue,railInsetVerticalLeft:ae,railColor:ke}}=E.value;return{"--n-scrollbar-bezier":ye,"--n-scrollbar-color":Y,"--n-scrollbar-color-hover":m,"--n-scrollbar-border-radius":te,"--n-scrollbar-width":D,"--n-scrollbar-height":F,"--n-scrollbar-rail-inset-horizontal-top":K,"--n-scrollbar-rail-inset-horizontal-bottom":se,"--n-scrollbar-rail-inset-vertical-right":i!=null&&i.value?h1(ue):ue,"--n-scrollbar-rail-inset-vertical-left":i!=null&&i.value?h1(ae):ae,"--n-scrollbar-rail-color":ke}}),Lt=n?Cn("scrollbar",void 0,yt,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ve,scrollBy:A,sync:V,syncUnifiedContainer:B,handleMouseEnterWrapper:G,handleMouseLeaveWrapper:de}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:b,wrapperRef:o,containerRef:a,contentRef:s,yRailRef:l,xRailRef:u,needYBar:oe,needXBar:ve,yBarSizePx:z,xBarSizePx:Z,yBarTopPx:ie,xBarLeftPx:_e,isShowXBar:we,isShowYBar:Oe,isIos:C,handleScroll:O,handleContentResize:Ee,handleContainerResize:Pe,handleYScrollMouseDown:lt,handleXScrollMouseDown:Ae,cssVars:n?void 0:yt,themeClass:Lt==null?void 0:Lt.themeClass,onRender:Lt==null?void 0:Lt.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:o,yPlacement:a,xPlacement:s,xScrollable:l}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const u=this.trigger==="none",c=(h,p)=>k("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,`${n}-scrollbar-rail--vertical--${a}`,h],"data-scrollbar-rail":!0,style:[p||"",this.verticalRailStyle],"aria-hidden":!0},k(u?v0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?k("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var h,p;return(h=this.onRender)===null||h===void 0||h.call(this),k("div",ia(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(p=t.default)===null||p===void 0?void 0:p.call(t):k("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},k(Wi,{onResize:this.handleContentResize},{default:()=>k("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),o?null:c(void 0,void 0),l&&k("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`,`${n}-scrollbar-rail--horizontal--${s}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},k(u?v0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?k("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},f=this.container?d():k(Wi,{onResize:this.handleContainerResize},{default:d});return o?k(Tt,null,f,c(this.themeClass,this.cssVars)):f}}),bR=vv;function V1(e){return Array.isArray(e)?e:[e]}const k0={STOP:"STOP"};function v5(e,t){const n=t(e);e.children!==void 0&&n!==k0.STOP&&e.children.forEach(r=>v5(r,t))}function mR(e,t={}){const{preserveGroup:n=!1}=t,r=[],i=n?a=>{a.isLeaf||(r.push(a.key),o(a.children))}:a=>{a.isLeaf||(a.isGroup||r.push(a.key),o(a.children))};function o(a){a.forEach(i)}return o(e),r}function yR(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function _R(e){return e.children}function xR(e){return e.key}function wR(){return!1}function CR(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function SR(e){return e.disabled===!0}function $R(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function qh(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function Yh(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function kR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function MR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function TR(e){return(e==null?void 0:e.type)==="group"}function ER(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class AR extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function PR(e,t,n,r){return hf(t.concat(e),n,r,!1)}function RR(e,t){const n=new Set;return e.forEach(r=>{const i=t.treeNodeMap.get(r);if(i!==void 0){let o=i.parent;for(;o!==null&&!(o.disabled||n.has(o.key));)n.add(o.key),o=o.parent}}),n}function zR(e,t,n,r){const i=hf(t,n,r,!1),o=hf(e,n,r,!0),a=RR(e,n),s=[];return i.forEach(l=>{(o.has(l)||a.has(l))&&s.push(l)}),s.forEach(l=>i.delete(l)),i}function Gh(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:o,cascade:a,leafOnly:s,checkStrategy:l,allowNotLoaded:u}=e;if(!a)return r!==void 0?{checkedKeys:kR(n,r),indeterminateKeys:Array.from(o)}:i!==void 0?{checkedKeys:MR(n,i),indeterminateKeys:Array.from(o)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(o)};const{levelTreeNodeMap:c}=t;let d;i!==void 0?d=zR(i,n,t,u):r!==void 0?d=PR(r,n,t,u):d=hf(n,t,u,!1);const f=l==="parent",h=l==="child"||s,p=d,g=new Set,b=Math.max.apply(null,Array.from(c.keys()));for(let v=b;v>=0;v-=1){const x=v===0,y=c.get(v);for(const _ of y){if(_.isLeaf)continue;const{key:S,shallowLoaded:$}=_;if(h&&$&&_.children.forEach(P=>{!P.disabled&&!P.isLeaf&&P.shallowLoaded&&p.has(P.key)&&p.delete(P.key)}),_.disabled||!$)continue;let w=!0,T=!1,M=!0;for(const P of _.children){const R=P.key;if(!P.disabled){if(M&&(M=!1),p.has(R))T=!0;else if(g.has(R)){T=!0,w=!1;break}else if(w=!1,T)break}}w&&!M?(f&&_.children.forEach(P=>{!P.disabled&&p.has(P.key)&&p.delete(P.key)}),p.add(S)):T&&g.add(S),x&&h&&p.has(S)&&p.delete(S)}}return{checkedKeys:Array.from(p),indeterminateKeys:Array.from(g)}}function hf(e,t,n,r){const{treeNodeMap:i,getChildren:o}=t,a=new Set,s=new Set(e);return e.forEach(l=>{const u=i.get(l);u!==void 0&&v5(u,c=>{if(c.disabled)return k0.STOP;const{key:d}=c;if(!a.has(d)&&(a.add(d),s.add(d),$R(c.rawNode,o))){if(r)return k0.STOP;if(!n)throw new AR}})}),s}function IR(e,{includeGroup:t=!1,includeSelf:n=!0},r){var i;const o=r.treeNodeMap;let a=e==null?null:(i=o.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:a};if(a!=null&&a.ignored)return s.treeNode=null,s;for(;a;)!a.ignored&&(t||!a.isGroup)&&s.treeNodePath.push(a),a=a.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(l=>l.key),s}function FR(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function BR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function q1(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const i=t==="prev"?OR:BR,o={reverse:t==="prev"};let a=!1,s=null;function l(u){if(u!==null){if(u===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!u.disabled||r)&&!u.ignored&&!u.isGroup){s=u;return}if(u.isGroup){const c=bv(u,o);c!==null?s=c:l(i(u,n))}else{const c=i(u,!1);if(c!==null)l(c);else{const d=NR(u);d!=null&&d.isGroup?l(i(d,n)):n&&l(i(u,!0))}}}}return l(e),s}function OR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function NR(e){return e.parent}function bv(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:i}=r,o=n?i-1:0,a=n?-1:i,s=n?-1:1;for(let l=o;l!==a;l+=s){const u=r[l];if(!u.disabled&&!u.ignored)if(u.isGroup){const c=bv(u,t);if(c!==null)return c}else return u}}return null}const LR={getChild(){return this.ignored?null:bv(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return q1(this,"next",e)},getPrev(e={}){return q1(this,"prev",e)}};function DR(e,t){const n=t?new Set(t):void 0,r=[];function i(o){o.forEach(a=>{r.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||n===void 0||n.has(a.key))&&i(a.children)})}return i(e),r}function HR(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function b5(e,t,n,r,i,o=null,a=0){const s=[];return e.forEach((l,u)=>{var c;const d=Object.create(r);if(d.rawNode=l,d.siblings=s,d.level=a,d.index=u,d.isFirstChild=u===0,d.isLastChild=u+1===e.length,d.parent=o,!d.ignored){const f=i(l);Array.isArray(f)&&(d.children=b5(f,t,n,r,i,d,a+1))}s.push(d),t.set(d.key,d),n.has(a)||n.set(a,[]),(c=n.get(a))===null||c===void 0||c.push(d)}),s}function UR(e,t={}){var n;const r=new Map,i=new Map,{getDisabled:o=SR,getIgnored:a=wR,getIsGroup:s=TR,getKey:l=xR}=t,u=(n=t.getChildren)!==null&&n!==void 0?n:_R,c=t.ignoreEmptyChildren?_=>{const S=u(_);return Array.isArray(S)?S.length?S:null:S}:u,d=Object.assign({get key(){return l(this.rawNode)},get disabled(){return o(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return yR(this.rawNode,c)},get shallowLoaded(){return CR(this.rawNode,c)},get ignored(){return a(this.rawNode)},contains(_){return HR(this,_)}},LR),f=b5(e,r,i,d,c);function h(_){if(_==null)return null;const S=r.get(_);return S&&!S.isGroup&&!S.ignored?S:null}function p(_){if(_==null)return null;const S=r.get(_);return S&&!S.ignored?S:null}function g(_,S){const $=p(_);return $?$.getPrev(S):null}function b(_,S){const $=p(_);return $?$.getNext(S):null}function v(_){const S=p(_);return S?S.getParent():null}function x(_){const S=p(_);return S?S.getChild():null}const y={treeNodes:f,treeNodeMap:r,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:c,getFlattenedNodes(_){return DR(f,_)},getNode:h,getPrev:g,getNext:b,getParent:v,getChild:x,getFirstAvailableNode(){return FR(f)},getPath(_,S={}){return IR(_,S,y)},getCheckedKeys(_,S={}){const{cascade:$=!0,leafOnly:w=!1,checkStrategy:T="all",allowNotLoaded:M=!1}=S;return Gh({checkedKeys:qh(_),indeterminateKeys:Yh(_),cascade:$,leafOnly:w,checkStrategy:T,allowNotLoaded:M},y)},check(_,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:M="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:qh(S),indeterminateKeys:Yh(S),keysToCheck:_==null?[]:V1(_),cascade:w,leafOnly:T,checkStrategy:M,allowNotLoaded:P},y)},uncheck(_,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:M="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:qh(S),indeterminateKeys:Yh(S),keysToUncheck:_==null?[]:V1(_),cascade:w,leafOnly:T,checkStrategy:M,allowNotLoaded:P},y)},getNonLeafKeys(_={}){return mR(f,_)}};return y}const jR={iconSizeTiny:"28px",iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function WR(e){const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l}=e;return Object.assign(Object.assign({},jR),{fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l,textColor:t,iconColor:n,extraTextColor:r})}const m5={name:"Empty",common:hn,self:WR},VR=W("empty",`
|
|
206
|
+
`,[fR(),ce("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),bR=Object.assign(Object.assign({},pt.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),vv=Ie({name:"Scrollbar",props:bR,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=rn(e),i=co("Scrollbar",r,t),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(null),g=ne(null),b=ne(0),v=ne(0),_=ne(!1),y=ne(!1);let x=!1,S=!1,$,w,T=0,k=0,P=0,R=0;const C=$7(),E=pt("Scrollbar","-scrollbar",vR,v5,e,t),I=pe(()=>{const{value:ye}=f,{value:Y}=c,{value:m}=p;return ye===null||Y===null||m===null?0:Math.min(ye,m*ye/Y+kn(E.value.self.width)*1.5)}),z=pe(()=>`${I.value}px`),j=pe(()=>{const{value:ye}=h,{value:Y}=d,{value:m}=g;return ye===null||Y===null||m===null?0:m*ye/Y+kn(E.value.self.height)*1.5}),Z=pe(()=>`${j.value}px`),J=pe(()=>{const{value:ye}=f,{value:Y}=b,{value:m}=c,{value:F}=p;if(ye===null||m===null||F===null)return 0;{const D=m-ye;return D?Y/D*(F-I.value):0}}),ie=pe(()=>`${J.value}px`),he=pe(()=>{const{value:ye}=h,{value:Y}=v,{value:m}=d,{value:F}=g;if(ye===null||m===null||F===null)return 0;{const D=m-ye;return D?Y/D*(F-j.value):0}}),_e=pe(()=>`${he.value}px`),oe=pe(()=>{const{value:ye}=f,{value:Y}=c;return ye!==null&&Y!==null&&Y>ye}),ve=pe(()=>{const{value:ye}=h,{value:Y}=d;return ye!==null&&Y!==null&&Y>ye}),we=pe(()=>{const{trigger:ye}=e;return ye==="none"||_.value}),Oe=pe(()=>{const{trigger:ye}=e;return ye==="none"||y.value}),xe=pe(()=>{const{container:ye}=e;return ye?ye():a.value}),Xe=pe(()=>{const{content:ye}=e;return ye?ye():s.value}),Ve=(ye,Y)=>{if(!e.scrollable)return;if(typeof ye=="number"){H(ye,Y??0,0,!1,"auto");return}const{left:m,top:F,index:D,elSize:te,position:K,behavior:se,el:ue,debounce:ae=!0}=ye;(m!==void 0||F!==void 0)&&H(m??0,F??0,0,!1,se),ue!==void 0?H(0,ue.offsetTop,ue.offsetHeight,ae,se):D!==void 0&&te!==void 0?H(0,D*te,te,ae,se):K==="bottom"?H(0,Number.MAX_SAFE_INTEGER,0,!1,se):K==="top"&&H(0,0,0,!1,se)},fe=k7(()=>{e.container||Ve({top:b.value,left:v.value})}),Ee=()=>{fe.isDeactivated||V()},Pe=ye=>{if(fe.isDeactivated)return;const{onResize:Y}=e;Y&&Y(ye),V()},A=(ye,Y)=>{if(!e.scrollable)return;const{value:m}=xe;m&&(typeof ye=="object"?m.scrollBy(ye):m.scrollBy(ye,Y||0))};function H(ye,Y,m,F,D){const{value:te}=xe;if(te){if(F){const{scrollTop:K,offsetHeight:se}=te;if(Y>K){Y+m<=K+se||te.scrollTo({left:ye,top:Y+m-se,behavior:D});return}}te.scrollTo({left:ye,top:Y,behavior:D})}}function G(){re(),L(),V()}function de(){le()}function le(){q(),N()}function q(){w!==void 0&&window.clearTimeout(w),w=window.setTimeout(()=>{y.value=!1},e.duration)}function N(){$!==void 0&&window.clearTimeout($),$=window.setTimeout(()=>{_.value=!1},e.duration)}function re(){$!==void 0&&window.clearTimeout($),_.value=!0}function L(){w!==void 0&&window.clearTimeout(w),y.value=!0}function O(ye){const{onScroll:Y}=e;Y&&Y(ye),ee()}function ee(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1))}function U(){const{value:ye}=Xe;ye&&(c.value=ye.offsetHeight,d.value=ye.offsetWidth);const{value:Y}=xe;Y&&(f.value=Y.offsetHeight,h.value=Y.offsetWidth);const{value:m}=u,{value:F}=l;m&&(g.value=m.offsetWidth),F&&(p.value=F.offsetHeight)}function B(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1),f.value=ye.offsetHeight,h.value=ye.offsetWidth,c.value=ye.scrollHeight,d.value=ye.scrollWidth);const{value:Y}=u,{value:m}=l;Y&&(g.value=Y.offsetWidth),m&&(p.value=m.offsetHeight)}function V(){e.scrollable&&(e.useUnifiedContainer?B():(U(),ee()))}function me(ye){var Y;return!(!((Y=o.value)===null||Y===void 0)&&Y.contains(Qa(ye)))}function Ae(ye){ye.preventDefault(),ye.stopPropagation(),S=!0,kt("mousemove",window,Re,!0),kt("mouseup",window,rt,!0),k=v.value,P=i!=null&&i.value?window.innerWidth-ye.clientX:ye.clientX}function Re(ye){if(!S)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:Y}=h,{value:m}=d,{value:F}=j;if(Y===null||m===null)return;const D=(i!=null&&i.value?window.innerWidth-ye.clientX-P:ye.clientX-P)*(m-Y)/(Y-F),te=m-Y;let K=k+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;if(se){se.scrollLeft=K*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ue}=e;ue&&ue(K)}}function rt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,Re,!0),St("mouseup",window,rt,!0),S=!1,V(),me(ye)&&le()}function lt(ye){ye.preventDefault(),ye.stopPropagation(),x=!0,kt("mousemove",window,ft,!0),kt("mouseup",window,zt,!0),T=b.value,R=ye.clientY}function ft(ye){if(!x)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:Y}=f,{value:m}=c,{value:F}=I;if(Y===null||m===null)return;const D=(ye.clientY-R)*(m-Y)/(Y-F),te=m-Y;let K=T+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;se&&(se.scrollTop=K)}function zt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,ft,!0),St("mouseup",window,zt,!0),x=!1,V(),me(ye)&&le()}xr(()=>{const{value:ye}=ve,{value:Y}=oe,{value:m}=t,{value:F}=u,{value:D}=l;F&&(ye?F.classList.remove(`${m}-scrollbar-rail--disabled`):F.classList.add(`${m}-scrollbar-rail--disabled`)),D&&(Y?D.classList.remove(`${m}-scrollbar-rail--disabled`):D.classList.add(`${m}-scrollbar-rail--disabled`))}),dn(()=>{e.container||V()}),Bn(()=>{$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w),St("mousemove",window,ft,!0),St("mouseup",window,zt,!0)});const yt=pe(()=>{const{common:{cubicBezierEaseInOut:ye},self:{color:Y,colorHover:m,height:F,width:D,borderRadius:te,railInsetHorizontalTop:K,railInsetHorizontalBottom:se,railInsetVerticalRight:ue,railInsetVerticalLeft:ae,railColor:ke}}=E.value;return{"--n-scrollbar-bezier":ye,"--n-scrollbar-color":Y,"--n-scrollbar-color-hover":m,"--n-scrollbar-border-radius":te,"--n-scrollbar-width":D,"--n-scrollbar-height":F,"--n-scrollbar-rail-inset-horizontal-top":K,"--n-scrollbar-rail-inset-horizontal-bottom":se,"--n-scrollbar-rail-inset-vertical-right":i!=null&&i.value?h1(ue):ue,"--n-scrollbar-rail-inset-vertical-left":i!=null&&i.value?h1(ae):ae,"--n-scrollbar-rail-color":ke}}),Lt=n?Cn("scrollbar",void 0,yt,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ve,scrollBy:A,sync:V,syncUnifiedContainer:B,handleMouseEnterWrapper:G,handleMouseLeaveWrapper:de}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:b,wrapperRef:o,containerRef:a,contentRef:s,yRailRef:l,xRailRef:u,needYBar:oe,needXBar:ve,yBarSizePx:z,xBarSizePx:Z,yBarTopPx:ie,xBarLeftPx:_e,isShowXBar:we,isShowYBar:Oe,isIos:C,handleScroll:O,handleContentResize:Ee,handleContainerResize:Pe,handleYScrollMouseDown:lt,handleXScrollMouseDown:Ae,cssVars:n?void 0:yt,themeClass:Lt==null?void 0:Lt.themeClass,onRender:Lt==null?void 0:Lt.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:o,yPlacement:a,xPlacement:s,xScrollable:l}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const u=this.trigger==="none",c=(h,p)=>M("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,`${n}-scrollbar-rail--vertical--${a}`,h],"data-scrollbar-rail":!0,style:[p||"",this.verticalRailStyle],"aria-hidden":!0},M(u?v0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?M("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var h,p;return(h=this.onRender)===null||h===void 0||h.call(this),M("div",ia(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(p=t.default)===null||p===void 0?void 0:p.call(t):M("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},M(Wi,{onResize:this.handleContentResize},{default:()=>M("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),o?null:c(void 0,void 0),l&&M("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`,`${n}-scrollbar-rail--horizontal--${s}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},M(u?v0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?M("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},f=this.container?d():M(Wi,{onResize:this.handleContainerResize},{default:d});return o?M(Tt,null,f,c(this.themeClass,this.cssVars)):f}}),mR=vv;function V1(e){return Array.isArray(e)?e:[e]}const k0={STOP:"STOP"};function b5(e,t){const n=t(e);e.children!==void 0&&n!==k0.STOP&&e.children.forEach(r=>b5(r,t))}function yR(e,t={}){const{preserveGroup:n=!1}=t,r=[],i=n?a=>{a.isLeaf||(r.push(a.key),o(a.children))}:a=>{a.isLeaf||(a.isGroup||r.push(a.key),o(a.children))};function o(a){a.forEach(i)}return o(e),r}function _R(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function xR(e){return e.children}function wR(e){return e.key}function CR(){return!1}function SR(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function $R(e){return e.disabled===!0}function kR(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function qh(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function Yh(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function MR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function TR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function ER(e){return(e==null?void 0:e.type)==="group"}function AR(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class PR extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function RR(e,t,n,r){return hf(t.concat(e),n,r,!1)}function zR(e,t){const n=new Set;return e.forEach(r=>{const i=t.treeNodeMap.get(r);if(i!==void 0){let o=i.parent;for(;o!==null&&!(o.disabled||n.has(o.key));)n.add(o.key),o=o.parent}}),n}function IR(e,t,n,r){const i=hf(t,n,r,!1),o=hf(e,n,r,!0),a=zR(e,n),s=[];return i.forEach(l=>{(o.has(l)||a.has(l))&&s.push(l)}),s.forEach(l=>i.delete(l)),i}function Gh(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:o,cascade:a,leafOnly:s,checkStrategy:l,allowNotLoaded:u}=e;if(!a)return r!==void 0?{checkedKeys:MR(n,r),indeterminateKeys:Array.from(o)}:i!==void 0?{checkedKeys:TR(n,i),indeterminateKeys:Array.from(o)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(o)};const{levelTreeNodeMap:c}=t;let d;i!==void 0?d=IR(i,n,t,u):r!==void 0?d=RR(r,n,t,u):d=hf(n,t,u,!1);const f=l==="parent",h=l==="child"||s,p=d,g=new Set,b=Math.max.apply(null,Array.from(c.keys()));for(let v=b;v>=0;v-=1){const _=v===0,y=c.get(v);for(const x of y){if(x.isLeaf)continue;const{key:S,shallowLoaded:$}=x;if(h&&$&&x.children.forEach(P=>{!P.disabled&&!P.isLeaf&&P.shallowLoaded&&p.has(P.key)&&p.delete(P.key)}),x.disabled||!$)continue;let w=!0,T=!1,k=!0;for(const P of x.children){const R=P.key;if(!P.disabled){if(k&&(k=!1),p.has(R))T=!0;else if(g.has(R)){T=!0,w=!1;break}else if(w=!1,T)break}}w&&!k?(f&&x.children.forEach(P=>{!P.disabled&&p.has(P.key)&&p.delete(P.key)}),p.add(S)):T&&g.add(S),_&&h&&p.has(S)&&p.delete(S)}}return{checkedKeys:Array.from(p),indeterminateKeys:Array.from(g)}}function hf(e,t,n,r){const{treeNodeMap:i,getChildren:o}=t,a=new Set,s=new Set(e);return e.forEach(l=>{const u=i.get(l);u!==void 0&&b5(u,c=>{if(c.disabled)return k0.STOP;const{key:d}=c;if(!a.has(d)&&(a.add(d),s.add(d),kR(c.rawNode,o))){if(r)return k0.STOP;if(!n)throw new PR}})}),s}function FR(e,{includeGroup:t=!1,includeSelf:n=!0},r){var i;const o=r.treeNodeMap;let a=e==null?null:(i=o.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:a};if(a!=null&&a.ignored)return s.treeNode=null,s;for(;a;)!a.ignored&&(t||!a.isGroup)&&s.treeNodePath.push(a),a=a.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(l=>l.key),s}function BR(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function OR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function q1(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const i=t==="prev"?NR:OR,o={reverse:t==="prev"};let a=!1,s=null;function l(u){if(u!==null){if(u===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!u.disabled||r)&&!u.ignored&&!u.isGroup){s=u;return}if(u.isGroup){const c=bv(u,o);c!==null?s=c:l(i(u,n))}else{const c=i(u,!1);if(c!==null)l(c);else{const d=LR(u);d!=null&&d.isGroup?l(i(d,n)):n&&l(i(u,!0))}}}}return l(e),s}function NR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function LR(e){return e.parent}function bv(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:i}=r,o=n?i-1:0,a=n?-1:i,s=n?-1:1;for(let l=o;l!==a;l+=s){const u=r[l];if(!u.disabled&&!u.ignored)if(u.isGroup){const c=bv(u,t);if(c!==null)return c}else return u}}return null}const DR={getChild(){return this.ignored?null:bv(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return q1(this,"next",e)},getPrev(e={}){return q1(this,"prev",e)}};function HR(e,t){const n=t?new Set(t):void 0,r=[];function i(o){o.forEach(a=>{r.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||n===void 0||n.has(a.key))&&i(a.children)})}return i(e),r}function UR(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function m5(e,t,n,r,i,o=null,a=0){const s=[];return e.forEach((l,u)=>{var c;const d=Object.create(r);if(d.rawNode=l,d.siblings=s,d.level=a,d.index=u,d.isFirstChild=u===0,d.isLastChild=u+1===e.length,d.parent=o,!d.ignored){const f=i(l);Array.isArray(f)&&(d.children=m5(f,t,n,r,i,d,a+1))}s.push(d),t.set(d.key,d),n.has(a)||n.set(a,[]),(c=n.get(a))===null||c===void 0||c.push(d)}),s}function jR(e,t={}){var n;const r=new Map,i=new Map,{getDisabled:o=$R,getIgnored:a=CR,getIsGroup:s=ER,getKey:l=wR}=t,u=(n=t.getChildren)!==null&&n!==void 0?n:xR,c=t.ignoreEmptyChildren?x=>{const S=u(x);return Array.isArray(S)?S.length?S:null:S}:u,d=Object.assign({get key(){return l(this.rawNode)},get disabled(){return o(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return _R(this.rawNode,c)},get shallowLoaded(){return SR(this.rawNode,c)},get ignored(){return a(this.rawNode)},contains(x){return UR(this,x)}},DR),f=m5(e,r,i,d,c);function h(x){if(x==null)return null;const S=r.get(x);return S&&!S.isGroup&&!S.ignored?S:null}function p(x){if(x==null)return null;const S=r.get(x);return S&&!S.ignored?S:null}function g(x,S){const $=p(x);return $?$.getPrev(S):null}function b(x,S){const $=p(x);return $?$.getNext(S):null}function v(x){const S=p(x);return S?S.getParent():null}function _(x){const S=p(x);return S?S.getChild():null}const y={treeNodes:f,treeNodeMap:r,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:c,getFlattenedNodes(x){return HR(f,x)},getNode:h,getPrev:g,getNext:b,getParent:v,getChild:_,getFirstAvailableNode(){return BR(f)},getPath(x,S={}){return FR(x,S,y)},getCheckedKeys(x,S={}){const{cascade:$=!0,leafOnly:w=!1,checkStrategy:T="all",allowNotLoaded:k=!1}=S;return Gh({checkedKeys:qh(x),indeterminateKeys:Yh(x),cascade:$,leafOnly:w,checkStrategy:T,allowNotLoaded:k},y)},check(x,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:k="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:qh(S),indeterminateKeys:Yh(S),keysToCheck:x==null?[]:V1(x),cascade:w,leafOnly:T,checkStrategy:k,allowNotLoaded:P},y)},uncheck(x,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:k="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:qh(S),indeterminateKeys:Yh(S),keysToUncheck:x==null?[]:V1(x),cascade:w,leafOnly:T,checkStrategy:k,allowNotLoaded:P},y)},getNonLeafKeys(x={}){return yR(f,x)}};return y}const WR={iconSizeTiny:"28px",iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function VR(e){const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l}=e;return Object.assign(Object.assign({},WR),{fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l,textColor:t,iconColor:n,extraTextColor:r})}const y5={name:"Empty",common:hn,self:VR},qR=W("empty",`
|
|
207
207
|
display: flex;
|
|
208
208
|
flex-direction: column;
|
|
209
209
|
align-items: center;
|
|
@@ -226,7 +226,7 @@ ${t}
|
|
|
226
226
|
transition: color .3s var(--n-bezier);
|
|
227
227
|
margin-top: 12px;
|
|
228
228
|
color: var(--n-extra-text-color);
|
|
229
|
-
`)]),
|
|
229
|
+
`)]),YR=Object.assign(Object.assign({},pt.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),GR=Ie({name:"Empty",props:YR,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:r}=rn(e),i=pt("Empty","-empty",qR,y5,e,t),{localeRef:o}=_u("Empty"),a=pe(()=>{var c,d,f;return(c=e.description)!==null&&c!==void 0?c:(f=(d=r==null?void 0:r.value)===null||d===void 0?void 0:d.Empty)===null||f===void 0?void 0:f.description}),s=pe(()=>{var c,d;return((d=(c=r==null?void 0:r.value)===null||c===void 0?void 0:c.Empty)===null||d===void 0?void 0:d.renderIcon)||(()=>M(ZP,null))}),l=pe(()=>{const{size:c}=e,{common:{cubicBezierEaseInOut:d},self:{[Se("iconSize",c)]:f,[Se("fontSize",c)]:h,textColor:p,iconColor:g,extraTextColor:b}}=i.value;return{"--n-icon-size":f,"--n-font-size":h,"--n-bezier":d,"--n-text-color":p,"--n-icon-color":g,"--n-extra-text-color":b}}),u=n?Cn("empty",pe(()=>{let c="";const{size:d}=e;return c+=d[0],c}),l,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:pe(()=>a.value||o.value.description),cssVars:n?void 0:l,themeClass:u==null?void 0:u.themeClass,onRender:u==null?void 0:u.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),M("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?M("div",{class:`${t}-empty__icon`},e.icon?e.icon():M(Cr,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?M("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?M("div",{class:`${t}-empty__extra`},e.extra()):null)}}),XR={height:"calc(var(--n-option-height) * 7.6)",paddingTiny:"4px 0",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingTiny:"0 12px",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function KR(e){const{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:o,primaryColorPressed:a,textColorDisabled:s,primaryColor:l,opacityDisabled:u,hoverColor:c,fontSizeTiny:d,fontSizeSmall:f,fontSizeMedium:h,fontSizeLarge:p,fontSizeHuge:g,heightTiny:b,heightSmall:v,heightMedium:_,heightLarge:y,heightHuge:x}=e;return Object.assign(Object.assign({},XR),{optionFontSizeTiny:d,optionFontSizeSmall:f,optionFontSizeMedium:h,optionFontSizeLarge:p,optionFontSizeHuge:g,optionHeightTiny:b,optionHeightSmall:v,optionHeightMedium:_,optionHeightLarge:y,optionHeightHuge:x,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:o,optionTextColorPressed:a,optionTextColorDisabled:s,optionTextColorActive:l,optionOpacityDisabled:u,optionCheckColor:l,optionColorPending:c,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:c,actionTextColor:o,loadingColor:l})}const _5={name:"InternalSelectMenu",common:hn,peers:{Scrollbar:v5,Empty:y5},self:KR},Y1=Ie({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=$t(nv);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,o=r==null?void 0:r(i),a=t?t(i,!1):Io(i[this.labelField],i,!1),s=M("div",Object.assign({},o,{class:[`${e}-base-select-group-header`,o==null?void 0:o.class]}),a);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}});function ZR(e,t){return M(wr,{name:"fade-in-scale-up-transition"},{default:()=>e?M(Cr,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>M(YP)}):null})}const G1=Ie({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:o,renderOptionRef:a,labelFieldRef:s,valueFieldRef:l,showCheckmarkRef:u,nodePropsRef:c,handleOptionClick:d,handleOptionMouseEnter:f}=$t(nv),h=Ht(()=>{const{value:v}=n;return v?e.tmNode.key===v.key:!1});function p(v){const{tmNode:_}=e;_.disabled||d(v,_)}function g(v){const{tmNode:_}=e;_.disabled||f(v,_)}function b(v){const{tmNode:_}=e,{value:y}=h;_.disabled||y||f(v,_)}return{multiple:r,isGrouped:Ht(()=>{const{tmNode:v}=e,{parent:_}=v;return _&&_.rawNode.type==="group"}),showCheckmark:u,nodeProps:c,isPending:h,isSelected:Ht(()=>{const{value:v}=t,{value:_}=r;if(v===null)return!1;const y=e.tmNode.rawNode[l.value];if(_){const{value:x}=i;return x.has(y)}else return v===y}),labelField:s,renderLabel:o,renderOption:a,handleMouseMove:b,handleMouseEnter:g,handleClick:p}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:o,nodeProps:a,renderOption:s,renderLabel:l,handleClick:u,handleMouseEnter:c,handleMouseMove:d}=this,f=ZR(n,e),h=l?[l(t,n),o&&f]:[Io(t[this.labelField],t,n),o&&f],p=a==null?void 0:a(t),g=M("div",Object.assign({},p,{class:[`${e}-base-select-option`,t.class,p==null?void 0:p.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:o}],style:[(p==null?void 0:p.style)||"",t.style||""],onClick:Nh([u,p==null?void 0:p.onClick]),onMouseenter:Nh([c,p==null?void 0:p.onMouseenter]),onMousemove:Nh([d,p==null?void 0:p.onMousemove])}),M("div",{class:`${e}-base-select-option__content`},h));return t.render?t.render({node:g,option:t,selected:n}):s?s({node:g,option:t,selected:n}):g}}),{cubicBezierEaseIn:X1,cubicBezierEaseOut:K1}=ca;function Ul({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:i=""}={}){return[ce("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${X1}, transform ${t} ${X1} ${i&&`,${i}`}`}),ce("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${K1}, transform ${t} ${K1} ${i&&`,${i}`}`}),ce("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),ce("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const JR=W("base-select-menu",`
|
|
230
230
|
line-height: 1.5;
|
|
231
231
|
outline: none;
|
|
232
232
|
z-index: 0;
|
|
@@ -333,7 +333,7 @@ ${t}
|
|
|
333
333
|
top: calc(50% - 7px);
|
|
334
334
|
color: var(--n-option-check-color);
|
|
335
335
|
transition: color .3s var(--n-bezier);
|
|
336
|
-
`,[Ul({enterScale:"0.5"})])])]),
|
|
336
|
+
`,[Ul({enterScale:"0.5"})])])]),QR=Ie({name:"InternalSelectMenu",props:Object.assign(Object.assign({},pt.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=rn(e),r=co("InternalSelectMenu",n,t),i=pt("InternalSelectMenu","-internal-select-menu",JR,_5,e,et(e,"clsPrefix")),o=ne(null),a=ne(null),s=ne(null),l=pe(()=>e.treeMate.getFlattenedNodes()),u=pe(()=>AR(l.value)),c=ne(null);function d(){const{treeMate:oe}=e;let ve=null;const{value:we}=e;we===null?ve=oe.getFirstAvailableNode():(e.multiple?ve=oe.getNode((we||[])[(we||[]).length-1]):ve=oe.getNode(we),(!ve||ve.disabled)&&(ve=oe.getFirstAvailableNode())),I(ve||null)}function f(){const{value:oe}=c;oe&&!e.treeMate.getNode(oe.key)&&(c.value=null)}let h;vt(()=>e.show,oe=>{oe?h=vt(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?d():f(),fn(z)):f()},{immediate:!0}):h==null||h()},{immediate:!0}),Bn(()=>{h==null||h()});const p=pe(()=>kn(i.value.self[Se("optionHeight",e.size)])),g=pe(()=>Kn(i.value.self[Se("padding",e.size)])),b=pe(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),v=pe(()=>{const oe=l.value;return oe&&oe.length===0});function _(oe){const{onToggle:ve}=e;ve&&ve(oe)}function y(oe){const{onScroll:ve}=e;ve&&ve(oe)}function x(oe){var ve;(ve=s.value)===null||ve===void 0||ve.sync(),y(oe)}function S(){var oe;(oe=s.value)===null||oe===void 0||oe.sync()}function $(){const{value:oe}=c;return oe||null}function w(oe,ve){ve.disabled||I(ve,!1)}function T(oe,ve){ve.disabled||_(ve)}function k(oe){var ve;vl(oe,"action")||(ve=e.onKeyup)===null||ve===void 0||ve.call(e,oe)}function P(oe){var ve;vl(oe,"action")||(ve=e.onKeydown)===null||ve===void 0||ve.call(e,oe)}function R(oe){var ve;(ve=e.onMousedown)===null||ve===void 0||ve.call(e,oe),!e.focusable&&oe.preventDefault()}function C(){const{value:oe}=c;oe&&I(oe.getNext({loop:!0}),!0)}function E(){const{value:oe}=c;oe&&I(oe.getPrev({loop:!0}),!0)}function I(oe,ve=!1){c.value=oe,ve&&z()}function z(){var oe,ve;const we=c.value;if(!we)return;const Oe=u.value(we.key);Oe!==null&&(e.virtualScroll?(oe=a.value)===null||oe===void 0||oe.scrollTo({index:Oe}):(ve=s.value)===null||ve===void 0||ve.scrollTo({index:Oe,elSize:p.value}))}function j(oe){var ve,we;!((ve=o.value)===null||ve===void 0)&&ve.contains(oe.target)&&((we=e.onFocus)===null||we===void 0||we.call(e,oe))}function Z(oe){var ve,we;!((ve=o.value)===null||ve===void 0)&&ve.contains(oe.relatedTarget)||(we=e.onBlur)===null||we===void 0||we.call(e,oe)}jn(nv,{handleOptionMouseEnter:w,handleOptionClick:T,valueSetRef:b,pendingTmNodeRef:c,nodePropsRef:et(e,"nodeProps"),showCheckmarkRef:et(e,"showCheckmark"),multipleRef:et(e,"multiple"),valueRef:et(e,"value"),renderLabelRef:et(e,"renderLabel"),renderOptionRef:et(e,"renderOption"),labelFieldRef:et(e,"labelField"),valueFieldRef:et(e,"valueField")}),jn(v2,o),dn(()=>{const{value:oe}=s;oe&&oe.sync()});const J=pe(()=>{const{size:oe}=e,{common:{cubicBezierEaseInOut:ve},self:{height:we,borderRadius:Oe,color:xe,groupHeaderTextColor:Xe,actionDividerColor:Ve,optionTextColorPressed:fe,optionTextColor:Ee,optionTextColorDisabled:Pe,optionTextColorActive:A,optionOpacityDisabled:H,optionCheckColor:G,actionTextColor:de,optionColorPending:le,optionColorActive:q,loadingColor:N,loadingSize:re,optionColorActivePending:L,[Se("optionFontSize",oe)]:O,[Se("optionHeight",oe)]:ee,[Se("optionPadding",oe)]:U}}=i.value;return{"--n-height":we,"--n-action-divider-color":Ve,"--n-action-text-color":de,"--n-bezier":ve,"--n-border-radius":Oe,"--n-color":xe,"--n-option-font-size":O,"--n-group-header-text-color":Xe,"--n-option-check-color":G,"--n-option-color-pending":le,"--n-option-color-active":q,"--n-option-color-active-pending":L,"--n-option-height":ee,"--n-option-opacity-disabled":H,"--n-option-text-color":Ee,"--n-option-text-color-active":A,"--n-option-text-color-disabled":Pe,"--n-option-text-color-pressed":fe,"--n-option-padding":U,"--n-option-padding-left":Kn(U,"left"),"--n-option-padding-right":Kn(U,"right"),"--n-loading-color":N,"--n-loading-size":re}}),{inlineThemeDisabled:ie}=e,he=ie?Cn("internal-select-menu",pe(()=>e.size[0]),J,e):void 0,_e={selfRef:o,next:C,prev:E,getPendingTmNode:$};return B2(o,e.onResize),Object.assign({mergedTheme:i,mergedClsPrefix:t,rtlEnabled:r,virtualListRef:a,scrollbarRef:s,itemSize:p,padding:g,flattenedNodes:l,empty:v,virtualListContainer(){const{value:oe}=a;return oe==null?void 0:oe.listElRef},virtualListContent(){const{value:oe}=a;return oe==null?void 0:oe.itemsElRef},doScroll:y,handleFocusin:j,handleFocusout:Z,handleKeyUp:k,handleKeyDown:P,handleMouseDown:R,handleVirtualListResize:S,handleVirtualListScroll:x,cssVars:ie?void 0:J,themeClass:he==null?void 0:he.themeClass,onRender:he==null?void 0:he.onRender},_e)},render(){const{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:i,onRender:o}=this;return o==null||o(),M("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},Bt(e.header,a=>a&&M("div",{class:`${n}-base-select-menu__header`,"data-header":!0,key:"header"},a)),this.loading?M("div",{class:`${n}-base-select-menu__loading`},M(Pd,{clsPrefix:n,strokeWidth:20})):this.empty?M("div",{class:`${n}-base-select-menu__empty`,"data-empty":!0},Ur(e.empty,()=>[M(GR,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty,size:this.size})])):M(vv,{ref:"scrollbarRef",theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?M(g9,{ref:"virtualListRef",class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:a})=>a.isGroup?M(Y1,{key:a.key,clsPrefix:n,tmNode:a}):a.ignored?null:M(G1,{clsPrefix:n,key:a.key,tmNode:a})}):M("div",{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(a=>a.isGroup?M(Y1,{key:a.key,clsPrefix:n,tmNode:a}):M(G1,{clsPrefix:n,key:a.key,tmNode:a})))}),Bt(e.action,a=>a&&[M("div",{class:`${n}-base-select-menu__action`,"data-action":!0,key:"action"},a),M(lR,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),ez={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function tz(e){const{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:i,fontSize:o,dividerColor:a}=e;return Object.assign(Object.assign({},ez),{fontSize:o,borderRadius:i,color:n,dividerColor:a,textColor:r,boxShadow:t})}const mv={name:"Popover",common:hn,self:tz},Xh={top:"bottom",bottom:"top",left:"right",right:"left"},Zt="var(--n-arrow-height) * 1.414",nz=ce([W("popover",`
|
|
337
337
|
transition:
|
|
338
338
|
box-shadow .3s var(--n-bezier),
|
|
339
339
|
background-color .3s var(--n-bezier),
|
|
@@ -435,13 +435,13 @@ ${t}
|
|
|
435
435
|
`),er("right-end",`
|
|
436
436
|
right: calc(${Zt} / -2);
|
|
437
437
|
bottom: calc(${ei("right-end")} + var(--v-offset-top));
|
|
438
|
-
`),...
|
|
438
|
+
`),...HP({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const n=["right","left"].includes(t),r=n?"width":"height";return e.map(i=>{const o=i.split("-")[1]==="end",a=`calc((${`var(--v-target-${r}, 0px)`} - ${Zt}) / 2)`,s=ei(i);return ce(`[v-placement="${i}"] >`,[W("popover-shared",[ge("center-arrow",[W("popover-arrow",`${t}: calc(max(${a}, ${s}) ${o?"+":"-"} var(--v-offset-${n?"left":"top"}));`)])])])})})]);function ei(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function er(e,t){const n=e.split("-")[0],r=["top","bottom"].includes(n)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return ce(`[v-placement="${e}"] >`,[W("popover-shared",`
|
|
439
439
|
margin-${Xh[n]}: var(--n-space);
|
|
440
440
|
`,[ge("show-arrow",`
|
|
441
441
|
margin-${Xh[n]}: var(--n-space-arrow);
|
|
442
442
|
`),ge("overlap",`
|
|
443
443
|
margin: 0;
|
|
444
|
-
`),
|
|
444
|
+
`),u7("popover-arrow-wrapper",`
|
|
445
445
|
right: 0;
|
|
446
446
|
left: 0;
|
|
447
447
|
top: 0;
|
|
@@ -449,7 +449,7 @@ ${t}
|
|
|
449
449
|
${n}: 100%;
|
|
450
450
|
${Xh[n]}: auto;
|
|
451
451
|
${r}
|
|
452
|
-
`,[W("popover-arrow",t)])])])}const _5=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function nz({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return k("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},k("div",{class:[`${i}-popover-arrow`,e],style:t}))}const rz=Ie({name:"PopoverBody",inheritAttrs:!1,props:_5,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o}=rn(e),a=pt("Popover","-popover",tz,mv,e,i),s=ne(null),l=$t("NPopover"),u=ne(null),c=ne(e.show),d=ne(!1);xr(()=>{const{show:w}=e;w&&!x9()&&!e.internalDeactivateImmediately&&(d.value=!0)});const f=pe(()=>{const{trigger:w,onClickoutside:T}=e,M=[],{positionManuallyRef:{value:P}}=l;return P||(w==="click"&&!T&&M.push([Ol,_,void 0,{capture:!0}]),w==="hover"&&M.push([T7,y])),T&&M.push([Ol,_,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&d.value)&&M.push([yd,e.show]),M}),h=pe(()=>{const{common:{cubicBezierEaseInOut:w,cubicBezierEaseIn:T,cubicBezierEaseOut:M},self:{space:P,spaceArrow:R,padding:C,fontSize:E,textColor:I,dividerColor:z,color:j,boxShadow:Z,borderRadius:J,arrowHeight:ie,arrowOffset:he,arrowOffsetVertical:_e}}=a.value;return{"--n-box-shadow":Z,"--n-bezier":w,"--n-bezier-ease-in":T,"--n-bezier-ease-out":M,"--n-font-size":E,"--n-text-color":I,"--n-color":j,"--n-divider-color":z,"--n-border-radius":J,"--n-arrow-height":ie,"--n-arrow-offset":he,"--n-arrow-offset-vertical":_e,"--n-padding":C,"--n-space":P,"--n-space-arrow":R}}),p=pe(()=>{const w=e.width==="trigger"?void 0:zc(e.width),T=[];w&&T.push({width:w});const{maxWidth:M,minWidth:P}=e;return M&&T.push({maxWidth:zc(M)}),P&&T.push({maxWidth:zc(P)}),o||T.push(h.value),T}),g=o?Cn("popover",void 0,h,e):void 0;l.setBodyInstance({syncPosition:b}),Bn(()=>{l.setBodyInstance(null)}),vt(et(e,"show"),w=>{e.animated||(w?c.value=!0:c.value=!1)});function b(){var w;(w=s.value)===null||w===void 0||w.syncPosition()}function v(w){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&l.handleMouseEnter(w)}function x(w){e.trigger==="hover"&&e.keepAliveOnHover&&l.handleMouseLeave(w)}function y(w){e.trigger==="hover"&&!S().contains(Qa(w))&&l.handleMouseMoveOutside(w)}function _(w){(e.trigger==="click"&&!S().contains(Qa(w))||e.onClickoutside)&&l.handleClickOutside(w)}function S(){return l.getTriggerElement()}jn(m2,u),jn(v2,null),jn(b2,null);function $(){if(g==null||g.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&d.value))return null;let w;const T=l.internalRenderBodyRef.value,{value:M}=i;if(T)w=T([`${M}-popover-shared`,g==null?void 0:g.themeClass.value,e.overlap&&`${M}-popover-shared--overlap`,e.showArrow&&`${M}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${M}-popover-shared--center-arrow`],u,p.value,v,x);else{const{value:P}=l.extraClassRef,{internalTrapFocus:R}=e,C=!ja(t.header)||!ja(t.footer),E=()=>{var I,z;const j=C?k(Tt,null,Bt(t.header,ie=>ie?k("div",{class:[`${M}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Bt(t.default,ie=>ie?k("div",{class:[`${M}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Bt(t.footer,ie=>ie?k("div",{class:[`${M}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(I=t.default)===null||I===void 0?void 0:I.call(t):k("div",{class:[`${M}-popover__content`,e.contentClass],style:e.contentStyle},t),Z=e.scrollable?k(bR,{contentClass:C?void 0:`${M}-popover__content ${(z=e.contentClass)!==null&&z!==void 0?z:""}`,contentStyle:C?void 0:e.contentStyle},{default:()=>j}):j,J=e.showArrow?nz({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:M}):null;return[Z,J]};w=k("div",ia({class:[`${M}-popover`,`${M}-popover-shared`,g==null?void 0:g.themeClass.value,P.map(I=>`${M}-${I}`),{[`${M}-popover--scrollable`]:e.scrollable,[`${M}-popover--show-header-or-footer`]:C,[`${M}-popover--raw`]:e.raw,[`${M}-popover-shared--overlap`]:e.overlap,[`${M}-popover-shared--show-arrow`]:e.showArrow,[`${M}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:u,style:p.value,onKeydown:l.handleKeydown,onMouseenter:v,onMouseleave:x},n),R?k(y9,{active:e.show,autoFocus:!0},{default:E}):E())}return lo(w,f.value)}return{displayed:d,namespace:r,isMounted:l.isMountedRef,zIndex:l.zIndexRef,followerRef:s,adjustedTo:Pn(e),followerEnabled:c,renderContentNode:$}},render(){return k($d,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===Pn.tdkey},{default:()=>this.animated?k(wr,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),iz=Object.keys(_5),oz={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function az(e,t,n){oz[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],o=n[r];i?e.props[r]=(...a)=>{i(...a),o(...a)}:e.props[r]=o})}const x5={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:Pn.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},sz=Object.assign(Object.assign(Object.assign({},pt.props),x5),{internalOnAfterLeave:Function,internalRenderBody:Function}),w5=Ie({name:"Popover",inheritAttrs:!1,props:sz,__popover__:!0,setup(e){const t=gs(),n=ne(null),r=pe(()=>e.show),i=ne(e.defaultShow),o=Yr(r,i),a=Ht(()=>e.disabled?!1:o.value),s=()=>{if(e.disabled)return!0;const{getDisabled:I}=e;return!!(I!=null&&I())},l=()=>s()?!1:o.value,u=rf(e,["arrow","showArrow"]),c=pe(()=>e.overlap?!1:u.value);let d=null;const f=ne(null),h=ne(null),p=Ht(()=>e.x!==void 0&&e.y!==void 0);function g(I){const{"onUpdate:show":z,onUpdateShow:j,onShow:Z,onHide:J}=e;i.value=I,z&&Ge(z,I),j&&Ge(j,I),I&&Z&&Ge(Z,!0),I&&J&&Ge(J,!1)}function b(){d&&d.syncPosition()}function v(){const{value:I}=f;I&&(window.clearTimeout(I),f.value=null)}function x(){const{value:I}=h;I&&(window.clearTimeout(I),h.value=null)}function y(){const I=s();if(e.trigger==="focus"&&!I){if(l())return;g(!0)}}function _(){const I=s();if(e.trigger==="focus"&&!I){if(!l())return;g(!1)}}function S(){const I=s();if(e.trigger==="hover"&&!I){if(x(),f.value!==null||l())return;const z=()=>{g(!0),f.value=null},{delay:j}=e;j===0?z():f.value=window.setTimeout(z,j)}}function $(){const I=s();if(e.trigger==="hover"&&!I){if(v(),h.value!==null||!l())return;const z=()=>{g(!1),h.value=null},{duration:j}=e;j===0?z():h.value=window.setTimeout(z,j)}}function w(){$()}function T(I){var z;l()&&(e.trigger==="click"&&(v(),x(),g(!1)),(z=e.onClickoutside)===null||z===void 0||z.call(e,I))}function M(){if(e.trigger==="click"&&!s()){v(),x();const I=!l();g(I)}}function P(I){e.internalTrapFocus&&I.key==="Escape"&&(v(),x(),g(!1))}function R(I){i.value=I}function C(){var I;return(I=n.value)===null||I===void 0?void 0:I.targetRef}function E(I){d=I}return jn("NPopover",{getTriggerElement:C,handleKeydown:P,handleMouseEnter:S,handleMouseLeave:$,handleClickOutside:T,handleMouseMoveOutside:w,setBodyInstance:E,positionManuallyRef:p,isMountedRef:t,zIndexRef:et(e,"zIndex"),extraClassRef:et(e,"internalExtraClass"),internalRenderBodyRef:et(e,"internalRenderBody")}),xr(()=>{o.value&&s()&&g(!1)}),{binderInstRef:n,positionManually:p,mergedShowConsideringDisabledProp:a,uncontrolledShow:i,mergedShowArrow:c,getMergedShow:l,setShow:R,handleClick:M,handleMouseEnter:S,handleMouseLeave:$,handleFocus:y,handleBlur:_,syncPosition:b}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=g1(n,"activator"):r=g1(n,"trigger"),r)){r=Vr(r),r=r.type===gu?k("span",[r]):r;const o={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[o,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[o];else{const{internalInheritedEventHandlers:a}=this,s=[o,...a],l={onBlur:u=>{s.forEach(c=>{c.onBlur(u)})},onFocus:u=>{s.forEach(c=>{c.onFocus(u)})},onClick:u=>{s.forEach(c=>{c.onClick(u)})},onMouseenter:u=>{s.forEach(c=>{c.onMouseenter(u)})},onMouseleave:u=>{s.forEach(c=>{c.onMouseleave(u)})}};az(r,a?"nested":t?"manual":this.trigger,l)}}return k(wd,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const o=this.getMergedShow();return[this.internalTrapFocus&&o?lo(k("div",{style:{position:"fixed",inset:0}}),[[w2,{enabled:o,zIndex:this.zIndex}]]):null,t?null:k(Cd,null,{default:()=>r}),k(rz,S9(this.$props,iz,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:o})),{default:()=>{var a,s;return(s=(a=this.$slots).default)===null||s===void 0?void 0:s.call(a)},header:()=>{var a,s;return(s=(a=this.$slots).header)===null||s===void 0?void 0:s.call(a)},footer:()=>{var a,s;return(s=(a=this.$slots).footer)===null||s===void 0?void 0:s.call(a)}})]}})}}),lz={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function uz(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:o,successColor:a,warningColor:s,errorColor:l,baseColor:u,borderColor:c,opacityDisabled:d,tagColor:f,closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,borderRadiusSmall:b,fontSizeMini:v,fontSizeTiny:x,fontSizeSmall:y,fontSizeMedium:_,heightMini:S,heightTiny:$,heightSmall:w,heightMedium:T,closeColorHover:M,closeColorPressed:P,buttonColor2Hover:R,buttonColor2Pressed:C,fontWeightStrong:E}=e;return Object.assign(Object.assign({},lz),{closeBorderRadius:b,heightTiny:S,heightSmall:$,heightMedium:w,heightLarge:T,borderRadius:b,opacityDisabled:d,fontSizeTiny:v,fontSizeSmall:x,fontSizeMedium:y,fontSizeLarge:_,fontWeightStrong:E,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:"#0000",colorHoverCheckable:R,colorPressedCheckable:C,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${c}`,textColor:t,color:f,colorBordered:"rgb(250, 250, 252)",closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,closeColorHover:M,closeColorPressed:P,borderPrimary:`1px solid ${nt(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:nt(i,{alpha:.12}),colorBorderedPrimary:nt(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:nt(i,{alpha:.12}),closeColorPressedPrimary:nt(i,{alpha:.18}),borderInfo:`1px solid ${nt(o,{alpha:.3})}`,textColorInfo:o,colorInfo:nt(o,{alpha:.12}),colorBorderedInfo:nt(o,{alpha:.1}),closeIconColorInfo:o,closeIconColorHoverInfo:o,closeIconColorPressedInfo:o,closeColorHoverInfo:nt(o,{alpha:.12}),closeColorPressedInfo:nt(o,{alpha:.18}),borderSuccess:`1px solid ${nt(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:nt(a,{alpha:.12}),colorBorderedSuccess:nt(a,{alpha:.1}),closeIconColorSuccess:a,closeIconColorHoverSuccess:a,closeIconColorPressedSuccess:a,closeColorHoverSuccess:nt(a,{alpha:.12}),closeColorPressedSuccess:nt(a,{alpha:.18}),borderWarning:`1px solid ${nt(s,{alpha:.35})}`,textColorWarning:s,colorWarning:nt(s,{alpha:.15}),colorBorderedWarning:nt(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:nt(s,{alpha:.12}),closeColorPressedWarning:nt(s,{alpha:.18}),borderError:`1px solid ${nt(l,{alpha:.23})}`,textColorError:l,colorError:nt(l,{alpha:.1}),colorBorderedError:nt(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:nt(l,{alpha:.12}),closeColorPressedError:nt(l,{alpha:.18})})}const cz={common:hn,self:uz},fz={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},dz=W("tag",`
|
|
452
|
+
`,[W("popover-arrow",t)])])])}const x5=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function rz({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return M("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},M("div",{class:[`${i}-popover-arrow`,e],style:t}))}const iz=Ie({name:"PopoverBody",inheritAttrs:!1,props:x5,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o}=rn(e),a=pt("Popover","-popover",nz,mv,e,i),s=ne(null),l=$t("NPopover"),u=ne(null),c=ne(e.show),d=ne(!1);xr(()=>{const{show:w}=e;w&&!w9()&&!e.internalDeactivateImmediately&&(d.value=!0)});const f=pe(()=>{const{trigger:w,onClickoutside:T}=e,k=[],{positionManuallyRef:{value:P}}=l;return P||(w==="click"&&!T&&k.push([Ol,x,void 0,{capture:!0}]),w==="hover"&&k.push([E7,y])),T&&k.push([Ol,x,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&d.value)&&k.push([yd,e.show]),k}),h=pe(()=>{const{common:{cubicBezierEaseInOut:w,cubicBezierEaseIn:T,cubicBezierEaseOut:k},self:{space:P,spaceArrow:R,padding:C,fontSize:E,textColor:I,dividerColor:z,color:j,boxShadow:Z,borderRadius:J,arrowHeight:ie,arrowOffset:he,arrowOffsetVertical:_e}}=a.value;return{"--n-box-shadow":Z,"--n-bezier":w,"--n-bezier-ease-in":T,"--n-bezier-ease-out":k,"--n-font-size":E,"--n-text-color":I,"--n-color":j,"--n-divider-color":z,"--n-border-radius":J,"--n-arrow-height":ie,"--n-arrow-offset":he,"--n-arrow-offset-vertical":_e,"--n-padding":C,"--n-space":P,"--n-space-arrow":R}}),p=pe(()=>{const w=e.width==="trigger"?void 0:zc(e.width),T=[];w&&T.push({width:w});const{maxWidth:k,minWidth:P}=e;return k&&T.push({maxWidth:zc(k)}),P&&T.push({maxWidth:zc(P)}),o||T.push(h.value),T}),g=o?Cn("popover",void 0,h,e):void 0;l.setBodyInstance({syncPosition:b}),Bn(()=>{l.setBodyInstance(null)}),vt(et(e,"show"),w=>{e.animated||(w?c.value=!0:c.value=!1)});function b(){var w;(w=s.value)===null||w===void 0||w.syncPosition()}function v(w){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&l.handleMouseEnter(w)}function _(w){e.trigger==="hover"&&e.keepAliveOnHover&&l.handleMouseLeave(w)}function y(w){e.trigger==="hover"&&!S().contains(Qa(w))&&l.handleMouseMoveOutside(w)}function x(w){(e.trigger==="click"&&!S().contains(Qa(w))||e.onClickoutside)&&l.handleClickOutside(w)}function S(){return l.getTriggerElement()}jn(y2,u),jn(b2,null),jn(m2,null);function $(){if(g==null||g.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&d.value))return null;let w;const T=l.internalRenderBodyRef.value,{value:k}=i;if(T)w=T([`${k}-popover-shared`,g==null?void 0:g.themeClass.value,e.overlap&&`${k}-popover-shared--overlap`,e.showArrow&&`${k}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${k}-popover-shared--center-arrow`],u,p.value,v,_);else{const{value:P}=l.extraClassRef,{internalTrapFocus:R}=e,C=!ja(t.header)||!ja(t.footer),E=()=>{var I,z;const j=C?M(Tt,null,Bt(t.header,ie=>ie?M("div",{class:[`${k}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Bt(t.default,ie=>ie?M("div",{class:[`${k}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Bt(t.footer,ie=>ie?M("div",{class:[`${k}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(I=t.default)===null||I===void 0?void 0:I.call(t):M("div",{class:[`${k}-popover__content`,e.contentClass],style:e.contentStyle},t),Z=e.scrollable?M(mR,{contentClass:C?void 0:`${k}-popover__content ${(z=e.contentClass)!==null&&z!==void 0?z:""}`,contentStyle:C?void 0:e.contentStyle},{default:()=>j}):j,J=e.showArrow?rz({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:k}):null;return[Z,J]};w=M("div",ia({class:[`${k}-popover`,`${k}-popover-shared`,g==null?void 0:g.themeClass.value,P.map(I=>`${k}-${I}`),{[`${k}-popover--scrollable`]:e.scrollable,[`${k}-popover--show-header-or-footer`]:C,[`${k}-popover--raw`]:e.raw,[`${k}-popover-shared--overlap`]:e.overlap,[`${k}-popover-shared--show-arrow`]:e.showArrow,[`${k}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:u,style:p.value,onKeydown:l.handleKeydown,onMouseenter:v,onMouseleave:_},n),R?M(_9,{active:e.show,autoFocus:!0},{default:E}):E())}return lo(w,f.value)}return{displayed:d,namespace:r,isMounted:l.isMountedRef,zIndex:l.zIndexRef,followerRef:s,adjustedTo:Pn(e),followerEnabled:c,renderContentNode:$}},render(){return M($d,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===Pn.tdkey},{default:()=>this.animated?M(wr,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),oz=Object.keys(x5),az={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function sz(e,t,n){az[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],o=n[r];i?e.props[r]=(...a)=>{i(...a),o(...a)}:e.props[r]=o})}const w5={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:Pn.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},lz=Object.assign(Object.assign(Object.assign({},pt.props),w5),{internalOnAfterLeave:Function,internalRenderBody:Function}),C5=Ie({name:"Popover",inheritAttrs:!1,props:lz,__popover__:!0,setup(e){const t=gs(),n=ne(null),r=pe(()=>e.show),i=ne(e.defaultShow),o=Yr(r,i),a=Ht(()=>e.disabled?!1:o.value),s=()=>{if(e.disabled)return!0;const{getDisabled:I}=e;return!!(I!=null&&I())},l=()=>s()?!1:o.value,u=rf(e,["arrow","showArrow"]),c=pe(()=>e.overlap?!1:u.value);let d=null;const f=ne(null),h=ne(null),p=Ht(()=>e.x!==void 0&&e.y!==void 0);function g(I){const{"onUpdate:show":z,onUpdateShow:j,onShow:Z,onHide:J}=e;i.value=I,z&&Ge(z,I),j&&Ge(j,I),I&&Z&&Ge(Z,!0),I&&J&&Ge(J,!1)}function b(){d&&d.syncPosition()}function v(){const{value:I}=f;I&&(window.clearTimeout(I),f.value=null)}function _(){const{value:I}=h;I&&(window.clearTimeout(I),h.value=null)}function y(){const I=s();if(e.trigger==="focus"&&!I){if(l())return;g(!0)}}function x(){const I=s();if(e.trigger==="focus"&&!I){if(!l())return;g(!1)}}function S(){const I=s();if(e.trigger==="hover"&&!I){if(_(),f.value!==null||l())return;const z=()=>{g(!0),f.value=null},{delay:j}=e;j===0?z():f.value=window.setTimeout(z,j)}}function $(){const I=s();if(e.trigger==="hover"&&!I){if(v(),h.value!==null||!l())return;const z=()=>{g(!1),h.value=null},{duration:j}=e;j===0?z():h.value=window.setTimeout(z,j)}}function w(){$()}function T(I){var z;l()&&(e.trigger==="click"&&(v(),_(),g(!1)),(z=e.onClickoutside)===null||z===void 0||z.call(e,I))}function k(){if(e.trigger==="click"&&!s()){v(),_();const I=!l();g(I)}}function P(I){e.internalTrapFocus&&I.key==="Escape"&&(v(),_(),g(!1))}function R(I){i.value=I}function C(){var I;return(I=n.value)===null||I===void 0?void 0:I.targetRef}function E(I){d=I}return jn("NPopover",{getTriggerElement:C,handleKeydown:P,handleMouseEnter:S,handleMouseLeave:$,handleClickOutside:T,handleMouseMoveOutside:w,setBodyInstance:E,positionManuallyRef:p,isMountedRef:t,zIndexRef:et(e,"zIndex"),extraClassRef:et(e,"internalExtraClass"),internalRenderBodyRef:et(e,"internalRenderBody")}),xr(()=>{o.value&&s()&&g(!1)}),{binderInstRef:n,positionManually:p,mergedShowConsideringDisabledProp:a,uncontrolledShow:i,mergedShowArrow:c,getMergedShow:l,setShow:R,handleClick:k,handleMouseEnter:S,handleMouseLeave:$,handleFocus:y,handleBlur:x,syncPosition:b}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=g1(n,"activator"):r=g1(n,"trigger"),r)){r=Vr(r),r=r.type===gu?M("span",[r]):r;const o={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[o,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[o];else{const{internalInheritedEventHandlers:a}=this,s=[o,...a],l={onBlur:u=>{s.forEach(c=>{c.onBlur(u)})},onFocus:u=>{s.forEach(c=>{c.onFocus(u)})},onClick:u=>{s.forEach(c=>{c.onClick(u)})},onMouseenter:u=>{s.forEach(c=>{c.onMouseenter(u)})},onMouseleave:u=>{s.forEach(c=>{c.onMouseleave(u)})}};sz(r,a?"nested":t?"manual":this.trigger,l)}}return M(wd,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const o=this.getMergedShow();return[this.internalTrapFocus&&o?lo(M("div",{style:{position:"fixed",inset:0}}),[[C2,{enabled:o,zIndex:this.zIndex}]]):null,t?null:M(Cd,null,{default:()=>r}),M(iz,$9(this.$props,oz,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:o})),{default:()=>{var a,s;return(s=(a=this.$slots).default)===null||s===void 0?void 0:s.call(a)},header:()=>{var a,s;return(s=(a=this.$slots).header)===null||s===void 0?void 0:s.call(a)},footer:()=>{var a,s;return(s=(a=this.$slots).footer)===null||s===void 0?void 0:s.call(a)}})]}})}}),uz={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function cz(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:o,successColor:a,warningColor:s,errorColor:l,baseColor:u,borderColor:c,opacityDisabled:d,tagColor:f,closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,borderRadiusSmall:b,fontSizeMini:v,fontSizeTiny:_,fontSizeSmall:y,fontSizeMedium:x,heightMini:S,heightTiny:$,heightSmall:w,heightMedium:T,closeColorHover:k,closeColorPressed:P,buttonColor2Hover:R,buttonColor2Pressed:C,fontWeightStrong:E}=e;return Object.assign(Object.assign({},uz),{closeBorderRadius:b,heightTiny:S,heightSmall:$,heightMedium:w,heightLarge:T,borderRadius:b,opacityDisabled:d,fontSizeTiny:v,fontSizeSmall:_,fontSizeMedium:y,fontSizeLarge:x,fontWeightStrong:E,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:"#0000",colorHoverCheckable:R,colorPressedCheckable:C,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${c}`,textColor:t,color:f,colorBordered:"rgb(250, 250, 252)",closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,closeColorHover:k,closeColorPressed:P,borderPrimary:`1px solid ${nt(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:nt(i,{alpha:.12}),colorBorderedPrimary:nt(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:nt(i,{alpha:.12}),closeColorPressedPrimary:nt(i,{alpha:.18}),borderInfo:`1px solid ${nt(o,{alpha:.3})}`,textColorInfo:o,colorInfo:nt(o,{alpha:.12}),colorBorderedInfo:nt(o,{alpha:.1}),closeIconColorInfo:o,closeIconColorHoverInfo:o,closeIconColorPressedInfo:o,closeColorHoverInfo:nt(o,{alpha:.12}),closeColorPressedInfo:nt(o,{alpha:.18}),borderSuccess:`1px solid ${nt(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:nt(a,{alpha:.12}),colorBorderedSuccess:nt(a,{alpha:.1}),closeIconColorSuccess:a,closeIconColorHoverSuccess:a,closeIconColorPressedSuccess:a,closeColorHoverSuccess:nt(a,{alpha:.12}),closeColorPressedSuccess:nt(a,{alpha:.18}),borderWarning:`1px solid ${nt(s,{alpha:.35})}`,textColorWarning:s,colorWarning:nt(s,{alpha:.15}),colorBorderedWarning:nt(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:nt(s,{alpha:.12}),closeColorPressedWarning:nt(s,{alpha:.18}),borderError:`1px solid ${nt(l,{alpha:.23})}`,textColorError:l,colorError:nt(l,{alpha:.1}),colorBorderedError:nt(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:nt(l,{alpha:.12}),closeColorPressedError:nt(l,{alpha:.18})})}const fz={common:hn,self:cz},dz={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},hz=W("tag",`
|
|
453
453
|
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
454
454
|
white-space: nowrap;
|
|
455
455
|
position: relative;
|
|
@@ -519,7 +519,7 @@ ${t}
|
|
|
519
519
|
`,[Vt("disabled",[ce("&:hover","background-color: var(--n-color-hover-checkable);",[Vt("checked","color: var(--n-text-color-hover-checkable);")]),ce("&:active","background-color: var(--n-color-pressed-checkable);",[Vt("checked","color: var(--n-text-color-pressed-checkable);")])]),ge("checked",`
|
|
520
520
|
color: var(--n-text-color-checked);
|
|
521
521
|
background-color: var(--n-color-checked);
|
|
522
|
-
`,[Vt("disabled",[ce("&:hover","background-color: var(--n-color-checked-hover);"),ce("&:active","background-color: var(--n-color-checked-pressed);")])])])]),
|
|
522
|
+
`,[Vt("disabled",[ce("&:hover","background-color: var(--n-color-checked-hover);"),ce("&:active","background-color: var(--n-color-checked-pressed);")])])])]),pz=Object.assign(Object.assign(Object.assign({},pt.props),dz),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),gz="n-tag",Kh=Ie({name:"Tag",props:pz,setup(e){const t=ne(null),{mergedBorderedRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:o}=rn(e),a=pt("Tag","-tag",hz,fz,e,r);jn(gz,{roundRef:et(e,"round")});function s(){if(!e.disabled&&e.checkable){const{checked:h,onCheckedChange:p,onUpdateChecked:g,"onUpdate:checked":b}=e;g&&g(!h),b&&b(!h),p&&p(!h)}}function l(h){if(e.triggerClickOnClose||h.stopPropagation(),!e.disabled){const{onClose:p}=e;p&&Ge(p,h)}}const u={setTextContent(h){const{value:p}=t;p&&(p.textContent=h)}},c=co("Tag",o,r),d=pe(()=>{const{type:h,size:p,color:{color:g,textColor:b}={}}=e,{common:{cubicBezierEaseInOut:v},self:{padding:_,closeMargin:y,borderRadius:x,opacityDisabled:S,textColorCheckable:$,textColorHoverCheckable:w,textColorPressedCheckable:T,textColorChecked:k,colorCheckable:P,colorHoverCheckable:R,colorPressedCheckable:C,colorChecked:E,colorCheckedHover:I,colorCheckedPressed:z,closeBorderRadius:j,fontWeightStrong:Z,[Se("colorBordered",h)]:J,[Se("closeSize",p)]:ie,[Se("closeIconSize",p)]:he,[Se("fontSize",p)]:_e,[Se("height",p)]:oe,[Se("color",h)]:ve,[Se("textColor",h)]:we,[Se("border",h)]:Oe,[Se("closeIconColor",h)]:xe,[Se("closeIconColorHover",h)]:Xe,[Se("closeIconColorPressed",h)]:Ve,[Se("closeColorHover",h)]:fe,[Se("closeColorPressed",h)]:Ee}}=a.value,Pe=Kn(y);return{"--n-font-weight-strong":Z,"--n-avatar-size-override":`calc(${oe} - 8px)`,"--n-bezier":v,"--n-border-radius":x,"--n-border":Oe,"--n-close-icon-size":he,"--n-close-color-pressed":Ee,"--n-close-color-hover":fe,"--n-close-border-radius":j,"--n-close-icon-color":xe,"--n-close-icon-color-hover":Xe,"--n-close-icon-color-pressed":Ve,"--n-close-icon-color-disabled":xe,"--n-close-margin-top":Pe.top,"--n-close-margin-right":Pe.right,"--n-close-margin-bottom":Pe.bottom,"--n-close-margin-left":Pe.left,"--n-close-size":ie,"--n-color":g||(n.value?J:ve),"--n-color-checkable":P,"--n-color-checked":E,"--n-color-checked-hover":I,"--n-color-checked-pressed":z,"--n-color-hover-checkable":R,"--n-color-pressed-checkable":C,"--n-font-size":_e,"--n-height":oe,"--n-opacity-disabled":S,"--n-padding":_,"--n-text-color":b||we,"--n-text-color-checkable":$,"--n-text-color-checked":k,"--n-text-color-hover-checkable":w,"--n-text-color-pressed-checkable":T}}),f=i?Cn("tag",pe(()=>{let h="";const{type:p,size:g,color:{color:b,textColor:v}={}}=e;return h+=p[0],h+=g[0],b&&(h+=`a${af(b)}`),v&&(h+=`b${af(v)}`),n.value&&(h+="c"),h}),d,e):void 0;return Object.assign(Object.assign({},u),{rtlEnabled:c,mergedClsPrefix:r,contentRef:t,mergedBordered:n,handleClick:s,handleCloseClick:l,cssVars:i?void 0:d,themeClass:f==null?void 0:f.themeClass,onRender:f==null?void 0:f.onRender})},render(){var e,t;const{mergedClsPrefix:n,rtlEnabled:r,closable:i,color:{borderColor:o}={},round:a,onRender:s,$slots:l}=this;s==null||s();const u=Bt(l.avatar,d=>d&&M("div",{class:`${n}-tag__avatar`},d)),c=Bt(l.icon,d=>d&&M("div",{class:`${n}-tag__icon`},d));return M("div",{class:[`${n}-tag`,this.themeClass,{[`${n}-tag--rtl`]:r,[`${n}-tag--strong`]:this.strong,[`${n}-tag--disabled`]:this.disabled,[`${n}-tag--checkable`]:this.checkable,[`${n}-tag--checked`]:this.checkable&&this.checked,[`${n}-tag--round`]:a,[`${n}-tag--avatar`]:u,[`${n}-tag--icon`]:c,[`${n}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},c||u,M("span",{class:`${n}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&i?M(gv,{clsPrefix:n,class:`${n}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:a,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?M("div",{class:`${n}-tag__border`,style:{borderColor:o}}):null)}}),S5=Ie({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:n}=e;return M(Pd,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?M($0,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>M(Cr,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>Ur(t.default,()=>[M(GP,null)])})}):null})}}}),vz={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};function bz(e){const{borderRadius:t,textColor2:n,textColorDisabled:r,inputColor:i,inputColorDisabled:o,primaryColor:a,primaryColorHover:s,warningColor:l,warningColorHover:u,errorColor:c,errorColorHover:d,borderColor:f,iconColor:h,iconColorDisabled:p,clearColor:g,clearColorHover:b,clearColorPressed:v,placeholderColor:_,placeholderColorDisabled:y,fontSizeTiny:x,fontSizeSmall:S,fontSizeMedium:$,fontSizeLarge:w,heightTiny:T,heightSmall:k,heightMedium:P,heightLarge:R,fontWeight:C}=e;return Object.assign(Object.assign({},vz),{fontSizeTiny:x,fontSizeSmall:S,fontSizeMedium:$,fontSizeLarge:w,heightTiny:T,heightSmall:k,heightMedium:P,heightLarge:R,borderRadius:t,fontWeight:C,textColor:n,textColorDisabled:r,placeholderColor:_,placeholderColorDisabled:y,color:i,colorDisabled:o,colorActive:i,border:`1px solid ${f}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${s}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${nt(a,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${nt(a,{alpha:.2})}`,caretColor:a,arrowColor:h,arrowColorDisabled:p,loadingColor:a,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,borderActiveWarning:`1px solid ${l}`,borderFocusWarning:`1px solid ${u}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${nt(l,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${nt(l,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:l,borderError:`1px solid ${c}`,borderHoverError:`1px solid ${d}`,borderActiveError:`1px solid ${c}`,borderFocusError:`1px solid ${d}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${nt(c,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${nt(c,{alpha:.2})}`,colorActiveError:i,caretColorError:c,clearColor:g,clearColorHover:b,clearColorPressed:v})}const $5={name:"InternalSelection",common:hn,peers:{Popover:mv},self:bz},mz=ce([W("base-selection",`
|
|
523
523
|
--n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
|
|
524
524
|
--n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
|
|
525
525
|
position: relative;
|
|
@@ -719,38 +719,38 @@ ${t}
|
|
|
719
719
|
line-height: 1.25;
|
|
720
720
|
text-overflow: ellipsis;
|
|
721
721
|
overflow: hidden;
|
|
722
|
-
`)])])]),mz=Ie({name:"InternalSelection",props:Object.assign(Object.assign({},pt.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=rn(e),r=co("InternalSelection",n,t),i=ne(null),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(!1),g=ne(!1),b=ne(!1),v=pt("InternalSelection","-internal-selection",bz,S5,e,et(e,"clsPrefix")),x=pe(()=>e.clearable&&!e.disabled&&(b.value||e.active)),y=pe(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Io(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),_=pe(()=>{const B=e.selectedOption;if(B)return B[e.labelField]}),S=pe(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function $(){var B;const{value:V}=i;if(V){const{value:me}=o;me&&(me.style.width=`${V.offsetWidth}px`,e.maxTagCount!=="responsive"&&((B=f.value)===null||B===void 0||B.sync({showAllItemsBeforeCalculate:!1})))}}function w(){const{value:B}=h;B&&(B.style.display="none")}function T(){const{value:B}=h;B&&(B.style.display="inline-block")}vt(et(e,"active"),B=>{B||w()}),vt(et(e,"pattern"),()=>{e.multiple&&fn($)});function M(B){const{onFocus:V}=e;V&&V(B)}function P(B){const{onBlur:V}=e;V&&V(B)}function R(B){const{onDeleteOption:V}=e;V&&V(B)}function C(B){const{onClear:V}=e;V&&V(B)}function E(B){const{onPatternInput:V}=e;V&&V(B)}function I(B){var V;(!B.relatedTarget||!(!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)))&&M(B)}function z(B){var V;!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)||P(B)}function j(B){C(B)}function Z(){b.value=!0}function J(){b.value=!1}function ie(B){!e.active||!e.filterable||B.target!==o.value&&B.preventDefault()}function he(B){R(B)}const _e=ne(!1);function oe(B){if(B.key==="Backspace"&&!_e.value&&!e.pattern.length){const{selectedOptions:V}=e;V!=null&&V.length&&he(V[V.length-1])}}let ve=null;function we(B){const{value:V}=i;if(V){const me=B.target.value;V.textContent=me,$()}e.ignoreComposition&&_e.value?ve=B:E(B)}function Oe(){_e.value=!0}function xe(){_e.value=!1,e.ignoreComposition&&E(ve),ve=null}function Xe(B){var V;g.value=!0,(V=e.onPatternFocus)===null||V===void 0||V.call(e,B)}function Ve(B){var V;g.value=!1,(V=e.onPatternBlur)===null||V===void 0||V.call(e,B)}function fe(){var B,V;if(e.filterable)g.value=!1,(B=u.value)===null||B===void 0||B.blur(),(V=o.value)===null||V===void 0||V.blur();else if(e.multiple){const{value:me}=s;me==null||me.blur()}else{const{value:me}=l;me==null||me.blur()}}function Ee(){var B,V,me;e.filterable?(g.value=!1,(B=u.value)===null||B===void 0||B.focus()):e.multiple?(V=s.value)===null||V===void 0||V.focus():(me=l.value)===null||me===void 0||me.focus()}function Pe(){const{value:B}=o;B&&(T(),B.focus())}function A(){const{value:B}=o;B&&B.blur()}function H(B){const{value:V}=c;V&&V.setTextContent(`+${B}`)}function G(){const{value:B}=d;return B}function de(){return o.value}let le=null;function q(){le!==null&&window.clearTimeout(le)}function N(){e.active||(q(),le=window.setTimeout(()=>{S.value&&(p.value=!0)},100))}function re(){q()}function L(B){B||(q(),p.value=!1)}vt(S,B=>{B||(p.value=!1)}),dn(()=>{xr(()=>{const B=u.value;B&&(e.disabled?B.removeAttribute("tabindex"):B.tabIndex=g.value?-1:0)})}),F2(a,e.onResize);const{inlineThemeDisabled:O}=e,ee=pe(()=>{const{size:B}=e,{common:{cubicBezierEaseInOut:V},self:{fontWeight:me,borderRadius:Ae,color:Re,placeholderColor:rt,textColor:lt,paddingSingle:ft,paddingMultiple:zt,caretColor:yt,colorDisabled:Lt,textColorDisabled:ye,placeholderColorDisabled:Y,colorActive:m,boxShadowFocus:F,boxShadowActive:D,boxShadowHover:te,border:K,borderFocus:se,borderHover:ue,borderActive:ae,arrowColor:ke,arrowColorDisabled:Me,loadingColor:$e,colorActiveWarning:ze,boxShadowFocusWarning:Je,boxShadowActiveWarning:Ne,boxShadowHoverWarning:ht,borderWarning:Le,borderFocusWarning:Be,borderHoverWarning:X,borderActiveWarning:be,colorActiveError:He,boxShadowFocusError:Te,boxShadowActiveError:gt,boxShadowHoverError:De,borderError:ut,borderFocusError:pn,borderHoverError:Wt,borderActiveError:vo,clearColor:bo,clearColorHover:Ss,clearColorPressed:hh,clearSize:ph,arrowSize:gh,[Se("height",B)]:vh,[Se("fontSize",B)]:bh}}=v.value,xa=Kn(ft),wa=Kn(zt);return{"--n-bezier":V,"--n-border":K,"--n-border-active":ae,"--n-border-focus":se,"--n-border-hover":ue,"--n-border-radius":Ae,"--n-box-shadow-active":D,"--n-box-shadow-focus":F,"--n-box-shadow-hover":te,"--n-caret-color":yt,"--n-color":Re,"--n-color-active":m,"--n-color-disabled":Lt,"--n-font-size":bh,"--n-height":vh,"--n-padding-single-top":xa.top,"--n-padding-multiple-top":wa.top,"--n-padding-single-right":xa.right,"--n-padding-multiple-right":wa.right,"--n-padding-single-left":xa.left,"--n-padding-multiple-left":wa.left,"--n-padding-single-bottom":xa.bottom,"--n-padding-multiple-bottom":wa.bottom,"--n-placeholder-color":rt,"--n-placeholder-color-disabled":Y,"--n-text-color":lt,"--n-text-color-disabled":ye,"--n-arrow-color":ke,"--n-arrow-color-disabled":Me,"--n-loading-color":$e,"--n-color-active-warning":ze,"--n-box-shadow-focus-warning":Je,"--n-box-shadow-active-warning":Ne,"--n-box-shadow-hover-warning":ht,"--n-border-warning":Le,"--n-border-focus-warning":Be,"--n-border-hover-warning":X,"--n-border-active-warning":be,"--n-color-active-error":He,"--n-box-shadow-focus-error":Te,"--n-box-shadow-active-error":gt,"--n-box-shadow-hover-error":De,"--n-border-error":ut,"--n-border-focus-error":pn,"--n-border-hover-error":Wt,"--n-border-active-error":vo,"--n-clear-size":ph,"--n-clear-color":bo,"--n-clear-color-hover":Ss,"--n-clear-color-pressed":hh,"--n-arrow-size":gh,"--n-font-weight":me}}),U=O?Cn("internal-selection",pe(()=>e.size[0]),ee,e):void 0;return{mergedTheme:v,mergedClearable:x,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:g,filterablePlaceholder:y,label:_,selected:S,showTagsPanel:p,isComposing:_e,counterRef:c,counterWrapperRef:d,patternInputMirrorRef:i,patternInputRef:o,selfRef:a,multipleElRef:s,singleElRef:l,patternInputWrapperRef:u,overflowRef:f,inputTagElRef:h,handleMouseDown:ie,handleFocusin:I,handleClear:j,handleMouseEnter:Z,handleMouseLeave:J,handleDeleteOption:he,handlePatternKeyDown:oe,handlePatternInputInput:we,handlePatternInputBlur:Ve,handlePatternInputFocus:Xe,handleMouseEnterCounter:N,handleMouseLeaveCounter:re,handleFocusout:z,handleCompositionEnd:xe,handleCompositionStart:Oe,onPopoverUpdateShow:L,focus:Ee,focusInput:Pe,blur:fe,blurInput:A,updateCounter:H,getCounter:G,getTail:de,renderLabel:e.renderLabel,cssVars:O?void 0:ee,themeClass:U==null?void 0:U.themeClass,onRender:U==null?void 0:U.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:o,bordered:a,clsPrefix:s,ellipsisTagPopoverProps:l,onRender:u,renderTag:c,renderLabel:d}=this;u==null||u();const f=o==="responsive",h=typeof o=="number",p=f||h,g=k(v0,null,{default:()=>k(C5,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var v,x;return(x=(v=this.$slots).arrow)===null||x===void 0?void 0:x.call(v)}})});let b;if(t){const{labelField:v}=this,x=C=>k("div",{class:`${s}-base-selection-tag-wrapper`,key:C.value},c?c({option:C,handleClose:()=>{this.handleDeleteOption(C)}}):k(Kh,{size:n,closable:!C.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(C)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>d?d(C,!0):Io(C[v],C,!0)})),y=()=>(h?this.selectedOptions.slice(0,o):this.selectedOptions).map(x),_=i?k("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},k("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),k("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,S=f?()=>k("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},k(Kh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let $;if(h){const C=this.selectedOptions.length-o;C>0&&($=k("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},k(Kh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${C}`})))}const w=f?i?k(f1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S,tail:()=>_}):k(f1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S}):h&&$?y().concat($):y(),T=p?()=>k("div",{class:`${s}-base-selection-popover`},f?y():this.selectedOptions.map(x)):void 0,M=p?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},l):null,P=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},k("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,R=i?k("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},w,f?null:_,g):k("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},w,g);b=k(Tt,null,p?k(w5,Object.assign({},M,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>R,default:T}):R,P)}else if(i){const v=this.pattern||this.isComposing,x=this.active?!v:!this.selected,y=this.active?!1:this.selected;b=k("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:p1(this.label)},k("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),y?k("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},k("div",{class:`${s}-base-selection-overlay__wrapper`},c?c({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Io(this.label,this.selectedOption,!0))):null,x?k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},k("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,g)}else b=k("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?k("div",{class:`${s}-base-selection-input`,title:p1(this.label),key:"input"},k("div",{class:`${s}-base-selection-input__content`},c?c({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Io(this.label,this.selectedOption,!0))):k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},k("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),g);return k("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},b,a?k("div",{class:`${s}-base-selection__border`}):null,a?k("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:ki}=ca;function yz({duration:e=".2s",delay:t=".1s"}={}){return[ce("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),ce("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
722
|
+
`)])])]),yz=Ie({name:"InternalSelection",props:Object.assign(Object.assign({},pt.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=rn(e),r=co("InternalSelection",n,t),i=ne(null),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(!1),g=ne(!1),b=ne(!1),v=pt("InternalSelection","-internal-selection",mz,$5,e,et(e,"clsPrefix")),_=pe(()=>e.clearable&&!e.disabled&&(b.value||e.active)),y=pe(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Io(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),x=pe(()=>{const B=e.selectedOption;if(B)return B[e.labelField]}),S=pe(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function $(){var B;const{value:V}=i;if(V){const{value:me}=o;me&&(me.style.width=`${V.offsetWidth}px`,e.maxTagCount!=="responsive"&&((B=f.value)===null||B===void 0||B.sync({showAllItemsBeforeCalculate:!1})))}}function w(){const{value:B}=h;B&&(B.style.display="none")}function T(){const{value:B}=h;B&&(B.style.display="inline-block")}vt(et(e,"active"),B=>{B||w()}),vt(et(e,"pattern"),()=>{e.multiple&&fn($)});function k(B){const{onFocus:V}=e;V&&V(B)}function P(B){const{onBlur:V}=e;V&&V(B)}function R(B){const{onDeleteOption:V}=e;V&&V(B)}function C(B){const{onClear:V}=e;V&&V(B)}function E(B){const{onPatternInput:V}=e;V&&V(B)}function I(B){var V;(!B.relatedTarget||!(!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)))&&k(B)}function z(B){var V;!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)||P(B)}function j(B){C(B)}function Z(){b.value=!0}function J(){b.value=!1}function ie(B){!e.active||!e.filterable||B.target!==o.value&&B.preventDefault()}function he(B){R(B)}const _e=ne(!1);function oe(B){if(B.key==="Backspace"&&!_e.value&&!e.pattern.length){const{selectedOptions:V}=e;V!=null&&V.length&&he(V[V.length-1])}}let ve=null;function we(B){const{value:V}=i;if(V){const me=B.target.value;V.textContent=me,$()}e.ignoreComposition&&_e.value?ve=B:E(B)}function Oe(){_e.value=!0}function xe(){_e.value=!1,e.ignoreComposition&&E(ve),ve=null}function Xe(B){var V;g.value=!0,(V=e.onPatternFocus)===null||V===void 0||V.call(e,B)}function Ve(B){var V;g.value=!1,(V=e.onPatternBlur)===null||V===void 0||V.call(e,B)}function fe(){var B,V;if(e.filterable)g.value=!1,(B=u.value)===null||B===void 0||B.blur(),(V=o.value)===null||V===void 0||V.blur();else if(e.multiple){const{value:me}=s;me==null||me.blur()}else{const{value:me}=l;me==null||me.blur()}}function Ee(){var B,V,me;e.filterable?(g.value=!1,(B=u.value)===null||B===void 0||B.focus()):e.multiple?(V=s.value)===null||V===void 0||V.focus():(me=l.value)===null||me===void 0||me.focus()}function Pe(){const{value:B}=o;B&&(T(),B.focus())}function A(){const{value:B}=o;B&&B.blur()}function H(B){const{value:V}=c;V&&V.setTextContent(`+${B}`)}function G(){const{value:B}=d;return B}function de(){return o.value}let le=null;function q(){le!==null&&window.clearTimeout(le)}function N(){e.active||(q(),le=window.setTimeout(()=>{S.value&&(p.value=!0)},100))}function re(){q()}function L(B){B||(q(),p.value=!1)}vt(S,B=>{B||(p.value=!1)}),dn(()=>{xr(()=>{const B=u.value;B&&(e.disabled?B.removeAttribute("tabindex"):B.tabIndex=g.value?-1:0)})}),B2(a,e.onResize);const{inlineThemeDisabled:O}=e,ee=pe(()=>{const{size:B}=e,{common:{cubicBezierEaseInOut:V},self:{fontWeight:me,borderRadius:Ae,color:Re,placeholderColor:rt,textColor:lt,paddingSingle:ft,paddingMultiple:zt,caretColor:yt,colorDisabled:Lt,textColorDisabled:ye,placeholderColorDisabled:Y,colorActive:m,boxShadowFocus:F,boxShadowActive:D,boxShadowHover:te,border:K,borderFocus:se,borderHover:ue,borderActive:ae,arrowColor:ke,arrowColorDisabled:Me,loadingColor:$e,colorActiveWarning:ze,boxShadowFocusWarning:Je,boxShadowActiveWarning:Ne,boxShadowHoverWarning:ht,borderWarning:Le,borderFocusWarning:Be,borderHoverWarning:X,borderActiveWarning:be,colorActiveError:He,boxShadowFocusError:Te,boxShadowActiveError:gt,boxShadowHoverError:De,borderError:ut,borderFocusError:pn,borderHoverError:Wt,borderActiveError:vo,clearColor:bo,clearColorHover:Ss,clearColorPressed:hh,clearSize:ph,arrowSize:gh,[Se("height",B)]:vh,[Se("fontSize",B)]:bh}}=v.value,xa=Kn(ft),wa=Kn(zt);return{"--n-bezier":V,"--n-border":K,"--n-border-active":ae,"--n-border-focus":se,"--n-border-hover":ue,"--n-border-radius":Ae,"--n-box-shadow-active":D,"--n-box-shadow-focus":F,"--n-box-shadow-hover":te,"--n-caret-color":yt,"--n-color":Re,"--n-color-active":m,"--n-color-disabled":Lt,"--n-font-size":bh,"--n-height":vh,"--n-padding-single-top":xa.top,"--n-padding-multiple-top":wa.top,"--n-padding-single-right":xa.right,"--n-padding-multiple-right":wa.right,"--n-padding-single-left":xa.left,"--n-padding-multiple-left":wa.left,"--n-padding-single-bottom":xa.bottom,"--n-padding-multiple-bottom":wa.bottom,"--n-placeholder-color":rt,"--n-placeholder-color-disabled":Y,"--n-text-color":lt,"--n-text-color-disabled":ye,"--n-arrow-color":ke,"--n-arrow-color-disabled":Me,"--n-loading-color":$e,"--n-color-active-warning":ze,"--n-box-shadow-focus-warning":Je,"--n-box-shadow-active-warning":Ne,"--n-box-shadow-hover-warning":ht,"--n-border-warning":Le,"--n-border-focus-warning":Be,"--n-border-hover-warning":X,"--n-border-active-warning":be,"--n-color-active-error":He,"--n-box-shadow-focus-error":Te,"--n-box-shadow-active-error":gt,"--n-box-shadow-hover-error":De,"--n-border-error":ut,"--n-border-focus-error":pn,"--n-border-hover-error":Wt,"--n-border-active-error":vo,"--n-clear-size":ph,"--n-clear-color":bo,"--n-clear-color-hover":Ss,"--n-clear-color-pressed":hh,"--n-arrow-size":gh,"--n-font-weight":me}}),U=O?Cn("internal-selection",pe(()=>e.size[0]),ee,e):void 0;return{mergedTheme:v,mergedClearable:_,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:g,filterablePlaceholder:y,label:x,selected:S,showTagsPanel:p,isComposing:_e,counterRef:c,counterWrapperRef:d,patternInputMirrorRef:i,patternInputRef:o,selfRef:a,multipleElRef:s,singleElRef:l,patternInputWrapperRef:u,overflowRef:f,inputTagElRef:h,handleMouseDown:ie,handleFocusin:I,handleClear:j,handleMouseEnter:Z,handleMouseLeave:J,handleDeleteOption:he,handlePatternKeyDown:oe,handlePatternInputInput:we,handlePatternInputBlur:Ve,handlePatternInputFocus:Xe,handleMouseEnterCounter:N,handleMouseLeaveCounter:re,handleFocusout:z,handleCompositionEnd:xe,handleCompositionStart:Oe,onPopoverUpdateShow:L,focus:Ee,focusInput:Pe,blur:fe,blurInput:A,updateCounter:H,getCounter:G,getTail:de,renderLabel:e.renderLabel,cssVars:O?void 0:ee,themeClass:U==null?void 0:U.themeClass,onRender:U==null?void 0:U.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:o,bordered:a,clsPrefix:s,ellipsisTagPopoverProps:l,onRender:u,renderTag:c,renderLabel:d}=this;u==null||u();const f=o==="responsive",h=typeof o=="number",p=f||h,g=M(v0,null,{default:()=>M(S5,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var v,_;return(_=(v=this.$slots).arrow)===null||_===void 0?void 0:_.call(v)}})});let b;if(t){const{labelField:v}=this,_=C=>M("div",{class:`${s}-base-selection-tag-wrapper`,key:C.value},c?c({option:C,handleClose:()=>{this.handleDeleteOption(C)}}):M(Kh,{size:n,closable:!C.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(C)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>d?d(C,!0):Io(C[v],C,!0)})),y=()=>(h?this.selectedOptions.slice(0,o):this.selectedOptions).map(_),x=i?M("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},M("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),M("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,S=f?()=>M("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},M(Kh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let $;if(h){const C=this.selectedOptions.length-o;C>0&&($=M("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},M(Kh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${C}`})))}const w=f?i?M(f1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S,tail:()=>x}):M(f1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S}):h&&$?y().concat($):y(),T=p?()=>M("div",{class:`${s}-base-selection-popover`},f?y():this.selectedOptions.map(_)):void 0,k=p?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},l):null,P=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?M("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},M("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,R=i?M("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},w,f?null:x,g):M("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},w,g);b=M(Tt,null,p?M(C5,Object.assign({},k,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>R,default:T}):R,P)}else if(i){const v=this.pattern||this.isComposing,_=this.active?!v:!this.selected,y=this.active?!1:this.selected;b=M("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:p1(this.label)},M("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),y?M("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},M("div",{class:`${s}-base-selection-overlay__wrapper`},c?c({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Io(this.label,this.selectedOption,!0))):null,_?M("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},M("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,g)}else b=M("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?M("div",{class:`${s}-base-selection-input`,title:p1(this.label),key:"input"},M("div",{class:`${s}-base-selection-input__content`},c?c({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Io(this.label,this.selectedOption,!0))):M("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},M("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),g);return M("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},b,a?M("div",{class:`${s}-base-selection__border`}):null,a?M("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:Mi}=ca;function _z({duration:e=".2s",delay:t=".1s"}={}){return[ce("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),ce("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
723
723
|
opacity: 0!important;
|
|
724
724
|
margin-left: 0!important;
|
|
725
725
|
margin-right: 0!important;
|
|
726
726
|
`),ce("&.fade-in-width-expand-transition-leave-active",`
|
|
727
727
|
overflow: hidden;
|
|
728
728
|
transition:
|
|
729
|
-
opacity ${e} ${
|
|
730
|
-
max-width ${e} ${
|
|
731
|
-
margin-left ${e} ${
|
|
732
|
-
margin-right ${e} ${
|
|
729
|
+
opacity ${e} ${Mi},
|
|
730
|
+
max-width ${e} ${Mi} ${t},
|
|
731
|
+
margin-left ${e} ${Mi} ${t},
|
|
732
|
+
margin-right ${e} ${Mi} ${t};
|
|
733
733
|
`),ce("&.fade-in-width-expand-transition-enter-active",`
|
|
734
734
|
overflow: hidden;
|
|
735
735
|
transition:
|
|
736
|
-
opacity ${e} ${
|
|
737
|
-
max-width ${e} ${
|
|
738
|
-
margin-left ${e} ${
|
|
739
|
-
margin-right ${e} ${
|
|
740
|
-
`)]}const
|
|
736
|
+
opacity ${e} ${Mi} ${t},
|
|
737
|
+
max-width ${e} ${Mi},
|
|
738
|
+
margin-left ${e} ${Mi},
|
|
739
|
+
margin-right ${e} ${Mi};
|
|
740
|
+
`)]}const xz=W("base-wave",`
|
|
741
741
|
position: absolute;
|
|
742
742
|
left: 0;
|
|
743
743
|
right: 0;
|
|
744
744
|
top: 0;
|
|
745
745
|
bottom: 0;
|
|
746
746
|
border-radius: inherit;
|
|
747
|
-
`),
|
|
747
|
+
`),wz=Ie({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){fa("-base-wave",xz,et(e,"clsPrefix"));const t=ne(null),n=ne(!1);let r=null;return Bn(()=>{r!==null&&window.clearTimeout(r)}),{active:n,selfRef:t,play(){r!==null&&(window.clearTimeout(r),n.value=!1,r=null),fn(()=>{var i;(i=t.value)===null||i===void 0||i.offsetHeight,n.value=!0,r=window.setTimeout(()=>{n.value=!1,r=null},1e3)})}}},render(){const{clsPrefix:e}=this;return M("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),Cz={iconMargin:"11px 8px 0 12px",iconMarginRtl:"11px 12px 0 8px",iconSize:"24px",closeIconSize:"16px",closeSize:"20px",closeMargin:"13px 14px 0 0",closeMarginRtl:"13px 0 0 14px",padding:"13px"};function Sz(e){const{lineHeight:t,borderRadius:n,fontWeightStrong:r,baseColor:i,dividerColor:o,actionColor:a,textColor1:s,textColor2:l,closeColorHover:u,closeColorPressed:c,closeIconColor:d,closeIconColorHover:f,closeIconColorPressed:h,infoColor:p,successColor:g,warningColor:b,errorColor:v,fontSize:_}=e;return Object.assign(Object.assign({},Cz),{fontSize:_,lineHeight:t,titleFontWeight:r,borderRadius:n,border:`1px solid ${o}`,color:a,titleTextColor:s,iconColor:l,contentTextColor:l,closeBorderRadius:n,closeColorHover:u,closeColorPressed:c,closeIconColor:d,closeIconColorHover:f,closeIconColorPressed:h,borderInfo:`1px solid ${ir(i,nt(p,{alpha:.25}))}`,colorInfo:ir(i,nt(p,{alpha:.08})),titleTextColorInfo:s,iconColorInfo:p,contentTextColorInfo:l,closeColorHoverInfo:u,closeColorPressedInfo:c,closeIconColorInfo:d,closeIconColorHoverInfo:f,closeIconColorPressedInfo:h,borderSuccess:`1px solid ${ir(i,nt(g,{alpha:.25}))}`,colorSuccess:ir(i,nt(g,{alpha:.08})),titleTextColorSuccess:s,iconColorSuccess:g,contentTextColorSuccess:l,closeColorHoverSuccess:u,closeColorPressedSuccess:c,closeIconColorSuccess:d,closeIconColorHoverSuccess:f,closeIconColorPressedSuccess:h,borderWarning:`1px solid ${ir(i,nt(b,{alpha:.33}))}`,colorWarning:ir(i,nt(b,{alpha:.08})),titleTextColorWarning:s,iconColorWarning:b,contentTextColorWarning:l,closeColorHoverWarning:u,closeColorPressedWarning:c,closeIconColorWarning:d,closeIconColorHoverWarning:f,closeIconColorPressedWarning:h,borderError:`1px solid ${ir(i,nt(v,{alpha:.25}))}`,colorError:ir(i,nt(v,{alpha:.08})),titleTextColorError:s,iconColorError:v,contentTextColorError:l,closeColorHoverError:u,closeColorPressedError:c,closeIconColorError:d,closeIconColorHoverError:f,closeIconColorPressedError:h})}const $z={common:hn,self:Sz},{cubicBezierEaseInOut:Pr,cubicBezierEaseOut:kz,cubicBezierEaseIn:Mz}=ca;function Tz({overflow:e="hidden",duration:t=".3s",originalTransition:n="",leavingDelay:r="0s",foldPadding:i=!1,enterToProps:o=void 0,leaveToProps:a=void 0,reverse:s=!1}={}){const l=s?"leave":"enter",u=s?"enter":"leave";return[ce(`&.fade-in-height-expand-transition-${u}-from,
|
|
748
748
|
&.fade-in-height-expand-transition-${l}-to`,Object.assign(Object.assign({},o),{opacity:1})),ce(`&.fade-in-height-expand-transition-${u}-to,
|
|
749
749
|
&.fade-in-height-expand-transition-${l}-from`,Object.assign(Object.assign({},a),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),ce(`&.fade-in-height-expand-transition-${u}-active`,`
|
|
750
750
|
overflow: ${e};
|
|
751
751
|
transition:
|
|
752
752
|
max-height ${t} ${Pr} ${r},
|
|
753
|
-
opacity ${t} ${
|
|
753
|
+
opacity ${t} ${kz} ${r},
|
|
754
754
|
margin-top ${t} ${Pr} ${r},
|
|
755
755
|
margin-bottom ${t} ${Pr} ${r},
|
|
756
756
|
padding-top ${t} ${Pr} ${r},
|
|
@@ -760,13 +760,13 @@ ${t}
|
|
|
760
760
|
overflow: ${e};
|
|
761
761
|
transition:
|
|
762
762
|
max-height ${t} ${Pr},
|
|
763
|
-
opacity ${t} ${
|
|
763
|
+
opacity ${t} ${Mz},
|
|
764
764
|
margin-top ${t} ${Pr},
|
|
765
765
|
margin-bottom ${t} ${Pr},
|
|
766
766
|
padding-top ${t} ${Pr},
|
|
767
767
|
padding-bottom ${t} ${Pr}
|
|
768
768
|
${n?`,${n}`:""}
|
|
769
|
-
`)]}const
|
|
769
|
+
`)]}const Ez=W("alert",`
|
|
770
770
|
line-height: var(--n-line-height);
|
|
771
771
|
border-radius: var(--n-border-radius);
|
|
772
772
|
position: relative;
|
|
@@ -786,7 +786,7 @@ ${t}
|
|
|
786
786
|
pointer-events: none;
|
|
787
787
|
`),ge("closable",[W("alert-body",[Q("title",`
|
|
788
788
|
padding-right: 24px;
|
|
789
|
-
`)])]),Q("icon",{color:"var(--n-icon-color)"}),W("alert-body",{padding:"var(--n-padding)"},[Q("title",{color:"var(--n-title-text-color)"}),Q("content",{color:"var(--n-content-text-color)"})]),
|
|
789
|
+
`)])]),Q("icon",{color:"var(--n-icon-color)"}),W("alert-body",{padding:"var(--n-padding)"},[Q("title",{color:"var(--n-title-text-color)"}),Q("content",{color:"var(--n-content-text-color)"})]),Tz({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),Q("icon",`
|
|
790
790
|
position: absolute;
|
|
791
791
|
left: 0;
|
|
792
792
|
top: 0;
|
|
@@ -813,7 +813,7 @@ ${t}
|
|
|
813
813
|
font-size: 16px;
|
|
814
814
|
line-height: 19px;
|
|
815
815
|
font-weight: var(--n-title-font-weight);
|
|
816
|
-
`,[ce("& +",[Q("content",{marginTop:"9px"})])]),Q("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),Q("icon",{transition:"color .3s var(--n-bezier)"})]),
|
|
816
|
+
`,[ce("& +",[Q("content",{marginTop:"9px"})])]),Q("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),Q("icon",{transition:"color .3s var(--n-bezier)"})]),Az=Object.assign(Object.assign({},pt.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),k5=Ie({name:"Alert",inheritAttrs:!1,props:Az,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=rn(e),o=pt("Alert","-alert",Ez,$z,e,t),a=co("Alert",i,t),s=pe(()=>{const{common:{cubicBezierEaseInOut:d},self:f}=o.value,{fontSize:h,borderRadius:p,titleFontWeight:g,lineHeight:b,iconSize:v,iconMargin:_,iconMarginRtl:y,closeIconSize:x,closeBorderRadius:S,closeSize:$,closeMargin:w,closeMarginRtl:T,padding:k}=f,{type:P}=e,{left:R,right:C}=Kn(_);return{"--n-bezier":d,"--n-color":f[Se("color",P)],"--n-close-icon-size":x,"--n-close-border-radius":S,"--n-close-color-hover":f[Se("closeColorHover",P)],"--n-close-color-pressed":f[Se("closeColorPressed",P)],"--n-close-icon-color":f[Se("closeIconColor",P)],"--n-close-icon-color-hover":f[Se("closeIconColorHover",P)],"--n-close-icon-color-pressed":f[Se("closeIconColorPressed",P)],"--n-icon-color":f[Se("iconColor",P)],"--n-border":f[Se("border",P)],"--n-title-text-color":f[Se("titleTextColor",P)],"--n-content-text-color":f[Se("contentTextColor",P)],"--n-line-height":b,"--n-border-radius":p,"--n-font-size":h,"--n-title-font-weight":g,"--n-icon-size":v,"--n-icon-margin":_,"--n-icon-margin-rtl":y,"--n-close-size":$,"--n-close-margin":w,"--n-close-margin-rtl":T,"--n-padding":k,"--n-icon-margin-left":R,"--n-icon-margin-right":C}}),l=r?Cn("alert",pe(()=>e.type[0]),s,e):void 0,u=ne(!0),c=()=>{const{onAfterLeave:d,onAfterHide:f}=e;d&&d(),f&&f()};return{rtlEnabled:a,mergedClsPrefix:t,mergedBordered:n,visible:u,handleCloseClick:()=>{var d;Promise.resolve((d=e.onClose)===null||d===void 0?void 0:d.call(e)).then(f=>{f!==!1&&(u.value=!1)})},handleAfterLeave:()=>{c()},mergedTheme:o,cssVars:r?void 0:s,themeClass:l==null?void 0:l.themeClass,onRender:l==null?void 0:l.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),M(p5,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:t,$slots:n}=this,r={class:[`${t}-alert`,this.themeClass,this.closable&&`${t}-alert--closable`,this.showIcon&&`${t}-alert--show-icon`,!this.title&&this.closable&&`${t}-alert--right-adjust`,this.rtlEnabled&&`${t}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?M("div",Object.assign({},ia(this.$attrs,r)),this.closable&&M(gv,{clsPrefix:t,class:`${t}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&M("div",{class:`${t}-alert__border`}),this.showIcon&&M("div",{class:`${t}-alert__icon`,"aria-hidden":"true"},Ur(n.icon,()=>[M(Cr,{clsPrefix:t},{default:()=>{switch(this.type){case"success":return M(rR,null);case"info":return M(tR,null);case"warning":return M(iR,null);case"error":return M(JP,null);default:return null}}})])),M("div",{class:[`${t}-alert-body`,this.mergedBordered&&`${t}-alert-body--bordered`]},Bt(n.header,i=>{const o=i||this.title;return o?M("div",{class:`${t}-alert-body__title`},o):null}),n.default&&M("div",{class:`${t}-alert-body__content`},n))):null}})}}),Pz=xd&&"chrome"in window;xd&&navigator.userAgent.includes("Firefox");const M5=xd&&navigator.userAgent.includes("Safari")&&!Pz,Rz={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};function zz(e){const{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:o,inputColor:a,inputColorDisabled:s,borderColor:l,warningColor:u,warningColorHover:c,errorColor:d,errorColorHover:f,borderRadius:h,lineHeight:p,fontSizeTiny:g,fontSizeSmall:b,fontSizeMedium:v,fontSizeLarge:_,heightTiny:y,heightSmall:x,heightMedium:S,heightLarge:$,actionColor:w,clearColor:T,clearColorHover:k,clearColorPressed:P,placeholderColor:R,placeholderColorDisabled:C,iconColor:E,iconColorDisabled:I,iconColorHover:z,iconColorPressed:j,fontWeight:Z}=e;return Object.assign(Object.assign({},Rz),{fontWeight:Z,countTextColorDisabled:r,countTextColor:n,heightTiny:y,heightSmall:x,heightMedium:S,heightLarge:$,fontSizeTiny:g,fontSizeSmall:b,fontSizeMedium:v,fontSizeLarge:_,lineHeight:p,lineHeightTextarea:p,borderRadius:h,iconSize:"16px",groupLabelColor:w,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:R,placeholderColorDisabled:C,color:a,colorDisabled:s,colorFocus:a,groupLabelBorder:`1px solid ${l}`,border:`1px solid ${l}`,borderHover:`1px solid ${o}`,borderDisabled:`1px solid ${l}`,borderFocus:`1px solid ${o}`,boxShadowFocus:`0 0 0 2px ${nt(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:u,borderWarning:`1px solid ${u}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 0 2px ${nt(u,{alpha:.2})}`,caretColorWarning:u,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:a,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${nt(d,{alpha:.2})}`,caretColorError:d,clearColor:T,clearColorHover:k,clearColorPressed:P,iconColor:E,iconColorDisabled:I,iconColorHover:z,iconColorPressed:j,suffixTextColor:t})}const yv={name:"Input",common:hn,self:zz},T5="n-input",Iz=W("input",`
|
|
817
817
|
max-width: 100%;
|
|
818
818
|
cursor: text;
|
|
819
819
|
line-height: 1.5;
|
|
@@ -1044,10 +1044,10 @@ ${t}
|
|
|
1044
1044
|
`,[Q("state-border",`
|
|
1045
1045
|
box-shadow: var(--n-box-shadow-focus-${e});
|
|
1046
1046
|
border: var(--n-border-focus-${e});
|
|
1047
|
-
`)])])]))]),
|
|
1047
|
+
`)])])]))]),Fz=W("input",[ge("disabled",[Q("input-el, textarea-el",`
|
|
1048
1048
|
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
1049
|
-
`)])]);function
|
|
1050
|
-
`)}else{const{value:gt}=u;gt&&(X?gt.textContent=X:gt.innerHTML=" ")}}function ke(){_e()}const Me=ne({top:"0"});function $e(X){var be;const{scrollTop:He}=X.target;Me.value.top=`${-He}px`,(be=p.value)===null||be===void 0||be.syncUnifiedContainer()}let ze=null;xr(()=>{const{autosize:X,type:be}=e;X&&be==="textarea"?ze=vt(x,He=>{!Array.isArray(He)&&He!==R&&ae(He)}):ze==null||ze()});let Je=null;xr(()=>{e.type==="textarea"?Je=vt(x,X=>{var be;!Array.isArray(X)&&X!==R&&((be=p.value)===null||be===void 0||be.syncUnifiedContainer())}):Je==null||Je()}),jn(M5,{mergedValueRef:x,maxlengthRef:oe,mergedClsPrefixRef:t,countGraphemesRef:et(e,"countGraphemes")});const Ne={wrapperElRef:a,inputElRef:c,textareaElRef:s,isCompositing:M,clear:Re,focus:F,blur:D,select:te,deactivate:se,activate:K,scrollTo:ue},ht=co("Input",i,t),Le=pe(()=>{const{value:X}=_,{common:{cubicBezierEaseInOut:be},self:{color:He,borderRadius:Te,textColor:gt,caretColor:De,caretColorError:ut,caretColorWarning:pn,textDecorationColor:Wt,border:vo,borderDisabled:bo,borderHover:Ss,borderFocus:hh,placeholderColor:ph,placeholderColorDisabled:gh,lineHeightTextarea:vh,colorDisabled:bh,colorFocus:xa,textColorDisabled:wa,boxShadowFocus:C4,iconSize:S4,colorFocusWarning:$4,boxShadowFocusWarning:k4,borderWarning:M4,borderFocusWarning:T4,borderHoverWarning:E4,colorFocusError:A4,boxShadowFocusError:P4,borderError:R4,borderFocusError:z4,borderHoverError:I4,clearSize:F4,clearColor:B4,clearColorHover:O4,clearColorPressed:N4,iconColor:L4,iconColorDisabled:D4,suffixTextColor:H4,countTextColor:U4,countTextColorDisabled:j4,iconColorHover:W4,iconColorPressed:V4,loadingColor:q4,loadingColorError:Y4,loadingColorWarning:G4,fontWeight:X4,[Se("padding",X)]:K4,[Se("fontSize",X)]:Z4,[Se("height",X)]:J4}}=o.value,{left:Q4,right:eS}=Kn(K4);return{"--n-bezier":be,"--n-count-text-color":U4,"--n-count-text-color-disabled":j4,"--n-color":He,"--n-font-size":Z4,"--n-font-weight":X4,"--n-border-radius":Te,"--n-height":J4,"--n-padding-left":Q4,"--n-padding-right":eS,"--n-text-color":gt,"--n-caret-color":De,"--n-text-decoration-color":Wt,"--n-border":vo,"--n-border-disabled":bo,"--n-border-hover":Ss,"--n-border-focus":hh,"--n-placeholder-color":ph,"--n-placeholder-color-disabled":gh,"--n-icon-size":S4,"--n-line-height-textarea":vh,"--n-color-disabled":bh,"--n-color-focus":xa,"--n-text-color-disabled":wa,"--n-box-shadow-focus":C4,"--n-loading-color":q4,"--n-caret-color-warning":pn,"--n-color-focus-warning":$4,"--n-box-shadow-focus-warning":k4,"--n-border-warning":M4,"--n-border-focus-warning":T4,"--n-border-hover-warning":E4,"--n-loading-color-warning":G4,"--n-caret-color-error":ut,"--n-color-focus-error":A4,"--n-box-shadow-focus-error":P4,"--n-border-error":R4,"--n-border-focus-error":z4,"--n-border-hover-error":I4,"--n-loading-color-error":Y4,"--n-clear-color":B4,"--n-clear-size":F4,"--n-clear-color-hover":O4,"--n-clear-color-pressed":N4,"--n-icon-color":L4,"--n-icon-color-hover":W4,"--n-icon-color-pressed":V4,"--n-icon-color-disabled":D4,"--n-suffix-text-color":H4}}),Be=r?Cn("input",pe(()=>{const{value:X}=_;return X[0]}),Le,e):void 0;return Object.assign(Object.assign({},Ne),{wrapperElRef:a,inputElRef:c,inputMirrorElRef:u,inputEl2Ref:d,textareaElRef:s,textareaMirrorElRef:l,textareaScrollbarInstRef:p,rtlEnabled:ht,uncontrolledValue:b,mergedValue:x,passwordVisible:J,mergedPlaceholder:C,showPlaceholder1:E,showPlaceholder2:I,mergedFocus:z,isComposing:M,activated:P,showClearButton:j,mergedSize:_,mergedDisabled:S,textDecorationStyle:ie,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Z,placeholderStyle:Me,mergedStatus:$,textAreaScrollContainerWidth:he,handleTextAreaScroll:$e,handleCompositionStart:le,handleCompositionEnd:q,handleInput:N,handleInputBlur:L,handleInputFocus:O,handleWrapperBlur:ee,handleWrapperFocus:U,handleMouseEnter:lt,handleMouseLeave:ft,handleMouseDown:rt,handleChange:V,handleClick:me,handleClear:Ae,handlePasswordToggleClick:zt,handlePasswordToggleMousedown:yt,handleWrapperKeydown:ye,handleWrapperKeyup:Lt,handleTextAreaMirrorResize:ke,getTextareaScrollContainer:()=>s.value,mergedTheme:o,cssVars:r?void 0:Le,themeClass:Be==null?void 0:Be.themeClass,onRender:Be==null?void 0:Be.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:o,countGraphemes:a,onRender:s}=this,l=this.$slots;return s==null||s(),k("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:o==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&o!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},k("div",{class:`${n}-input-wrapper`},Bt(l.prefix,u=>u&&k("div",{class:`${n}-input__prefix`},u)),o==="textarea"?k(vv,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var u,c;const{textAreaScrollContainerWidth:d}=this,f={width:this.autosize&&d&&`${d}px`};return k(Tt,null,k("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(u=this.inputProps)===null||u===void 0?void 0:u.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(c=this.inputProps)===null||c===void 0?void 0:c.style,f],onBlur:this.handleInputBlur,onFocus:h=>{this.handleInputFocus(h,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?k("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,f],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?k(Wi,{onResize:this.handleTextAreaMirrorResize},{default:()=>k("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):k("div",{class:`${n}-input__input`},k("input",Object.assign({type:o==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":o},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,0)},onInput:u=>{this.handleInput(u,0)},onChange:u=>{this.handleChange(u,0)}})),this.showPlaceholder1?k("div",{class:`${n}-input__placeholder`},k("span",null,this.mergedPlaceholder[0])):null,this.autosize?k("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Bt(l.suffix,u=>u||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?k("div",{class:`${n}-input__suffix`},[Bt(l["clear-icon-placeholder"],c=>(this.clearable||c)&&k($0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>c,icon:()=>{var d,f;return(f=(d=this.$slots)["clear-icon"])===null||f===void 0?void 0:f.call(d)}})),this.internalLoadingBeforeSuffix?null:u,this.loading!==void 0?k(C5,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?u:null,this.showCount&&this.type!=="textarea"?k(Z1,null,{default:c=>{var d;return(d=l.count)===null||d===void 0?void 0:d.call(l,c)}}):null,this.mergedShowPasswordOn&&this.type==="password"?k("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Ur(l["password-visible-icon"],()=>[k(Cr,{clsPrefix:n},{default:()=>k(JP,null)})]):Ur(l["password-invisible-icon"],()=>[k(Cr,{clsPrefix:n},{default:()=>k(QP,null)})])):null]):null)),this.pair?k("span",{class:`${n}-input__separator`},Ur(l.separator,()=>[this.separator])):null,this.pair?k("div",{class:`${n}-input-wrapper`},k("div",{class:`${n}-input__input`},k("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,1)},onInput:u=>{this.handleInput(u,1)},onChange:u=>{this.handleChange(u,1)}}),this.showPlaceholder2?k("div",{class:`${n}-input__placeholder`},k("span",null,this.mergedPlaceholder[1])):null),Bt(l.suffix,u=>(this.clearable||u)&&k("div",{class:`${n}-input__suffix`},[this.clearable&&k($0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var c;return(c=l["clear-icon"])===null||c===void 0?void 0:c.call(l)},placeholder:()=>{var c;return(c=l["clear-icon-placeholder"])===null||c===void 0?void 0:c.call(l)}}),u]))):null,this.mergedBordered?k("div",{class:`${n}-input__border`}):null,this.mergedBordered?k("div",{class:`${n}-input__state-border`}):null,this.showCount&&o==="textarea"?k(Z1,null,{default:u=>{var c;const{renderCount:d}=this;return d?d(u):(c=l.count)===null||c===void 0?void 0:c.call(l,u)}}):null)}}),Nz=W("input-group",`
|
|
1049
|
+
`)])]);function Bz(e){let t=0;for(const n of e)t++;return t}function tc(e){return e===""||e==null}function Oz(e){const t=ne(null);function n(){const{value:o}=e;if(!(o!=null&&o.focus)){i();return}const{selectionStart:a,selectionEnd:s,value:l}=o;if(a==null||s==null){i();return}t.value={start:a,end:s,beforeText:l.slice(0,a),afterText:l.slice(s)}}function r(){var o;const{value:a}=t,{value:s}=e;if(!a||!s)return;const{value:l}=s,{start:u,beforeText:c,afterText:d}=a;let f=l.length;if(l.endsWith(d))f=l.length-d.length;else if(l.startsWith(c))f=c.length;else{const h=c[u-1],p=l.indexOf(h,u-1);p!==-1&&(f=p+1)}(o=s.setSelectionRange)===null||o===void 0||o.call(s,f,f)}function i(){t.value=null}return vt(e,i),{recordCursor:n,restoreCursor:r}}const Z1=Ie({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:r,mergedClsPrefixRef:i,countGraphemesRef:o}=$t(T5),a=pe(()=>{const{value:s}=n;return s===null||Array.isArray(s)?0:(o.value||Bz)(s)});return()=>{const{value:s}=r,{value:l}=n;return M("span",{class:`${i.value}-input-word-count`},M9(t.default,{value:l===null||Array.isArray(l)?"":l},()=>[s===void 0?a.value:`${a.value} / ${s}`]))}}}),Nz=Object.assign(Object.assign({},pt.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),ts=Ie({name:"Input",props:Nz,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=rn(e),o=pt("Input","-input",Iz,yv,e,t);M5&&fa("-input-safari",Fz,t);const a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=Oz(f),p=ne(null),{localeRef:g}=_u("Input"),b=ne(e.defaultValue),v=et(e,"value"),_=Yr(v,b),y=aa(e),{mergedSizeRef:x,mergedDisabledRef:S,mergedStatusRef:$}=y,w=ne(!1),T=ne(!1),k=ne(!1),P=ne(!1);let R=null;const C=pe(()=>{const{placeholder:X,pair:be}=e;return be?Array.isArray(X)?X:X===void 0?["",""]:[X,X]:X===void 0?[g.value.placeholder]:[X]}),E=pe(()=>{const{value:X}=k,{value:be}=_,{value:He}=C;return!X&&(tc(be)||Array.isArray(be)&&tc(be[0]))&&He[0]}),I=pe(()=>{const{value:X}=k,{value:be}=_,{value:He}=C;return!X&&He[1]&&(tc(be)||Array.isArray(be)&&tc(be[1]))}),z=Ht(()=>e.internalForceFocus||w.value),j=Ht(()=>{if(S.value||e.readonly||!e.clearable||!z.value&&!T.value)return!1;const{value:X}=_,{value:be}=z;return e.pair?!!(Array.isArray(X)&&(X[0]||X[1]))&&(T.value||be):!!X&&(T.value||be)}),Z=pe(()=>{const{showPasswordOn:X}=e;if(X)return X;if(e.showPasswordToggle)return"click"}),J=ne(!1),ie=pe(()=>{const{textDecoration:X}=e;return X?Array.isArray(X)?X.map(be=>({textDecoration:be})):[{textDecoration:X}]:["",""]}),he=ne(void 0),_e=()=>{var X,be;if(e.type==="textarea"){const{autosize:He}=e;if(He&&(he.value=(be=(X=p.value)===null||X===void 0?void 0:X.$el)===null||be===void 0?void 0:be.offsetWidth),!s.value||typeof He=="boolean")return;const{paddingTop:Te,paddingBottom:gt,lineHeight:De}=window.getComputedStyle(s.value),ut=Number(Te.slice(0,-2)),pn=Number(gt.slice(0,-2)),Wt=Number(De.slice(0,-2)),{value:vo}=l;if(!vo)return;if(He.minRows){const bo=Math.max(He.minRows,1),Ss=`${ut+pn+Wt*bo}px`;vo.style.minHeight=Ss}if(He.maxRows){const bo=`${ut+pn+Wt*He.maxRows}px`;vo.style.maxHeight=bo}}},oe=pe(()=>{const{maxlength:X}=e;return X===void 0?void 0:Number(X)});dn(()=>{const{value:X}=_;Array.isArray(X)||ae(X)});const ve=ps().proxy;function we(X,be){const{onUpdateValue:He,"onUpdate:value":Te,onInput:gt}=e,{nTriggerFormInput:De}=y;He&&Ge(He,X,be),Te&&Ge(Te,X,be),gt&&Ge(gt,X,be),b.value=X,De()}function Oe(X,be){const{onChange:He}=e,{nTriggerFormChange:Te}=y;He&&Ge(He,X,be),b.value=X,Te()}function xe(X){const{onBlur:be}=e,{nTriggerFormBlur:He}=y;be&&Ge(be,X),He()}function Xe(X){const{onFocus:be}=e,{nTriggerFormFocus:He}=y;be&&Ge(be,X),He()}function Ve(X){const{onClear:be}=e;be&&Ge(be,X)}function fe(X){const{onInputBlur:be}=e;be&&Ge(be,X)}function Ee(X){const{onInputFocus:be}=e;be&&Ge(be,X)}function Pe(){const{onDeactivate:X}=e;X&&Ge(X)}function A(){const{onActivate:X}=e;X&&Ge(X)}function H(X){const{onClick:be}=e;be&&Ge(be,X)}function G(X){const{onWrapperFocus:be}=e;be&&Ge(be,X)}function de(X){const{onWrapperBlur:be}=e;be&&Ge(be,X)}function le(){k.value=!0}function q(X){k.value=!1,X.target===d.value?N(X,1):N(X,0)}function N(X,be=0,He="input"){const Te=X.target.value;if(ae(Te),X instanceof InputEvent&&!X.isComposing&&(k.value=!1),e.type==="textarea"){const{value:De}=p;De&&De.syncUnifiedContainer()}if(R=Te,k.value)return;h.recordCursor();const gt=re(Te);if(gt)if(!e.pair)He==="input"?we(Te,{source:be}):Oe(Te,{source:be});else{let{value:De}=_;Array.isArray(De)?De=[De[0],De[1]]:De=["",""],De[be]=Te,He==="input"?we(De,{source:be}):Oe(De,{source:be})}ve.$forceUpdate(),gt||fn(h.restoreCursor)}function re(X){const{countGraphemes:be,maxlength:He,minlength:Te}=e;if(be){let De;if(He!==void 0&&(De===void 0&&(De=be(X)),De>Number(He))||Te!==void 0&&(De===void 0&&(De=be(X)),De<Number(He)))return!1}const{allowInput:gt}=e;return typeof gt=="function"?gt(X):!0}function L(X){fe(X),X.relatedTarget===a.value&&Pe(),X.relatedTarget!==null&&(X.relatedTarget===c.value||X.relatedTarget===d.value||X.relatedTarget===s.value)||(P.value=!1),B(X,"blur"),f.value=null}function O(X,be){Ee(X),w.value=!0,P.value=!0,A(),B(X,"focus"),be===0?f.value=c.value:be===1?f.value=d.value:be===2&&(f.value=s.value)}function ee(X){e.passivelyActivated&&(de(X),B(X,"blur"))}function U(X){e.passivelyActivated&&(w.value=!0,G(X),B(X,"focus"))}function B(X,be){X.relatedTarget!==null&&(X.relatedTarget===c.value||X.relatedTarget===d.value||X.relatedTarget===s.value||X.relatedTarget===a.value)||(be==="focus"?(Xe(X),w.value=!0):be==="blur"&&(xe(X),w.value=!1))}function V(X,be){N(X,be,"change")}function me(X){H(X)}function Ae(X){Ve(X),Re()}function Re(){e.pair?(we(["",""],{source:"clear"}),Oe(["",""],{source:"clear"})):(we("",{source:"clear"}),Oe("",{source:"clear"}))}function rt(X){const{onMousedown:be}=e;be&&be(X);const{tagName:He}=X.target;if(He!=="INPUT"&&He!=="TEXTAREA"){if(e.resizable){const{value:Te}=a;if(Te){const{left:gt,top:De,width:ut,height:pn}=Te.getBoundingClientRect(),Wt=14;if(gt+ut-Wt<X.clientX&&X.clientX<gt+ut&&De+pn-Wt<X.clientY&&X.clientY<De+pn)return}}X.preventDefault(),w.value||F()}}function lt(){var X;T.value=!0,e.type==="textarea"&&((X=p.value)===null||X===void 0||X.handleMouseEnterWrapper())}function ft(){var X;T.value=!1,e.type==="textarea"&&((X=p.value)===null||X===void 0||X.handleMouseLeaveWrapper())}function zt(){S.value||Z.value==="click"&&(J.value=!J.value)}function yt(X){if(S.value)return;X.preventDefault();const be=Te=>{Te.preventDefault(),St("mouseup",document,be)};if(kt("mouseup",document,be),Z.value!=="mousedown")return;J.value=!0;const He=()=>{J.value=!1,St("mouseup",document,He)};kt("mouseup",document,He)}function Lt(X){e.onKeyup&&Ge(e.onKeyup,X)}function ye(X){switch(e.onKeydown&&Ge(e.onKeydown,X),X.key){case"Escape":m();break;case"Enter":Y(X);break}}function Y(X){var be,He;if(e.passivelyActivated){const{value:Te}=P;if(Te){e.internalDeactivateOnEnter&&m();return}X.preventDefault(),e.type==="textarea"?(be=s.value)===null||be===void 0||be.focus():(He=c.value)===null||He===void 0||He.focus()}}function m(){e.passivelyActivated&&(P.value=!1,fn(()=>{var X;(X=a.value)===null||X===void 0||X.focus()}))}function F(){var X,be,He;S.value||(e.passivelyActivated?(X=a.value)===null||X===void 0||X.focus():((be=s.value)===null||be===void 0||be.focus(),(He=c.value)===null||He===void 0||He.focus()))}function D(){var X;!((X=a.value)===null||X===void 0)&&X.contains(document.activeElement)&&document.activeElement.blur()}function te(){var X,be;(X=s.value)===null||X===void 0||X.select(),(be=c.value)===null||be===void 0||be.select()}function K(){S.value||(s.value?s.value.focus():c.value&&c.value.focus())}function se(){const{value:X}=a;X!=null&&X.contains(document.activeElement)&&X!==document.activeElement&&m()}function ue(X){if(e.type==="textarea"){const{value:be}=s;be==null||be.scrollTo(X)}else{const{value:be}=c;be==null||be.scrollTo(X)}}function ae(X){const{type:be,pair:He,autosize:Te}=e;if(!He&&Te)if(be==="textarea"){const{value:gt}=l;gt&&(gt.textContent=`${X??""}\r
|
|
1050
|
+
`)}else{const{value:gt}=u;gt&&(X?gt.textContent=X:gt.innerHTML=" ")}}function ke(){_e()}const Me=ne({top:"0"});function $e(X){var be;const{scrollTop:He}=X.target;Me.value.top=`${-He}px`,(be=p.value)===null||be===void 0||be.syncUnifiedContainer()}let ze=null;xr(()=>{const{autosize:X,type:be}=e;X&&be==="textarea"?ze=vt(_,He=>{!Array.isArray(He)&&He!==R&&ae(He)}):ze==null||ze()});let Je=null;xr(()=>{e.type==="textarea"?Je=vt(_,X=>{var be;!Array.isArray(X)&&X!==R&&((be=p.value)===null||be===void 0||be.syncUnifiedContainer())}):Je==null||Je()}),jn(T5,{mergedValueRef:_,maxlengthRef:oe,mergedClsPrefixRef:t,countGraphemesRef:et(e,"countGraphemes")});const Ne={wrapperElRef:a,inputElRef:c,textareaElRef:s,isCompositing:k,clear:Re,focus:F,blur:D,select:te,deactivate:se,activate:K,scrollTo:ue},ht=co("Input",i,t),Le=pe(()=>{const{value:X}=x,{common:{cubicBezierEaseInOut:be},self:{color:He,borderRadius:Te,textColor:gt,caretColor:De,caretColorError:ut,caretColorWarning:pn,textDecorationColor:Wt,border:vo,borderDisabled:bo,borderHover:Ss,borderFocus:hh,placeholderColor:ph,placeholderColorDisabled:gh,lineHeightTextarea:vh,colorDisabled:bh,colorFocus:xa,textColorDisabled:wa,boxShadowFocus:S4,iconSize:$4,colorFocusWarning:k4,boxShadowFocusWarning:M4,borderWarning:T4,borderFocusWarning:E4,borderHoverWarning:A4,colorFocusError:P4,boxShadowFocusError:R4,borderError:z4,borderFocusError:I4,borderHoverError:F4,clearSize:B4,clearColor:O4,clearColorHover:N4,clearColorPressed:L4,iconColor:D4,iconColorDisabled:H4,suffixTextColor:U4,countTextColor:j4,countTextColorDisabled:W4,iconColorHover:V4,iconColorPressed:q4,loadingColor:Y4,loadingColorError:G4,loadingColorWarning:X4,fontWeight:K4,[Se("padding",X)]:Z4,[Se("fontSize",X)]:J4,[Se("height",X)]:Q4}}=o.value,{left:eS,right:tS}=Kn(Z4);return{"--n-bezier":be,"--n-count-text-color":j4,"--n-count-text-color-disabled":W4,"--n-color":He,"--n-font-size":J4,"--n-font-weight":K4,"--n-border-radius":Te,"--n-height":Q4,"--n-padding-left":eS,"--n-padding-right":tS,"--n-text-color":gt,"--n-caret-color":De,"--n-text-decoration-color":Wt,"--n-border":vo,"--n-border-disabled":bo,"--n-border-hover":Ss,"--n-border-focus":hh,"--n-placeholder-color":ph,"--n-placeholder-color-disabled":gh,"--n-icon-size":$4,"--n-line-height-textarea":vh,"--n-color-disabled":bh,"--n-color-focus":xa,"--n-text-color-disabled":wa,"--n-box-shadow-focus":S4,"--n-loading-color":Y4,"--n-caret-color-warning":pn,"--n-color-focus-warning":k4,"--n-box-shadow-focus-warning":M4,"--n-border-warning":T4,"--n-border-focus-warning":E4,"--n-border-hover-warning":A4,"--n-loading-color-warning":X4,"--n-caret-color-error":ut,"--n-color-focus-error":P4,"--n-box-shadow-focus-error":R4,"--n-border-error":z4,"--n-border-focus-error":I4,"--n-border-hover-error":F4,"--n-loading-color-error":G4,"--n-clear-color":O4,"--n-clear-size":B4,"--n-clear-color-hover":N4,"--n-clear-color-pressed":L4,"--n-icon-color":D4,"--n-icon-color-hover":V4,"--n-icon-color-pressed":q4,"--n-icon-color-disabled":H4,"--n-suffix-text-color":U4}}),Be=r?Cn("input",pe(()=>{const{value:X}=x;return X[0]}),Le,e):void 0;return Object.assign(Object.assign({},Ne),{wrapperElRef:a,inputElRef:c,inputMirrorElRef:u,inputEl2Ref:d,textareaElRef:s,textareaMirrorElRef:l,textareaScrollbarInstRef:p,rtlEnabled:ht,uncontrolledValue:b,mergedValue:_,passwordVisible:J,mergedPlaceholder:C,showPlaceholder1:E,showPlaceholder2:I,mergedFocus:z,isComposing:k,activated:P,showClearButton:j,mergedSize:x,mergedDisabled:S,textDecorationStyle:ie,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Z,placeholderStyle:Me,mergedStatus:$,textAreaScrollContainerWidth:he,handleTextAreaScroll:$e,handleCompositionStart:le,handleCompositionEnd:q,handleInput:N,handleInputBlur:L,handleInputFocus:O,handleWrapperBlur:ee,handleWrapperFocus:U,handleMouseEnter:lt,handleMouseLeave:ft,handleMouseDown:rt,handleChange:V,handleClick:me,handleClear:Ae,handlePasswordToggleClick:zt,handlePasswordToggleMousedown:yt,handleWrapperKeydown:ye,handleWrapperKeyup:Lt,handleTextAreaMirrorResize:ke,getTextareaScrollContainer:()=>s.value,mergedTheme:o,cssVars:r?void 0:Le,themeClass:Be==null?void 0:Be.themeClass,onRender:Be==null?void 0:Be.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:o,countGraphemes:a,onRender:s}=this,l=this.$slots;return s==null||s(),M("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:o==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&o!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},M("div",{class:`${n}-input-wrapper`},Bt(l.prefix,u=>u&&M("div",{class:`${n}-input__prefix`},u)),o==="textarea"?M(vv,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var u,c;const{textAreaScrollContainerWidth:d}=this,f={width:this.autosize&&d&&`${d}px`};return M(Tt,null,M("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(u=this.inputProps)===null||u===void 0?void 0:u.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(c=this.inputProps)===null||c===void 0?void 0:c.style,f],onBlur:this.handleInputBlur,onFocus:h=>{this.handleInputFocus(h,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?M("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,f],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?M(Wi,{onResize:this.handleTextAreaMirrorResize},{default:()=>M("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):M("div",{class:`${n}-input__input`},M("input",Object.assign({type:o==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":o},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,0)},onInput:u=>{this.handleInput(u,0)},onChange:u=>{this.handleChange(u,0)}})),this.showPlaceholder1?M("div",{class:`${n}-input__placeholder`},M("span",null,this.mergedPlaceholder[0])):null,this.autosize?M("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Bt(l.suffix,u=>u||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?M("div",{class:`${n}-input__suffix`},[Bt(l["clear-icon-placeholder"],c=>(this.clearable||c)&&M($0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>c,icon:()=>{var d,f;return(f=(d=this.$slots)["clear-icon"])===null||f===void 0?void 0:f.call(d)}})),this.internalLoadingBeforeSuffix?null:u,this.loading!==void 0?M(S5,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?u:null,this.showCount&&this.type!=="textarea"?M(Z1,null,{default:c=>{var d;return(d=l.count)===null||d===void 0?void 0:d.call(l,c)}}):null,this.mergedShowPasswordOn&&this.type==="password"?M("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Ur(l["password-visible-icon"],()=>[M(Cr,{clsPrefix:n},{default:()=>M(QP,null)})]):Ur(l["password-invisible-icon"],()=>[M(Cr,{clsPrefix:n},{default:()=>M(eR,null)})])):null]):null)),this.pair?M("span",{class:`${n}-input__separator`},Ur(l.separator,()=>[this.separator])):null,this.pair?M("div",{class:`${n}-input-wrapper`},M("div",{class:`${n}-input__input`},M("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,1)},onInput:u=>{this.handleInput(u,1)},onChange:u=>{this.handleChange(u,1)}}),this.showPlaceholder2?M("div",{class:`${n}-input__placeholder`},M("span",null,this.mergedPlaceholder[1])):null),Bt(l.suffix,u=>(this.clearable||u)&&M("div",{class:`${n}-input__suffix`},[this.clearable&&M($0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var c;return(c=l["clear-icon"])===null||c===void 0?void 0:c.call(l)},placeholder:()=>{var c;return(c=l["clear-icon-placeholder"])===null||c===void 0?void 0:c.call(l)}}),u]))):null,this.mergedBordered?M("div",{class:`${n}-input__border`}):null,this.mergedBordered?M("div",{class:`${n}-input__state-border`}):null,this.showCount&&o==="textarea"?M(Z1,null,{default:u=>{var c;const{renderCount:d}=this;return d?d(u):(c=l.count)===null||c===void 0?void 0:c.call(l,u)}}):null)}}),Lz=W("input-group",`
|
|
1051
1051
|
display: inline-flex;
|
|
1052
1052
|
width: 100%;
|
|
1053
1053
|
flex-wrap: nowrap;
|
|
@@ -1102,7 +1102,7 @@ ${t}
|
|
|
1102
1102
|
`),Q("box-shadow, border, state-border",`
|
|
1103
1103
|
border-top-left-radius: 0!important;
|
|
1104
1104
|
border-bottom-left-radius: 0!important;
|
|
1105
|
-
`)])])])])])]),
|
|
1105
|
+
`)])])])])])]),Dz={},Hz=Ie({name:"InputGroup",props:Dz,setup(e){const{mergedClsPrefixRef:t}=rn(e);return fa("-input-group",Lz,t),{mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return M("div",{class:`${e}-input-group`},this.$slots)}});function pf(e){return e.type==="group"}function E5(e){return e.type==="ignored"}function Zh(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Uz(e,t){return{getIsGroup:pf,getIgnored:E5,getKey(n){return pf(n)?n.name||n.key||"key-required":n[e]},getChildren(n){return n[t]}}}function jz(e,t,n,r){if(!t)return e;function i(o){if(!Array.isArray(o))return[];const a=[];for(const s of o)if(pf(s)){const l=i(s[r]);l.length&&a.push(Object.assign({},s,{[r]:l}))}else{if(E5(s))continue;t(n,s)&&a.push(s)}return a}return i(e)}function Wz(e,t,n){const r=new Map;return e.forEach(i=>{pf(i)?i[n].forEach(o=>{r.set(o[t],o)}):r.set(i[t],i)}),r}function xo(e){return ir(e,[255,255,255,.16])}function nc(e){return ir(e,[0,0,0,.12])}const Vz="n-button-group",qz={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};function Yz(e){const{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadius:o,fontSizeTiny:a,fontSizeSmall:s,fontSizeMedium:l,fontSizeLarge:u,opacityDisabled:c,textColor2:d,textColor3:f,primaryColorHover:h,primaryColorPressed:p,borderColor:g,primaryColor:b,baseColor:v,infoColor:_,infoColorHover:y,infoColorPressed:x,successColor:S,successColorHover:$,successColorPressed:w,warningColor:T,warningColorHover:k,warningColorPressed:P,errorColor:R,errorColorHover:C,errorColorPressed:E,fontWeight:I,buttonColor2:z,buttonColor2Hover:j,buttonColor2Pressed:Z,fontWeightStrong:J}=e;return Object.assign(Object.assign({},qz),{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadiusTiny:o,borderRadiusSmall:o,borderRadiusMedium:o,borderRadiusLarge:o,fontSizeTiny:a,fontSizeSmall:s,fontSizeMedium:l,fontSizeLarge:u,opacityDisabled:c,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:z,colorSecondaryHover:j,colorSecondaryPressed:Z,colorTertiary:z,colorTertiaryHover:j,colorTertiaryPressed:Z,colorQuaternary:"#0000",colorQuaternaryHover:j,colorQuaternaryPressed:Z,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:d,textColorTertiary:f,textColorHover:h,textColorPressed:p,textColorFocus:h,textColorDisabled:d,textColorText:d,textColorTextHover:h,textColorTextPressed:p,textColorTextFocus:h,textColorTextDisabled:d,textColorGhost:d,textColorGhostHover:h,textColorGhostPressed:p,textColorGhostFocus:h,textColorGhostDisabled:d,border:`1px solid ${g}`,borderHover:`1px solid ${h}`,borderPressed:`1px solid ${p}`,borderFocus:`1px solid ${h}`,borderDisabled:`1px solid ${g}`,rippleColor:b,colorPrimary:b,colorHoverPrimary:h,colorPressedPrimary:p,colorFocusPrimary:h,colorDisabledPrimary:b,textColorPrimary:v,textColorHoverPrimary:v,textColorPressedPrimary:v,textColorFocusPrimary:v,textColorDisabledPrimary:v,textColorTextPrimary:b,textColorTextHoverPrimary:h,textColorTextPressedPrimary:p,textColorTextFocusPrimary:h,textColorTextDisabledPrimary:d,textColorGhostPrimary:b,textColorGhostHoverPrimary:h,textColorGhostPressedPrimary:p,textColorGhostFocusPrimary:h,textColorGhostDisabledPrimary:b,borderPrimary:`1px solid ${b}`,borderHoverPrimary:`1px solid ${h}`,borderPressedPrimary:`1px solid ${p}`,borderFocusPrimary:`1px solid ${h}`,borderDisabledPrimary:`1px solid ${b}`,rippleColorPrimary:b,colorInfo:_,colorHoverInfo:y,colorPressedInfo:x,colorFocusInfo:y,colorDisabledInfo:_,textColorInfo:v,textColorHoverInfo:v,textColorPressedInfo:v,textColorFocusInfo:v,textColorDisabledInfo:v,textColorTextInfo:_,textColorTextHoverInfo:y,textColorTextPressedInfo:x,textColorTextFocusInfo:y,textColorTextDisabledInfo:d,textColorGhostInfo:_,textColorGhostHoverInfo:y,textColorGhostPressedInfo:x,textColorGhostFocusInfo:y,textColorGhostDisabledInfo:_,borderInfo:`1px solid ${_}`,borderHoverInfo:`1px solid ${y}`,borderPressedInfo:`1px solid ${x}`,borderFocusInfo:`1px solid ${y}`,borderDisabledInfo:`1px solid ${_}`,rippleColorInfo:_,colorSuccess:S,colorHoverSuccess:$,colorPressedSuccess:w,colorFocusSuccess:$,colorDisabledSuccess:S,textColorSuccess:v,textColorHoverSuccess:v,textColorPressedSuccess:v,textColorFocusSuccess:v,textColorDisabledSuccess:v,textColorTextSuccess:S,textColorTextHoverSuccess:$,textColorTextPressedSuccess:w,textColorTextFocusSuccess:$,textColorTextDisabledSuccess:d,textColorGhostSuccess:S,textColorGhostHoverSuccess:$,textColorGhostPressedSuccess:w,textColorGhostFocusSuccess:$,textColorGhostDisabledSuccess:S,borderSuccess:`1px solid ${S}`,borderHoverSuccess:`1px solid ${$}`,borderPressedSuccess:`1px solid ${w}`,borderFocusSuccess:`1px solid ${$}`,borderDisabledSuccess:`1px solid ${S}`,rippleColorSuccess:S,colorWarning:T,colorHoverWarning:k,colorPressedWarning:P,colorFocusWarning:k,colorDisabledWarning:T,textColorWarning:v,textColorHoverWarning:v,textColorPressedWarning:v,textColorFocusWarning:v,textColorDisabledWarning:v,textColorTextWarning:T,textColorTextHoverWarning:k,textColorTextPressedWarning:P,textColorTextFocusWarning:k,textColorTextDisabledWarning:d,textColorGhostWarning:T,textColorGhostHoverWarning:k,textColorGhostPressedWarning:P,textColorGhostFocusWarning:k,textColorGhostDisabledWarning:T,borderWarning:`1px solid ${T}`,borderHoverWarning:`1px solid ${k}`,borderPressedWarning:`1px solid ${P}`,borderFocusWarning:`1px solid ${k}`,borderDisabledWarning:`1px solid ${T}`,rippleColorWarning:T,colorError:R,colorHoverError:C,colorPressedError:E,colorFocusError:C,colorDisabledError:R,textColorError:v,textColorHoverError:v,textColorPressedError:v,textColorFocusError:v,textColorDisabledError:v,textColorTextError:R,textColorTextHoverError:C,textColorTextPressedError:E,textColorTextFocusError:C,textColorTextDisabledError:d,textColorGhostError:R,textColorGhostHoverError:C,textColorGhostPressedError:E,textColorGhostFocusError:C,textColorGhostDisabledError:R,borderError:`1px solid ${R}`,borderHoverError:`1px solid ${C}`,borderPressedError:`1px solid ${E}`,borderFocusError:`1px solid ${C}`,borderDisabledError:`1px solid ${R}`,rippleColorError:R,waveOpacity:"0.6",fontWeight:I,fontWeightStrong:J})}const _v={name:"Button",common:hn,self:Yz},Gz=ce([W("button",`
|
|
1106
1106
|
margin: 0;
|
|
1107
1107
|
font-weight: var(--n-font-weight);
|
|
1108
1108
|
line-height: 1;
|
|
@@ -1171,7 +1171,7 @@ ${t}
|
|
|
1171
1171
|
display: flex;
|
|
1172
1172
|
align-items: center;
|
|
1173
1173
|
justify-content: center;
|
|
1174
|
-
`,[es({top:"50%",originalTransform:"translateY(-50%)"})]),
|
|
1174
|
+
`,[es({top:"50%",originalTransform:"translateY(-50%)"})]),_z()]),Q("content",`
|
|
1175
1175
|
display: flex;
|
|
1176
1176
|
align-items: center;
|
|
1177
1177
|
flex-wrap: nowrap;
|
|
@@ -1179,7 +1179,7 @@ ${t}
|
|
|
1179
1179
|
`,[ce("~",[Q("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),ge("block",`
|
|
1180
1180
|
display: flex;
|
|
1181
1181
|
width: 100%;
|
|
1182
|
-
`),ge("dashed",[Q("border, state-border",{borderStyle:"dashed !important"})]),ge("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),ce("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),ce("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),Gz=Object.assign(Object.assign({},pt.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!k5}}),Lr=Ie({name:"Button",props:Gz,setup(e){const t=ne(null),n=ne(null),r=ne(!1),i=Ht(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),o=$t(Wz,{}),{mergedSizeRef:a}=aa({},{defaultSize:"medium",mergedSize:_=>{const{size:S}=e;if(S)return S;const{size:$}=o;if($)return $;const{mergedSize:w}=_||{};return w?w.value:"medium"}}),s=pe(()=>e.focusable&&!e.disabled),l=_=>{var S;s.value||_.preventDefault(),!e.nativeFocusBehavior&&(_.preventDefault(),!e.disabled&&s.value&&((S=t.value)===null||S===void 0||S.focus({preventScroll:!0})))},u=_=>{var S;if(!e.disabled&&!e.loading){const{onClick:$}=e;$&&Ge($,_),e.text||(S=n.value)===null||S===void 0||S.play()}},c=_=>{switch(_.key){case"Enter":if(!e.keyboard)return;r.value=!1}},d=_=>{switch(_.key){case"Enter":if(!e.keyboard||e.loading){_.preventDefault();return}r.value=!0}},f=()=>{r.value=!1},{inlineThemeDisabled:h,mergedClsPrefixRef:p,mergedRtlRef:g}=rn(e),b=pt("Button","-button",Yz,_v,e,p),v=co("Button",g,p),x=pe(()=>{const _=b.value,{common:{cubicBezierEaseInOut:S,cubicBezierEaseOut:$},self:w}=_,{rippleDuration:T,opacityDisabled:M,fontWeight:P,fontWeightStrong:R}=w,C=a.value,{dashed:E,type:I,ghost:z,text:j,color:Z,round:J,circle:ie,textColor:he,secondary:_e,tertiary:oe,quaternary:ve,strong:we}=e,Oe={"--n-font-weight":we?R:P};let xe={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Xe=I==="tertiary",Ve=I==="default",fe=Xe?"default":I;if(j){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":L||w[Se("textColorText",fe)],"--n-text-color-hover":L?xo(L):w[Se("textColorTextHover",fe)],"--n-text-color-pressed":L?nc(L):w[Se("textColorTextPressed",fe)],"--n-text-color-focus":L?xo(L):w[Se("textColorTextHover",fe)],"--n-text-color-disabled":L||w[Se("textColorTextDisabled",fe)]}}else if(z||E){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Z||w[Se("rippleColor",fe)],"--n-text-color":L||w[Se("textColorGhost",fe)],"--n-text-color-hover":L?xo(L):w[Se("textColorGhostHover",fe)],"--n-text-color-pressed":L?nc(L):w[Se("textColorGhostPressed",fe)],"--n-text-color-focus":L?xo(L):w[Se("textColorGhostHover",fe)],"--n-text-color-disabled":L||w[Se("textColorGhostDisabled",fe)]}}else if(_e){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",fe)],O=Z||L,ee=I!=="default"&&I!=="tertiary";xe={"--n-color":ee?nt(O,{alpha:Number(w.colorOpacitySecondary)}):w.colorSecondary,"--n-color-hover":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-pressed":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryPressed)}):w.colorSecondaryPressed,"--n-color-focus":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-disabled":w.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":O,"--n-text-color-hover":O,"--n-text-color-pressed":O,"--n-text-color-focus":O,"--n-text-color-disabled":O}}else if(oe||ve){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",fe)],O=Z||L;oe?(xe["--n-color"]=w.colorTertiary,xe["--n-color-hover"]=w.colorTertiaryHover,xe["--n-color-pressed"]=w.colorTertiaryPressed,xe["--n-color-focus"]=w.colorSecondaryHover,xe["--n-color-disabled"]=w.colorTertiary):(xe["--n-color"]=w.colorQuaternary,xe["--n-color-hover"]=w.colorQuaternaryHover,xe["--n-color-pressed"]=w.colorQuaternaryPressed,xe["--n-color-focus"]=w.colorQuaternaryHover,xe["--n-color-disabled"]=w.colorQuaternary),xe["--n-ripple-color"]="#0000",xe["--n-text-color"]=O,xe["--n-text-color-hover"]=O,xe["--n-text-color-pressed"]=O,xe["--n-text-color-focus"]=O,xe["--n-text-color-disabled"]=O}else xe={"--n-color":Z||w[Se("color",fe)],"--n-color-hover":Z?xo(Z):w[Se("colorHover",fe)],"--n-color-pressed":Z?nc(Z):w[Se("colorPressed",fe)],"--n-color-focus":Z?xo(Z):w[Se("colorFocus",fe)],"--n-color-disabled":Z||w[Se("colorDisabled",fe)],"--n-ripple-color":Z||w[Se("rippleColor",fe)],"--n-text-color":he||(Z?w.textColorPrimary:Xe?w.textColorTertiary:w[Se("textColor",fe)]),"--n-text-color-hover":he||(Z?w.textColorHoverPrimary:w[Se("textColorHover",fe)]),"--n-text-color-pressed":he||(Z?w.textColorPressedPrimary:w[Se("textColorPressed",fe)]),"--n-text-color-focus":he||(Z?w.textColorFocusPrimary:w[Se("textColorFocus",fe)]),"--n-text-color-disabled":he||(Z?w.textColorDisabledPrimary:w[Se("textColorDisabled",fe)])};let Ee={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};j?Ee={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ee={"--n-border":w[Se("border",fe)],"--n-border-hover":w[Se("borderHover",fe)],"--n-border-pressed":w[Se("borderPressed",fe)],"--n-border-focus":w[Se("borderFocus",fe)],"--n-border-disabled":w[Se("borderDisabled",fe)]};const{[Se("height",C)]:Pe,[Se("fontSize",C)]:A,[Se("padding",C)]:H,[Se("paddingRound",C)]:G,[Se("iconSize",C)]:de,[Se("borderRadius",C)]:le,[Se("iconMargin",C)]:q,waveOpacity:N}=w,re={"--n-width":ie&&!j?Pe:"initial","--n-height":j?"initial":Pe,"--n-font-size":A,"--n-padding":ie||j?"initial":J?G:H,"--n-icon-size":de,"--n-icon-margin":q,"--n-border-radius":j?"initial":ie||J?Pe:le};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":S,"--n-bezier-ease-out":$,"--n-ripple-duration":T,"--n-opacity-disabled":M,"--n-wave-opacity":N},Oe),xe),Ee),re)}),y=h?Cn("button",pe(()=>{let _="";const{dashed:S,type:$,ghost:w,text:T,color:M,round:P,circle:R,textColor:C,secondary:E,tertiary:I,quaternary:z,strong:j}=e;S&&(_+="a"),w&&(_+="b"),T&&(_+="c"),P&&(_+="d"),R&&(_+="e"),E&&(_+="f"),I&&(_+="g"),z&&(_+="h"),j&&(_+="i"),M&&(_+=`j${af(M)}`),C&&(_+=`k${af(C)}`);const{value:Z}=a;return _+=`l${Z[0]}`,_+=`m${$[0]}`,_}),x,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:p,mergedFocusable:s,mergedSize:a,showBorder:i,enterPressed:r,rtlEnabled:v,handleMousedown:l,handleKeydown:d,handleBlur:f,handleKeyup:c,handleClick:u,customColorCssVars:pe(()=>{const{color:_}=e;if(!_)return null;const S=xo(_);return{"--n-border-color":_,"--n-border-color-hover":S,"--n-border-color-pressed":nc(_),"--n-border-color-focus":S,"--n-border-color-disabled":_}}),cssVars:h?void 0:x,themeClass:y==null?void 0:y.themeClass,onRender:y==null?void 0:y.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Bt(this.$slots.default,i=>i&&k("span",{class:`${e}-button__content`},i));return k(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,k(h5,{width:!0},{default:()=>Bt(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&k("span",{class:`${e}-button__icon`,style:{margin:ja(this.$slots.default)?"0":""}},k(Ad,null,{default:()=>this.loading?k(Pd,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):k("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:k(xz,{ref:"waveElRef",clsPrefix:e}),this.showBorder?k("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?k("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),J1=Lr;function Xz(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:o,borderColor:a,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:f,dividerColor:h}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:o,border:`1px solid ${a}`,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:f,dividerColor:h}}const Kz={common:hn,peers:{Input:yv,Button:_v},self:Xz};function Zz(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return"#000000"}function jl(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function Jz(e){return e=Math.round(e),e>=360?359:e<0?0:e}function Qz(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const eI={rgb:{hex(e){return ji(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...l0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...s0(t,n,r),i])}},hex:{rgb(e){return Hr(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...l0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...s0(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=Oo(e);return ji([...nf(t,n,r),i])},rgb(e){const[t,n,r,i]=Oo(e);return Hr([...nf(t,n,r),i])},hsv(e){const[t,n,r,i]=Oo(e);return No([...l2(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=Hi(e);return ji([...si(t,n,r),i])},rgb(e){const[t,n,r,i]=Hi(e);return Hr([...si(t,n,r),i])},hsl(e){const[t,n,r,i]=Hi(e);return Ui([...Ac(t,n,r),i])}}};function E5(e,t,n){return n=n||jl(e),n?n===t?e:eI[n][t](e):null}const Ps="12px",tI=12,wo="6px",nI=Ie({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){!t.value||!e.rgba||(kt("mousemove",document,r),kt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=(o.clientX-l)/(s-tI);e.onUpdateAlpha(Qz(u))}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,railBackgroundImage:pe(()=>{const{rgba:o}=e;return o?`linear-gradient(to right, rgba(${o[0]}, ${o[1]}, ${o[2]}, 0) 0%, rgba(${o[0]}, ${o[1]}, ${o[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:Ps,borderRadius:wo},onMousedown:this.handleMouseDown},k("div",{style:{borderRadius:wo,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},k("div",{class:`${e}-color-picker-checkboard`}),k("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&k("div",{style:{position:"absolute",left:wo,right:wo,top:0,bottom:0}},k("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${wo})`,borderRadius:wo,width:Ps,height:Ps}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:Hr(this.rgba),borderRadius:wo,width:Ps,height:Ps}}))))}}),xv="n-color-picker";function rI(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function iI(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function oI(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function aI(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function sI(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const lI={paddingSmall:"0 4px"},Q1=Ie({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=ne(""),{themeRef:n}=$t(xv,null);xr(()=>{t.value=r()});function r(){const{value:a}=e;if(a===null)return"";const{label:s}=e;return s==="HEX"?a:s==="A"?`${Math.floor(a*100)}%`:String(Math.floor(a))}function i(a){t.value=a}function o(a){let s,l;switch(e.label){case"HEX":l=aI(a),l&&e.onUpdateValue(a),t.value=r();break;case"H":s=iI(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=oI(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=sI(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=rI(a),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:o,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return k(ts,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:lI,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),uI=Ie({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?ji:bl)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?No:f0)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?Hr:c0)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?Ui:d0)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return k("div",{class:`${e}-color-picker-input`},k("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),k(Dz,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let o=null;try{o=r===null?null:(i?ji:bl)(r)}catch{}return k(Q1,{label:"HEX",showAlpha:i,value:o,onUpdateValue:a=>{this.handleUnitUpdateValue(0,a)}})}return(n+(i?"a":"")).split("").map((o,a)=>k(Q1,{label:o.toUpperCase(),value:r===null?null:r[a],onUpdateValue:s=>{this.handleUnitUpdateValue(a,s)}}))}}))}});function cI(e,t){if(t==="hsv"){const[n,r,i,o]=Hi(e);return Hr([...si(n,r,i),o])}return e}function fI(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const dI=Ie({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=pe(()=>e.swatches.map(o=>{const a=jl(o);return{value:o,mode:a,legalValue:cI(o,a)}}));function n(o){const{mode:a}=e;let{value:s,mode:l}=o;return l||(l="hex",/^[a-zA-Z]+$/.test(s)?s=fI(s):(sf("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),l===a?s:E5(s,a,l)}function r(o){e.onUpdateColor(n(o))}function i(o,a){o.key==="Enter"&&r(a)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>k("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},k("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),hI=Ie({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=$t(xv,null);return()=>{const{hsla:r,value:i,clsPrefix:o,onClick:a,disabled:s}=e,l=t.label||n.value;return k("div",{class:[`${o}-color-picker-trigger`,s&&`${o}-color-picker-trigger--disabled`],onClick:s?void 0:a},k("div",{class:`${o}-color-picker-trigger__fill`},k("div",{class:`${o}-color-picker-checkboard`}),k("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?Ui(r):""}}),i&&r?k("div",{class:`${o}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},l?l(i):i):null))}}}),pI=Ie({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=jl(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,E5(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-preview__preview`},k("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),k("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),ka="12px",gI=12,Co="6px",vI=6,bI="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",mI=Ie({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(kt("mousemove",document,r),kt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=Jz((o.clientX-l-vI)/(s-gI)*360);e.onUpdateHue(u)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-slider`,style:{height:ka,borderRadius:Co}},k("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:bI,height:ka,borderRadius:Co,position:"relative"},onMousedown:this.handleMouseDown},k("div",{style:{position:"absolute",left:Co,right:Co,top:0,bottom:0}},k("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${Co})`,borderRadius:Co,width:ka,height:ka}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:Co,width:ka,height:ka}})))))}}),rc="12px",ic="6px",yI=Ie({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(kt("mousemove",document,r),kt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,height:l,left:u,bottom:c}=a.getBoundingClientRect(),d=(c-o.clientY)/l,f=(o.clientX-u)/s,h=100*(f>1?1:f<0?0:f),p=100*(d>1?1:d<0?0:d);e.onUpdateSV(h,p)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{palleteRef:t,handleColor:pe(()=>{const{rgba:o}=e;return o?`rgb(${o[0]}, ${o[1]}, ${o[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},k("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),k("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&k("div",{class:`${e}-color-picker-handle`,style:{width:rc,height:rc,borderRadius:ic,left:`calc(${this.displayedSv[0]}% - ${ic})`,bottom:`calc(${this.displayedSv[1]}% - ${ic})`}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:ic,width:rc,height:rc}})))}}),_I=ce([W("color-picker",`
|
|
1182
|
+
`),ge("dashed",[Q("border, state-border",{borderStyle:"dashed !important"})]),ge("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),ce("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),ce("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),Xz=Object.assign(Object.assign({},pt.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!M5}}),Lr=Ie({name:"Button",props:Xz,setup(e){const t=ne(null),n=ne(null),r=ne(!1),i=Ht(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),o=$t(Vz,{}),{mergedSizeRef:a}=aa({},{defaultSize:"medium",mergedSize:x=>{const{size:S}=e;if(S)return S;const{size:$}=o;if($)return $;const{mergedSize:w}=x||{};return w?w.value:"medium"}}),s=pe(()=>e.focusable&&!e.disabled),l=x=>{var S;s.value||x.preventDefault(),!e.nativeFocusBehavior&&(x.preventDefault(),!e.disabled&&s.value&&((S=t.value)===null||S===void 0||S.focus({preventScroll:!0})))},u=x=>{var S;if(!e.disabled&&!e.loading){const{onClick:$}=e;$&&Ge($,x),e.text||(S=n.value)===null||S===void 0||S.play()}},c=x=>{switch(x.key){case"Enter":if(!e.keyboard)return;r.value=!1}},d=x=>{switch(x.key){case"Enter":if(!e.keyboard||e.loading){x.preventDefault();return}r.value=!0}},f=()=>{r.value=!1},{inlineThemeDisabled:h,mergedClsPrefixRef:p,mergedRtlRef:g}=rn(e),b=pt("Button","-button",Gz,_v,e,p),v=co("Button",g,p),_=pe(()=>{const x=b.value,{common:{cubicBezierEaseInOut:S,cubicBezierEaseOut:$},self:w}=x,{rippleDuration:T,opacityDisabled:k,fontWeight:P,fontWeightStrong:R}=w,C=a.value,{dashed:E,type:I,ghost:z,text:j,color:Z,round:J,circle:ie,textColor:he,secondary:_e,tertiary:oe,quaternary:ve,strong:we}=e,Oe={"--n-font-weight":we?R:P};let xe={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Xe=I==="tertiary",Ve=I==="default",fe=Xe?"default":I;if(j){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":L||w[Se("textColorText",fe)],"--n-text-color-hover":L?xo(L):w[Se("textColorTextHover",fe)],"--n-text-color-pressed":L?nc(L):w[Se("textColorTextPressed",fe)],"--n-text-color-focus":L?xo(L):w[Se("textColorTextHover",fe)],"--n-text-color-disabled":L||w[Se("textColorTextDisabled",fe)]}}else if(z||E){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Z||w[Se("rippleColor",fe)],"--n-text-color":L||w[Se("textColorGhost",fe)],"--n-text-color-hover":L?xo(L):w[Se("textColorGhostHover",fe)],"--n-text-color-pressed":L?nc(L):w[Se("textColorGhostPressed",fe)],"--n-text-color-focus":L?xo(L):w[Se("textColorGhostHover",fe)],"--n-text-color-disabled":L||w[Se("textColorGhostDisabled",fe)]}}else if(_e){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",fe)],O=Z||L,ee=I!=="default"&&I!=="tertiary";xe={"--n-color":ee?nt(O,{alpha:Number(w.colorOpacitySecondary)}):w.colorSecondary,"--n-color-hover":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-pressed":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryPressed)}):w.colorSecondaryPressed,"--n-color-focus":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-disabled":w.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":O,"--n-text-color-hover":O,"--n-text-color-pressed":O,"--n-text-color-focus":O,"--n-text-color-disabled":O}}else if(oe||ve){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",fe)],O=Z||L;oe?(xe["--n-color"]=w.colorTertiary,xe["--n-color-hover"]=w.colorTertiaryHover,xe["--n-color-pressed"]=w.colorTertiaryPressed,xe["--n-color-focus"]=w.colorSecondaryHover,xe["--n-color-disabled"]=w.colorTertiary):(xe["--n-color"]=w.colorQuaternary,xe["--n-color-hover"]=w.colorQuaternaryHover,xe["--n-color-pressed"]=w.colorQuaternaryPressed,xe["--n-color-focus"]=w.colorQuaternaryHover,xe["--n-color-disabled"]=w.colorQuaternary),xe["--n-ripple-color"]="#0000",xe["--n-text-color"]=O,xe["--n-text-color-hover"]=O,xe["--n-text-color-pressed"]=O,xe["--n-text-color-focus"]=O,xe["--n-text-color-disabled"]=O}else xe={"--n-color":Z||w[Se("color",fe)],"--n-color-hover":Z?xo(Z):w[Se("colorHover",fe)],"--n-color-pressed":Z?nc(Z):w[Se("colorPressed",fe)],"--n-color-focus":Z?xo(Z):w[Se("colorFocus",fe)],"--n-color-disabled":Z||w[Se("colorDisabled",fe)],"--n-ripple-color":Z||w[Se("rippleColor",fe)],"--n-text-color":he||(Z?w.textColorPrimary:Xe?w.textColorTertiary:w[Se("textColor",fe)]),"--n-text-color-hover":he||(Z?w.textColorHoverPrimary:w[Se("textColorHover",fe)]),"--n-text-color-pressed":he||(Z?w.textColorPressedPrimary:w[Se("textColorPressed",fe)]),"--n-text-color-focus":he||(Z?w.textColorFocusPrimary:w[Se("textColorFocus",fe)]),"--n-text-color-disabled":he||(Z?w.textColorDisabledPrimary:w[Se("textColorDisabled",fe)])};let Ee={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};j?Ee={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ee={"--n-border":w[Se("border",fe)],"--n-border-hover":w[Se("borderHover",fe)],"--n-border-pressed":w[Se("borderPressed",fe)],"--n-border-focus":w[Se("borderFocus",fe)],"--n-border-disabled":w[Se("borderDisabled",fe)]};const{[Se("height",C)]:Pe,[Se("fontSize",C)]:A,[Se("padding",C)]:H,[Se("paddingRound",C)]:G,[Se("iconSize",C)]:de,[Se("borderRadius",C)]:le,[Se("iconMargin",C)]:q,waveOpacity:N}=w,re={"--n-width":ie&&!j?Pe:"initial","--n-height":j?"initial":Pe,"--n-font-size":A,"--n-padding":ie||j?"initial":J?G:H,"--n-icon-size":de,"--n-icon-margin":q,"--n-border-radius":j?"initial":ie||J?Pe:le};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":S,"--n-bezier-ease-out":$,"--n-ripple-duration":T,"--n-opacity-disabled":k,"--n-wave-opacity":N},Oe),xe),Ee),re)}),y=h?Cn("button",pe(()=>{let x="";const{dashed:S,type:$,ghost:w,text:T,color:k,round:P,circle:R,textColor:C,secondary:E,tertiary:I,quaternary:z,strong:j}=e;S&&(x+="a"),w&&(x+="b"),T&&(x+="c"),P&&(x+="d"),R&&(x+="e"),E&&(x+="f"),I&&(x+="g"),z&&(x+="h"),j&&(x+="i"),k&&(x+=`j${af(k)}`),C&&(x+=`k${af(C)}`);const{value:Z}=a;return x+=`l${Z[0]}`,x+=`m${$[0]}`,x}),_,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:p,mergedFocusable:s,mergedSize:a,showBorder:i,enterPressed:r,rtlEnabled:v,handleMousedown:l,handleKeydown:d,handleBlur:f,handleKeyup:c,handleClick:u,customColorCssVars:pe(()=>{const{color:x}=e;if(!x)return null;const S=xo(x);return{"--n-border-color":x,"--n-border-color-hover":S,"--n-border-color-pressed":nc(x),"--n-border-color-focus":S,"--n-border-color-disabled":x}}),cssVars:h?void 0:_,themeClass:y==null?void 0:y.themeClass,onRender:y==null?void 0:y.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Bt(this.$slots.default,i=>i&&M("span",{class:`${e}-button__content`},i));return M(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,M(p5,{width:!0},{default:()=>Bt(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&M("span",{class:`${e}-button__icon`,style:{margin:ja(this.$slots.default)?"0":""}},M(Ad,null,{default:()=>this.loading?M(Pd,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):M("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:M(wz,{ref:"waveElRef",clsPrefix:e}),this.showBorder?M("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?M("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),J1=Lr;function Kz(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:o,borderColor:a,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:f,dividerColor:h}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:o,border:`1px solid ${a}`,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:f,dividerColor:h}}const Zz={common:hn,peers:{Input:yv,Button:_v},self:Kz};function Jz(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return"#000000"}function jl(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function Qz(e){return e=Math.round(e),e>=360?359:e<0?0:e}function eI(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const tI={rgb:{hex(e){return ji(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...l0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...s0(t,n,r),i])}},hex:{rgb(e){return Hr(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...l0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...s0(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=Oo(e);return ji([...nf(t,n,r),i])},rgb(e){const[t,n,r,i]=Oo(e);return Hr([...nf(t,n,r),i])},hsv(e){const[t,n,r,i]=Oo(e);return No([...u2(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=Hi(e);return ji([...li(t,n,r),i])},rgb(e){const[t,n,r,i]=Hi(e);return Hr([...li(t,n,r),i])},hsl(e){const[t,n,r,i]=Hi(e);return Ui([...Ac(t,n,r),i])}}};function A5(e,t,n){return n=n||jl(e),n?n===t?e:tI[n][t](e):null}const Ps="12px",nI=12,wo="6px",rI=Ie({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){!t.value||!e.rgba||(kt("mousemove",document,r),kt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=(o.clientX-l)/(s-nI);e.onUpdateAlpha(eI(u))}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,railBackgroundImage:pe(()=>{const{rgba:o}=e;return o?`linear-gradient(to right, rgba(${o[0]}, ${o[1]}, ${o[2]}, 0) 0%, rgba(${o[0]}, ${o[1]}, ${o[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return M("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:Ps,borderRadius:wo},onMousedown:this.handleMouseDown},M("div",{style:{borderRadius:wo,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},M("div",{class:`${e}-color-picker-checkboard`}),M("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&M("div",{style:{position:"absolute",left:wo,right:wo,top:0,bottom:0}},M("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${wo})`,borderRadius:wo,width:Ps,height:Ps}},M("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:Hr(this.rgba),borderRadius:wo,width:Ps,height:Ps}}))))}}),xv="n-color-picker";function iI(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function oI(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function aI(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function sI(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function lI(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const uI={paddingSmall:"0 4px"},Q1=Ie({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=ne(""),{themeRef:n}=$t(xv,null);xr(()=>{t.value=r()});function r(){const{value:a}=e;if(a===null)return"";const{label:s}=e;return s==="HEX"?a:s==="A"?`${Math.floor(a*100)}%`:String(Math.floor(a))}function i(a){t.value=a}function o(a){let s,l;switch(e.label){case"HEX":l=sI(a),l&&e.onUpdateValue(a),t.value=r();break;case"H":s=oI(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=aI(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=lI(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=iI(a),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:o,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return M(ts,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:uI,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),cI=Ie({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?ji:bl)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?No:f0)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?Hr:c0)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?Ui:d0)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return M("div",{class:`${e}-color-picker-input`},M("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),M(Hz,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let o=null;try{o=r===null?null:(i?ji:bl)(r)}catch{}return M(Q1,{label:"HEX",showAlpha:i,value:o,onUpdateValue:a=>{this.handleUnitUpdateValue(0,a)}})}return(n+(i?"a":"")).split("").map((o,a)=>M(Q1,{label:o.toUpperCase(),value:r===null?null:r[a],onUpdateValue:s=>{this.handleUnitUpdateValue(a,s)}}))}}))}});function fI(e,t){if(t==="hsv"){const[n,r,i,o]=Hi(e);return Hr([...li(n,r,i),o])}return e}function dI(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const hI=Ie({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=pe(()=>e.swatches.map(o=>{const a=jl(o);return{value:o,mode:a,legalValue:fI(o,a)}}));function n(o){const{mode:a}=e;let{value:s,mode:l}=o;return l||(l="hex",/^[a-zA-Z]+$/.test(s)?s=dI(s):(sf("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),l===a?s:A5(s,a,l)}function r(o){e.onUpdateColor(n(o))}function i(o,a){o.key==="Enter"&&r(a)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return M("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>M("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},M("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),pI=Ie({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=$t(xv,null);return()=>{const{hsla:r,value:i,clsPrefix:o,onClick:a,disabled:s}=e,l=t.label||n.value;return M("div",{class:[`${o}-color-picker-trigger`,s&&`${o}-color-picker-trigger--disabled`],onClick:s?void 0:a},M("div",{class:`${o}-color-picker-trigger__fill`},M("div",{class:`${o}-color-picker-checkboard`}),M("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?Ui(r):""}}),i&&r?M("div",{class:`${o}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},l?l(i):i):null))}}}),gI=Ie({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=jl(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,A5(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return M("div",{class:`${e}-color-picker-preview__preview`},M("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),M("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),ka="12px",vI=12,Co="6px",bI=6,mI="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",yI=Ie({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(kt("mousemove",document,r),kt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=Qz((o.clientX-l-bI)/(s-vI)*360);e.onUpdateHue(u)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return M("div",{class:`${e}-color-picker-slider`,style:{height:ka,borderRadius:Co}},M("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:mI,height:ka,borderRadius:Co,position:"relative"},onMousedown:this.handleMouseDown},M("div",{style:{position:"absolute",left:Co,right:Co,top:0,bottom:0}},M("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${Co})`,borderRadius:Co,width:ka,height:ka}},M("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:Co,width:ka,height:ka}})))))}}),rc="12px",ic="6px",_I=Ie({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(kt("mousemove",document,r),kt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,height:l,left:u,bottom:c}=a.getBoundingClientRect(),d=(c-o.clientY)/l,f=(o.clientX-u)/s,h=100*(f>1?1:f<0?0:f),p=100*(d>1?1:d<0?0:d);e.onUpdateSV(h,p)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{palleteRef:t,handleColor:pe(()=>{const{rgba:o}=e;return o?`rgb(${o[0]}, ${o[1]}, ${o[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return M("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},M("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),M("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&M("div",{class:`${e}-color-picker-handle`,style:{width:rc,height:rc,borderRadius:ic,left:`calc(${this.displayedSv[0]}% - ${ic})`,bottom:`calc(${this.displayedSv[1]}% - ${ic})`}},M("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:ic,width:rc,height:rc}})))}}),xI=ce([W("color-picker",`
|
|
1183
1183
|
display: inline-block;
|
|
1184
1184
|
box-sizing: border-box;
|
|
1185
1185
|
height: var(--n-height);
|
|
@@ -1359,7 +1359,7 @@ ${t}
|
|
|
1359
1359
|
background: inherit;
|
|
1360
1360
|
filter: blur(2px);
|
|
1361
1361
|
content: "";
|
|
1362
|
-
`)])])])])]),
|
|
1362
|
+
`)])])])])]),wI=Object.assign(Object.assign({},pt.props),{value:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,defaultValue:String,modes:{type:Array,default:()=>["rgb","hex","hsl"]},placement:{type:String,default:"bottom-start"},to:Pn.propTo,showAlpha:{type:Boolean,default:!0},showPreview:Boolean,swatches:Array,disabled:{type:Boolean,default:void 0},actions:{type:Array,default:null},internalActions:Array,size:String,renderLabel:Function,onComplete:Function,onConfirm:Function,onClear:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),CI=Ie({name:"ColorPicker",props:wI,setup(e,{slots:t}){const n=ne(null);let r=null;const i=aa(e),{mergedSizeRef:o,mergedDisabledRef:a}=i,{localeRef:s}=_u("global"),{mergedClsPrefixRef:l,namespaceRef:u,inlineThemeDisabled:c}=rn(e),d=pt("ColorPicker","-color-picker",xI,Zz,e,l);jn(xv,{themeRef:d,renderLabelRef:et(e,"renderLabel"),colorPickerSlots:t});const f=ne(e.defaultShow),h=Yr(et(e,"show"),f);function p(N){const{onUpdateShow:re,"onUpdate:show":L}=e;re&&Ge(re,N),L&&Ge(L,N),f.value=N}const{defaultValue:g}=e,b=ne(g===void 0?Jz(e.modes,e.showAlpha):g),v=Yr(et(e,"value"),b),_=ne([v.value]),y=ne(0),x=pe(()=>jl(v.value)),{modes:S}=e,$=ne(jl(v.value)||S[0]||"rgb");function w(){const{modes:N}=e,{value:re}=$,L=N.findIndex(O=>O===re);~L?$.value=N[(L+1)%N.length]:$.value="rgb"}let T,k,P,R,C,E,I,z;const j=pe(()=>{const{value:N}=v;if(!N)return null;switch(x.value){case"hsv":return Hi(N);case"hsl":return[T,k,P,z]=Oo(N),[...u2(T,k,P),z];case"rgb":case"hex":return[C,E,I,z]=en(N),[...s0(C,E,I),z]}}),Z=pe(()=>{const{value:N}=v;if(!N)return null;switch(x.value){case"rgb":case"hex":return en(N);case"hsv":return[T,k,R,z]=Hi(N),[...li(T,k,R),z];case"hsl":return[T,k,P,z]=Oo(N),[...nf(T,k,P),z]}}),J=pe(()=>{const{value:N}=v;if(!N)return null;switch(x.value){case"hsl":return Oo(N);case"hsv":return[T,k,R,z]=Hi(N),[...Ac(T,k,R),z];case"rgb":case"hex":return[C,E,I,z]=en(N),[...l0(C,E,I),z]}}),ie=pe(()=>{switch($.value){case"rgb":case"hex":return Z.value;case"hsv":return j.value;case"hsl":return J.value}}),he=ne(0),_e=ne(1),oe=ne([0,0]);function ve(N,re){const{value:L}=j,O=he.value,ee=L?L[3]:1;oe.value=[N,re];const{showAlpha:U}=e;switch($.value){case"hsv":xe((U?No:f0)([O,N,re,ee]),"cursor");break;case"hsl":xe((U?Ui:d0)([...Ac(O,N,re),ee]),"cursor");break;case"rgb":xe((U?Hr:c0)([...li(O,N,re),ee]),"cursor");break;case"hex":xe((U?ji:bl)([...li(O,N,re),ee]),"cursor");break}}function we(N){he.value=N;const{value:re}=j;if(!re)return;const[,L,O,ee]=re,{showAlpha:U}=e;switch($.value){case"hsv":xe((U?No:f0)([N,L,O,ee]),"cursor");break;case"rgb":xe((U?Hr:c0)([...li(N,L,O),ee]),"cursor");break;case"hex":xe((U?ji:bl)([...li(N,L,O),ee]),"cursor");break;case"hsl":xe((U?Ui:d0)([...Ac(N,L,O),ee]),"cursor");break}}function Oe(N){switch($.value){case"hsv":[T,k,R]=j.value,xe(No([T,k,R,N]),"cursor");break;case"rgb":[C,E,I]=Z.value,xe(Hr([C,E,I,N]),"cursor");break;case"hex":[C,E,I]=Z.value,xe(ji([C,E,I,N]),"cursor");break;case"hsl":[T,k,P]=J.value,xe(Ui([T,k,P,N]),"cursor");break}_e.value=N}function xe(N,re){re==="cursor"?r=N:r=null;const{nTriggerFormChange:L,nTriggerFormInput:O}=i,{onUpdateValue:ee,"onUpdate:value":U}=e;ee&&Ge(ee,N),U&&Ge(U,N),L(),O(),b.value=N}function Xe(N){xe(N,"input"),fn(Ve)}function Ve(N=!0){const{value:re}=v;if(re){const{nTriggerFormChange:L,nTriggerFormInput:O}=i,{onComplete:ee}=e;ee&&ee(re);const{value:U}=_,{value:B}=y;N&&(U.splice(B+1,U.length,re),y.value=B+1),L(),O()}}function fe(){const{value:N}=y;N-1<0||(xe(_.value[N-1],"input"),Ve(!1),y.value=N-1)}function Ee(){const{value:N}=y;N<0||N+1>=_.value.length||(xe(_.value[N+1],"input"),Ve(!1),y.value=N+1)}function Pe(){xe(null,"input");const{onClear:N}=e;N&&N(),p(!1)}function A(){const{value:N}=v,{onConfirm:re}=e;re&&re(N),p(!1)}const H=pe(()=>y.value>=1),G=pe(()=>{const{value:N}=_;return N.length>1&&y.value<N.length-1});vt(h,N=>{N||(_.value=[v.value],y.value=0)}),xr(()=>{if(!(r&&r===v.value)){const{value:N}=j;N&&(he.value=N[0],_e.value=N[3],oe.value=[N[1],N[2]])}r=null});const de=pe(()=>{const{value:N}=o,{common:{cubicBezierEaseInOut:re},self:{textColor:L,color:O,panelFontSize:ee,boxShadow:U,border:B,borderRadius:V,dividerColor:me,[Se("height",N)]:Ae,[Se("fontSize",N)]:Re}}=d.value;return{"--n-bezier":re,"--n-text-color":L,"--n-color":O,"--n-panel-font-size":ee,"--n-font-size":Re,"--n-box-shadow":U,"--n-border":B,"--n-border-radius":V,"--n-height":Ae,"--n-divider-color":me}}),le=c?Cn("color-picker",pe(()=>o.value[0]),de,e):void 0;function q(){var N;const{value:re}=Z,{value:L}=he,{internalActions:O,modes:ee,actions:U}=e,{value:B}=d,{value:V}=l;return M("div",{class:[`${V}-color-picker-panel`,le==null?void 0:le.themeClass.value],onDragstart:me=>{me.preventDefault()},style:c?void 0:de.value},M("div",{class:`${V}-color-picker-control`},M(_I,{clsPrefix:V,rgba:re,displayedHue:L,displayedSv:oe.value,onUpdateSV:ve,onComplete:Ve}),M("div",{class:`${V}-color-picker-preview`},M("div",{class:`${V}-color-picker-preview__sliders`},M(yI,{clsPrefix:V,hue:L,onUpdateHue:we,onComplete:Ve}),e.showAlpha?M(rI,{clsPrefix:V,rgba:re,alpha:_e.value,onUpdateAlpha:Oe,onComplete:Ve}):null),e.showPreview?M(gI,{clsPrefix:V,mode:$.value,color:Z.value&&bl(Z.value),onUpdateColor:me=>{xe(me,"input")}}):null),M(cI,{clsPrefix:V,showAlpha:e.showAlpha,mode:$.value,modes:ee,onUpdateMode:w,value:v.value,valueArr:ie.value,onUpdateValue:Xe}),((N=e.swatches)===null||N===void 0?void 0:N.length)&&M(hI,{clsPrefix:V,mode:$.value,swatches:e.swatches,onUpdateColor:me=>{xe(me,"input")}})),U!=null&&U.length?M("div",{class:`${V}-color-picker-action`},U.includes("confirm")&&M(Lr,{size:"small",onClick:A,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.confirm}),U.includes("clear")&&M(Lr,{size:"small",onClick:Pe,disabled:!v.value,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.clear})):null,t.action?M("div",{class:`${V}-color-picker-action`},{default:t.action}):O?M("div",{class:`${V}-color-picker-action`},O.includes("undo")&&M(Lr,{size:"small",onClick:fe,disabled:!H.value,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.undo}),O.includes("redo")&&M(Lr,{size:"small",onClick:Ee,disabled:!G.value,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.redo})):null)}return{mergedClsPrefix:l,namespace:u,selfRef:n,hsla:J,rgba:Z,mergedShow:h,mergedDisabled:a,isMounted:gs(),adjustedTo:Pn(e),mergedValue:v,handleTriggerClick(){p(!0)},handleClickOutside(N){var re;!((re=n.value)===null||re===void 0)&&re.contains(Qa(N))||p(!1)},renderPanel:q,cssVars:c?void 0:de,themeClass:le==null?void 0:le.themeClass,onRender:le==null?void 0:le.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),M("div",{class:[this.themeClass,`${t}-color-picker`],ref:"selfRef",style:this.cssVars},M(wd,null,{default:()=>[M(Cd,null,{default:()=>M(pI,{clsPrefix:t,value:this.mergedValue,hsla:this.hsla,disabled:this.mergedDisabled,onClick:this.handleTriggerClick},{label:e.label})}),M($d,{placement:this.placement,show:this.mergedShow,containerClass:this.namespace,teleportDisabled:this.adjustedTo===Pn.tdkey,to:this.adjustedTo},{default:()=>M(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?lo(this.renderPanel(),[[Ol,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function SI(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const $I={common:hn,peers:{InternalSelection:$5,InternalSelectMenu:_5},self:SI},kI=ce([W("select",`
|
|
1363
1363
|
z-index: auto;
|
|
1364
1364
|
outline: none;
|
|
1365
1365
|
width: 100%;
|
|
@@ -1368,7 +1368,7 @@ ${t}
|
|
|
1368
1368
|
`),W("select-menu",`
|
|
1369
1369
|
margin: 4px 0;
|
|
1370
1370
|
box-shadow: var(--n-menu-box-shadow);
|
|
1371
|
-
`,[Ul({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),kI=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),Rd=Ie({name:"Select",props:kI,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=rn(e),o=pt("Select","-select",$I,SI,e,t),a=ne(e.defaultValue),s=et(e,"value"),l=Yr(s,a),u=ne(!1),c=ne(""),d=rf(e,["items","options"]),f=ne([]),h=ne([]),p=pe(()=>h.value.concat(f.value).concat(d.value)),g=pe(()=>{const{filter:Y}=e;if(Y)return Y;const{labelField:m,valueField:F}=e;return(D,te)=>{if(!te)return!1;const K=te[m];if(typeof K=="string")return Zh(D,K);const se=te[F];return typeof se=="string"?Zh(D,se):typeof se=="number"?Zh(D,String(se)):!1}}),b=pe(()=>{if(e.remote)return d.value;{const{value:Y}=p,{value:m}=c;return!m.length||!e.filterable?Y:Uz(Y,g.value,m,e.childrenField)}}),v=pe(()=>{const{valueField:Y,childrenField:m}=e,F=Hz(Y,m);return UR(b.value,F)}),x=pe(()=>jz(p.value,e.valueField,e.childrenField)),y=ne(!1),_=Yr(et(e,"show"),y),S=ne(null),$=ne(null),w=ne(null),{localeRef:T}=_u("Select"),M=pe(()=>{var Y;return(Y=e.placeholder)!==null&&Y!==void 0?Y:T.value.placeholder}),P=[],R=ne(new Map),C=pe(()=>{const{fallbackOption:Y}=e;if(Y===void 0){const{labelField:m,valueField:F}=e;return D=>({[m]:String(D),[F]:D})}return Y===!1?!1:m=>Object.assign(Y(m),{value:m})});function E(Y){const m=e.remote,{value:F}=R,{value:D}=x,{value:te}=C,K=[];return Y.forEach(se=>{if(D.has(se))K.push(D.get(se));else if(m&&F.has(se))K.push(F.get(se));else if(te){const ue=te(se);ue&&K.push(ue)}}),K}const I=pe(()=>{if(e.multiple){const{value:Y}=l;return Array.isArray(Y)?E(Y):[]}return null}),z=pe(()=>{const{value:Y}=l;return!e.multiple&&!Array.isArray(Y)?Y===null?null:E([Y])[0]||null:null}),j=aa(e),{mergedSizeRef:Z,mergedDisabledRef:J,mergedStatusRef:ie}=j;function he(Y,m){const{onChange:F,"onUpdate:value":D,onUpdateValue:te}=e,{nTriggerFormChange:K,nTriggerFormInput:se}=j;F&&Ge(F,Y,m),te&&Ge(te,Y,m),D&&Ge(D,Y,m),a.value=Y,K(),se()}function _e(Y){const{onBlur:m}=e,{nTriggerFormBlur:F}=j;m&&Ge(m,Y),F()}function oe(){const{onClear:Y}=e;Y&&Ge(Y)}function ve(Y){const{onFocus:m,showOnFocus:F}=e,{nTriggerFormFocus:D}=j;m&&Ge(m,Y),D(),F&&Ve()}function we(Y){const{onSearch:m}=e;m&&Ge(m,Y)}function Oe(Y){const{onScroll:m}=e;m&&Ge(m,Y)}function xe(){var Y;const{remote:m,multiple:F}=e;if(m){const{value:D}=R;if(F){const{valueField:te}=e;(Y=I.value)===null||Y===void 0||Y.forEach(K=>{D.set(K[te],K)})}else{const te=z.value;te&&D.set(te[e.valueField],te)}}}function Xe(Y){const{onUpdateShow:m,"onUpdate:show":F}=e;m&&Ge(m,Y),F&&Ge(F,Y),y.value=Y}function Ve(){J.value||(Xe(!0),y.value=!0,e.filterable&&ft())}function fe(){Xe(!1)}function Ee(){c.value="",h.value=P}const Pe=ne(!1);function A(){e.filterable&&(Pe.value=!0)}function H(){e.filterable&&(Pe.value=!1,_.value||Ee())}function G(){J.value||(_.value?e.filterable?ft():fe():Ve())}function de(Y){var m,F;!((F=(m=w.value)===null||m===void 0?void 0:m.selfRef)===null||F===void 0)&&F.contains(Y.relatedTarget)||(u.value=!1,_e(Y),fe())}function le(Y){ve(Y),u.value=!0}function q(){u.value=!0}function N(Y){var m;!((m=S.value)===null||m===void 0)&&m.$el.contains(Y.relatedTarget)||(u.value=!1,_e(Y),fe())}function re(){var Y;(Y=S.value)===null||Y===void 0||Y.focus(),fe()}function L(Y){var m;_.value&&(!((m=S.value)===null||m===void 0)&&m.$el.contains(Qa(Y))||fe())}function O(Y){if(!Array.isArray(Y))return[];if(C.value)return Array.from(Y);{const{remote:m}=e,{value:F}=x;if(m){const{value:D}=R;return Y.filter(te=>F.has(te)||D.has(te))}else return Y.filter(D=>F.has(D))}}function ee(Y){U(Y.rawNode)}function U(Y){if(J.value)return;const{tag:m,remote:F,clearFilterAfterSelect:D,valueField:te}=e;if(m&&!F){const{value:K}=h,se=K[0]||null;if(se){const ue=f.value;ue.length?ue.push(se):f.value=[se],h.value=P}}if(F&&R.value.set(Y[te],Y),e.multiple){const K=O(l.value),se=K.findIndex(ue=>ue===Y[te]);if(~se){if(K.splice(se,1),m&&!F){const ue=B(Y[te]);~ue&&(f.value.splice(ue,1),D&&(c.value=""))}}else K.push(Y[te]),D&&(c.value="");he(K,E(K))}else{if(m&&!F){const K=B(Y[te]);~K?f.value=[f.value[K]]:f.value=P}lt(),fe(),he(Y[te],Y)}}function B(Y){return f.value.findIndex(m=>m[e.valueField]===Y)}function V(Y){_.value||Ve();const{value:m}=Y.target;c.value=m;const{tag:F,remote:D}=e;if(we(m),F&&!D){if(!m){h.value=P;return}const{onCreate:te}=e,K=te?te(m):{[e.labelField]:m,[e.valueField]:m},{valueField:se,labelField:ue}=e;d.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])||f.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])?h.value=P:h.value=[K]}}function me(Y){Y.stopPropagation();const{multiple:m}=e;!m&&e.filterable&&fe(),oe(),m?he([],[]):he(null,null)}function Ae(Y){!vl(Y,"action")&&!vl(Y,"empty")&&!vl(Y,"header")&&Y.preventDefault()}function Re(Y){Oe(Y)}function rt(Y){var m,F,D,te,K;if(!e.keyboard){Y.preventDefault();return}switch(Y.key){case" ":if(e.filterable)break;Y.preventDefault();case"Enter":if(!(!((m=S.value)===null||m===void 0)&&m.isComposing)){if(_.value){const se=(F=w.value)===null||F===void 0?void 0:F.getPendingTmNode();se?ee(se):e.filterable||(fe(),lt())}else if(Ve(),e.tag&&Pe.value){const se=h.value[0];if(se){const ue=se[e.valueField],{value:ae}=l;e.multiple&&Array.isArray(ae)&&ae.includes(ue)||U(se)}}}Y.preventDefault();break;case"ArrowUp":if(Y.preventDefault(),e.loading)return;_.value&&((D=w.value)===null||D===void 0||D.prev());break;case"ArrowDown":if(Y.preventDefault(),e.loading)return;_.value?(te=w.value)===null||te===void 0||te.next():Ve();break;case"Escape":_.value&&(C9(Y),fe()),(K=S.value)===null||K===void 0||K.focus();break}}function lt(){var Y;(Y=S.value)===null||Y===void 0||Y.focus()}function ft(){var Y;(Y=S.value)===null||Y===void 0||Y.focusInput()}function zt(){var Y;_.value&&((Y=$.value)===null||Y===void 0||Y.syncPosition())}xe(),vt(et(e,"options"),xe);const yt={focus:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.focus()},focusInput:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.focusInput()},blur:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.blur()},blurInput:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.blurInput()}},Lt=pe(()=>{const{self:{menuBoxShadow:Y}}=o.value;return{"--n-menu-box-shadow":Y}}),ye=i?Cn("select",void 0,Lt,e):void 0;return Object.assign(Object.assign({},yt),{mergedStatus:ie,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:v,isMounted:gs(),triggerRef:S,menuRef:w,pattern:c,uncontrolledShow:y,mergedShow:_,adjustedTo:Pn(e),uncontrolledValue:a,mergedValue:l,followerRef:$,localizedPlaceholder:M,selectedOption:z,selectedOptions:I,mergedSize:Z,mergedDisabled:J,focused:u,activeWithoutMenuOpen:Pe,inlineThemeDisabled:i,onTriggerInputFocus:A,onTriggerInputBlur:H,handleTriggerOrMenuResize:zt,handleMenuFocus:q,handleMenuBlur:N,handleMenuTabOut:re,handleTriggerClick:G,handleToggle:ee,handleDeleteOption:U,handlePatternInput:V,handleClear:me,handleTriggerBlur:de,handleTriggerFocus:le,handleKeydown:rt,handleMenuAfterLeave:Ee,handleMenuClickOutside:L,handleMenuScroll:Re,handleMenuKeydown:rt,handleMenuMousedown:Ae,mergedTheme:o,cssVars:i?void 0:Lt,themeClass:ye==null?void 0:ye.themeClass,onRender:ye==null?void 0:ye.onRender})},render(){return k("div",{class:`${this.mergedClsPrefix}-select`},k(wd,null,{default:()=>[k(Cd,null,{default:()=>k(mz,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),k($d,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Pn.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>k(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),lo(k(JR,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[yd,this.mergedShow],[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),MI={padding:"8px 14px"};function TI(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},MI),{borderRadius:t,boxShadow:n,color:ir(r,"rgba(0, 0, 0, .85)"),textColor:r})}const EI={common:hn,peers:{Popover:mv},self:TI},AI=Object.assign(Object.assign({},x5),pt.props),Wl=Ie({name:"Tooltip",props:AI,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=rn(e),n=pt("Tooltip","-tooltip",void 0,EI,e,t),r=ne(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(i){r.value.setShow(i)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:pe(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return k(w5,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function PI(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:o,opacity5:a}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:o,opacity5Depth:a}}const RI={common:hn,self:PI},zI=W("icon",`
|
|
1371
|
+
`,[Ul({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),MI=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),Rd=Ie({name:"Select",props:MI,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=rn(e),o=pt("Select","-select",kI,$I,e,t),a=ne(e.defaultValue),s=et(e,"value"),l=Yr(s,a),u=ne(!1),c=ne(""),d=rf(e,["items","options"]),f=ne([]),h=ne([]),p=pe(()=>h.value.concat(f.value).concat(d.value)),g=pe(()=>{const{filter:Y}=e;if(Y)return Y;const{labelField:m,valueField:F}=e;return(D,te)=>{if(!te)return!1;const K=te[m];if(typeof K=="string")return Zh(D,K);const se=te[F];return typeof se=="string"?Zh(D,se):typeof se=="number"?Zh(D,String(se)):!1}}),b=pe(()=>{if(e.remote)return d.value;{const{value:Y}=p,{value:m}=c;return!m.length||!e.filterable?Y:jz(Y,g.value,m,e.childrenField)}}),v=pe(()=>{const{valueField:Y,childrenField:m}=e,F=Uz(Y,m);return jR(b.value,F)}),_=pe(()=>Wz(p.value,e.valueField,e.childrenField)),y=ne(!1),x=Yr(et(e,"show"),y),S=ne(null),$=ne(null),w=ne(null),{localeRef:T}=_u("Select"),k=pe(()=>{var Y;return(Y=e.placeholder)!==null&&Y!==void 0?Y:T.value.placeholder}),P=[],R=ne(new Map),C=pe(()=>{const{fallbackOption:Y}=e;if(Y===void 0){const{labelField:m,valueField:F}=e;return D=>({[m]:String(D),[F]:D})}return Y===!1?!1:m=>Object.assign(Y(m),{value:m})});function E(Y){const m=e.remote,{value:F}=R,{value:D}=_,{value:te}=C,K=[];return Y.forEach(se=>{if(D.has(se))K.push(D.get(se));else if(m&&F.has(se))K.push(F.get(se));else if(te){const ue=te(se);ue&&K.push(ue)}}),K}const I=pe(()=>{if(e.multiple){const{value:Y}=l;return Array.isArray(Y)?E(Y):[]}return null}),z=pe(()=>{const{value:Y}=l;return!e.multiple&&!Array.isArray(Y)?Y===null?null:E([Y])[0]||null:null}),j=aa(e),{mergedSizeRef:Z,mergedDisabledRef:J,mergedStatusRef:ie}=j;function he(Y,m){const{onChange:F,"onUpdate:value":D,onUpdateValue:te}=e,{nTriggerFormChange:K,nTriggerFormInput:se}=j;F&&Ge(F,Y,m),te&&Ge(te,Y,m),D&&Ge(D,Y,m),a.value=Y,K(),se()}function _e(Y){const{onBlur:m}=e,{nTriggerFormBlur:F}=j;m&&Ge(m,Y),F()}function oe(){const{onClear:Y}=e;Y&&Ge(Y)}function ve(Y){const{onFocus:m,showOnFocus:F}=e,{nTriggerFormFocus:D}=j;m&&Ge(m,Y),D(),F&&Ve()}function we(Y){const{onSearch:m}=e;m&&Ge(m,Y)}function Oe(Y){const{onScroll:m}=e;m&&Ge(m,Y)}function xe(){var Y;const{remote:m,multiple:F}=e;if(m){const{value:D}=R;if(F){const{valueField:te}=e;(Y=I.value)===null||Y===void 0||Y.forEach(K=>{D.set(K[te],K)})}else{const te=z.value;te&&D.set(te[e.valueField],te)}}}function Xe(Y){const{onUpdateShow:m,"onUpdate:show":F}=e;m&&Ge(m,Y),F&&Ge(F,Y),y.value=Y}function Ve(){J.value||(Xe(!0),y.value=!0,e.filterable&&ft())}function fe(){Xe(!1)}function Ee(){c.value="",h.value=P}const Pe=ne(!1);function A(){e.filterable&&(Pe.value=!0)}function H(){e.filterable&&(Pe.value=!1,x.value||Ee())}function G(){J.value||(x.value?e.filterable?ft():fe():Ve())}function de(Y){var m,F;!((F=(m=w.value)===null||m===void 0?void 0:m.selfRef)===null||F===void 0)&&F.contains(Y.relatedTarget)||(u.value=!1,_e(Y),fe())}function le(Y){ve(Y),u.value=!0}function q(){u.value=!0}function N(Y){var m;!((m=S.value)===null||m===void 0)&&m.$el.contains(Y.relatedTarget)||(u.value=!1,_e(Y),fe())}function re(){var Y;(Y=S.value)===null||Y===void 0||Y.focus(),fe()}function L(Y){var m;x.value&&(!((m=S.value)===null||m===void 0)&&m.$el.contains(Qa(Y))||fe())}function O(Y){if(!Array.isArray(Y))return[];if(C.value)return Array.from(Y);{const{remote:m}=e,{value:F}=_;if(m){const{value:D}=R;return Y.filter(te=>F.has(te)||D.has(te))}else return Y.filter(D=>F.has(D))}}function ee(Y){U(Y.rawNode)}function U(Y){if(J.value)return;const{tag:m,remote:F,clearFilterAfterSelect:D,valueField:te}=e;if(m&&!F){const{value:K}=h,se=K[0]||null;if(se){const ue=f.value;ue.length?ue.push(se):f.value=[se],h.value=P}}if(F&&R.value.set(Y[te],Y),e.multiple){const K=O(l.value),se=K.findIndex(ue=>ue===Y[te]);if(~se){if(K.splice(se,1),m&&!F){const ue=B(Y[te]);~ue&&(f.value.splice(ue,1),D&&(c.value=""))}}else K.push(Y[te]),D&&(c.value="");he(K,E(K))}else{if(m&&!F){const K=B(Y[te]);~K?f.value=[f.value[K]]:f.value=P}lt(),fe(),he(Y[te],Y)}}function B(Y){return f.value.findIndex(m=>m[e.valueField]===Y)}function V(Y){x.value||Ve();const{value:m}=Y.target;c.value=m;const{tag:F,remote:D}=e;if(we(m),F&&!D){if(!m){h.value=P;return}const{onCreate:te}=e,K=te?te(m):{[e.labelField]:m,[e.valueField]:m},{valueField:se,labelField:ue}=e;d.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])||f.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])?h.value=P:h.value=[K]}}function me(Y){Y.stopPropagation();const{multiple:m}=e;!m&&e.filterable&&fe(),oe(),m?he([],[]):he(null,null)}function Ae(Y){!vl(Y,"action")&&!vl(Y,"empty")&&!vl(Y,"header")&&Y.preventDefault()}function Re(Y){Oe(Y)}function rt(Y){var m,F,D,te,K;if(!e.keyboard){Y.preventDefault();return}switch(Y.key){case" ":if(e.filterable)break;Y.preventDefault();case"Enter":if(!(!((m=S.value)===null||m===void 0)&&m.isComposing)){if(x.value){const se=(F=w.value)===null||F===void 0?void 0:F.getPendingTmNode();se?ee(se):e.filterable||(fe(),lt())}else if(Ve(),e.tag&&Pe.value){const se=h.value[0];if(se){const ue=se[e.valueField],{value:ae}=l;e.multiple&&Array.isArray(ae)&&ae.includes(ue)||U(se)}}}Y.preventDefault();break;case"ArrowUp":if(Y.preventDefault(),e.loading)return;x.value&&((D=w.value)===null||D===void 0||D.prev());break;case"ArrowDown":if(Y.preventDefault(),e.loading)return;x.value?(te=w.value)===null||te===void 0||te.next():Ve();break;case"Escape":x.value&&(S9(Y),fe()),(K=S.value)===null||K===void 0||K.focus();break}}function lt(){var Y;(Y=S.value)===null||Y===void 0||Y.focus()}function ft(){var Y;(Y=S.value)===null||Y===void 0||Y.focusInput()}function zt(){var Y;x.value&&((Y=$.value)===null||Y===void 0||Y.syncPosition())}xe(),vt(et(e,"options"),xe);const yt={focus:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.focus()},focusInput:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.focusInput()},blur:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.blur()},blurInput:()=>{var Y;(Y=S.value)===null||Y===void 0||Y.blurInput()}},Lt=pe(()=>{const{self:{menuBoxShadow:Y}}=o.value;return{"--n-menu-box-shadow":Y}}),ye=i?Cn("select",void 0,Lt,e):void 0;return Object.assign(Object.assign({},yt),{mergedStatus:ie,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:v,isMounted:gs(),triggerRef:S,menuRef:w,pattern:c,uncontrolledShow:y,mergedShow:x,adjustedTo:Pn(e),uncontrolledValue:a,mergedValue:l,followerRef:$,localizedPlaceholder:k,selectedOption:z,selectedOptions:I,mergedSize:Z,mergedDisabled:J,focused:u,activeWithoutMenuOpen:Pe,inlineThemeDisabled:i,onTriggerInputFocus:A,onTriggerInputBlur:H,handleTriggerOrMenuResize:zt,handleMenuFocus:q,handleMenuBlur:N,handleMenuTabOut:re,handleTriggerClick:G,handleToggle:ee,handleDeleteOption:U,handlePatternInput:V,handleClear:me,handleTriggerBlur:de,handleTriggerFocus:le,handleKeydown:rt,handleMenuAfterLeave:Ee,handleMenuClickOutside:L,handleMenuScroll:Re,handleMenuKeydown:rt,handleMenuMousedown:Ae,mergedTheme:o,cssVars:i?void 0:Lt,themeClass:ye==null?void 0:ye.themeClass,onRender:ye==null?void 0:ye.onRender})},render(){return M("div",{class:`${this.mergedClsPrefix}-select`},M(wd,null,{default:()=>[M(Cd,null,{default:()=>M(yz,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),M($d,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Pn.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>M(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),lo(M(QR,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[yd,this.mergedShow],[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),TI={padding:"8px 14px"};function EI(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},TI),{borderRadius:t,boxShadow:n,color:ir(r,"rgba(0, 0, 0, .85)"),textColor:r})}const AI={common:hn,peers:{Popover:mv},self:EI},PI=Object.assign(Object.assign({},w5),pt.props),Wl=Ie({name:"Tooltip",props:PI,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=rn(e),n=pt("Tooltip","-tooltip",void 0,AI,e,t),r=ne(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(i){r.value.setShow(i)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:pe(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return M(C5,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function RI(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:o,opacity5:a}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:o,opacity5Depth:a}}const zI={common:hn,self:RI},II=W("icon",`
|
|
1372
1372
|
height: 1em;
|
|
1373
1373
|
width: 1em;
|
|
1374
1374
|
line-height: 1em;
|
|
@@ -1377,13 +1377,13 @@ ${t}
|
|
|
1377
1377
|
position: relative;
|
|
1378
1378
|
fill: currentColor;
|
|
1379
1379
|
transform: translateZ(0);
|
|
1380
|
-
`,[ge("color-transition",{transition:"color .3s var(--n-bezier)"}),ge("depth",{color:"var(--n-color)"},[ce("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),ce("svg",{height:"1em",width:"1em"})]),
|
|
1380
|
+
`,[ge("color-transition",{transition:"color .3s var(--n-bezier)"}),ge("depth",{color:"var(--n-color)"},[ce("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),ce("svg",{height:"1em",width:"1em"})]),FI=Object.assign(Object.assign({},pt.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),mr=Ie({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:FI,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=rn(e),r=pt("Icon","-icon",II,zI,e,t),i=pe(()=>{const{depth:a}=e,{common:{cubicBezierEaseInOut:s},self:l}=r.value;if(a!==void 0){const{color:u,[`opacity${a}Depth`]:c}=l;return{"--n-bezier":s,"--n-color":u,"--n-opacity":c}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),o=n?Cn("icon",pe(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:pe(()=>{const{size:a,color:s}=e;return{fontSize:zc(a),color:s}}),cssVars:n?void 0:i,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender}},render(){var e;const{$parent:t,depth:n,mergedClsPrefix:r,component:i,onRender:o,themeClass:a}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&sf("icon","don't wrap `n-icon` inside `n-icon`"),o==null||o(),M("i",ia(this.$attrs,{role:"img",class:[`${r}-icon`,a,{[`${r}-icon--depth`]:n,[`${r}-icon--color-transition`]:n!==void 0}],style:[this.cssVars,this.mergedStyle]}),i?M(i):this.$slots)}});function BI(e){const{textColorDisabled:t}=e;return{iconColorDisabled:t}}const OI={common:hn,peers:{Button:_v,Input:yv},self:BI},NI={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};function LI(e){const t="rgba(0, 0, 0, .85)",n="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:r,primaryColor:i,baseColor:o,cardColor:a,modalColor:s,popoverColor:l,borderRadius:u,fontSize:c,opacityDisabled:d}=e;return Object.assign(Object.assign({},NI),{fontSize:c,markFontSize:c,railColor:r,railColorHover:r,fillColor:i,fillColorHover:i,opacityDisabled:d,handleColor:"#FFF",dotColor:a,dotColorModal:s,dotColorPopover:l,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:t,indicatorBoxShadow:n,indicatorTextColor:o,indicatorBorderRadius:u,dotBorder:`2px solid ${r}`,dotBorderActive:`2px solid ${i}`,dotBoxShadow:""})}const DI={common:hn,self:LI},HI={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};function UI(e){const{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},HI),{iconColor:i,textColor:"white",loadingColor:t,opacityDisabled:n,railColor:"rgba(0, 0, 0, .14)",railColorActive:t,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 0 2px ${nt(t,{alpha:.2})}`})}const jI={common:hn,self:UI},WI={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function VI(e){const{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:o,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:l,tabColor:u,baseColor:c,dividerColor:d,fontWeight:f,textColor1:h,borderRadius:p,fontSize:g,fontWeightStrong:b}=e;return Object.assign(Object.assign({},WI),{colorSegment:u,tabFontSizeCard:g,tabTextColorLine:h,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:h,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:h,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:h,tabTextColorHoverCard:h,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:o,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:l,closeBorderRadius:p,tabColor:u,tabColorSegment:c,tabBorderColor:d,tabFontWeightActive:f,tabFontWeight:f,tabBorderRadius:p,paneTextColor:t,fontWeightStrong:b})}const qI={common:hn,self:VI},YI=ce([W("input-number-suffix",`
|
|
1381
1381
|
display: inline-block;
|
|
1382
1382
|
margin-right: 10px;
|
|
1383
1383
|
`),W("input-number-prefix",`
|
|
1384
1384
|
display: inline-block;
|
|
1385
1385
|
margin-left: 10px;
|
|
1386
|
-
`)]);function
|
|
1386
|
+
`)]);function GI(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function XI(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e==="-"||e==="-0"}function Jh(e){return e==null?!0:!Number.isNaN(e)}function ey(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function Qh(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const ty=800,ny=100,KI=Object.assign(Object.assign({},pt.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),ZI=Ie({name:"InputNumber",props:KI,setup(e){const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r}=rn(e),i=pt("InputNumber","-input-number",YI,OI,e,n),{localeRef:o}=_u("InputNumber"),a=aa(e),{mergedSizeRef:s,mergedDisabledRef:l,mergedStatusRef:u}=a,c=ne(null),d=ne(null),f=ne(null),h=ne(e.defaultValue),p=et(e,"value"),g=Yr(p,h),b=ne(""),v=q=>{const N=String(q).split(".")[1];return N?N.length:0},_=q=>{const N=[e.min,e.max,e.step,q].map(re=>re===void 0?0:v(re));return Math.max(...N)},y=Ht(()=>{const{placeholder:q}=e;return q!==void 0?q:o.value.placeholder}),x=Ht(()=>{const q=Qh(e.step);return q!==null?q===0?1:Math.abs(q):1}),S=Ht(()=>{const q=Qh(e.min);return q!==null?q:null}),$=Ht(()=>{const q=Qh(e.max);return q!==null?q:null}),w=()=>{const{value:q}=g;if(Jh(q)){const{format:N,precision:re}=e;N?b.value=N(q):q===null||re===void 0||v(q)>re?b.value=ey(q,void 0):b.value=ey(q,re)}else b.value=String(q)};w();const T=q=>{const{value:N}=g;if(q===N){w();return}const{"onUpdate:value":re,onUpdateValue:L,onChange:O}=e,{nTriggerFormInput:ee,nTriggerFormChange:U}=a;O&&Ge(O,q),L&&Ge(L,q),re&&Ge(re,q),h.value=q,ee(),U()},k=({offset:q,doUpdateIfValid:N,fixPrecision:re,isInputing:L})=>{const{value:O}=b;if(L&&XI(O))return!1;const ee=(e.parse||GI)(O);if(ee===null)return N&&T(null),null;if(Jh(ee)){const U=v(ee),{precision:B}=e;if(B!==void 0&&B<U&&!re)return!1;let V=Number.parseFloat((ee+q).toFixed(B??_(ee)));if(Jh(V)){const{value:me}=$,{value:Ae}=S;if(me!==null&&V>me){if(!N||L)return!1;V=me}if(Ae!==null&&V<Ae){if(!N||L)return!1;V=Ae}return e.validator&&!e.validator(V)?!1:(N&&T(V),V)}}return!1},P=Ht(()=>k({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),R=Ht(()=>{const{value:q}=g;if(e.validator&&q===null)return!1;const{value:N}=x;return k({offset:-N,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),C=Ht(()=>{const{value:q}=g;if(e.validator&&q===null)return!1;const{value:N}=x;return k({offset:+N,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function E(q){const{onFocus:N}=e,{nTriggerFormFocus:re}=a;N&&Ge(N,q),re()}function I(q){var N,re;if(q.target===((N=c.value)===null||N===void 0?void 0:N.wrapperElRef))return;const L=k({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(L!==!1){const U=(re=c.value)===null||re===void 0?void 0:re.inputElRef;U&&(U.value=String(L||"")),g.value===L&&w()}else w();const{onBlur:O}=e,{nTriggerFormBlur:ee}=a;O&&Ge(O,q),ee(),fn(()=>{w()})}function z(q){const{onClear:N}=e;N&&Ge(N,q)}function j(){const{value:q}=C;if(!q){Ve();return}const{value:N}=g;if(N===null)e.validator||T(he());else{const{value:re}=x;k({offset:re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function Z(){const{value:q}=R;if(!q){xe();return}const{value:N}=g;if(N===null)e.validator||T(he());else{const{value:re}=x;k({offset:-re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const J=E,ie=I;function he(){if(e.validator)return null;const{value:q}=S,{value:N}=$;return q!==null?Math.max(0,q):N!==null?Math.min(0,N):0}function _e(q){z(q),T(null)}function oe(q){var N,re,L;!((N=f.value)===null||N===void 0)&&N.$el.contains(q.target)&&q.preventDefault(),!((re=d.value)===null||re===void 0)&&re.$el.contains(q.target)&&q.preventDefault(),(L=c.value)===null||L===void 0||L.activate()}let ve=null,we=null,Oe=null;function xe(){Oe&&(window.clearTimeout(Oe),Oe=null),ve&&(window.clearInterval(ve),ve=null)}let Xe=null;function Ve(){Xe&&(window.clearTimeout(Xe),Xe=null),we&&(window.clearInterval(we),we=null)}function fe(){xe(),Oe=window.setTimeout(()=>{ve=window.setInterval(()=>{Z()},ny)},ty),kt("mouseup",document,xe,{once:!0})}function Ee(){Ve(),Xe=window.setTimeout(()=>{we=window.setInterval(()=>{j()},ny)},ty),kt("mouseup",document,Ve,{once:!0})}const Pe=()=>{we||j()},A=()=>{ve||Z()};function H(q){var N,re;if(q.key==="Enter"){if(q.target===((N=c.value)===null||N===void 0?void 0:N.wrapperElRef))return;k({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((re=c.value)===null||re===void 0||re.deactivate())}else if(q.key==="ArrowUp"){if(!C.value||e.keyboard.ArrowUp===!1)return;q.preventDefault(),k({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&j()}else if(q.key==="ArrowDown"){if(!R.value||e.keyboard.ArrowDown===!1)return;q.preventDefault(),k({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Z()}}function G(q){b.value=q,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&k({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}vt(g,()=>{w()});const de={focus:()=>{var q;return(q=c.value)===null||q===void 0?void 0:q.focus()},blur:()=>{var q;return(q=c.value)===null||q===void 0?void 0:q.blur()},select:()=>{var q;return(q=c.value)===null||q===void 0?void 0:q.select()}},le=co("InputNumber",r,n);return Object.assign(Object.assign({},de),{rtlEnabled:le,inputInstRef:c,minusButtonInstRef:d,addButtonInstRef:f,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:h,mergedValue:g,mergedPlaceholder:y,displayedValueInvalid:P,mergedSize:s,mergedDisabled:l,displayedValue:b,addable:C,minusable:R,mergedStatus:u,handleFocus:J,handleBlur:ie,handleClear:_e,handleMouseDown:oe,handleAddClick:Pe,handleMinusClick:A,handleAddMousedown:Ee,handleMinusMousedown:fe,handleKeyDown:H,handleUpdateDisplayedValue:G,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:pe(()=>{const{self:{iconColorDisabled:q}}=i.value,[N,re,L,O]=en(q);return{textColorTextDisabled:`rgb(${N}, ${re}, ${L})`,opacityDisabled:`${O}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>M(J1,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>Ur(t["minus-icon"],()=>[M(Cr,{clsPrefix:e},{default:()=>M(nR,null)})])}),r=()=>M(J1,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>Ur(t["add-icon"],()=>[M(Cr,{clsPrefix:e},{default:()=>M(h5,null)})])});return M("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},M(ts,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var i;return this.showButton&&this.buttonPlacement==="both"?[n(),Bt(t.prefix,o=>o?M("span",{class:`${e}-input-number-prefix`},o):null)]:(i=t.prefix)===null||i===void 0?void 0:i.call(t)},suffix:()=>{var i;return this.showButton?[Bt(t.suffix,o=>o?M("span",{class:`${e}-input-number-suffix`},o):null),this.buttonPlacement==="right"?n():null,r()]:(i=t.suffix)===null||i===void 0?void 0:i.call(t)}}))}}),JI=ce([W("slider",`
|
|
1387
1387
|
display: block;
|
|
1388
1388
|
padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
|
|
1389
1389
|
position: relative;
|
|
@@ -1541,7 +1541,7 @@ ${t}
|
|
|
1541
1541
|
margin-top: 12px;
|
|
1542
1542
|
`),ge("left",`
|
|
1543
1543
|
margin-right: 12px;
|
|
1544
|
-
`),Ul()]),a7(W("slider",[W("slider-dot","background-color: var(--n-dot-color-modal);")])),s7(W("slider",[W("slider-dot","background-color: var(--n-dot-color-popover);")]))]);function ry(e){return window.TouchEvent&&e instanceof window.TouchEvent}function iy(){const e=new Map,t=n=>r=>{e.set(n,r)};return hw(()=>{e.clear()}),[e,t]}const JI=0,QI=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),eF=Ie({name:"Slider",props:QI,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=rn(e),i=pt("Slider","-slider",ZI,LI,e,t),o=ne(null),[a,s]=iy(),[l,u]=iy(),c=ne(new Set),d=aa(e),{mergedDisabledRef:f}=d,h=pe(()=>{const{step:U}=e;if(Number(U)<=0||U==="mark")return 0;const B=U.toString();let V=0;return B.includes(".")&&(V=B.length-B.indexOf(".")-1),V}),p=ne(e.defaultValue),g=et(e,"value"),b=Yr(g,p),v=pe(()=>{const{value:U}=b;return(e.range?U:[U]).map(oe)}),x=pe(()=>v.value.length>2),y=pe(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),_=pe(()=>{const{marks:U}=e;return U?Object.keys(U).map(Number.parseFloat):null}),S=ne(-1),$=ne(-1),w=ne(-1),T=ne(!1),M=ne(!1),P=pe(()=>{const{vertical:U,reverse:B}=e;return U?B?"top":"bottom":B?"right":"left"}),R=pe(()=>{if(x.value)return;const U=v.value,B=ve(e.range?Math.min(...U):e.min),V=ve(e.range?Math.max(...U):U[0]),{value:me}=P;return e.vertical?{[me]:`${B}%`,height:`${V-B}%`}:{[me]:`${B}%`,width:`${V-B}%`}}),C=pe(()=>{const U=[],{marks:B}=e;if(B){const V=v.value.slice();V.sort((lt,ft)=>lt-ft);const{value:me}=P,{value:Ae}=x,{range:Re}=e,rt=Ae?()=>!1:lt=>Re?lt>=V[0]&<<=V[V.length-1]:lt<=V[0];for(const lt of Object.keys(B)){const ft=Number(lt);U.push({active:rt(ft),key:ft,label:B[lt],style:{[me]:`${ve(ft)}%`}})}}return U});function E(U,B){const V=ve(U),{value:me}=P;return{[me]:`${V}%`,zIndex:B===S.value?1:0}}function I(U){return e.showTooltip||w.value===U||S.value===U&&T.value}function z(U){return T.value?!(S.value===U&&$.value===U):!0}function j(U){var B;~U&&(S.value=U,(B=a.get(U))===null||B===void 0||B.focus())}function Z(){l.forEach((U,B)=>{I(B)&&U.syncPosition()})}function J(U){const{"onUpdate:value":B,onUpdateValue:V}=e,{nTriggerFormInput:me,nTriggerFormChange:Ae}=d;V&&Ge(V,U),B&&Ge(B,U),p.value=U,me(),Ae()}function ie(U){const{range:B}=e;if(B){if(Array.isArray(U)){const{value:V}=v;U.join()!==V.join()&&J(U)}}else Array.isArray(U)||v.value[0]!==U&&J(U)}function he(U,B){if(e.range){const V=v.value.slice();V.splice(B,1,U),ie(V)}else ie(U)}function _e(U,B,V){const me=V!==void 0;V||(V=U-B>0?1:-1);const Ae=_.value||[],{step:Re}=e;if(Re==="mark"){const ft=xe(U,Ae.concat(B),me?V:void 0);return ft?ft.value:B}if(Re<=0)return B;const{value:rt}=h;let lt;if(me){const ft=Number((B/Re).toFixed(rt)),zt=Math.floor(ft),yt=ft>zt?zt:zt-1,Lt=ft<zt?zt:zt+1;lt=xe(B,[Number((yt*Re).toFixed(rt)),Number((Lt*Re).toFixed(rt)),...Ae],V)}else{const ft=Oe(U);lt=xe(U,[...Ae,ft])}return lt?oe(lt.value):B}function oe(U){return Math.min(e.max,Math.max(e.min,U))}function ve(U){const{max:B,min:V}=e;return(U-V)/(B-V)*100}function we(U){const{max:B,min:V}=e;return V+(B-V)*U}function Oe(U){const{step:B,min:V}=e;if(Number(B)<=0||B==="mark")return U;const me=Math.round((U-V)/B)*B+V;return Number(me.toFixed(h.value))}function xe(U,B=_.value,V){if(!(B!=null&&B.length))return null;let me=null,Ae=-1;for(;++Ae<B.length;){const Re=B[Ae]-U,rt=Math.abs(Re);(V===void 0||Re*V>0)&&(me===null||rt<me.distance)&&(me={index:Ae,distance:rt,value:B[Ae]})}return me}function Xe(U){const B=o.value;if(!B)return;const V=ry(U)?U.touches[0]:U,me=B.getBoundingClientRect();let Ae;return e.vertical?Ae=(me.bottom-V.clientY)/me.height:Ae=(V.clientX-me.left)/me.width,e.reverse&&(Ae=1-Ae),we(Ae)}function Ve(U){if(f.value||!e.keyboard)return;const{vertical:B,reverse:V}=e;switch(U.key){case"ArrowUp":U.preventDefault(),fe(B&&V?-1:1);break;case"ArrowRight":U.preventDefault(),fe(!B&&V?-1:1);break;case"ArrowDown":U.preventDefault(),fe(B&&V?1:-1);break;case"ArrowLeft":U.preventDefault(),fe(!B&&V?1:-1);break}}function fe(U){const B=S.value;if(B===-1)return;const{step:V}=e,me=v.value[B],Ae=Number(V)<=0||V==="mark"?me:me+V*U;he(_e(Ae,me,U>0?1:-1),B)}function Ee(U){var B,V;if(f.value||!ry(U)&&U.button!==JI)return;const me=Xe(U);if(me===void 0)return;const Ae=v.value.slice(),Re=e.range?(V=(B=xe(me,Ae))===null||B===void 0?void 0:B.index)!==null&&V!==void 0?V:-1:0;Re!==-1&&(U.preventDefault(),j(Re),Pe(),he(_e(me,v.value[Re]),Re))}function Pe(){T.value||(T.value=!0,e.onDragstart&&Ge(e.onDragstart),kt("touchend",document,G),kt("mouseup",document,G),kt("touchmove",document,H),kt("mousemove",document,H))}function A(){T.value&&(T.value=!1,e.onDragend&&Ge(e.onDragend),St("touchend",document,G),St("mouseup",document,G),St("touchmove",document,H),St("mousemove",document,H))}function H(U){const{value:B}=S;if(!T.value||B===-1){A();return}const V=Xe(U);V!==void 0&&he(_e(V,v.value[B]),B)}function G(){A()}function de(U){S.value=U,f.value||(w.value=U)}function le(U){S.value===U&&(S.value=-1,A()),w.value===U&&(w.value=-1)}function q(U){w.value=U}function N(U){w.value===U&&(w.value=-1)}vt(S,(U,B)=>void fn(()=>$.value=B)),vt(b,()=>{if(e.marks){if(M.value)return;M.value=!0,fn(()=>{M.value=!1})}fn(Z)}),Bn(()=>{A()});const re=pe(()=>{const{self:{markFontSize:U,railColor:B,railColorHover:V,fillColor:me,fillColorHover:Ae,handleColor:Re,opacityDisabled:rt,dotColor:lt,dotColorModal:ft,handleBoxShadow:zt,handleBoxShadowHover:yt,handleBoxShadowActive:Lt,handleBoxShadowFocus:ye,dotBorder:Y,dotBoxShadow:m,railHeight:F,railWidthVertical:D,handleSize:te,dotHeight:K,dotWidth:se,dotBorderRadius:ue,fontSize:ae,dotBorderActive:ke,dotColorPopover:Me},common:{cubicBezierEaseInOut:$e}}=i.value;return{"--n-bezier":$e,"--n-dot-border":Y,"--n-dot-border-active":ke,"--n-dot-border-radius":ue,"--n-dot-box-shadow":m,"--n-dot-color":lt,"--n-dot-color-modal":ft,"--n-dot-color-popover":Me,"--n-dot-height":K,"--n-dot-width":se,"--n-fill-color":me,"--n-fill-color-hover":Ae,"--n-font-size":ae,"--n-handle-box-shadow":zt,"--n-handle-box-shadow-active":Lt,"--n-handle-box-shadow-focus":ye,"--n-handle-box-shadow-hover":yt,"--n-handle-color":Re,"--n-handle-size":te,"--n-opacity-disabled":rt,"--n-rail-color":B,"--n-rail-color-hover":V,"--n-rail-height":F,"--n-rail-width-vertical":D,"--n-mark-font-size":U}}),L=r?Cn("slider",void 0,re,e):void 0,O=pe(()=>{const{self:{fontSize:U,indicatorColor:B,indicatorBoxShadow:V,indicatorTextColor:me,indicatorBorderRadius:Ae}}=i.value;return{"--n-font-size":U,"--n-indicator-border-radius":Ae,"--n-indicator-box-shadow":V,"--n-indicator-color":B,"--n-indicator-text-color":me}}),ee=r?Cn("slider-indicator",void 0,O,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:p,mergedValue:b,mergedDisabled:f,mergedPlacement:y,isMounted:gs(),adjustedTo:Pn(e),dotTransitionDisabled:M,markInfos:C,isShowTooltip:I,shouldKeepTooltipTransition:z,handleRailRef:o,setHandleRefs:s,setFollowerRefs:u,fillStyle:R,getHandleStyle:E,activeIndex:S,arrifiedValues:v,followerEnabledIndexSet:c,handleRailMouseDown:Ee,handleHandleFocus:de,handleHandleBlur:le,handleHandleMouseEnter:q,handleHandleMouseLeave:N,handleRailKeyDown:Ve,indicatorCssVars:r?void 0:O,indicatorThemeClass:ee==null?void 0:ee.themeClass,indicatorOnRender:ee==null?void 0:ee.onRender,cssVars:r?void 0:re,themeClass:L==null?void 0:L.themeClass,onRender:L==null?void 0:L.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),k("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},k("div",{class:`${t}-slider-rail`},k("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?k("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>k("div",{key:i.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,k("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,o)=>{const a=this.isShowTooltip(o);return k(wd,null,{default:()=>[k(Cd,null,{default:()=>k("div",{ref:this.setHandleRefs(o),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,o),onFocus:()=>{this.handleHandleFocus(o)},onBlur:()=>{this.handleHandleBlur(o)},onMouseenter:()=>{this.handleHandleMouseEnter(o)},onMouseleave:()=>{this.handleHandleMouseLeave(o)}},Ur(this.$slots.thumb,()=>[k("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&k($d,{ref:this.setFollowerRefs(o),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(o),teleportDisabled:this.adjustedTo===Pn.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>k(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(o),onEnter:()=>{this.followerEnabledIndexSet.add(o)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(o)}},{default:()=>{var s;return a?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),k("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?k("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>k("div",{key:i.key,class:`${t}-slider-mark`,style:i.style},typeof i.label=="function"?i.label():i.label))):null))}}),tF=W("switch",`
|
|
1544
|
+
`),Ul()]),s7(W("slider",[W("slider-dot","background-color: var(--n-dot-color-modal);")])),l7(W("slider",[W("slider-dot","background-color: var(--n-dot-color-popover);")]))]);function ry(e){return window.TouchEvent&&e instanceof window.TouchEvent}function iy(){const e=new Map,t=n=>r=>{e.set(n,r)};return pw(()=>{e.clear()}),[e,t]}const QI=0,eF=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),tF=Ie({name:"Slider",props:eF,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=rn(e),i=pt("Slider","-slider",JI,DI,e,t),o=ne(null),[a,s]=iy(),[l,u]=iy(),c=ne(new Set),d=aa(e),{mergedDisabledRef:f}=d,h=pe(()=>{const{step:U}=e;if(Number(U)<=0||U==="mark")return 0;const B=U.toString();let V=0;return B.includes(".")&&(V=B.length-B.indexOf(".")-1),V}),p=ne(e.defaultValue),g=et(e,"value"),b=Yr(g,p),v=pe(()=>{const{value:U}=b;return(e.range?U:[U]).map(oe)}),_=pe(()=>v.value.length>2),y=pe(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),x=pe(()=>{const{marks:U}=e;return U?Object.keys(U).map(Number.parseFloat):null}),S=ne(-1),$=ne(-1),w=ne(-1),T=ne(!1),k=ne(!1),P=pe(()=>{const{vertical:U,reverse:B}=e;return U?B?"top":"bottom":B?"right":"left"}),R=pe(()=>{if(_.value)return;const U=v.value,B=ve(e.range?Math.min(...U):e.min),V=ve(e.range?Math.max(...U):U[0]),{value:me}=P;return e.vertical?{[me]:`${B}%`,height:`${V-B}%`}:{[me]:`${B}%`,width:`${V-B}%`}}),C=pe(()=>{const U=[],{marks:B}=e;if(B){const V=v.value.slice();V.sort((lt,ft)=>lt-ft);const{value:me}=P,{value:Ae}=_,{range:Re}=e,rt=Ae?()=>!1:lt=>Re?lt>=V[0]&<<=V[V.length-1]:lt<=V[0];for(const lt of Object.keys(B)){const ft=Number(lt);U.push({active:rt(ft),key:ft,label:B[lt],style:{[me]:`${ve(ft)}%`}})}}return U});function E(U,B){const V=ve(U),{value:me}=P;return{[me]:`${V}%`,zIndex:B===S.value?1:0}}function I(U){return e.showTooltip||w.value===U||S.value===U&&T.value}function z(U){return T.value?!(S.value===U&&$.value===U):!0}function j(U){var B;~U&&(S.value=U,(B=a.get(U))===null||B===void 0||B.focus())}function Z(){l.forEach((U,B)=>{I(B)&&U.syncPosition()})}function J(U){const{"onUpdate:value":B,onUpdateValue:V}=e,{nTriggerFormInput:me,nTriggerFormChange:Ae}=d;V&&Ge(V,U),B&&Ge(B,U),p.value=U,me(),Ae()}function ie(U){const{range:B}=e;if(B){if(Array.isArray(U)){const{value:V}=v;U.join()!==V.join()&&J(U)}}else Array.isArray(U)||v.value[0]!==U&&J(U)}function he(U,B){if(e.range){const V=v.value.slice();V.splice(B,1,U),ie(V)}else ie(U)}function _e(U,B,V){const me=V!==void 0;V||(V=U-B>0?1:-1);const Ae=x.value||[],{step:Re}=e;if(Re==="mark"){const ft=xe(U,Ae.concat(B),me?V:void 0);return ft?ft.value:B}if(Re<=0)return B;const{value:rt}=h;let lt;if(me){const ft=Number((B/Re).toFixed(rt)),zt=Math.floor(ft),yt=ft>zt?zt:zt-1,Lt=ft<zt?zt:zt+1;lt=xe(B,[Number((yt*Re).toFixed(rt)),Number((Lt*Re).toFixed(rt)),...Ae],V)}else{const ft=Oe(U);lt=xe(U,[...Ae,ft])}return lt?oe(lt.value):B}function oe(U){return Math.min(e.max,Math.max(e.min,U))}function ve(U){const{max:B,min:V}=e;return(U-V)/(B-V)*100}function we(U){const{max:B,min:V}=e;return V+(B-V)*U}function Oe(U){const{step:B,min:V}=e;if(Number(B)<=0||B==="mark")return U;const me=Math.round((U-V)/B)*B+V;return Number(me.toFixed(h.value))}function xe(U,B=x.value,V){if(!(B!=null&&B.length))return null;let me=null,Ae=-1;for(;++Ae<B.length;){const Re=B[Ae]-U,rt=Math.abs(Re);(V===void 0||Re*V>0)&&(me===null||rt<me.distance)&&(me={index:Ae,distance:rt,value:B[Ae]})}return me}function Xe(U){const B=o.value;if(!B)return;const V=ry(U)?U.touches[0]:U,me=B.getBoundingClientRect();let Ae;return e.vertical?Ae=(me.bottom-V.clientY)/me.height:Ae=(V.clientX-me.left)/me.width,e.reverse&&(Ae=1-Ae),we(Ae)}function Ve(U){if(f.value||!e.keyboard)return;const{vertical:B,reverse:V}=e;switch(U.key){case"ArrowUp":U.preventDefault(),fe(B&&V?-1:1);break;case"ArrowRight":U.preventDefault(),fe(!B&&V?-1:1);break;case"ArrowDown":U.preventDefault(),fe(B&&V?1:-1);break;case"ArrowLeft":U.preventDefault(),fe(!B&&V?1:-1);break}}function fe(U){const B=S.value;if(B===-1)return;const{step:V}=e,me=v.value[B],Ae=Number(V)<=0||V==="mark"?me:me+V*U;he(_e(Ae,me,U>0?1:-1),B)}function Ee(U){var B,V;if(f.value||!ry(U)&&U.button!==QI)return;const me=Xe(U);if(me===void 0)return;const Ae=v.value.slice(),Re=e.range?(V=(B=xe(me,Ae))===null||B===void 0?void 0:B.index)!==null&&V!==void 0?V:-1:0;Re!==-1&&(U.preventDefault(),j(Re),Pe(),he(_e(me,v.value[Re]),Re))}function Pe(){T.value||(T.value=!0,e.onDragstart&&Ge(e.onDragstart),kt("touchend",document,G),kt("mouseup",document,G),kt("touchmove",document,H),kt("mousemove",document,H))}function A(){T.value&&(T.value=!1,e.onDragend&&Ge(e.onDragend),St("touchend",document,G),St("mouseup",document,G),St("touchmove",document,H),St("mousemove",document,H))}function H(U){const{value:B}=S;if(!T.value||B===-1){A();return}const V=Xe(U);V!==void 0&&he(_e(V,v.value[B]),B)}function G(){A()}function de(U){S.value=U,f.value||(w.value=U)}function le(U){S.value===U&&(S.value=-1,A()),w.value===U&&(w.value=-1)}function q(U){w.value=U}function N(U){w.value===U&&(w.value=-1)}vt(S,(U,B)=>void fn(()=>$.value=B)),vt(b,()=>{if(e.marks){if(k.value)return;k.value=!0,fn(()=>{k.value=!1})}fn(Z)}),Bn(()=>{A()});const re=pe(()=>{const{self:{markFontSize:U,railColor:B,railColorHover:V,fillColor:me,fillColorHover:Ae,handleColor:Re,opacityDisabled:rt,dotColor:lt,dotColorModal:ft,handleBoxShadow:zt,handleBoxShadowHover:yt,handleBoxShadowActive:Lt,handleBoxShadowFocus:ye,dotBorder:Y,dotBoxShadow:m,railHeight:F,railWidthVertical:D,handleSize:te,dotHeight:K,dotWidth:se,dotBorderRadius:ue,fontSize:ae,dotBorderActive:ke,dotColorPopover:Me},common:{cubicBezierEaseInOut:$e}}=i.value;return{"--n-bezier":$e,"--n-dot-border":Y,"--n-dot-border-active":ke,"--n-dot-border-radius":ue,"--n-dot-box-shadow":m,"--n-dot-color":lt,"--n-dot-color-modal":ft,"--n-dot-color-popover":Me,"--n-dot-height":K,"--n-dot-width":se,"--n-fill-color":me,"--n-fill-color-hover":Ae,"--n-font-size":ae,"--n-handle-box-shadow":zt,"--n-handle-box-shadow-active":Lt,"--n-handle-box-shadow-focus":ye,"--n-handle-box-shadow-hover":yt,"--n-handle-color":Re,"--n-handle-size":te,"--n-opacity-disabled":rt,"--n-rail-color":B,"--n-rail-color-hover":V,"--n-rail-height":F,"--n-rail-width-vertical":D,"--n-mark-font-size":U}}),L=r?Cn("slider",void 0,re,e):void 0,O=pe(()=>{const{self:{fontSize:U,indicatorColor:B,indicatorBoxShadow:V,indicatorTextColor:me,indicatorBorderRadius:Ae}}=i.value;return{"--n-font-size":U,"--n-indicator-border-radius":Ae,"--n-indicator-box-shadow":V,"--n-indicator-color":B,"--n-indicator-text-color":me}}),ee=r?Cn("slider-indicator",void 0,O,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:p,mergedValue:b,mergedDisabled:f,mergedPlacement:y,isMounted:gs(),adjustedTo:Pn(e),dotTransitionDisabled:k,markInfos:C,isShowTooltip:I,shouldKeepTooltipTransition:z,handleRailRef:o,setHandleRefs:s,setFollowerRefs:u,fillStyle:R,getHandleStyle:E,activeIndex:S,arrifiedValues:v,followerEnabledIndexSet:c,handleRailMouseDown:Ee,handleHandleFocus:de,handleHandleBlur:le,handleHandleMouseEnter:q,handleHandleMouseLeave:N,handleRailKeyDown:Ve,indicatorCssVars:r?void 0:O,indicatorThemeClass:ee==null?void 0:ee.themeClass,indicatorOnRender:ee==null?void 0:ee.onRender,cssVars:r?void 0:re,themeClass:L==null?void 0:L.themeClass,onRender:L==null?void 0:L.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),M("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},M("div",{class:`${t}-slider-rail`},M("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?M("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>M("div",{key:i.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,M("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,o)=>{const a=this.isShowTooltip(o);return M(wd,null,{default:()=>[M(Cd,null,{default:()=>M("div",{ref:this.setHandleRefs(o),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,o),onFocus:()=>{this.handleHandleFocus(o)},onBlur:()=>{this.handleHandleBlur(o)},onMouseenter:()=>{this.handleHandleMouseEnter(o)},onMouseleave:()=>{this.handleHandleMouseLeave(o)}},Ur(this.$slots.thumb,()=>[M("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&M($d,{ref:this.setFollowerRefs(o),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(o),teleportDisabled:this.adjustedTo===Pn.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>M(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(o),onEnter:()=>{this.followerEnabledIndexSet.add(o)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(o)}},{default:()=>{var s;return a?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),M("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?M("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>M("div",{key:i.key,class:`${t}-slider-mark`,style:i.style},typeof i.label=="function"?i.label():i.label))):null))}}),nF=W("switch",`
|
|
1545
1545
|
height: var(--n-height);
|
|
1546
1546
|
min-width: var(--n-width);
|
|
1547
1547
|
vertical-align: middle;
|
|
@@ -1642,7 +1642,7 @@ ${t}
|
|
|
1642
1642
|
`)]),ge("disabled",[Q("rail",`
|
|
1643
1643
|
cursor: not-allowed;
|
|
1644
1644
|
opacity: .5;
|
|
1645
|
-
`)])]),
|
|
1645
|
+
`)])]),rF=Object.assign(Object.assign({},pt.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let Rs;const P5=Ie({name:"Switch",props:rF,setup(e){Rs===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?Rs=CSS.supports("width","max(1px)"):Rs=!1:Rs=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=rn(e),r=pt("Switch","-switch",nF,jI,e,t),i=aa(e),{mergedSizeRef:o,mergedDisabledRef:a}=i,s=ne(e.defaultValue),l=et(e,"value"),u=Yr(l,s),c=pe(()=>u.value===e.checkedValue),d=ne(!1),f=ne(!1),h=pe(()=>{const{railStyle:T}=e;if(T)return T({focused:f.value,checked:c.value})});function p(T){const{"onUpdate:value":k,onChange:P,onUpdateValue:R}=e,{nTriggerFormInput:C,nTriggerFormChange:E}=i;k&&Ge(k,T),R&&Ge(R,T),P&&Ge(P,T),s.value=T,C(),E()}function g(){const{nTriggerFormFocus:T}=i;T()}function b(){const{nTriggerFormBlur:T}=i;T()}function v(){e.loading||a.value||(u.value!==e.checkedValue?p(e.checkedValue):p(e.uncheckedValue))}function _(){f.value=!0,g()}function y(){f.value=!1,b(),d.value=!1}function x(T){e.loading||a.value||T.key===" "&&(u.value!==e.checkedValue?p(e.checkedValue):p(e.uncheckedValue),d.value=!1)}function S(T){e.loading||a.value||T.key===" "&&(T.preventDefault(),d.value=!0)}const $=pe(()=>{const{value:T}=o,{self:{opacityDisabled:k,railColor:P,railColorActive:R,buttonBoxShadow:C,buttonColor:E,boxShadowFocus:I,loadingColor:z,textColor:j,iconColor:Z,[Se("buttonHeight",T)]:J,[Se("buttonWidth",T)]:ie,[Se("buttonWidthPressed",T)]:he,[Se("railHeight",T)]:_e,[Se("railWidth",T)]:oe,[Se("railBorderRadius",T)]:ve,[Se("buttonBorderRadius",T)]:we},common:{cubicBezierEaseInOut:Oe}}=r.value;let xe,Xe,Ve;return Rs?(xe=`calc((${_e} - ${J}) / 2)`,Xe=`max(${_e}, ${J})`,Ve=`max(${oe}, calc(${oe} + ${J} - ${_e}))`):(xe=Bi((kn(_e)-kn(J))/2),Xe=Bi(Math.max(kn(_e),kn(J))),Ve=kn(_e)>kn(J)?oe:Bi(kn(oe)+kn(J)-kn(_e))),{"--n-bezier":Oe,"--n-button-border-radius":we,"--n-button-box-shadow":C,"--n-button-color":E,"--n-button-width":ie,"--n-button-width-pressed":he,"--n-button-height":J,"--n-height":Xe,"--n-offset":xe,"--n-opacity-disabled":k,"--n-rail-border-radius":ve,"--n-rail-color":P,"--n-rail-color-active":R,"--n-rail-height":_e,"--n-rail-width":oe,"--n-width":Ve,"--n-box-shadow-focus":I,"--n-loading-color":z,"--n-text-color":j,"--n-icon-color":Z}}),w=n?Cn("switch",pe(()=>o.value[0]),$,e):void 0;return{handleClick:v,handleBlur:y,handleFocus:_,handleKeyup:x,handleKeydown:S,mergedRailStyle:h,pressed:d,mergedClsPrefix:t,mergedValue:u,checked:c,mergedDisabled:a,cssVars:n?void 0:$,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:r,onRender:i,$slots:o}=this;i==null||i();const{checked:a,unchecked:s,icon:l,"checked-icon":u,"unchecked-icon":c}=o,d=!(ja(l)&&ja(u)&&ja(c));return M("div",{role:"switch","aria-checked":n,class:[`${e}-switch`,this.themeClass,d&&`${e}-switch--icon`,n&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},M("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:r},Bt(a,f=>Bt(s,h=>f||h?M("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},M("div",{class:`${e}-switch__rail-placeholder`},M("div",{class:`${e}-switch__button-placeholder`}),f),M("div",{class:`${e}-switch__rail-placeholder`},M("div",{class:`${e}-switch__button-placeholder`}),h)):null)),M("div",{class:`${e}-switch__button`},Bt(l,f=>Bt(u,h=>Bt(c,p=>M(Ad,null,{default:()=>this.loading?M(Pd,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(h||f)?M("div",{class:`${e}-switch__button-icon`,key:h?"checked-icon":"icon"},h||f):!this.checked&&(p||f)?M("div",{class:`${e}-switch__button-icon`,key:p?"unchecked-icon":"icon"},p||f):null})))),Bt(a,f=>f&&M("div",{key:"checked",class:`${e}-switch__checked`},f)),Bt(s,f=>f&&M("div",{key:"unchecked",class:`${e}-switch__unchecked`},f)))))}}),wv="n-tabs",R5={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:"if"},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},oy=Ie({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:R5,setup(e){const t=$t(wv,null);return t||O2("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return M("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),iF=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},k9(R5,["displayDirective"])),M0=Ie({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:iF,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:i,tabStyleRef:o,addTabStyleRef:a,tabClassRef:s,addTabClassRef:l,tabChangeIdRef:u,onBeforeLeaveRef:c,triggerRef:d,handleAdd:f,activateTab:h,handleClose:p}=$t(wv);return{trigger:d,mergedClosable:pe(()=>{if(e.internalAddable)return!1;const{closable:g}=e;return g===void 0?i.value:g}),style:o,addStyle:a,tabClass:s,addTabClass:l,clsPrefix:t,value:n,type:r,handleClose(g){g.stopPropagation(),!e.disabled&&p(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){f();return}const{name:g}=e,b=++u.id;if(g!==n.value){const{value:v}=c;v?Promise.resolve(v(e.name,n.value)).then(_=>{_&&u.id===b&&h(g)}):h(g)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:i,tab:o,value:a,mergedClosable:s,trigger:l,$slots:{default:u}}=this,c=i??o;return M("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?M("div",{class:`${t}-tabs-tab-pad`}):null,M("div",Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},ia({class:[`${t}-tabs-tab`,a===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,s&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:l==="click"?this.activateTab:void 0,onMouseenter:l==="hover"?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),M("span",{class:`${t}-tabs-tab__label`},e?M(Tt,null,M("div",{class:`${t}-tabs-tab__height-placeholder`}," "),M(Cr,{clsPrefix:t},{default:()=>M(h5,null)})):u?u():typeof c=="object"?c:Io(c??n)),s&&this.type==="card"?M(gv,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),oF=W("tabs",`
|
|
1646
1646
|
box-sizing: border-box;
|
|
1647
1647
|
width: 100%;
|
|
1648
1648
|
display: flex;
|
|
@@ -1993,14 +1993,14 @@ ${t}
|
|
|
1993
1993
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1994
1994
|
`),W("tabs-pad",`
|
|
1995
1995
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1996
|
-
`)])])])]),oF=Object.assign(Object.assign({},pt.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),aF=Ie({name:"Tabs",props:oF,setup(e,{slots:t}){var n,r,i,o;const{mergedClsPrefixRef:a,inlineThemeDisabled:s}=rn(e),l=pt("Tabs","-tabs",iF,VI,e,a),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(null),g=ne(!0),b=ne(!0),v=rf(e,["labelSize","size"]),x=rf(e,["activeName","value"]),y=ne((r=(n=x.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(o=(i=Ua(t.default())[0])===null||i===void 0?void 0:i.props)===null||o===void 0?void 0:o.name:null),_=Yr(x,y),S={id:0},$=pe(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});vt(_,()=>{S.id=0,R(),C()});function w(){var L;const{value:O}=_;return O===null?null:(L=u.value)===null||L===void 0?void 0:L.querySelector(`[data-name="${O}"]`)}function T(L){if(e.type==="card")return;const{value:O}=c;if(!O)return;const ee=O.style.opacity==="0";if(L){const U=`${a.value}-tabs-bar--disabled`,{barWidth:B,placement:V}=e;if(L.dataset.disabled==="true"?O.classList.add(U):O.classList.remove(U),["top","bottom"].includes(V)){if(P(["top","maxHeight","height"]),typeof B=="number"&&L.offsetWidth>=B){const me=Math.floor((L.offsetWidth-B)/2)+L.offsetLeft;O.style.left=`${me}px`,O.style.maxWidth=`${B}px`}else O.style.left=`${L.offsetLeft}px`,O.style.maxWidth=`${L.offsetWidth}px`;O.style.width="8192px",ee&&(O.style.transition="none"),O.offsetWidth,ee&&(O.style.transition="",O.style.opacity="1")}else{if(P(["left","maxWidth","width"]),typeof B=="number"&&L.offsetHeight>=B){const me=Math.floor((L.offsetHeight-B)/2)+L.offsetTop;O.style.top=`${me}px`,O.style.maxHeight=`${B}px`}else O.style.top=`${L.offsetTop}px`,O.style.maxHeight=`${L.offsetHeight}px`;O.style.height="8192px",ee&&(O.style.transition="none"),O.offsetHeight,ee&&(O.style.transition="",O.style.opacity="1")}}}function M(){if(e.type==="card")return;const{value:L}=c;L&&(L.style.opacity="0")}function P(L){const{value:O}=c;if(O)for(const ee of L)O.style[ee]=""}function R(){if(e.type==="card")return;const L=w();L?T(L):M()}function C(){var L;const O=(L=h.value)===null||L===void 0?void 0:L.$el;if(!O)return;const ee=w();if(!ee)return;const{scrollLeft:U,offsetWidth:B}=O,{offsetLeft:V,offsetWidth:me}=ee;U>V?O.scrollTo({top:0,left:V,behavior:"smooth"}):V+me>U+B&&O.scrollTo({top:0,left:V+me-B,behavior:"smooth"})}const E=ne(null);let I=0,z=null;function j(L){const O=E.value;if(O){I=L.getBoundingClientRect().height;const ee=`${I}px`,U=()=>{O.style.height=ee,O.style.maxHeight=ee};z?(U(),z(),z=null):z=U}}function Z(L){const O=E.value;if(O){const ee=L.getBoundingClientRect().height,U=()=>{document.body.offsetHeight,O.style.maxHeight=`${ee}px`,O.style.height=`${Math.max(I,ee)}px`};z?(z(),z=null,U()):z=U}}function J(){const L=E.value;if(L){L.style.maxHeight="",L.style.height="";const{paneWrapperStyle:O}=e;if(typeof O=="string")L.style.cssText=O;else if(O){const{maxHeight:ee,height:U}=O;ee!==void 0&&(L.style.maxHeight=ee),U!==void 0&&(L.style.height=U)}}}const ie={value:[]},he=ne("next");function _e(L){const O=_.value;let ee="next";for(const U of ie.value){if(U===O)break;if(U===L){ee="prev";break}}he.value=ee,oe(L)}function oe(L){const{onActiveNameChange:O,onUpdateValue:ee,"onUpdate:value":U}=e;O&&Ge(O,L),ee&&Ge(ee,L),U&&Ge(U,L),y.value=L}function ve(L){const{onClose:O}=e;O&&Ge(O,L)}function we(){const{value:L}=c;if(!L)return;const O="transition-disabled";L.classList.add(O),R(),L.classList.remove(O)}const Oe=ne(null);function xe({transitionDisabled:L}){const O=u.value;if(!O)return;L&&O.classList.add("transition-disabled");const ee=w();ee&&Oe.value&&(Oe.value.style.width=`${ee.offsetWidth}px`,Oe.value.style.height=`${ee.offsetHeight}px`,Oe.value.style.transform=`translateX(${ee.offsetLeft-kn(getComputedStyle(O).paddingLeft)}px)`,L&&Oe.value.offsetWidth),L&&O.classList.remove("transition-disabled")}vt([_],()=>{e.type==="segment"&&fn(()=>{xe({transitionDisabled:!1})})}),dn(()=>{e.type==="segment"&&xe({transitionDisabled:!0})});let Xe=0;function Ve(L){var O;if(L.contentRect.width===0&&L.contentRect.height===0||Xe===L.contentRect.width)return;Xe=L.contentRect.width;const{type:ee}=e;if((ee==="line"||ee==="bar")&&we(),ee!=="segment"){const{placement:U}=e;G((U==="top"||U==="bottom"?(O=h.value)===null||O===void 0?void 0:O.$el:p.value)||null)}}const fe=Wh(Ve,64);vt([()=>e.justifyContent,()=>e.size],()=>{fn(()=>{const{type:L}=e;(L==="line"||L==="bar")&&we()})});const Ee=ne(!1);function Pe(L){var O;const{target:ee,contentRect:{width:U,height:B}}=L,V=ee.parentElement.parentElement.offsetWidth,me=ee.parentElement.parentElement.offsetHeight,{placement:Ae}=e;if(!Ee.value)Ae==="top"||Ae==="bottom"?V<U&&(Ee.value=!0):me<B&&(Ee.value=!0);else{const{value:Re}=f;if(!Re)return;Ae==="top"||Ae==="bottom"?V-U>Re.$el.offsetWidth&&(Ee.value=!1):me-B>Re.$el.offsetHeight&&(Ee.value=!1)}G(((O=h.value)===null||O===void 0?void 0:O.$el)||null)}const A=Wh(Pe,64);function H(){const{onAdd:L}=e;L&&L(),fn(()=>{const O=w(),{value:ee}=h;!O||!ee||ee.scrollTo({left:O.offsetLeft,top:0,behavior:"smooth"})})}function G(L){if(!L)return;const{placement:O}=e;if(O==="top"||O==="bottom"){const{scrollLeft:ee,scrollWidth:U,offsetWidth:B}=L;g.value=ee<=0,b.value=ee+B>=U}else{const{scrollTop:ee,scrollHeight:U,offsetHeight:B}=L;g.value=ee<=0,b.value=ee+B>=U}}const de=Wh(L=>{G(L.target)},64);jn(wv,{triggerRef:et(e,"trigger"),tabStyleRef:et(e,"tabStyle"),tabClassRef:et(e,"tabClass"),addTabStyleRef:et(e,"addTabStyle"),addTabClassRef:et(e,"addTabClass"),paneClassRef:et(e,"paneClass"),paneStyleRef:et(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:et(e,"type"),closableRef:et(e,"closable"),valueRef:_,tabChangeIdRef:S,onBeforeLeaveRef:et(e,"onBeforeLeave"),activateTab:_e,handleClose:ve,handleAdd:H}),p2(()=>{R(),C()}),xr(()=>{const{value:L}=d;if(!L)return;const{value:O}=a,ee=`${O}-tabs-nav-scroll-wrapper--shadow-start`,U=`${O}-tabs-nav-scroll-wrapper--shadow-end`;g.value?L.classList.remove(ee):L.classList.add(ee),b.value?L.classList.remove(U):L.classList.add(U)});const le={syncBarPosition:()=>{R()}},q=()=>{xe({transitionDisabled:!0})},N=pe(()=>{const{value:L}=v,{type:O}=e,ee={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[O],U=`${L}${ee}`,{self:{barColor:B,closeIconColor:V,closeIconColorHover:me,closeIconColorPressed:Ae,tabColor:Re,tabBorderColor:rt,paneTextColor:lt,tabFontWeight:ft,tabBorderRadius:zt,tabFontWeightActive:yt,colorSegment:Lt,fontWeightStrong:ye,tabColorSegment:Y,closeSize:m,closeIconSize:F,closeColorHover:D,closeColorPressed:te,closeBorderRadius:K,[Se("panePadding",L)]:se,[Se("tabPadding",U)]:ue,[Se("tabPaddingVertical",U)]:ae,[Se("tabGap",U)]:ke,[Se("tabGap",`${U}Vertical`)]:Me,[Se("tabTextColor",O)]:$e,[Se("tabTextColorActive",O)]:ze,[Se("tabTextColorHover",O)]:Je,[Se("tabTextColorDisabled",O)]:Ne,[Se("tabFontSize",L)]:ht},common:{cubicBezierEaseInOut:Le}}=l.value;return{"--n-bezier":Le,"--n-color-segment":Lt,"--n-bar-color":B,"--n-tab-font-size":ht,"--n-tab-text-color":$e,"--n-tab-text-color-active":ze,"--n-tab-text-color-disabled":Ne,"--n-tab-text-color-hover":Je,"--n-pane-text-color":lt,"--n-tab-border-color":rt,"--n-tab-border-radius":zt,"--n-close-size":m,"--n-close-icon-size":F,"--n-close-color-hover":D,"--n-close-color-pressed":te,"--n-close-border-radius":K,"--n-close-icon-color":V,"--n-close-icon-color-hover":me,"--n-close-icon-color-pressed":Ae,"--n-tab-color":Re,"--n-tab-font-weight":ft,"--n-tab-font-weight-active":yt,"--n-tab-padding":ue,"--n-tab-padding-vertical":ae,"--n-tab-gap":ke,"--n-tab-gap-vertical":Me,"--n-pane-padding-left":Kn(se,"left"),"--n-pane-padding-right":Kn(se,"right"),"--n-pane-padding-top":Kn(se,"top"),"--n-pane-padding-bottom":Kn(se,"bottom"),"--n-font-weight-strong":ye,"--n-tab-color-segment":Y}}),re=s?Cn("tabs",pe(()=>`${v.value[0]}${e.type[0]}`),N,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:_,renderedNames:new Set,segmentCapsuleElRef:Oe,tabsPaneWrapperRef:E,tabsElRef:u,barElRef:c,addTabInstRef:f,xScrollInstRef:h,scrollWrapperElRef:d,addTabFixed:Ee,tabWrapperStyle:$,handleNavResize:fe,mergedSize:v,handleScroll:de,handleTabsResize:A,cssVars:s?void 0:N,themeClass:re==null?void 0:re.themeClass,animationDirection:he,renderNameListRef:ie,yScrollElRef:p,handleSegmentResize:q,onAnimationBeforeLeave:j,onAnimationEnter:Z,onAnimationAfterEnter:J,onRender:re==null?void 0:re.onRender},le)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:o,renderNameListRef:a,onRender:s,paneWrapperClass:l,paneWrapperStyle:u,$slots:{default:c,prefix:d,suffix:f}}=this;s==null||s();const h=c?Ua(c()).filter(S=>S.type.__TAB_PANE__===!0):[],p=c?Ua(c()).filter(S=>S.type.__TAB__===!0):[],g=!p.length,b=t==="card",v=t==="segment",x=!b&&!v&&this.justifyContent;a.value=[];const y=()=>{const S=k("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},x?null:k("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?h.map(($,w)=>(a.value.push($.props.name),uy(k(M0,Object.assign({},$.props,{internalCreatedByPane:!0,internalLeftPadded:w!==0&&(!x||x==="center"||x==="start"||x==="end")}),$.children?{default:$.children.tab}:void 0)))):p.map(($,w)=>(a.value.push($.props.name),uy(w!==0&&!x?ly($):$))),!r&&i&&b?sy(i,(g?h.length:p.length)!==0):null,x?null:k("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return k("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},b&&i?k(Wi,{onResize:this.handleTabsResize},{default:()=>S}):S,b?k("div",{class:`${e}-tabs-pad`}):null,b?null:k("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},_=v?"top":n;return k("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${o}-size`,x&&`${e}-tabs--flex`,`${e}-tabs--${_}`],style:this.cssVars},k("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${_}`,`${e}-tabs-nav`]},Bt(d,S=>S&&k("div",{class:`${e}-tabs-nav__prefix`},S)),v?k(Wi,{onResize:this.handleSegmentResize},{default:()=>k("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},k("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},k("div",{class:`${e}-tabs-wrapper`},k("div",{class:`${e}-tabs-tab`}))),g?h.map((S,$)=>(a.value.push(S.props.name),k(M0,Object.assign({},S.props,{internalCreatedByPane:!0,internalLeftPadded:$!==0}),S.children?{default:S.children.tab}:void 0))):p.map((S,$)=>(a.value.push(S.props.name),$===0?S:ly(S))))}):k(Wi,{onResize:this.handleNavResize},{default:()=>k("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(_)?k(v9,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:y}):k("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},y()))}),r&&i&&b?sy(i,!0):null,Bt(f,S=>S&&k("div",{class:`${e}-tabs-nav__suffix`},S))),g&&(this.animated&&(_==="top"||_==="bottom")?k("div",{ref:"tabsPaneWrapperRef",style:u,class:[`${e}-tabs-pane-wrapper`,l]},ay(h,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):ay(h,this.mergedValue,this.renderedNames)))}});function ay(e,t,n,r,i,o,a){const s=[];return e.forEach(l=>{const{name:u,displayDirective:c,"display-directive":d}=l.props,f=p=>c===p||d===p,h=t===u;if(l.key!==void 0&&(l.key=u),h||f("show")||f("show:lazy")&&n.has(u)){n.has(u)||n.add(u);const p=!f("if");s.push(p?lo(l,[[yd,h]]):l)}}),a?k(Xw,{name:`${a}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:o},{default:()=>s}):s}function sy(e,t){return k(M0,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function ly(e){const t=Vr(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function uy(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function R5(e,t,n){try{const{data:r}=await bu().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){Bl(r)}}async function sF(e,t,n,r){try{if(t)await z5(t,n,r);else return await R5(e,n,r)}catch(i){Bl(i)}}async function z5(e,t,n){try{await bu().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(r){Bl(r)}}function qs(e){return String(e).toLowerCase()==="true"}async function lF(e,t={}){const n=xu(e.settings,t.settings),r=e.specs,i=fF(e.tracks,t.tracks);return{plugin:e,settings:n,specs:r,tracks:i}}function uF(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=qs(n)),n}function cF(e,t={}){var n,r,i;const o=t,a=(n=e.test_param)==null?void 0:n.name;if(!a)console.error(`Test parameter has no name: ${e.name}.`);else{const s=o[a]??((r=e.test_param)==null?void 0:r.value);for(const l of e.cases||[])l.value===s&&(o[a]=s,(i=l.inputs)!=null&&i.length&&xu(l.inputs,o))}return o}function xu(e,t){const n=t||{};return e==null||e.forEach(r=>{r.type==="conditional"?n[r.name]=cF(r,n[r.name]):n[r.name]=uF(r,n[r.name])}),n}function fF(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=xu(e,r)})),n}const dF={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},hF=Ie({__name:"InputConditional",props:Xc({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:Xc(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,r=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=ne(n.input.test_param),o=i.value.name;o||console.error(`Test parameter has no name: ${n.input.name}.`);const a=Kg(e,"value");(!a.value||!(o in a.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,a.value);const s=ne(f()),l=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=xu(g.inputs),p[g.value][o]=g.value;return p}),u=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=g.inputs;return p}),c=pe(()=>u.value[s.value]),d=pe({get(){return s.value==="true"},set(p){s.value=String(p)}});function f(){return a.value&&a.value[o]}function h(p){let g={...l.value[s.value]};if(p){const b={};c.value.forEach(v=>{b[v.name]=p[v.name]}),g={...g,...p}}r("update:value",g)}return vt(()=>a.value,()=>{s.value=f()}),vt(()=>s.value,()=>{h()}),(p,g)=>(We(),xt(Tt,null,[i.value.type==="boolean"?(We(),Ft(qe(A5),{key:0,value:d.value,"onUpdate:value":g[0]||(g[0]=b=>d.value=b)},null,8,["value"])):(We(),Ft(qe(Rd),{key:1,value:s.value,"onUpdate:value":g[1]||(g[1]=b=>s.value=b),options:i.value.data},null,8,["value","options"])),c.value?(We(),xt("div",dF,[Ye(Cv,{"dataset-id":p.datasetId,inputs:c.value,values:a.value,"onUpdate:values":h},null,8,["dataset-id","inputs","values"])])):Xn("",!0)],64))}}),oc=ne({});function I5(){async function e(t){return oc.value[t]||(oc.value[t]=bu().GET(`/api/datasets/${t}`).catch(n=>{throw delete oc.value[t],n})),await oc.value[t]}return{getDataset:e}}const pF={key:0},gF={key:0,class:"text-red-600 mb-1"},vF={key:1},bF=100,mF=Ie({__name:"InputData",props:Xc({datasetId:{},extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=I5(),n=e,r=ne([]),i=Kg(e,"value"),o=ne(!1),a=ne(null);async function s(d){if(n.datasetId){o.value=!0;try{const{data:f}=await t(n.datasetId),h=f.history_id,p="v=dev&order=hid&q=deleted&qv=false&q=visible&qv=true&",g=n.extension?`q=extension-eq&qv=${n.extension}&`:"",b=d?`q=name-contains&qv=${d}&`:"",{data:v}=await bu().GET(`/api/histories/${h}/contents?${p}${g}${b}limit=${bF}`);if(v&&v.length>0){const x=v.map(y=>({label:`${y.hid}: ${y.name}`,value:{id:y.id,hid:y.hid,name:y.name}}));x.push({label:"...filter for more",value:null,disabled:!0}),n.optional&&x.unshift({label:"-- Clear Selection --",value:null}),r.value=x}}catch(f){console.log(f)}finally{o.value=!1}}else console.debug("Data selector disabled, since `datasetId` is unavailable.")}function l(){i.value=a.value}function u(d){return k("div",{class:"my-1 whitespace-normal break-all"},[k(mr,{class:"size-3 mr-1"},{default:()=>k(Qw)}),d.label])}function c({option:d}){return k("div",{class:"z-[1] whitespace-nowrap text-ellipsis overflow-hidden"},d.label)}return vt(()=>i.value,()=>{var d;a.value=((d=i.value)==null?void 0:d.name)||null},{immediate:!0}),s(),(d,f)=>d.datasetId?(We(),xt("div",pF,[!d.optional&&!i.value?(We(),xt("div",gF,[Ye(qe(mr),{class:"size-3 mr-1"},{default:mt(()=>[Ye(qe(Jw))]),_:1}),f[1]||(f[1]=ot("span",null,"Please select a dataset.",-1))])):Xn("",!0),Ye(qe(Rd),{value:a.value,"onUpdate:value":[f[0]||(f[0]=h=>a.value=h),l],filterable:"",placeholder:"Select a Dataset",loading:o.value,"render-label":u,"render-tag":c,options:r.value,onSearch:s},null,8,["value","loading","options"])])):(We(),xt("div",vF,"Selection deferred."))}});function yF(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const o=e.metadata_column_types;for(const a in o)(r&&["int","float"].includes(o[a])||n&&o[a]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(a)+1),value:a});return i}const _F=Ie({__name:"InputDataColumn",props:Xc({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=I5(),n=e,r=ne([]),i=Kg(e,"value");async function o(){if(n.datasetId)try{const{data:s}=await t(n.datasetId),l=yF(s,n.isAuto,n.isText,n.isNumber);r.value=l,a()}catch(s){console.debug(s)}else console.debug("Data column selector disabled, since `datasetId` is unavailable.")}function a(){r.value.length>0&&i.value===null&&(i.value=r.value[0].value)}return o(),vt(()=>i.value,()=>a()),(s,l)=>s.datasetId?(We(),Ft(qe(Rd),{key:0,value:i.value,"onUpdate:value":l[0]||(l[0]=u=>i.value=u),options:r.value},null,8,["value","options"])):(We(),Ft(qe(ts),{key:1,value:i.value,"onUpdate:value":l[1]||(l[1]=u=>i.value=u)},null,8,["value"]))}}),xF={class:"select-none"},wF={class:"font-bold mb-1"},CF={key:0,class:"text-xs mb-1"},SF={key:5},cy=.01,Cv=Ie({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=t,i=ne(o());function o(){const s={...n.values};return n.inputs.forEach(l=>{s[l.name]===void 0&&(s[l.name]=null)}),s}function a(){r("update:values",i.value)}return vt(()=>n.values,()=>{i.value=o()}),(s,l)=>(We(),xt("div",xF,[(We(!0),xt(Tt,null,vw(s.inputs,(u,c)=>(We(),xt("div",{key:c,class:pu(c<s.inputs.length-1?"pb-2":"")},[ot("div",wF,di(u.label||u.name),1),u.help?(We(),xt("div",CF,di(u.help),1)):Xn("",!0),ot("div",null,[u.type==="boolean"?(We(),Ft(qe(A5),{key:0,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a]},null,8,["value","onUpdate:value"])):u.type==="color"?(We(),Ft(qe(wI),{key:1,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):u.type==="conditional"?(We(),Ft(hF,{key:2,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,input:u},null,8,["value","onUpdate:value","dataset-id","input"])):u.type==="data"?(We(),Ft(mF,{key:3,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,extension:u.extension,optional:qe(qs)(u.optional)},null,8,["value","onUpdate:value","dataset-id","extension","optional"])):u.type==="data_column"?(We(),Ft(_F,{key:4,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,"is-auto":qe(qs)(u.is_auto),"is-text":qe(qs)(u.is_text),"is-number":qe(qs)(u.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):["float","integer"].includes(u.type)?(We(),xt("div",SF,[u.min!==void 0&&u.max!==void 0?(We(),Ft(qe(eF),{key:0,class:"mb-2",value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],min:Number(u.min),max:Number(u.max),step:u.type==="float"?cy:1},null,8,["value","onUpdate:value","min","max","step"])):Xn("",!0),Ye(qe(KI),{value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],size:"small",min:Number(u.min),max:Number(u.max),step:u.type==="float"?cy:1},null,8,["value","onUpdate:value","min","max","step"])])):u.type==="select"?(We(),Ft(qe(Rd),{key:6,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],options:u.data},null,8,["value","onUpdate:value","options"])):u.type==="textarea"?(We(),Ft(qe(ts),{key:7,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],rows:Number(u.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(We(),Ft(qe(ts),{key:8,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,l[0]||(l[0]=d=>a())]},null,8,["value","onUpdate:value"]))])],2))),128))]))}}),$F={class:"border border-dotted border-green-600 rounded p-2"},kF={class:"mx-1"},MF=Ie({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=pe(()=>xu(n.inputs));function o(){const l=[...n.valuesArray];l.unshift(i.value),r("update:values-array",l)}function a(l){const u=[...n.valuesArray];u.splice(l,1),r("update:values-array",u)}function s(l,u){const c=[...n.valuesArray];c[l]={...u},r("update:values-array",c)}return(l,u)=>(We(),xt(Tt,null,[Ye(qe(Lr),{size:"tiny",type:"primary",onClick:o},{default:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Qw))]),_:1}),u[0]||(u[0]=ot("span",{class:"mx-1"},"Add New Track",-1))]),_:1}),(We(!0),xt(Tt,null,vw(l.valuesArray,(c,d)=>(We(),xt("div",{key:d,class:"py-2"},[ot("div",$F,[Ye(Cv,{"dataset-id":l.datasetId,inputs:l.inputs,values:c,"onUpdate:values":f=>s(d,f)},null,8,["dataset-id","inputs","values","onUpdate:values"]),Ye(qe(Lr),{class:"w-full mt-2","data-description":"remove repeat block",disabled:l.valuesArray.length<=1,size:"tiny",type:"primary",onClick:f=>a(d)},{default:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Nk))]),_:1}),ot("span",kF,"Remove Track "+di(l.valuesArray.length-d),1)]),_:2},1032,["disabled","onClick"])])]))),128))],64))}}),TF=2e3,EF=Ie({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return vt(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),TF)}),(o,a)=>o.message?(We(),Ft(qe($5),{key:0,type:o.messageType},{default:mt(()=>[Wo(di(o.message),1)]),_:1},8,["type"])):Xn("",!0)}}),AF={class:"text-xs"},PF=Ie({__name:"ApiStatus",setup(e){const t=ne("...");async function n(){try{const{data:r}=await bu().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(r,i)=>t.value?(We(),Ft(qe(Wl),{key:0,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(mr),{class:"mx-1"},{default:mt(()=>[Ye(qe(zk),{class:"text-green-600"})]),_:1})]),default:mt(()=>[ot("span",AF,"Connected to Galaxy Version "+di(t.value)+".",1)]),_:1})):(We(),Ft(qe(Wl),{key:1,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(mr),{class:"mx-1"},{default:mt(()=>[Ye(qe(Jw),{class:"text-red-600"})]),_:1})]),default:mt(()=>[i[0]||(i[0]=ot("span",{class:"text-xs"},"Galaxy is not accessible!",-1))]),_:1}))}}),RF=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},zF={},IF={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"};function FF(e,t){return We(),xt("svg",IF,t[0]||(t[0]=[ot("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),ot("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)]))}const BF=RF(zF,[["render",FF]]),OF={class:"overflow-auto select-none bg-white z-10 p-2"},NF={key:0,class:"flex"},LF={class:"flex-1 font-thin text-lg mt-1"},DF={class:"bg-sky-50 text-sky-900 rounded my-2 p-2"},HF={class:"flex"},UF={class:"flex justify-center center-items"},jF={class:"m-2"},WF=["src"],VF={class:"overflow-hidden break-words p-1"},qF={class:"font-bold"},YF=["innerHTML"],GF=Ie({__name:"SidePanel",props:{datasetId:{},datasetUrl:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,r=t,i=ne(""),o=ne("info"),a=pe(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await z5(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",o.value="success";else{const d=await R5(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});d?(i.value="Successfully created.",o.value="success",r("update:visualization-id",d)):(i.value="Something went wrong.",o.value="error")}}catch(d){i.value=Kw(d),o.value="error"}}function l(d){r("update:settings",d)}function u(d){r("update:tracks",d)}function c(d){r("update:visualization-title",d)}return(d,f)=>(We(),xt("div",OF,[d.datasetUrl?(We(),xt("div",NF,[ot("div",LF,[f[2]||(f[2]=ot("span",null,"Charts",-1)),Ye(PF)]),ot("div",null,[d.datasetId?(We(),Ft(qe(Wl),{key:0,trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 mr-2","data-description":"sidepanel save button",onClick:s},{icon:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Bk))]),_:1})]),_:1})]),default:mt(()=>[f[3]||(f[3]=ot("span",{class:"text-xs"},"Save",-1))]),_:1})):Xn("",!0),Ye(qe(Wl),{trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100",onClick:f[0]||(f[0]=h=>r("toggle"))},{icon:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Fk))]),_:1})]),_:1})]),default:mt(()=>[f[4]||(f[4]=ot("span",{class:"text-xs"},"Collapse",-1))]),_:1})])])):Xn("",!0),Ye(EF,{message:i.value,"message-type":o.value,onTimeout:f[1]||(f[1]=h=>i.value=""),class:"mt-2"},null,8,["message","message-type"]),ot("div",DF,[ot("div",HF,[ot("div",UF,[ot("div",jF,[n.logoUrl?(We(),xt("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,WF)):(We(),Ft(BF,{key:1}))])]),ot("div",VF,[ot("span",qF,di(d.html),1),ot("div",{class:"text-xs",innerHTML:d.description},null,8,YF)])])]),ot("div",null,[f[5]||(f[5]=ot("div",{class:"font-bold"},"Title",-1)),f[6]||(f[6]=ot("div",{class:"text-xs py-1"},"Specify a visualization title.",-1)),Ye(qe(ts),{value:d.visualizationTitle,onInput:c},null,8,["value"])]),Ye(qe(aF),{type:"line",animated:"",class:"mt-2","pane-wrapper-class":"!overflow-visible","tab-class":a.value?"!hidden":""},{default:mt(()=>[d.trackInputs.length>0?(We(),Ft(qe(oy),{key:0,name:"tracks"},{tab:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Ok))]),_:1}),f[7]||(f[7]=ot("span",{class:"mx-1"},"Tracks",-1))]),default:mt(()=>[Ye(MF,{"dataset-id":d.datasetId,inputs:d.trackInputs,"values-array":d.trackValues,"onUpdate:valuesArray":u},null,8,["dataset-id","inputs","values-array"])]),_:1})):Xn("",!0),d.settingInputs.length>0?(We(),Ft(qe(oy),{key:1,name:"settings"},{tab:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Pk))]),_:1}),f[8]||(f[8]=ot("span",{class:"mx-1"},"Settings",-1))]),default:mt(()=>[Ye(Cv,{"dataset-id":d.datasetId,inputs:d.settingInputs,values:d.settingValues,"onUpdate:values":l},null,8,["dataset-id","inputs","values"])]),_:1})):Xn("",!0)]),_:1},8,["tab-class"])]))}});function XF(e,t="app"){if(e===void 0){const s=document.getElementById(t);if(s)e=JSON.parse((s==null?void 0:s.dataset.incoming)||"{}");else throw new Error(`Container element '${t}' not found.`)}const n=(e==null?void 0:e.root)??"/",r=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,o=(e==null?void 0:e.visualization_plugin)??{},a=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}}const KF={key:1,class:"m-2"},ZF={key:0,class:"relative max-w-full h-screen overflow-hidden"},JF=Ie({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}=XF(t.incoming,t.container),s=ne(!0),l=ne(""),u=ne(""),c=ne(""),d=ne(!0),f=ne(""),h=ne(""),p=ne([]),g=ne({}),b=ne({}),v=ne([]),x=ne([]),y=ne(i),_=ne(a),S=Zw();S.setCredentials(t.credentials||"include"),S.setRoot(n||"/"),lF(o,r).then(({plugin:ie,settings:he,specs:_e,tracks:oe})=>{l.value=ie.description||"",c.value=ie.html||"",d.value=!1,f.value=ie.logo||"",h.value=ie.name||"",p.value=ie.settings||[],g.value=he,b.value=_e||{},v.value=ie.tracks||[],x.value=oe});const $=pe(()=>r.dataset_id||""),w=pe(()=>$.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${$.value}.`),Ak(n,$.value)):""),T=pe(()=>f.value&&`${n}${f.value}`),M=pe(()=>p.value.length===0&&v.value.length===0);async function P(){s.value=!s.value,await fn(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function R(){try{window.postMessage({container:t.container,from:"galaxy-visualization",visualization_config:JSON.parse(JSON.stringify(C())),visualization_id:y.value,visualization_title:_.value},"*")}catch(ie){u.value=`Failed to postMessage: ${ie}`}}function C(){return{dataset_id:$.value,settings:g.value,tracks:x.value}}function E(ie){g.value={...ie},R()}function I(ie){x.value=[...ie],R()}function z(ie){y.value=ie,R()}function j(ie){_.value=ie,R()}async function Z(ie){J(ie);try{const he=await sF(h.value,y.value,_.value,C());he&&z(he)}catch(he){u.value=`Failed to save: ${he}`}}function J(ie){E({...g.value,...ie})}return(ie,he)=>(We(),xt(Tt,null,[u.value?(We(),Ft(qe($5),{key:0,type:"error",class:"m-2"},{default:mt(()=>[Wo(di(u.value),1)]),_:1})):Xn("",!0),d.value?(We(),xt("div",KF,[ot("span",null,[Ye(qe(Rk),{class:"animate-spin size-4 inline mx-1"})]),he[0]||(he[0]=ot("span",{class:"text-xs"},"Please wait...",-1))])):(We(),xt("div",{key:2,class:pu(["grid h-screen",{"grid-cols-[1fr_17rem]":!s.value&&!M.value&&w.value}])},[w.value?(We(),xt("div",ZF,[Yg(ie.$slots,"default",{datasetId:$.value,datasetUrl:w.value,root:qe(n),settings:g.value,specs:b.value,tracks:x.value,save:Z,update:J})])):Xn("",!0),s.value&&!M.value&&w.value?(We(),Ft(qe(Wl),{key:1,trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2 absolute right-0",onClick:P},{icon:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Ik))]),_:1})]),_:1})]),default:mt(()=>[he[1]||(he[1]=ot("span",{class:"text-xs"},"Expand",-1))]),_:1})):Xn("",!0),lo(Ye(GF,{"dataset-id":$.value,"dataset-url":w.value,description:l.value,html:c.value,"logo-url":T.value,name:h.value,"setting-inputs":p.value,"setting-values":g.value,"track-inputs":v.value,"track-values":x.value,"visualization-id":y.value,"visualization-title":_.value,"onUpdate:settings":E,"onUpdate:tracks":I,"onUpdate:visualizationId":z,"onUpdate:visualizationTitle":j,onToggle:P},null,8,["dataset-id","dataset-url","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]),[[yd,!s.value&&!M.value||!w.value]])],2))],64))}}),F5="0.14.0";class Zi{constructor(){this._items=new Map}get(t){if(!this._items.has(t))throw new Error(`Item not found: ${t}`);return this._items.get(t)}add(t,n,r=!1){if(!r&&this._items.has(t))throw new Error(`Item ${t} is already defined`);return this._items.set(t,n),n}remove(t){return this._items.delete(t)}has(t){return this._items.has(t)}list(){return Array.from(this._items.keys())}}class Sv extends Zi{create(t,...n){const r=this.get(t);return new r(...n)}extend(t,n,r){if(console.warn("Deprecation warning: .extend method will be removed in future versions, in favor of explicit ES6 subclasses"),arguments.length!==3)throw new Error("Invalid arguments to .extend");const i=this.get(t);class o extends i{}return Object.assign(o.prototype,r,i),this.add(n,o),o}}class QF{constructor(t,n,r={},i=null,o=null){this.key=t,this.value=n,this.metadata=r,this.prev=i,this.next=o}}class eB{constructor(t=3){if(this._max_size=t,this._cur_size=0,this._store=new Map,this._head=null,this._tail=null,t===null||t<0)throw new Error('Cache "max_size" must be >= 0')}has(t){return this._store.has(t)}get(t){const n=this._store.get(t);return n?(this._head!==n&&this.add(t,n.value),n.value):null}add(t,n,r={}){if(this._max_size===0)return;const i=this._store.get(t);i&&this._remove(i);const o=new QF(t,n,r,null,this._head);if(this._head?this._head.prev=o:this._tail=o,this._head=o,this._store.set(t,o),this._max_size>=0&&this._cur_size>=this._max_size){const a=this._tail;this._tail=this._tail.prev,this._remove(a)}this._cur_size+=1}clear(){this._head=null,this._tail=null,this._cur_size=0,this._store=new Map}remove(t){const n=this._store.get(t);return n?(this._remove(n),!0):!1}_remove(t){t.prev!==null?t.prev.next=t.next:this._head=t.next,t.next!==null?t.next.prev=t.prev:this._tail=t.prev,this._store.delete(t.key),this._cur_size-=1}find(t){let n=this._head;for(;n;){const r=n.next;if(t(n))return n;n=r}}}function tB(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ep,fy;function nB(){if(fy)return ep;fy=1,ep=e;function e(n){if(typeof n=="function")return n;var r=Array.isArray(n)?[]:{};for(var i in n){var o=n[i],a={}.toString.call(o).slice(8,-1);a=="Array"||a=="Object"?r[i]=e(o):a=="Date"?r[i]=new Date(o.getTime()):a=="RegExp"?r[i]=RegExp(o.source,t(o)):r[i]=o}return r}function t(n){if(typeof n.source.flags=="string")return n.source.flags;var r=[];return n.global&&r.push("g"),n.ignoreCase&&r.push("i"),n.multiline&&r.push("m"),n.sticky&&r.push("y"),n.unicode&&r.push("u"),r.join("")}return ep}var rB=nB();const iB=tB(rB);function Ys(e){return typeof e!="object"?e:iB(e)}let oB=class{constructor(t={}){this._config=t;const{cache_enabled:n=!0,cache_size:r=3}=t;this._enable_cache=n,this._cache=new eB(r)}_buildRequestOptions(t,n){return Object.assign({},t)}_getCacheKey(t){if(this._enable_cache)throw new Error("Method not implemented");return null}_performRequest(t){throw new Error("Not implemented")}_normalizeResponse(t,n){return t}_annotateRecords(t,n){return t}_postProcessResponse(t,n){return t}getData(t={},...n){t=this._buildRequestOptions(t,...n);const r=this._getCacheKey(t);let i;return this._enable_cache&&this._cache.has(r)?i=this._cache.get(r):(i=Promise.resolve(this._performRequest(t)).then(o=>this._normalizeResponse(o,t)),this._cache.add(r,i,t._cache_meta),i.catch(o=>this._cache.remove(r))),i.then(o=>Ys(o)).then(o=>this._annotateRecords(o,t)).then(o=>this._postProcessResponse(o,t))}};class aB extends oB{constructor(t={}){super(t),this._url=t.url}_getCacheKey(t){return this._getURL(t)}_getURL(t){return this._url}_performRequest(t){const n=this._getURL(t);if(!this._url)throw new Error('Web based resources must specify a resource URL as option "url"');return fetch(n).then(r=>{if(!r.ok)throw new Error(r.statusText);return r.text()})}_normalizeResponse(t,n){return typeof t=="string"?JSON.parse(t):t}}var tp={},ac={exports:{}},np,dy;function sB(){return dy||(dy=1,np=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}),np}var hy;function lB(){return hy||(hy=1,function(e,t){const n=sB();e.exports=class extends Error{constructor(r){const i=r.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:n(o));super(i.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t.assert)}}}(ac,ac.exports)),ac.exports}var rp,py;function uB(){if(py)return rp;py=1;const e=lB();return rp=function(t,...n){if(!t)throw n.length===1&&n[0]instanceof Error?n[0]:new e(n)},rp}var gy;function cB(){if(gy)return tp;gy=1;const e=uB(),t={};return tp.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(n,r){r=r||{};const i=[].concat(r.before||[]),o=[].concat(r.after||[]),a=r.group||"?",s=r.sort||0;e(!i.includes(a),`Item cannot come before itself: ${a}`),e(!i.includes("?"),"Item cannot come before unassociated items"),e(!o.includes(a),`Item cannot come after itself: ${a}`),e(!o.includes("?"),"Item cannot come after unassociated items"),Array.isArray(n)||(n=[n]);for(const l of n){const u={seq:this._items.length,sort:s,before:i,after:o,group:a,node:l};this._items.push(u)}if(!r.manual){const l=this._sort();e(l,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(n){Array.isArray(n)||(n=[n]);for(const i of n)if(i)for(const o of i._items)this._items.push(Object.assign({},o));this._items.sort(t.mergeSort);for(let i=0;i<this._items.length;++i)this._items[i].seq=i;const r=this._sort();return e(r,"merge created a dependencies error"),this.nodes}sort(){const n=this._sort();return e(n,"sort created a dependencies error"),this.nodes}_sort(){const n={},r=Object.create(null),i=Object.create(null);for(const u of this._items){const c=u.seq,d=u.group;i[d]=i[d]||[],i[d].push(c),n[c]=u.before;for(const f of u.after)r[f]=r[f]||[],r[f].push(c)}for(const u in n){const c=[];for(const d in n[u]){const f=n[u][d];i[f]=i[f]||[],c.push(...i[f])}n[u]=c}for(const u in r)if(i[u])for(const c of i[u])n[c].push(...r[u]);const o={};for(const u in n){const c=n[u];for(const d of c)o[d]=o[d]||[],o[d].push(u)}const a={},s=[];for(let u=0;u<this._items.length;++u){let c=u;if(o[u]){c=null;for(let d=0;d<this._items.length;++d){if(a[d]===!0)continue;o[d]||(o[d]=[]);const f=o[d].length;let h=0;for(let p=0;p<f;++p)a[o[d][p]]&&++h;if(h===f){c=d;break}}}c!==null&&(a[c]=!0,s.push(c))}if(s.length!==this._items.length)return!1;const l={};for(const u of this._items)l[u.seq]=u;this._items=[],this.nodes=[];for(const u of s){const c=l[u];this.nodes.push(c.node),this._items.push(c)}return!0}},t.mergeSort=(n,r)=>n.sort===r.sort?0:n.sort<r.sort?-1:1,tp}var fB=cB();function dB(e){const t=/^(?<name_alone>\w+)$|((?<name_deps>\w+)+\(\s*(?<deps>[^)]+?)\s*\))/.exec(e);if(!t)throw new Error(`Unable to parse dependency specification: ${e}`);let{name_alone:n,name_deps:r,deps:i}=t.groups;return n?[n,[]]:(i=i.split(/\s*,\s*/),[r,i])}function hB(e,t,n,r=!0){if(!n.length)return[];const i=n.map(u=>dB(u)),o=new Map(i),a=new fB.Sorter;for(let[u,c]of o.entries())try{a.add(u,{after:c,group:u})}catch{throw new Error(`Invalid or possible circular dependency specification for: ${u}`)}const s=a.nodes,l=new Map;for(let u of s){const c=t.get(u);if(!c)throw new Error(`Data has been requested from source '${u}', but no matching source was provided`);const d=o.get(u)||[],h=Promise.all(d.map(p=>l.get(p))).then(p=>{const g=Object.assign({_provider_name:u},e);return c.getData(g,...p)});l.set(u,h)}return Promise.all([...l.values()]).then(u=>r?u[u.length-1]:u)}function T0(e,t){const n=new Map;for(let r of e){const i=r[t];if(typeof i>"u")throw new Error(`All records must specify a value for the field "${t}"`);if(typeof i=="object")throw new Error("Attempted to group on a field with non-primitive values");let o=n.get(i);o||(o=[],n.set(i,o)),o.push(r)}return n}function $v(e,t,n,r,i){const o=T0(n,i),a=[];for(let s of t){const l=s[r],u=o.get(l)||[];u.length?a.push(...u.map(c=>Object.assign({},Ys(c),Ys(s)))):e!=="inner"&&a.push(Ys(s))}if(e==="outer"){const s=T0(t,r);for(let l of n){const u=l[i];(s.get(u)||[]).length||a.push(Ys(l))}}return a}function B5(e,t,n,r){return $v("left",...arguments)}function pB(e,t,n,r){return $v("inner",...arguments)}function gB(e,t,n,r){return $v("outer",...arguments)}const vB=/^(?:chr)?([a-zA-Z0-9]+?)[_:-](\d+)[_:|-]?(\w+)?[/_:|-]?([^_]+)?_?(.*)?/;function O5(e,t=!1){const n=e&&e.match(vB);if(n)return n.slice(1);if(t)return null;throw new Error(`Could not understand marker format for ${e}. Should be of format chr:pos or chr:pos_ref/alt`)}class N5{constructor(){throw new Error('The "BaseAdapter" and "BaseApiAdapter" classes have been replaced in LocusZoom 0.14. See migration guide for details.')}}class bB extends N5{}class zd extends aB{constructor(t={}){t.params&&(console.warn('Deprecation warning: all options in "config.params" should now be specified as top level keys.'),Object.assign(t,t.params||{}),delete t.params),super(t);const{prefix_namespace:n=!0,limit_fields:r}=t;this._prefix_namespace=n,this._limit_fields=r?new Set(r):!1}_getCacheKey(t){let{chr:n,start:r,end:i}=t;const o=this._cache.find(({metadata:a})=>n===a.chr&&r>=a.start&&i<=a.end);return o&&({chr:n,start:r,end:i}=o.metadata),t._cache_meta={chr:n,start:r,end:i},`${n}_${r}_${i}`}_postProcessResponse(t,n){if(!this._prefix_namespace||!Array.isArray(t))return t;const{_limit_fields:r}=this,{_provider_name:i}=n;return t.map(o=>Object.entries(o).reduce((a,[s,l])=>((!r||r.has(s))&&(a[`${i}:${s}`]=l),a),{}))}_findPrefixedKey(t,n){const r=new RegExp(`:${n}$`),i=Object.keys(t).find(o=>r.test(o));if(!i)throw new Error(`Could not locate the required key name: ${n} in dependent data`);return i}}class da extends zd{constructor(t={}){super(t),this._genome_build=t.genome_build||t.build}_validateBuildSource(t,n){if(t&&n||!(t||n))throw new Error(`${this.constructor.name} must provide a parameter specifying either "build" or "source". It should not specify both.`);if(t&&!["GRCh37","GRCh38"].includes(t))throw new Error(`${this.constructor.name} must specify a valid 'genome_build'`)}_normalizeResponse(t,n){let r=super._normalizeResponse(...arguments);if(r=r.data||r,Array.isArray(r))return r;const i=Object.keys(r),o=r[i[0]].length;if(!i.every(function(u){return r[u].length===o}))throw new Error(`${this.constructor.name} expects a response in which all arrays of data are the same length`);const s=[],l=Object.keys(r);for(let u=0;u<o;u++){const c={};for(let d=0;d<l.length;d++)c[l[d]]=r[l[d]][u];s.push(c)}return s}}class mB extends da{constructor(t={}){super(t);const{source:n}=t;this._source_id=n}_getURL(t){const{chr:n,start:r,end:i}=t;return`${super._getURL(t)}results/?filter=analysis in ${this._source_id} and chromosome in '${n}' and position ge ${r} and position le ${i}`}}class yB extends da{constructor(t){t.limit_fields||(t.limit_fields=["log_pvalue","pos","rsid","trait","variant"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build,r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id eq ${r}`;return`${super._getURL(t)}?format=objects&sort=pos&filter=chrom eq '${t.chr}' and pos ge ${t.start} and pos le ${t.end}${i}`}}class _B extends da{constructor(t={}){super(t),this._prefix_namespace=!1}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and source in ${r}`;return`${super._getURL(t)}?filter=chrom eq '${t.chr}' and start le ${t.end} and end ge ${t.start}${i}`}}class xB extends zd{constructor(t={}){super(t),this._prefix_namespace=!1}_buildRequestOptions(t,n){const r=t.genome_build||this._config.build;if(!r)throw new Error(`Adapter ${this.constructor.name} must specify a 'genome_build' option`);const i=new Set;for(let o of n)i.add(o.gene_name);return t.query=[...i.values()].map(function(o){return`${`_${o.replace(/[^A-Za-z0-9_]/g,"_")}`}: gene(gene_symbol: "${o}", reference_genome: ${r}) { gnomad_constraint { exp_syn obs_syn syn_z oe_syn oe_syn_lower oe_syn_upper exp_mis obs_mis mis_z oe_mis oe_mis_lower oe_mis_upper exp_lof obs_lof pLI oe_lof oe_lof_lower oe_lof_upper } } `}),t.build=r,Object.assign({},t)}_performRequest(t){let{query:n,build:r}=t;if(!n.length||n.length>25||r==="GRCh38")return Promise.resolve([]);n=`{${n.join(" ")} }`;const i=this._getURL(t),o=JSON.stringify({query:n});return fetch(i,{method:"POST",body:o,headers:{"Content-Type":"application/json"}}).then(s=>s.ok?s.text():[]).catch(s=>[])}_normalizeResponse(t){return typeof t!="string"?t:JSON.parse(t).data}}class L5 extends da{constructor(t){t.limit_fields||(t.limit_fields=["variant2","position2","correlation"]),super(t)}__find_ld_refvar(t,n){const r=this._findPrefixedKey(n[0],"variant"),i=this._findPrefixedKey(n[0],"log_pvalue");let o,a={};if(t.ldrefvar)o=t.ldrefvar,a=n.find(h=>h[r]===o)||{};else{let h=0;for(let p of n){const{[r]:g,[i]:b}=p;b>h&&(h=b,o=g,a=p)}}a.lz_is_ld_refvar=!0;const s=O5(o,!0);if(!s)throw new Error("Could not request LD for a missing or incomplete marker format");const[l,u,c,d]=s;o=`${l}:${u}`,c&&d&&(o+=`_${c}/${d}`);const f=+u;return f&&t.ldrefvar&&t.chr&&(l!==String(t.chr)||f<t.start||f>t.end)?(t.ldrefvar=null,this.__find_ld_refvar(t,n)):o}_buildRequestOptions(t,n){if(!n)throw new Error("LD request must depend on association data");const r=super._buildRequestOptions(...arguments);if(!n.length)return r._skip_request=!0,r;r.ld_refvar=this.__find_ld_refvar(t,n);const i=t.genome_build||this._config.build||"GRCh37";let o=t.ld_source||this._config.source||"1000G";const a=t.ld_pop||this._config.population||"ALL";return o==="1000G"&&i==="GRCh38"&&(o="1000G-FRZ09"),this._validateBuildSource(i,null),Object.assign({},r,{genome_build:i,ld_source:o,ld_population:a})}_getURL(t){const n=this._config.method||"rsquare",{chr:r,start:i,end:o,ld_refvar:a,genome_build:s,ld_source:l,ld_population:u}=t;return[super._getURL(t),"genome_builds/",s,"/references/",l,"/populations/",u,"/variants","?correlation=",n,"&variant=",encodeURIComponent(a),"&chrom=",encodeURIComponent(r),"&start=",encodeURIComponent(i),"&stop=",encodeURIComponent(o)].join("")}_getCacheKey(t){const n=super._getCacheKey(t),{ld_refvar:r,ld_source:i,ld_population:o}=t;return`${n}_${r}_${i}_${o}`}_performRequest(t){if(t._skip_request)return Promise.resolve([]);const n=this._getURL(t);let r={data:{}},i=function(o){return fetch(o).then().then(a=>{if(!a.ok)throw new Error(a.statusText);return a.text()}).then(function(a){return a=JSON.parse(a),Object.keys(a.data).forEach(function(s){r.data[s]=(r.data[s]||[]).concat(a.data[s])}),a.next?i(a.next):r})};return i(n)}}class wB extends da{constructor(t){t.limit_fields||(t.limit_fields=["position","recomb_rate"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id in ${r}`;return`${super._getURL(t)}?filter=chromosome eq '${t.chr}' and position le ${t.end} and position ge ${t.start}${i}`}}class D5 extends zd{constructor(t={}){super(...arguments);const{data:n}=t;if(!n||Array.isArray(t))throw new Error("'StaticSource' must provide data as required option 'config.data'");this._data=n}_performRequest(t){return Promise.resolve(this._data)}}class CB extends da{_getURL(t){const n=(t.genome_build?[t.genome_build]:null)||this._config.build;if(!n||!Array.isArray(n)||!n.length)throw new Error(["Adapter",this.constructor.name,"requires that you specify array of one or more desired genome build names"].join(" "));return[super._getURL(t),"?filter=variant eq '",encodeURIComponent(t.variant),"'&format=objects&",n.map(function(o){return`build=${encodeURIComponent(o)}`}).join("&")].join("")}_getCacheKey(t){return this._getURL(t)}}const SB=Object.freeze(Object.defineProperty({__proto__:null,AssociationLZ:mB,BaseAdapter:N5,BaseApiAdapter:bB,BaseLZAdapter:zd,BaseUMAdapter:da,GeneConstraintLZ:xB,GeneLZ:_B,GwasCatalogLZ:yB,LDServer:L5,PheWASLZ:CB,RecombLZ:wB,StaticSource:D5},Symbol.toStringTag,{value:"Module"})),ns=new Sv;for(let[e,t]of Object.entries(SB))ns.add(e,t);ns.add("StaticJSON",D5);ns.add("LDLZ2",L5);var $B="5.16.0";function Sr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function kv(e){return e.length===1&&(e=kB(e)),{left:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function kB(e){return function(t,n){return Sr(e(t),n)}}var H5=kv(Sr),Ji=H5.right,MB=H5.left;function TB(e,t){t==null&&(t=U5);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return o}function U5(e,t){return[e,t]}function EB(e,t,n){var r=e.length,i=t.length,o=new Array(r*i),a,s,l,u;for(n==null&&(n=U5),a=l=0;a<r;++a)for(u=e[a],s=0;s<i;++s,++l)o[l]=n(u,t[s]);return o}function AB(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Qi(e){return e===null?NaN:+e}function j5(e,t){var n=e.length,r=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<n;)isNaN(a=Qi(e[i]))||(s=a-o,o+=s/++r,l+=s*(a-o));else for(;++i<n;)isNaN(a=Qi(t(e[i],i,e)))||(s=a-o,o+=s/++r,l+=s*(a-o));if(r>1)return l/(r-1)}function W5(e,t){var n=j5(e,t);return n&&Math.sqrt(n)}function qo(e,t){var n=e.length,r=-1,i,o,a;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=a=i;++r<n;)(i=e[r])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=a=i;++r<n;)(i=t(e[r],r,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var V5=Array.prototype,PB=V5.slice,RB=V5.map;function sc(e){return function(){return e}}function zB(e){return e}function Jn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}var E0=Math.sqrt(50),A0=Math.sqrt(10),P0=Math.sqrt(2);function Mv(e,t,n){var r,i=-1,o,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),(s=wl(e,t,n))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return r&&a.reverse(),a}function wl(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=E0?10:o>=A0?5:o>=P0?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=E0?10:o>=A0?5:o>=P0?2:1)}function Yo(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=E0?i*=10:o>=A0?i*=5:o>=P0&&(i*=2),t<e?-i:i}function Tv(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function IB(){var e=zB,t=qo,n=Tv;function r(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var u=t(l),c=u[0],d=u[1],f=n(l,c,d);Array.isArray(f)||(f=Yo(c,d,f),f=Jn(Math.ceil(c/f)*f,d,f));for(var h=f.length;f[0]<=c;)f.shift(),--h;for(;f[h-1]>d;)f.pop(),--h;var p=new Array(h+1),g;for(o=0;o<=h;++o)g=p[o]=[],g.x0=o>0?f[o-1]:c,g.x1=o<h?f[o]:d;for(o=0;o<a;++o)s=l[o],c<=s&&s<=d&&p[Ji(f,s,0,h)].push(i[o]);return p}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:sc(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:sc([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Array.isArray(i)?sc(PB.call(i)):sc(i),r):n},r}function Vl(e,t,n){if(n==null&&(n=Qi),!!(r=e.length)){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function FB(e,t,n){return e=RB.call(e,Qi).sort(Sr),Math.ceil((n-t)/(2*(Vl(e,.75)-Vl(e,.25))*Math.pow(e.length,-1/3)))}function BB(e,t,n){return Math.ceil((n-t)/(3.5*W5(e)*Math.pow(e.length,-1/3)))}function q5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&i>o&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&i>o&&(o=i);return o}function OB(e,t){var n=e.length,r=n,i=-1,o,a=0;if(t==null)for(;++i<n;)isNaN(o=Qi(e[i]))?--r:a+=o;else for(;++i<n;)isNaN(o=Qi(t(e[i],i,e)))?--r:a+=o;if(r)return a/r}function NB(e,t){var n=e.length,r=-1,i,o=[];if(t==null)for(;++r<n;)isNaN(i=Qi(e[r]))||o.push(i);else for(;++r<n;)isNaN(i=Qi(t(e[r],r,e)))||o.push(i);return Vl(o.sort(Sr),.5)}function Ev(e){for(var t=e.length,n,r=-1,i=0,o,a;++r<t;)i+=e[r].length;for(o=new Array(i);--t>=0;)for(a=e[t],n=a.length;--n>=0;)o[--i]=a[n];return o}function Y5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&o>i&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&o>i&&(o=i);return o}function LB(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}function DB(e,t){if(n=e.length){var n,r=0,i=0,o,a=e[i];for(t==null&&(t=Sr);++r<n;)(t(o=e[r],a)<0||t(a,a)!==0)&&(a=o,i=r);if(t(a,a)===0)return i}}function HB(e,t,n){for(var r=(n??e.length)-(t=t==null?0:+t),i,o;r;)o=Math.random()*r--|0,i=e[r+t],e[r+t]=e[o+t],e[o+t]=i;return e}function UB(e,t){var n=e.length,r=-1,i,o=0;if(t==null)for(;++r<n;)(i=+e[r])&&(o+=i);else for(;++r<n;)(i=+t(e[r],r,e))&&(o+=i);return o}function G5(e){if(!(o=e.length))return[];for(var t=-1,n=Y5(e,jB),r=new Array(n);++t<n;)for(var i=-1,o,a=r[t]=new Array(o);++i<o;)a[i]=e[i][t];return r}function jB(e){return e.length}function WB(){return G5(arguments)}var ip=Array.prototype.slice;function VB(e){return e}var Ic=1,Fc=2,R0=3,Gs=4,vy=1e-6;function qB(e){return"translate("+(e+.5)+",0)"}function YB(e){return"translate(0,"+(e+.5)+")"}function GB(e){return function(t){return+e(t)}}function XB(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function KB(){return!this.__axis}function Id(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=e===Ic||e===Gs?-1:1,u=e===Gs||e===Fc?"x":"y",c=e===Ic||e===R0?qB:YB;function d(f){var h=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):VB),g=Math.max(o,0)+s,b=t.range(),v=+b[0]+.5,x=+b[b.length-1]+.5,y=(t.bandwidth?XB:GB)(t.copy()),_=f.selection?f.selection():f,S=_.selectAll(".domain").data([null]),$=_.selectAll(".tick").data(h,t).order(),w=$.exit(),T=$.enter().append("g").attr("class","tick"),M=$.select("line"),P=$.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),$=$.merge(T),M=M.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",l*o)),P=P.merge(T.append("text").attr("fill","currentColor").attr(u,l*g).attr("dy",e===Ic?"0em":e===R0?"0.71em":"0.32em")),f!==_&&(S=S.transition(f),$=$.transition(f),M=M.transition(f),P=P.transition(f),w=w.transition(f).attr("opacity",vy).attr("transform",function(R){return isFinite(R=y(R))?c(R):this.getAttribute("transform")}),T.attr("opacity",vy).attr("transform",function(R){var C=this.parentNode.__axis;return c(C&&isFinite(C=C(R))?C:y(R))})),w.remove(),S.attr("d",e===Gs||e==Fc?a?"M"+l*a+","+v+"H0.5V"+x+"H"+l*a:"M0.5,"+v+"V"+x:a?"M"+v+","+l*a+"V0.5H"+x+"V"+l*a:"M"+v+",0.5H"+x),$.attr("opacity",1).attr("transform",function(R){return c(y(R))}),M.attr(u+"2",l*o),P.attr(u,l*g).text(p),_.filter(KB).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Fc?"start":e===Gs?"end":"middle"),_.each(function(){this.__axis=y})}return d.scale=function(f){return arguments.length?(t=f,d):t},d.ticks=function(){return n=ip.call(arguments),d},d.tickArguments=function(f){return arguments.length?(n=f==null?[]:ip.call(f),d):n.slice()},d.tickValues=function(f){return arguments.length?(r=f==null?null:ip.call(f),d):r&&r.slice()},d.tickFormat=function(f){return arguments.length?(i=f,d):i},d.tickSize=function(f){return arguments.length?(o=a=+f,d):o},d.tickSizeInner=function(f){return arguments.length?(o=+f,d):o},d.tickSizeOuter=function(f){return arguments.length?(a=+f,d):a},d.tickPadding=function(f){return arguments.length?(s=+f,d):s},d}function X5(e){return Id(Ic,e)}function Av(e){return Id(Fc,e)}function K5(e){return Id(R0,e)}function Z5(e){return Id(Gs,e)}var ZB={value:function(){}};function ha(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Bc(n)}function Bc(e){this._=e}function JB(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Bc.prototype=ha.prototype={constructor:Bc,on:function(e,t){var n=this._,r=JB(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=QB(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=by(n[i],e.name,t);else if(t==null)for(i in n)n[i]=by(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Bc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function QB(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function by(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ZB,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var z0="http://www.w3.org/1999/xhtml";const I0={svg:"http://www.w3.org/2000/svg",xhtml:z0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wu(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),I0.hasOwnProperty(t)?{space:I0[t],local:e}:e}function eO(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===z0&&t.documentElement.namespaceURI===z0?t.createElement(e):t.createElementNS(n,e)}}function tO(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fd(e){var t=wu(e);return(t.local?tO:eO)(t)}function nO(){}function Bd(e){return e==null?nO:function(){return this.querySelector(e)}}function rO(e){typeof e!="function"&&(e=Bd(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=e.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Rn(r,this._parents)}function iO(){return[]}function Pv(e){return e==null?iO:function(){return this.querySelectorAll(e)}}function oO(e){typeof e!="function"&&(e=Pv(e));for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new Rn(r,i)}function Rv(e){return function(){return this.matches(e)}}function aO(e){typeof e!="function"&&(e=Rv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Rn(r,this._parents)}function J5(e){return new Array(e.length)}function sO(){return new Rn(this._enter||this._groups.map(J5),this._parents)}function gf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}gf.prototype={constructor:gf,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function lO(e){return function(){return e}}var my="$";function uO(e,t,n,r,i,o){for(var a=0,s,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new gf(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function cO(e,t,n,r,i,o,a){var s,l,u={},c=t.length,d=o.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=my+a.call(l,l.__data__,s,t),h in u?i[s]=l:u[h]=l);for(s=0;s<d;++s)h=my+a.call(e,o[s],s,o),(l=u[h])?(r[s]=l,l.__data__=o[s],u[h]=null):n[s]=new gf(e,o[s]);for(s=0;s<c;++s)(l=t[s])&&u[f[s]]===l&&(i[s]=l)}function fO(e,t){if(!e)return h=new Array(this.size()),u=-1,this.each(function($){h[++u]=$}),h;var n=t?cO:uO,r=this._parents,i=this._groups;typeof e!="function"&&(e=lO(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],d=i[u],f=d.length,h=e.call(c,c&&c.__data__,u,r),p=h.length,g=s[u]=new Array(p),b=a[u]=new Array(p),v=l[u]=new Array(f);n(c,d,g,b,v,h,t);for(var x=0,y=0,_,S;x<p;++x)if(_=g[x]){for(x>=y&&(y=x+1);!(S=b[y])&&++y<p;);_._next=S||null}}return a=new Rn(a,r),a._enter=s,a._exit=l,a}function dO(){return new Rn(this._exit||this._groups.map(J5),this._parents)}function hO(e,t,n){var r=this.enter(),i=this,o=this.exit();return r=typeof e=="function"?e(r):r.append(e+""),t!=null&&(i=t(i)),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function pO(e){for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<r;++s)a[s]=t[s];return new Rn(a,this._parents)}function gO(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function vO(e){e||(e=bO);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Rn(i,this._parents).order()}function bO(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function mO(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yO(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function _O(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function xO(){var e=0;return this.each(function(){++e}),e}function wO(){return!this.node()}function CO(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function SO(e){return function(){this.removeAttribute(e)}}function $O(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kO(e,t){return function(){this.setAttribute(e,t)}}function MO(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function TO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function EO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function AO(e,t){var n=wu(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?$O:SO:typeof t=="function"?n.local?EO:TO:n.local?MO:kO)(n,t))}function zv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function PO(e){return function(){this.style.removeProperty(e)}}function RO(e,t,n){return function(){this.style.setProperty(e,t,n)}}function zO(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function IO(e,t,n){return arguments.length>1?this.each((t==null?PO:typeof t=="function"?zO:RO)(e,t,n??"")):Go(this.node(),e)}function Go(e,t){return e.style.getPropertyValue(t)||zv(e).getComputedStyle(e,null).getPropertyValue(t)}function FO(e){return function(){delete this[e]}}function BO(e,t){return function(){this[e]=t}}function OO(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function NO(e,t){return arguments.length>1?this.each((t==null?FO:typeof t=="function"?OO:BO)(e,t)):this.node()[e]}function Q5(e){return e.trim().split(/^|\s+/)}function Iv(e){return e.classList||new e8(e)}function e8(e){this._node=e,this._names=Q5(e.getAttribute("class")||"")}e8.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function t8(e,t){for(var n=Iv(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function n8(e,t){for(var n=Iv(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function LO(e){return function(){t8(this,e)}}function DO(e){return function(){n8(this,e)}}function HO(e,t){return function(){(t.apply(this,arguments)?t8:n8)(this,e)}}function UO(e,t){var n=Q5(e+"");if(arguments.length<2){for(var r=Iv(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?HO:t?LO:DO)(n,t))}function jO(){this.textContent=""}function WO(e){return function(){this.textContent=e}}function VO(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function qO(e){return arguments.length?this.each(e==null?jO:(typeof e=="function"?VO:WO)(e)):this.node().textContent}function YO(){this.innerHTML=""}function GO(e){return function(){this.innerHTML=e}}function XO(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function KO(e){return arguments.length?this.each(e==null?YO:(typeof e=="function"?XO:GO)(e)):this.node().innerHTML}function ZO(){this.nextSibling&&this.parentNode.appendChild(this)}function JO(){return this.each(ZO)}function QO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function eN(){return this.each(QO)}function tN(e){var t=typeof e=="function"?e:Fd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function nN(){return null}function rN(e,t){var n=typeof e=="function"?e:Fd(e),r=t==null?nN:typeof t=="function"?t:Bd(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function iN(){var e=this.parentNode;e&&e.removeChild(this)}function oN(){return this.each(iN)}function aN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function sN(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lN(e){return this.select(e?sN:aN)}function uN(e){return arguments.length?this.property("__data__",e):this.node().__data__}var r8={},Ce=null;if(typeof document<"u"){var cN=document.documentElement;"onmouseenter"in cN||(r8={mouseenter:"mouseover",mouseleave:"mouseout"})}function fN(e,t,n){return e=i8(e,t,n),function(r){var i=r.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,r)}}function i8(e,t,n){return function(r){var i=Ce;Ce=r;try{e.call(this,this.__data__,t,n)}finally{Ce=i}}}function dN(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function hN(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++r]=o;++r?t.length=r:delete this.__on}}}function pN(e,t,n){var r=r8.hasOwnProperty(e.type)?fN:i8;return function(i,o,a){var s=this.__on,l,u=r(t,o,a);if(s){for(var c=0,d=s.length;c<d;++c)if((l=s[c]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),l.value=t;return}}this.addEventListener(e.type,u,n),l={type:e.type,name:e.name,value:t,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function gN(e,t,n){var r=dN(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?pN:hN,n==null&&(n=!1),i=0;i<o;++i)this.each(s(r[i],t,n));return this}function ql(e,t,n,r){var i=Ce;e.sourceEvent=Ce,Ce=e;try{return t.apply(n,r)}finally{Ce=i}}function o8(e,t,n){var r=zv(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function vN(e,t){return function(){return o8(this,e,t)}}function bN(e,t){return function(){return o8(this,e,t.apply(this,arguments))}}function mN(e,t){return this.each((typeof t=="function"?bN:vN)(e,t))}var Fv=[null];function Rn(e,t){this._groups=e,this._parents=t}function pa(){return new Rn([[document.documentElement]],Fv)}Rn.prototype=pa.prototype={constructor:Rn,select:rO,selectAll:oO,filter:aO,data:fO,enter:sO,exit:dO,join:hO,merge:pO,order:gO,sort:vO,call:mO,nodes:yO,node:_O,size:xO,empty:wO,each:CO,attr:AO,style:IO,property:NO,classed:UO,text:qO,html:KO,raise:JO,lower:eN,append:tN,insert:rN,remove:oN,clone:lN,datum:uN,on:gN,dispatch:mN};function Ue(e){return typeof e=="string"?new Rn([[document.querySelector(e)]],[document.documentElement]):new Rn([[e]],Fv)}function yN(e){return Ue(Fd(e).call(document.documentElement))}var _N=0;function a8(){return new F0}function F0(){this._="@"+(++_N).toString(36)}F0.prototype=a8.prototype={constructor:F0,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function Bv(){for(var e=Ce,t;t=e.sourceEvent;)e=t;return e}function Od(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function lr(e){var t=Bv();return t.changedTouches&&(t=t.changedTouches[0]),Od(e,t)}function s8(e){return typeof e=="string"?new Rn([document.querySelectorAll(e)],[document.documentElement]):new Rn([e??[]],Fv)}function Yl(e,t,n){arguments.length<3&&(n=t,t=Bv().changedTouches);for(var r=0,i=t?t.length:0,o;r<i;++r)if((o=t[r]).identifier===n)return Od(e,o);return null}function xN(e,t){t==null&&(t=Bv().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n<r;++n)i[n]=Od(e,t[n]);return i}function op(){Ce.stopImmediatePropagation()}function Wa(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function Nd(e){var t=e.document.documentElement,n=Ue(e).on("dragstart.drag",Wa,!0);"onselectstart"in t?n.on("selectstart.drag",Wa,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Ld(e,t){var n=e.document.documentElement,r=Ue(e).on("dragstart.drag",null);t&&(r.on("click.drag",Wa,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function lc(e){return function(){return e}}function B0(e,t,n,r,i,o,a,s,l,u){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=u}B0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function wN(){return!Ce.ctrlKey&&!Ce.button}function CN(){return this.parentNode}function SN(e){return e??{x:Ce.x,y:Ce.y}}function $N(){return navigator.maxTouchPoints||"ontouchstart"in this}function O0(){var e=wN,t=CN,n=SN,r=$N,i={},o=ha("start","drag","end"),a=0,s,l,u,c,d=0;function f(_){_.on("mousedown.drag",h).filter(r).on("touchstart.drag",b).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){if(!(c||!e.apply(this,arguments))){var _=y("mouse",t.apply(this,arguments),lr,this,arguments);_&&(Ue(Ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Nd(Ce.view),op(),u=!1,s=Ce.clientX,l=Ce.clientY,_("start"))}}function p(){if(Wa(),!u){var _=Ce.clientX-s,S=Ce.clientY-l;u=_*_+S*S>d}i.mouse("drag")}function g(){Ue(Ce.view).on("mousemove.drag mouseup.drag",null),Ld(Ce.view,u),Wa(),i.mouse("end")}function b(){if(e.apply(this,arguments)){var _=Ce.changedTouches,S=t.apply(this,arguments),$=_.length,w,T;for(w=0;w<$;++w)(T=y(_[w].identifier,S,Yl,this,arguments))&&(op(),T("start"))}}function v(){var _=Ce.changedTouches,S=_.length,$,w;for($=0;$<S;++$)(w=i[_[$].identifier])&&(Wa(),w("drag"))}function x(){var _=Ce.changedTouches,S=_.length,$,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),$=0;$<S;++$)(w=i[_[$].identifier])&&(op(),w("end"))}function y(_,S,$,w,T){var M=$(S,_),P,R,C,E=o.copy();if(ql(new B0(f,"beforestart",P,_,a,M[0],M[1],0,0,E),function(){return(Ce.subject=P=n.apply(w,T))==null?!1:(R=P.x-M[0]||0,C=P.y-M[1]||0,!0)}))return function I(z){var j=M,Z;switch(z){case"start":i[_]=I,Z=a++;break;case"end":delete i[_],--a;case"drag":M=$(S,_),Z=a;break}ql(new B0(f,z,P,_,Z,M[0]+R,M[1]+C,M[0]-j[0],M[1]-j[1],E),E.apply,E,[z,w,T])}}return f.filter=function(_){return arguments.length?(e=typeof _=="function"?_:lc(!!_),f):e},f.container=function(_){return arguments.length?(t=typeof _=="function"?_:lc(_),f):t},f.subject=function(_){return arguments.length?(n=typeof _=="function"?_:lc(_),f):n},f.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:lc(!!_),f):r},f.on=function(){var _=o.on.apply(o,arguments);return _===o?f:_},f.clickDistance=function(_){return arguments.length?(d=(_=+_)*_,f):Math.sqrt(d)},f}function ms(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fo(){}var Xo=.7,rs=1/Xo,Va="\\s*([+-]?\\d+)\\s*",Gl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kN=/^#([0-9a-f]{3,8})$/,MN=new RegExp("^rgb\\("+[Va,Va,Va]+"\\)$"),TN=new RegExp("^rgb\\("+[Wr,Wr,Wr]+"\\)$"),EN=new RegExp("^rgba\\("+[Va,Va,Va,Gl]+"\\)$"),AN=new RegExp("^rgba\\("+[Wr,Wr,Wr,Gl]+"\\)$"),PN=new RegExp("^hsl\\("+[Gl,Wr,Wr]+"\\)$"),RN=new RegExp("^hsla\\("+[Gl,Wr,Wr,Gl]+"\\)$"),yy={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};ms(fo,eo,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:_y,formatHex:_y,formatHsl:zN,formatRgb:xy,toString:xy});function _y(){return this.rgb().formatHex()}function zN(){return l8(this).formatHsl()}function xy(){return this.rgb().formatRgb()}function eo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=kN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wy(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?uc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?uc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=MN.exec(e))?new un(t[1],t[2],t[3],1):(t=TN.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=EN.exec(e))?uc(t[1],t[2],t[3],t[4]):(t=AN.exec(e))?uc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PN.exec(e))?$y(t[1],t[2]/100,t[3]/100,1):(t=RN.exec(e))?$y(t[1],t[2]/100,t[3]/100,t[4]):yy.hasOwnProperty(e)?wy(yy[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function wy(e){return new un(e>>16&255,e>>8&255,e&255,1)}function uc(e,t,n,r){return r<=0&&(e=t=n=NaN),new un(e,t,n,r)}function Ov(e){return e instanceof fo||(e=eo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function is(e,t,n,r){return arguments.length===1?Ov(e):new un(e,t,n,r??1)}function un(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ms(un,is,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:Cy,formatHex:Cy,formatRgb:Sy,toString:Sy}));function Cy(){return"#"+ap(this.r)+ap(this.g)+ap(this.b)}function Sy(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function ap(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function $y(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fr(e,t,n,r)}function l8(e){if(e instanceof Fr)return new Fr(e.h,e.s,e.l,e.opacity);if(e instanceof fo||(e=eo(e)),!e)return new Fr;if(e instanceof Fr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Fr(a,s,l,e.opacity)}function vf(e,t,n,r){return arguments.length===1?l8(e):new Fr(e,t,n,r??1)}function Fr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Fr,vf,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Fr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Fr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new un(sp(e>=240?e-240:e+120,i,r),sp(e,i,r),sp(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function sp(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var u8=Math.PI/180,c8=180/Math.PI,bf=18,f8=.96422,d8=1,h8=.82521,p8=4/29,qa=6/29,g8=3*qa*qa,IN=qa*qa*qa;function v8(e){if(e instanceof _r)return new _r(e.l,e.a,e.b,e.opacity);if(e instanceof Dr)return m8(e);e instanceof un||(e=Ov(e));var t=fp(e.r),n=fp(e.g),r=fp(e.b),i=lp((.2225045*t+.7168786*n+.0606169*r)/d8),o,a;return t===n&&n===r?o=a=i:(o=lp((.4360747*t+.3850649*n+.1430804*r)/f8),a=lp((.0139322*t+.0971045*n+.7141733*r)/h8)),new _r(116*i-16,500*(o-i),200*(i-a),e.opacity)}function FN(e,t){return new _r(e,0,0,t??1)}function mf(e,t,n,r){return arguments.length===1?v8(e):new _r(e,t,n,r??1)}function _r(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ms(_r,mf,Cu(fo,{brighter:function(e){return new _r(this.l+bf*(e??1),this.a,this.b,this.opacity)},darker:function(e){return new _r(this.l-bf*(e??1),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=f8*up(t),e=d8*up(e),n=h8*up(n),new un(cp(3.1338561*t-1.6168667*e-.4906146*n),cp(-.9787684*t+1.9161415*e+.033454*n),cp(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function lp(e){return e>IN?Math.pow(e,1/3):e/g8+p8}function up(e){return e>qa?e*e*e:g8*(e-p8)}function cp(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function fp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function b8(e){if(e instanceof Dr)return new Dr(e.h,e.c,e.l,e.opacity);if(e instanceof _r||(e=v8(e)),e.a===0&&e.b===0)return new Dr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*c8;return new Dr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function BN(e,t,n,r){return arguments.length===1?b8(e):new Dr(n,t,e,r??1)}function yf(e,t,n,r){return arguments.length===1?b8(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function m8(e){if(isNaN(e.h))return new _r(e.l,0,0,e.opacity);var t=e.h*u8;return new _r(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ms(Dr,yf,Cu(fo,{brighter:function(e){return new Dr(this.h,this.c,this.l+bf*(e??1),this.opacity)},darker:function(e){return new Dr(this.h,this.c,this.l-bf*(e??1),this.opacity)},rgb:function(){return m8(this).rgb()}}));var y8=-.14861,Nv=1.78277,Lv=-.29227,Dd=-.90649,Xl=1.97294,ky=Xl*Dd,My=Xl*Nv,Ty=Nv*Lv-Dd*y8;function ON(e){if(e instanceof Ho)return new Ho(e.h,e.s,e.l,e.opacity);e instanceof un||(e=Ov(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Ty*r+ky*t-My*n)/(Ty+ky-My),o=r-i,a=(Xl*(n-i)-Lv*o)/Dd,s=Math.sqrt(a*a+o*o)/(Xl*i*(1-i)),l=s?Math.atan2(a,o)*c8-120:NaN;return new Ho(l<0?l+360:l,s,i,e.opacity)}function $r(e,t,n,r){return arguments.length===1?ON(e):new Ho(e,t,n,r??1)}function Ho(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Ho,$r,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Ho(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Ho(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*u8,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new un(255*(t+n*(y8*r+Nv*i)),255*(t+n*(Lv*r+Dd*i)),255*(t+n*(Xl*r)),this.opacity)}}));function _8(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function x8(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return _8((n-r/t)*t,a,i,o,s)}}function w8(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return _8((n-r/t)*t,i,o,a,s)}}function Hd(e){return function(){return e}}function C8(e,t){return function(n){return e+n*t}}function NN(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ud(e,t){var n=t-e;return n?C8(e,n>180||n<-180?n-360*Math.round(n/360):n):Hd(isNaN(e)?t:e)}function LN(e){return(e=+e)==1?tn:function(t,n){return n-t?NN(t,n,e):Hd(isNaN(t)?n:t)}}function tn(e,t){var n=t-e;return n?C8(e,n):Hd(isNaN(e)?t:e)}const Kl=function e(t){var n=LN(t);function r(i,o){var a=n((i=is(i)).r,(o=is(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=tn(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function S8(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=is(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=o(l),s+""}}}var $8=S8(x8),DN=S8(w8);function Dv(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function k8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function HN(e,t){return(k8(t)?Dv:M8)(e,t)}function M8(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=ys(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function T8(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function E8(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ys(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var N0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dp=new RegExp(N0.source,"g");function UN(e){return function(){return e}}function jN(e){return function(t){return e(t)+""}}function Hv(e,t){var n=N0.lastIndex=dp.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=N0.exec(e))&&(i=dp.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:or(r,i)})),n=dp.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?jN(l[0].x):UN(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}function ys(e,t){var n=typeof t,r;return t==null||n==="boolean"?Hd(t):(n==="number"?or:n==="string"?(r=eo(t))?(t=r,Kl):Hv:t instanceof eo?Kl:t instanceof Date?T8:k8(t)?Dv:Array.isArray(t)?M8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?E8:or)(e,t)}function WN(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function VN(e,t){var n=Ud(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function A8(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ey=180/Math.PI,L0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function P8(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ey,skewX:Math.atan(l)*Ey,scaleX:a,scaleY:s}}var zs,hp,Ay,cc;function qN(e){return e==="none"?L0:(zs||(zs=document.createElement("DIV"),hp=document.documentElement,Ay=document.defaultView),zs.style.transform=e,e=Ay.getComputedStyle(hp.appendChild(zs),null).getPropertyValue("transform"),hp.removeChild(zs),e=e.slice(7,-1).split(","),P8(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function YN(e){return e==null||(cc||(cc=document.createElementNS("http://www.w3.org/2000/svg","g")),cc.setAttribute("transform",e),!(e=cc.transform.baseVal.consolidate()))?L0:(e=e.matrix,P8(e.a,e.b,e.c,e.d,e.e,e.f))}function R8(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push("translate(",null,t,null,n);p.push({i:g-4,x:or(u,d)},{i:g-2,x:or(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:or(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:or(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function l(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");p.push({i:g-4,x:or(u,d)},{i:g-2,x:or(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var p=-1,g=f.length,b;++p<g;)d[(b=f[p]).i]=b.x(h);return d.join("")}}}var z8=R8(qN,"px, ","px)","deg)"),I8=R8(YN,", ",")",")"),Is=Math.SQRT2,pp=2,Py=4,GN=1e-12;function Ry(e){return((e=Math.exp(e))+1/e)/2}function XN(e){return((e=Math.exp(e))-1/e)/2}function KN(e){return((e=Math.exp(2*e))-1)/(e+1)}function F8(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-n,u=a-r,c=l*l+u*u,d,f;if(c<GN)f=Math.log(s/i)/Is,d=function(x){return[n+x*l,r+x*u,i*Math.exp(Is*x*f)]};else{var h=Math.sqrt(c),p=(s*s-i*i+Py*c)/(2*i*pp*h),g=(s*s-i*i-Py*c)/(2*s*pp*h),b=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);f=(v-b)/Is,d=function(x){var y=x*f,_=Ry(b),S=i/(pp*h)*(_*KN(Is*y+b)-XN(b));return[n+S*l,r+S*u,i*_/Ry(Is*y+b)]}}return d.duration=f*1e3,d}function B8(e){return function(t,n){var r=e((t=vf(t)).h,(n=vf(n)).h),i=tn(t.s,n.s),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const ZN=B8(Ud);var JN=B8(tn);function QN(e,t){var n=tn((e=mf(e)).l,(t=mf(t)).l),r=tn(e.a,t.a),i=tn(e.b,t.b),o=tn(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function O8(e){return function(t,n){var r=e((t=yf(t)).h,(n=yf(n)).h),i=tn(t.c,n.c),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const eL=O8(Ud);var tL=O8(tn);function N8(e){return function t(n){n=+n;function r(i,o){var a=e((i=$r(i)).h,(o=$r(o)).h),s=tn(i.s,o.s),l=tn(i.l,o.l),u=tn(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=t,r}(1)}const nL=N8(Ud);var jd=N8(tn);function rL(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function iL(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var os=0,Xs=0,Fs=0,L8=1e3,_f,Ks,xf=0,Ko=0,Wd=0,Zl=typeof performance=="object"&&performance.now?performance:Date,D8=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _s(){return Ko||(D8(oL),Ko=Zl.now()+Wd)}function oL(){Ko=0}function Jl(){this._call=this._time=this._next=null}Jl.prototype=Vd.prototype={constructor:Jl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_s():+n)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:_f=this,Ks=this),this._call=e,this._time=n,D0()},stop:function(){this._call&&(this._call=null,this._time=1/0,D0())}};function Vd(e,t,n){var r=new Jl;return r.restart(e,t,n),r}function H8(){_s(),++os;for(var e=_f,t;e;)(t=Ko-e._time)>=0&&e._call.call(null,t),e=e._next;--os}function zy(){Ko=(xf=Zl.now())+Wd,os=Xs=0;try{H8()}finally{os=0,sL(),Ko=0}}function aL(){var e=Zl.now(),t=e-xf;t>L8&&(Wd-=t,xf=e)}function sL(){for(var e,t=_f,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:_f=n);Ks=e,D0(r)}function D0(e){if(!os){Xs&&(Xs=clearTimeout(Xs));var t=e-Ko;t>24?(e<1/0&&(Xs=setTimeout(zy,e-Zl.now()-Wd)),Fs&&(Fs=clearInterval(Fs))):(Fs||(xf=Zl.now(),Fs=setInterval(aL,L8)),os=1,D8(zy))}}function H0(e,t,n){var r=new Jl;return t=t==null?0:+t,r.restart(function(i){r.stop(),e(i+t)},t,n),r}function lL(e,t,n){var r=new Jl,i=t;return t==null?(r.restart(e,t,n),r):(t=+t,n=n==null?_s():+n,r.restart(function o(a){a+=i,r.restart(o,i+=t,n),e(a)},t,n),r)}var uL=ha("start","end","cancel","interrupt"),cL=[],U8=0,U0=1,j0=2,Oc=3,Iy=4,W0=5,Nc=6;function qd(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;fL(e,n,{name:t,index:r,group:i,on:uL,tween:cL,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:U8})}function Uv(e,t){var n=Mr(e,t);if(n.state>U8)throw new Error("too late; already scheduled");return n}function xi(e,t){var n=Mr(e,t);if(n.state>Oc)throw new Error("too late; already running");return n}function Mr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fL(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Vd(o,0,n.time);function o(u){n.state=U0,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==U0)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Oc)return H0(a);h.state===Iy?(h.state=Nc,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=Nc,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(H0(function(){n.state===Oc&&(n.state=Iy,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=j0,n.on.call("start",e,e.__data__,n.index,n.group),n.state===j0){for(n.state=Oc,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=W0,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===W0&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Nc,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Uo(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>j0&&r.state<W0,r.state=Nc,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function dL(e){return this.each(function(){Uo(this,e)})}function hL(e,t){var n,r;return function(){var i=xi(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function pL(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=xi(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function gL(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Mr(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?hL:pL)(n,e,t))}function jv(e,t,n){var r=e._id;return e.each(function(){var i=xi(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Mr(i,r).value[t]}}function j8(e,t){var n;return(typeof t=="number"?or:t instanceof eo?Kl:(n=eo(t))?(t=n,Kl):Hv)(e,t)}function vL(e){return function(){this.removeAttribute(e)}}function bL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function yL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function _L(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function xL(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function wL(e,t){var n=wu(e),r=n==="transform"?I8:j8;return this.attrTween(e,typeof t=="function"?(n.local?xL:_L)(n,r,jv(this,"attr."+e,t)):t==null?(n.local?bL:vL)(n):(n.local?yL:mL)(n,r,t))}function CL(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function SL(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function $L(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&SL(e,o)),n}return i._value=t,i}function kL(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&CL(e,o)),n}return i._value=t,i}function ML(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=wu(e);return this.tween(n,(r.local?$L:kL)(r,t))}function TL(e,t){return function(){Uv(this,e).delay=+t.apply(this,arguments)}}function EL(e,t){return t=+t,function(){Uv(this,e).delay=t}}function AL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?TL:EL)(t,e)):Mr(this.node(),t).delay}function PL(e,t){return function(){xi(this,e).duration=+t.apply(this,arguments)}}function RL(e,t){return t=+t,function(){xi(this,e).duration=t}}function zL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?PL:RL)(t,e)):Mr(this.node(),t).duration}function IL(e,t){if(typeof t!="function")throw new Error;return function(){xi(this,e).ease=t}}function FL(e){var t=this._id;return arguments.length?this.each(IL(t,e)):Mr(this.node(),t).ease}function BL(e){typeof e!="function"&&(e=Rv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Gr(r,this._parents,this._name,this._id)}function OL(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<r;++s)a[s]=t[s];return new Gr(a,this._parents,this._name,this._id)}function NL(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function LL(e,t,n){var r,i,o=NL(t)?Uv:xi;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function DL(e,t){var n=this._id;return arguments.length<2?Mr(this.node(),n).on.on(e):this.each(LL(n,e,t))}function HL(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function UL(){return this.on("end.remove",HL(this._id))}function jL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Bd(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,d,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,qd(u[f],t,n,f,u,Mr(c,n)));return new Gr(o,this._parents,t,n)}function WL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Pv(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,p=Mr(c,n),g=0,b=f.length;g<b;++g)(h=f[g])&&qd(h,t,n,g,f,p);o.push(f),a.push(c)}return new Gr(o,a,t,n)}var VL=pa.prototype.constructor;function qL(){return new VL(this._groups,this._parents)}function YL(e,t){var n,r,i;return function(){var o=Go(this,e),a=(this.style.removeProperty(e),Go(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function W8(e){return function(){this.style.removeProperty(e)}}function GL(e,t,n){var r,i=n+"",o;return function(){var a=Go(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function XL(e,t,n){var r,i,o;return function(){var a=Go(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Go(this,e))),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}function KL(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var l=xi(this,e),u=l.on,c=l.value[o]==null?s||(s=W8(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function ZL(e,t,n){var r=(e+="")=="transform"?z8:j8;return t==null?this.styleTween(e,YL(e,r)).on("end.style."+e,W8(e)):typeof t=="function"?this.styleTween(e,XL(e,r,jv(this,"style."+e,t))).each(KL(this._id,e)):this.styleTween(e,GL(e,r,t),n).on("end.style."+e,null)}function JL(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function QL(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&JL(e,a,n)),r}return o._value=t,o}function eD(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,QL(e,t,n??""))}function tD(e){return function(){this.textContent=e}}function nD(e){return function(){var t=e(this);this.textContent=t??""}}function rD(e){return this.tween("text",typeof e=="function"?nD(jv(this,"text",e)):tD(e==null?"":e+""))}function iD(e){return function(t){this.textContent=e.call(this,t)}}function oD(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&iD(i)),t}return r._value=e,r}function aD(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,oD(e))}function sD(){for(var e=this._name,t=this._id,n=q8(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Mr(l,t);qd(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Gr(r,this._parents,e,n)}function lD(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=xi(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t})})}var uD=0;function Gr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function V8(e){return pa().transition(e)}function q8(){return++uD}var Ma=pa.prototype;Gr.prototype=V8.prototype={constructor:Gr,select:jL,selectAll:WL,filter:BL,merge:OL,selection:qL,transition:sD,call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:DL,attr:wL,attrTween:ML,style:ZL,styleTween:eD,text:rD,textTween:aD,remove:UL,tween:gL,delay:AL,duration:zL,ease:FL,end:lD};function cD(e){return+e}function fD(e){return e*e}function dD(e){return e*(2-e)}function Fy(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function hD(e){return e*e*e}function pD(e){return--e*e*e+1}function V0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Wv=3,gD=function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n}(Wv),vD=function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n}(Wv),By=function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n}(Wv),Y8=Math.PI,G8=Y8/2;function bD(e){return+e==1?1:1-Math.cos(e*G8)}function mD(e){return Math.sin(e*G8)}function Oy(e){return(1-Math.cos(Y8*e))/2}function to(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function yD(e){return to(1-+e)}function _D(e){return 1-to(e)}function Ny(e){return((e*=2)<=1?to(1-e):2-to(e-1))/2}function xD(e){return 1-Math.sqrt(1-e*e)}function wD(e){return Math.sqrt(1- --e*e)}function Ly(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var q0=4/11,CD=6/11,SD=8/11,$D=3/4,kD=9/11,MD=10/11,TD=15/16,ED=21/22,AD=63/64,fc=1/q0/q0;function PD(e){return 1-Ql(1-e)}function Ql(e){return(e=+e)<q0?fc*e*e:e<SD?fc*(e-=CD)*e+$D:e<MD?fc*(e-=kD)*e+TD:fc*(e-=ED)*e+AD}function RD(e){return((e*=2)<=1?1-Ql(1-e):Ql(e-1)+1)/2}var Vv=1.70158,zD=function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n}(Vv),ID=function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n}(Vv),Dy=function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n}(Vv),as=2*Math.PI,qv=1,Yv=.3,FD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return t*to(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(qv,Yv),Hy=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return 1-t*to(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(qv,Yv),BD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return((o=o*2-1)<0?t*to(-o)*Math.sin((r-o)/n):2-t*to(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(qv,Yv),Y0={time:null,delay:0,duration:250,ease:V0};function OD(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return Y0.time=_s(),Y0;return n}function ND(e){var t,n;e instanceof Gr?(t=e._id,e=e._name):(t=q8(),(n=Y0).time=_s(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&qd(l,e,t,u,a,n||OD(l,t));return new Gr(r,this._parents,e,t)}pa.prototype.interrupt=dL;pa.prototype.transition=ND;var LD=[null];function DD(e,t){var n=e.__transition,r,i;if(n){t=t==null?null:t+"";for(i in n)if((r=n[i]).state>U0&&r.name===t)return new Gr([[e]],LD,t,+i)}return null}function gp(e){return function(){return e}}function HD(e,t,n){this.target=e,this.type=t,this.selection=n}function Uy(){Ce.stopImmediatePropagation()}function vp(){Ce.preventDefault(),Ce.stopImmediatePropagation()}var jy={},bp={name:"space"},Ta={name:"handle"},Ea={name:"center"};function Wy(e){return[+e[0],+e[1]]}function G0(e){return[Wy(e[0]),Wy(e[1])]}function UD(e){return function(t){return Yl(t,Ce.touches,e)}}var Lc={name:"x",handles:["w","e"].map(eu),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Dc={name:"y",handles:["n","s"].map(eu),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},jD={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(eu),input:function(e){return e==null?null:G0(e)},output:function(e){return e}},ti={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Vy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},qy={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},WD={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},VD={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function eu(e){return{type:e}}function qD(){return!Ce.ctrlKey&&!Ce.button}function YD(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function GD(){return navigator.maxTouchPoints||"ontouchstart"in this}function mp(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function XD(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function KD(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function ZD(){return Gv(Lc)}function JD(){return Gv(Dc)}function QD(){return Gv(jD)}function Gv(e){var t=YD,n=qD,r=GD,i=!0,o=ha("start","brush","end"),a=6,s;function l(b){var v=b.property("__brush",g).selectAll(".overlay").data([eu("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ti.overlay).merge(v).each(function(){var y=mp(this).extent;Ue(this).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1])}),b.selectAll(".selection").data([eu("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ti.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=b.selectAll(".handle").data(e.handles,function(y){return y.type});x.exit().remove(),x.enter().append("rect").attr("class",function(y){return"handle handle--"+y.type}).attr("cursor",function(y){return ti[y.type]}),b.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(b,v){b.selection?b.on("start.brush",function(){c(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){c(this,arguments).end()}).tween("brush",function(){var x=this,y=x.__brush,_=c(x,arguments),S=y.selection,$=e.input(typeof v=="function"?v.apply(this,arguments):v,y.extent),w=ys(S,$);function T(M){y.selection=M===1&&$===null?null:w(M),u.call(x),_.brush()}return S!==null&&$!==null?T:T(1)}):b.each(function(){var x=this,y=arguments,_=x.__brush,S=e.input(typeof v=="function"?v.apply(x,y):v,_.extent),$=c(x,y).beforestart();Uo(x),_.selection=S===null?null:S,u.call(x),$.start().brush().end()})},l.clear=function(b){l.move(b,null)};function u(){var b=Ue(this),v=mp(this).selection;v?(b.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),b.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?v[1][1]-v[0][1]+a:a})):b.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(b,v,x){var y=b.__brush.emitter;return y&&(!x||!y.clean)?y:new d(b,v,x)}function d(b,v,x){this.that=b,this.args=v,this.state=b.__brush,this.active=0,this.clean=x}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(b){ql(new HD(l,b,e.output(this.state.selection)),o.apply,o,[b,this.that,this.args])}};function f(){if(s&&!Ce.touches||!n.apply(this,arguments))return;var b=this,v=Ce.target.__data__.type,x=(i&&Ce.metaKey?v="overlay":v)==="selection"?jy:i&&Ce.altKey?Ea:Ta,y=e===Dc?null:WD[v],_=e===Lc?null:VD[v],S=mp(b),$=S.extent,w=S.selection,T=$[0][0],M,P,R=$[0][1],C,E,I=$[1][0],z,j,Z=$[1][1],J,ie,he=0,_e=0,oe,ve=y&&_&&i&&Ce.shiftKey,we,Oe,xe=Ce.touches?UD(Ce.changedTouches[0].identifier):lr,Xe=xe(b),Ve=Xe,fe=c(b,arguments,!0).beforestart();v==="overlay"?(w&&(oe=!0),S.selection=w=[[M=e===Dc?T:Xe[0],C=e===Lc?R:Xe[1]],[z=e===Dc?I:M,J=e===Lc?Z:C]]):(M=w[0][0],C=w[0][1],z=w[1][0],J=w[1][1]),P=M,E=C,j=z,ie=J;var Ee=Ue(b).attr("pointer-events","none"),Pe=Ee.selectAll(".overlay").attr("cursor",ti[v]);if(Ce.touches)fe.moved=H,fe.ended=de;else{var A=Ue(Ce.view).on("mousemove.brush",H,!0).on("mouseup.brush",de,!0);i&&A.on("keydown.brush",le,!0).on("keyup.brush",q,!0),Nd(Ce.view)}Uy(),Uo(b),u.call(b),fe.start();function H(){var N=xe(b);ve&&!we&&!Oe&&(Math.abs(N[0]-Ve[0])>Math.abs(N[1]-Ve[1])?Oe=!0:we=!0),Ve=N,oe=!0,vp(),G()}function G(){var N;switch(he=Ve[0]-Xe[0],_e=Ve[1]-Xe[1],x){case bp:case jy:{y&&(he=Math.max(T-M,Math.min(I-z,he)),P=M+he,j=z+he),_&&(_e=Math.max(R-C,Math.min(Z-J,_e)),E=C+_e,ie=J+_e);break}case Ta:{y<0?(he=Math.max(T-M,Math.min(I-M,he)),P=M+he,j=z):y>0&&(he=Math.max(T-z,Math.min(I-z,he)),P=M,j=z+he),_<0?(_e=Math.max(R-C,Math.min(Z-C,_e)),E=C+_e,ie=J):_>0&&(_e=Math.max(R-J,Math.min(Z-J,_e)),E=C,ie=J+_e);break}case Ea:{y&&(P=Math.max(T,Math.min(I,M-he*y)),j=Math.max(T,Math.min(I,z+he*y))),_&&(E=Math.max(R,Math.min(Z,C-_e*_)),ie=Math.max(R,Math.min(Z,J+_e*_)));break}}j<P&&(y*=-1,N=M,M=z,z=N,N=P,P=j,j=N,v in Vy&&Pe.attr("cursor",ti[v=Vy[v]])),ie<E&&(_*=-1,N=C,C=J,J=N,N=E,E=ie,ie=N,v in qy&&Pe.attr("cursor",ti[v=qy[v]])),S.selection&&(w=S.selection),we&&(P=w[0][0],j=w[1][0]),Oe&&(E=w[0][1],ie=w[1][1]),(w[0][0]!==P||w[0][1]!==E||w[1][0]!==j||w[1][1]!==ie)&&(S.selection=[[P,E],[j,ie]],u.call(b),fe.brush())}function de(){if(Uy(),Ce.touches){if(Ce.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ld(Ce.view,oe),A.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Ee.attr("pointer-events","all"),Pe.attr("cursor",ti.overlay),S.selection&&(w=S.selection),XD(w)&&(S.selection=null,u.call(b)),fe.end()}function le(){switch(Ce.keyCode){case 16:{ve=y&&_;break}case 18:{x===Ta&&(y&&(z=j-he*y,M=P+he*y),_&&(J=ie-_e*_,C=E+_e*_),x=Ea,G());break}case 32:{(x===Ta||x===Ea)&&(y<0?z=j-he:y>0&&(M=P-he),_<0?J=ie-_e:_>0&&(C=E-_e),x=bp,Pe.attr("cursor",ti.selection),G());break}default:return}vp()}function q(){switch(Ce.keyCode){case 16:{ve&&(we=Oe=ve=!1,G());break}case 18:{x===Ea&&(y<0?z=j:y>0&&(M=P),_<0?J=ie:_>0&&(C=E),x=Ta,G());break}case 32:{x===bp&&(Ce.altKey?(y&&(z=j-he*y,M=P+he*y),_&&(J=ie-_e*_,C=E+_e*_),x=Ea):(y<0?z=j:y>0&&(M=P),_<0?J=ie:_>0&&(C=E),x=Ta),Pe.attr("cursor",ti[v]),G());break}default:return}vp()}}function h(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var b=this.__brush||{selection:null};return b.extent=G0(t.apply(this,arguments)),b.dim=e,b}return l.extent=function(b){return arguments.length?(t=typeof b=="function"?b:gp(G0(b)),l):t},l.filter=function(b){return arguments.length?(n=typeof b=="function"?b:gp(!!b),l):n},l.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:gp(!!b),l):r},l.handleSize=function(b){return arguments.length?(a=+b,l):a},l.keyModifiers=function(b){return arguments.length?(i=!!b,l):i},l.on=function(){var b=o.on.apply(o,arguments);return b===o?l:b},l}var Yy=Math.cos,Gy=Math.sin,X8=Math.PI,dc=X8/2,Xy=X8*2,Ky=Math.max;function eH(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}function tH(){var e=0,t=null,n=null,r=null;function i(o){var a=o.length,s=[],l=Jn(a),u=[],c=[],d=c.groups=new Array(a),f=new Array(a*a),h,p,g,b,v,x;for(h=0,v=-1;++v<a;){for(p=0,x=-1;++x<a;)p+=o[v][x];s.push(p),u.push(Jn(a)),h+=p}for(t&&l.sort(function(P,R){return t(s[P],s[R])}),n&&u.forEach(function(P,R){P.sort(function(C,E){return n(o[R][C],o[R][E])})}),h=Ky(0,Xy-e*a)/h,b=h?e:Xy/a,p=0,v=-1;++v<a;){for(g=p,x=-1;++x<a;){var y=l[v],_=u[y][x],S=o[y][_],$=p,w=p+=S*h;f[_*a+y]={index:y,subindex:_,startAngle:$,endAngle:w,value:S}}d[y]={index:y,startAngle:g,endAngle:p,value:s[y]},p+=b}for(v=-1;++v<a;)for(x=v-1;++x<a;){var T=f[x*a+v],M=f[v*a+x];(T.value||M.value)&&c.push(T.value<M.value?{source:M,target:T}:{source:T,target:M})}return r?c.sort(r):c}return i.padAngle=function(o){return arguments.length?(e=Ky(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(n=o,i):n},i.sortChords=function(o){return arguments.length?(o==null?r=null:(r=eH(o))._=o,i):r&&r._},i}var nH=Array.prototype.slice;function yp(e){return function(){return e}}var X0=Math.PI,K0=2*X0,ko=1e-6,rH=K0-ko;function Z0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ho(){return new Z0}Z0.prototype=ho.prototype={constructor:Z0,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,u=o-e,c=a-t,d=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>ko)if(!(Math.abs(c*s-l*u)>ko)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=n-o,h=r-a,p=s*s+l*l,g=f*f+h*h,b=Math.sqrt(p),v=Math.sqrt(d),x=i*Math.tan((X0-Math.acos((p+d-g)/(2*b*v)))/2),y=x/v,_=x/b;Math.abs(y-1)>ko&&(this._+="L"+(e+y*u)+","+(t+y*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>u*h)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,u=t+s,c=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>ko||Math.abs(this._y1-u)>ko)&&(this._+="L"+l+","+u),n&&(d<0&&(d=d%K0+K0),d>rH?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):d>ko&&(this._+="A"+n+","+n+",0,"+ +(d>=X0)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function iH(e){return e.source}function oH(e){return e.target}function aH(e){return e.radius}function sH(e){return e.startAngle}function lH(e){return e.endAngle}function uH(){var e=iH,t=oH,n=aH,r=sH,i=lH,o=null;function a(){var s,l=nH.call(arguments),u=e.apply(this,l),c=t.apply(this,l),d=+n.apply(this,(l[0]=u,l)),f=r.apply(this,l)-dc,h=i.apply(this,l)-dc,p=d*Yy(f),g=d*Gy(f),b=+n.apply(this,(l[0]=c,l)),v=r.apply(this,l)-dc,x=i.apply(this,l)-dc;if(o||(o=s=ho()),o.moveTo(p,g),o.arc(0,0,d,f,h),(f!==v||h!==x)&&(o.quadraticCurveTo(0,0,b*Yy(v),b*Gy(v)),o.arc(0,0,b,v,x)),o.quadraticCurveTo(0,0,p,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(n=typeof s=="function"?s:yp(+s),a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:yp(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:yp(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s??null,a):o},a}var rr="$";function wf(){}wf.prototype=hi.prototype={constructor:wf,has:function(e){return rr+e in this},get:function(e){return this[rr+e]},set:function(e,t){return this[rr+e]=t,this},remove:function(e){var t=rr+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===rr&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===rr&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===rr&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===rr&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===rr&&++e;return e},empty:function(){for(var e in this)if(e[0]===rr)return!1;return!0},each:function(e){for(var t in this)t[0]===rr&&e(this[t],t.slice(1),this)}};function hi(e,t){var n=new wf;if(e instanceof wf)e.each(function(s,l){n.set(l,s)});else if(Array.isArray(e)){var r=-1,i=e.length,o;if(t==null)for(;++r<i;)n.set(r,e[r]);else for(;++r<i;)n.set(t(o=e[r],r,e),o)}else if(e)for(var a in e)n.set(a,e[a]);return n}function cH(){var e=[],t=[],n,r,i;function o(s,l,u,c){if(l>=e.length)return n!=null&&s.sort(n),r!=null?r(s):s;for(var d=-1,f=s.length,h=e[l++],p,g,b=hi(),v,x=u();++d<f;)(v=b.get(p=h(g=s[d])+""))?v.push(g):b.set(p,[g]);return b.each(function(y,_){c(x,_,o(y,l,u,c))}),x}function a(s,l){if(++l>e.length)return s;var u,c=t[l-1];return r!=null&&l>=e.length?u=s.entries():(u=[],s.each(function(d,f){u.push({key:f,values:a(d,l)})})),c!=null?u.sort(function(d,f){return c(d.key,f.key)}):u}return i={object:function(s){return o(s,0,fH,dH)},map:function(s){return o(s,0,Zy,Jy)},entries:function(s){return a(o(s,0,Zy,Jy),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return n=s,i},rollup:function(s){return r=s,i}}}function fH(){return{}}function dH(e,t,n){e[t]=n}function Zy(){return hi()}function Jy(e,t,n){e.set(t,n)}function Cf(){}var So=hi.prototype;Cf.prototype=K8.prototype={constructor:Cf,has:So.has,add:function(e){return e+="",this[rr+e]=e,this},remove:So.remove,clear:So.clear,values:So.keys,size:So.size,empty:So.empty,each:So.each};function K8(e,t){var n=new Cf;if(e instanceof Cf)e.each(function(o){n.add(o)});else if(e){var r=-1,i=e.length;if(t==null)for(;++r<i;)n.add(e[r]);else for(;++r<i;)n.add(t(e[r],r,e))}return n}function hH(e){var t=[];for(var n in e)t.push(n);return t}function pH(e){var t=[];for(var n in e)t.push(e[n]);return t}function gH(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t}var vH=Array.prototype,Z8=vH.slice;function bH(e,t){return e-t}function mH(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}function Ri(e){return function(){return e}}function yH(e,t){for(var n=-1,r=t.length,i;++n<r;)if(i=_H(e,t[n]))return i;return 0}function _H(e,t){for(var n=t[0],r=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],u=l[0],c=l[1],d=e[s],f=d[0],h=d[1];if(xH(l,d,t))return 0;c>r!=h>r&&n<(f-u)*(r-c)/(h-c)+u&&(i=-i)}return i}function xH(e,t,n){var r;return wH(e,t,n)&&CH(e[r=+(e[0]===t[0])],n[r],t[r])}function wH(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function CH(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function SH(){}var ni=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function J8(){var e=1,t=1,n=Tv,r=l;function i(u){var c=n(u);if(Array.isArray(c))c=c.slice().sort(bH);else{var d=qo(u),f=d[0],h=d[1];c=Yo(f,h,c),c=Jn(Math.floor(f/c)*c,Math.floor(h/c)*c,c)}return c.map(function(p){return o(u,p)})}function o(u,c){var d=[],f=[];return a(u,c,function(h){r(h,u,c),mH(h)>0?d.push([h]):f.push(h)}),f.forEach(function(h){for(var p=0,g=d.length,b;p<g;++p)if(yH((b=d[p])[0],h)!==-1){b.push(h);return}}),{type:"MultiPolygon",value:c,coordinates:d}}function a(u,c,d){var f=new Array,h=new Array,p,g,b,v,x,y;for(p=g=-1,v=u[0]>=c,ni[v<<1].forEach(_);++p<e-1;)b=v,v=u[p+1]>=c,ni[b|v<<1].forEach(_);for(ni[v<<0].forEach(_);++g<t-1;){for(p=-1,v=u[g*e+e]>=c,x=u[g*e]>=c,ni[v<<1|x<<2].forEach(_);++p<e-1;)b=v,v=u[g*e+e+p+1]>=c,y=x,x=u[g*e+p+1]>=c,ni[b|v<<1|x<<2|y<<3].forEach(_);ni[v|x<<3].forEach(_)}for(p=-1,x=u[g*e]>=c,ni[x<<2].forEach(_);++p<e-1;)y=x,x=u[g*e+p+1]>=c,ni[x<<2|y<<3].forEach(_);ni[x<<3].forEach(_);function _(S){var $=[S[0][0]+p,S[0][1]+g],w=[S[1][0]+p,S[1][1]+g],T=s($),M=s(w),P,R;(P=h[T])?(R=f[M])?(delete h[P.end],delete f[R.start],P===R?(P.ring.push(w),d(P.ring)):f[P.start]=h[R.end]={start:P.start,end:R.end,ring:P.ring.concat(R.ring)}):(delete h[P.end],P.ring.push(w),h[P.end=M]=P):(P=f[M])?(R=h[T])?(delete f[P.start],delete h[R.end],P===R?(P.ring.push(w),d(P.ring)):f[R.start]=h[P.end]={start:R.start,end:P.end,ring:R.ring.concat(P.ring)}):(delete f[P.start],P.ring.unshift($),f[P.start=T]=P):f[T]=h[M]={start:T,end:M,ring:[$,w]}}}function s(u){return u[0]*2+u[1]*(e+1)*4}function l(u,c,d){u.forEach(function(f){var h=f[0],p=f[1],g=h|0,b=p|0,v,x=c[b*e+g];h>0&&h<e&&g===h&&(v=c[b*e+g-1],f[0]=h+(d-v)/(x-v)-.5),p>0&&p<t&&b===p&&(v=c[(b-1)*e+g],f[1]=p+(d-v)/(x-v)-.5)})}return i.contour=o,i.size=function(u){if(!arguments.length)return[e,t];var c=Math.ceil(u[0]),d=Math.ceil(u[1]);if(!(c>0)||!(d>0))throw new Error("invalid size");return e=c,t=d,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?Ri(Z8.call(u)):Ri(u),i):n},i.smooth=function(u){return arguments.length?(r=u?l:SH,i):r===l},i}function _p(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<i;++a)for(var s=0,l=0;s<r+n;++s)s<r&&(l+=e.data[s+a*r]),s>=n&&(s>=o&&(l-=e.data[s-o+a*r]),t.data[s-n+a*r]=l/Math.min(s+1,r-1+o-s,o))}function xp(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<r;++a)for(var s=0,l=0;s<i+n;++s)s<i&&(l+=e.data[a+s*r]),s>=n&&(s>=o&&(l-=e.data[a+(s-o)*r]),t.data[a+(s-n)*r]=l/Math.min(s+1,i-1+o-s,o))}function $H(e){return e[0]}function kH(e){return e[1]}function MH(){return 1}function TH(){var e=$H,t=kH,n=MH,r=960,i=500,o=20,a=2,s=o*3,l=r+s*2>>a,u=i+s*2>>a,c=Ri(20);function d(v){var x=new Float32Array(l*u),y=new Float32Array(l*u);v.forEach(function($,w,T){var M=+e($,w,T)+s>>a,P=+t($,w,T)+s>>a,R=+n($,w,T);M>=0&&M<l&&P>=0&&P<u&&(x[M+P*l]+=R)}),_p({width:l,height:u,data:x},{data:y},o>>a),xp({width:l,height:u,data:y},{data:x},o>>a),_p({width:l,height:u,data:x},{data:y},o>>a),xp({width:l,height:u,data:y},{data:x},o>>a),_p({width:l,height:u,data:x},{data:y},o>>a),xp({width:l,height:u,data:y},{data:x},o>>a);var _=c(x);if(!Array.isArray(_)){var S=q5(x);_=Yo(0,S,_),_=Jn(0,Math.floor(S/_)*_,_),_.shift()}return J8().thresholds(_).size([l,u])(x).map(f)}function f(v){return v.value*=Math.pow(2,-2*a),v.coordinates.forEach(h),v}function h(v){v.forEach(p)}function p(v){v.forEach(g)}function g(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function b(){return s=o*3,l=r+s*2>>a,u=i+s*2>>a,d}return d.x=function(v){return arguments.length?(e=typeof v=="function"?v:Ri(+v),d):e},d.y=function(v){return arguments.length?(t=typeof v=="function"?v:Ri(+v),d):t},d.weight=function(v){return arguments.length?(n=typeof v=="function"?v:Ri(+v),d):n},d.size=function(v){if(!arguments.length)return[r,i];var x=Math.ceil(v[0]),y=Math.ceil(v[1]);if(!(x>=0)&&!(x>=0))throw new Error("invalid size");return r=x,i=y,b()},d.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),b()},d.thresholds=function(v){return arguments.length?(c=typeof v=="function"?v:Array.isArray(v)?Ri(Z8.call(v)):Ri(v),d):c},d.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*v*v+1)-1)/2),b()},d}var Qy={},wp={},Cp=34,Bs=10,Sp=13;function Q8(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function EH(e,t){var n=Q8(e);return function(r,i){return t(n(r),i,e)}}function e_(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Dn(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function AH(e){return e<0?"-"+Dn(-e,6):e>9999?"+"+Dn(e,6):Dn(e,4)}function PH(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":AH(e.getUTCFullYear())+"-"+Dn(e.getUTCMonth()+1,2)+"-"+Dn(e.getUTCDate(),2)+(i?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"."+Dn(i,3)+"Z":r?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"Z":n||t?"T"+Dn(t,2)+":"+Dn(n,2)+"Z":"")}function Yd(e){var t=new RegExp('["'+e+`
|
|
1997
|
-
\r]`),n=e.charCodeAt(0);function r(d,f){var h,p,g=i(d,function(b,v){if(h)return h(b,v-1);p=b,h=f?EH(b,f):
|
|
1998
|
-
`)}function s(d,f){return f==null&&(f=
|
|
1996
|
+
`)])])])]),aF=Object.assign(Object.assign({},pt.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),sF=Ie({name:"Tabs",props:aF,setup(e,{slots:t}){var n,r,i,o;const{mergedClsPrefixRef:a,inlineThemeDisabled:s}=rn(e),l=pt("Tabs","-tabs",oF,qI,e,a),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(null),g=ne(!0),b=ne(!0),v=rf(e,["labelSize","size"]),_=rf(e,["activeName","value"]),y=ne((r=(n=_.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(o=(i=Ua(t.default())[0])===null||i===void 0?void 0:i.props)===null||o===void 0?void 0:o.name:null),x=Yr(_,y),S={id:0},$=pe(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});vt(x,()=>{S.id=0,R(),C()});function w(){var L;const{value:O}=x;return O===null?null:(L=u.value)===null||L===void 0?void 0:L.querySelector(`[data-name="${O}"]`)}function T(L){if(e.type==="card")return;const{value:O}=c;if(!O)return;const ee=O.style.opacity==="0";if(L){const U=`${a.value}-tabs-bar--disabled`,{barWidth:B,placement:V}=e;if(L.dataset.disabled==="true"?O.classList.add(U):O.classList.remove(U),["top","bottom"].includes(V)){if(P(["top","maxHeight","height"]),typeof B=="number"&&L.offsetWidth>=B){const me=Math.floor((L.offsetWidth-B)/2)+L.offsetLeft;O.style.left=`${me}px`,O.style.maxWidth=`${B}px`}else O.style.left=`${L.offsetLeft}px`,O.style.maxWidth=`${L.offsetWidth}px`;O.style.width="8192px",ee&&(O.style.transition="none"),O.offsetWidth,ee&&(O.style.transition="",O.style.opacity="1")}else{if(P(["left","maxWidth","width"]),typeof B=="number"&&L.offsetHeight>=B){const me=Math.floor((L.offsetHeight-B)/2)+L.offsetTop;O.style.top=`${me}px`,O.style.maxHeight=`${B}px`}else O.style.top=`${L.offsetTop}px`,O.style.maxHeight=`${L.offsetHeight}px`;O.style.height="8192px",ee&&(O.style.transition="none"),O.offsetHeight,ee&&(O.style.transition="",O.style.opacity="1")}}}function k(){if(e.type==="card")return;const{value:L}=c;L&&(L.style.opacity="0")}function P(L){const{value:O}=c;if(O)for(const ee of L)O.style[ee]=""}function R(){if(e.type==="card")return;const L=w();L?T(L):k()}function C(){var L;const O=(L=h.value)===null||L===void 0?void 0:L.$el;if(!O)return;const ee=w();if(!ee)return;const{scrollLeft:U,offsetWidth:B}=O,{offsetLeft:V,offsetWidth:me}=ee;U>V?O.scrollTo({top:0,left:V,behavior:"smooth"}):V+me>U+B&&O.scrollTo({top:0,left:V+me-B,behavior:"smooth"})}const E=ne(null);let I=0,z=null;function j(L){const O=E.value;if(O){I=L.getBoundingClientRect().height;const ee=`${I}px`,U=()=>{O.style.height=ee,O.style.maxHeight=ee};z?(U(),z(),z=null):z=U}}function Z(L){const O=E.value;if(O){const ee=L.getBoundingClientRect().height,U=()=>{document.body.offsetHeight,O.style.maxHeight=`${ee}px`,O.style.height=`${Math.max(I,ee)}px`};z?(z(),z=null,U()):z=U}}function J(){const L=E.value;if(L){L.style.maxHeight="",L.style.height="";const{paneWrapperStyle:O}=e;if(typeof O=="string")L.style.cssText=O;else if(O){const{maxHeight:ee,height:U}=O;ee!==void 0&&(L.style.maxHeight=ee),U!==void 0&&(L.style.height=U)}}}const ie={value:[]},he=ne("next");function _e(L){const O=x.value;let ee="next";for(const U of ie.value){if(U===O)break;if(U===L){ee="prev";break}}he.value=ee,oe(L)}function oe(L){const{onActiveNameChange:O,onUpdateValue:ee,"onUpdate:value":U}=e;O&&Ge(O,L),ee&&Ge(ee,L),U&&Ge(U,L),y.value=L}function ve(L){const{onClose:O}=e;O&&Ge(O,L)}function we(){const{value:L}=c;if(!L)return;const O="transition-disabled";L.classList.add(O),R(),L.classList.remove(O)}const Oe=ne(null);function xe({transitionDisabled:L}){const O=u.value;if(!O)return;L&&O.classList.add("transition-disabled");const ee=w();ee&&Oe.value&&(Oe.value.style.width=`${ee.offsetWidth}px`,Oe.value.style.height=`${ee.offsetHeight}px`,Oe.value.style.transform=`translateX(${ee.offsetLeft-kn(getComputedStyle(O).paddingLeft)}px)`,L&&Oe.value.offsetWidth),L&&O.classList.remove("transition-disabled")}vt([x],()=>{e.type==="segment"&&fn(()=>{xe({transitionDisabled:!1})})}),dn(()=>{e.type==="segment"&&xe({transitionDisabled:!0})});let Xe=0;function Ve(L){var O;if(L.contentRect.width===0&&L.contentRect.height===0||Xe===L.contentRect.width)return;Xe=L.contentRect.width;const{type:ee}=e;if((ee==="line"||ee==="bar")&&we(),ee!=="segment"){const{placement:U}=e;G((U==="top"||U==="bottom"?(O=h.value)===null||O===void 0?void 0:O.$el:p.value)||null)}}const fe=Wh(Ve,64);vt([()=>e.justifyContent,()=>e.size],()=>{fn(()=>{const{type:L}=e;(L==="line"||L==="bar")&&we()})});const Ee=ne(!1);function Pe(L){var O;const{target:ee,contentRect:{width:U,height:B}}=L,V=ee.parentElement.parentElement.offsetWidth,me=ee.parentElement.parentElement.offsetHeight,{placement:Ae}=e;if(!Ee.value)Ae==="top"||Ae==="bottom"?V<U&&(Ee.value=!0):me<B&&(Ee.value=!0);else{const{value:Re}=f;if(!Re)return;Ae==="top"||Ae==="bottom"?V-U>Re.$el.offsetWidth&&(Ee.value=!1):me-B>Re.$el.offsetHeight&&(Ee.value=!1)}G(((O=h.value)===null||O===void 0?void 0:O.$el)||null)}const A=Wh(Pe,64);function H(){const{onAdd:L}=e;L&&L(),fn(()=>{const O=w(),{value:ee}=h;!O||!ee||ee.scrollTo({left:O.offsetLeft,top:0,behavior:"smooth"})})}function G(L){if(!L)return;const{placement:O}=e;if(O==="top"||O==="bottom"){const{scrollLeft:ee,scrollWidth:U,offsetWidth:B}=L;g.value=ee<=0,b.value=ee+B>=U}else{const{scrollTop:ee,scrollHeight:U,offsetHeight:B}=L;g.value=ee<=0,b.value=ee+B>=U}}const de=Wh(L=>{G(L.target)},64);jn(wv,{triggerRef:et(e,"trigger"),tabStyleRef:et(e,"tabStyle"),tabClassRef:et(e,"tabClass"),addTabStyleRef:et(e,"addTabStyle"),addTabClassRef:et(e,"addTabClass"),paneClassRef:et(e,"paneClass"),paneStyleRef:et(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:et(e,"type"),closableRef:et(e,"closable"),valueRef:x,tabChangeIdRef:S,onBeforeLeaveRef:et(e,"onBeforeLeave"),activateTab:_e,handleClose:ve,handleAdd:H}),g2(()=>{R(),C()}),xr(()=>{const{value:L}=d;if(!L)return;const{value:O}=a,ee=`${O}-tabs-nav-scroll-wrapper--shadow-start`,U=`${O}-tabs-nav-scroll-wrapper--shadow-end`;g.value?L.classList.remove(ee):L.classList.add(ee),b.value?L.classList.remove(U):L.classList.add(U)});const le={syncBarPosition:()=>{R()}},q=()=>{xe({transitionDisabled:!0})},N=pe(()=>{const{value:L}=v,{type:O}=e,ee={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[O],U=`${L}${ee}`,{self:{barColor:B,closeIconColor:V,closeIconColorHover:me,closeIconColorPressed:Ae,tabColor:Re,tabBorderColor:rt,paneTextColor:lt,tabFontWeight:ft,tabBorderRadius:zt,tabFontWeightActive:yt,colorSegment:Lt,fontWeightStrong:ye,tabColorSegment:Y,closeSize:m,closeIconSize:F,closeColorHover:D,closeColorPressed:te,closeBorderRadius:K,[Se("panePadding",L)]:se,[Se("tabPadding",U)]:ue,[Se("tabPaddingVertical",U)]:ae,[Se("tabGap",U)]:ke,[Se("tabGap",`${U}Vertical`)]:Me,[Se("tabTextColor",O)]:$e,[Se("tabTextColorActive",O)]:ze,[Se("tabTextColorHover",O)]:Je,[Se("tabTextColorDisabled",O)]:Ne,[Se("tabFontSize",L)]:ht},common:{cubicBezierEaseInOut:Le}}=l.value;return{"--n-bezier":Le,"--n-color-segment":Lt,"--n-bar-color":B,"--n-tab-font-size":ht,"--n-tab-text-color":$e,"--n-tab-text-color-active":ze,"--n-tab-text-color-disabled":Ne,"--n-tab-text-color-hover":Je,"--n-pane-text-color":lt,"--n-tab-border-color":rt,"--n-tab-border-radius":zt,"--n-close-size":m,"--n-close-icon-size":F,"--n-close-color-hover":D,"--n-close-color-pressed":te,"--n-close-border-radius":K,"--n-close-icon-color":V,"--n-close-icon-color-hover":me,"--n-close-icon-color-pressed":Ae,"--n-tab-color":Re,"--n-tab-font-weight":ft,"--n-tab-font-weight-active":yt,"--n-tab-padding":ue,"--n-tab-padding-vertical":ae,"--n-tab-gap":ke,"--n-tab-gap-vertical":Me,"--n-pane-padding-left":Kn(se,"left"),"--n-pane-padding-right":Kn(se,"right"),"--n-pane-padding-top":Kn(se,"top"),"--n-pane-padding-bottom":Kn(se,"bottom"),"--n-font-weight-strong":ye,"--n-tab-color-segment":Y}}),re=s?Cn("tabs",pe(()=>`${v.value[0]}${e.type[0]}`),N,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:x,renderedNames:new Set,segmentCapsuleElRef:Oe,tabsPaneWrapperRef:E,tabsElRef:u,barElRef:c,addTabInstRef:f,xScrollInstRef:h,scrollWrapperElRef:d,addTabFixed:Ee,tabWrapperStyle:$,handleNavResize:fe,mergedSize:v,handleScroll:de,handleTabsResize:A,cssVars:s?void 0:N,themeClass:re==null?void 0:re.themeClass,animationDirection:he,renderNameListRef:ie,yScrollElRef:p,handleSegmentResize:q,onAnimationBeforeLeave:j,onAnimationEnter:Z,onAnimationAfterEnter:J,onRender:re==null?void 0:re.onRender},le)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:o,renderNameListRef:a,onRender:s,paneWrapperClass:l,paneWrapperStyle:u,$slots:{default:c,prefix:d,suffix:f}}=this;s==null||s();const h=c?Ua(c()).filter(S=>S.type.__TAB_PANE__===!0):[],p=c?Ua(c()).filter(S=>S.type.__TAB__===!0):[],g=!p.length,b=t==="card",v=t==="segment",_=!b&&!v&&this.justifyContent;a.value=[];const y=()=>{const S=M("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},_?null:M("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?h.map(($,w)=>(a.value.push($.props.name),uy(M(M0,Object.assign({},$.props,{internalCreatedByPane:!0,internalLeftPadded:w!==0&&(!_||_==="center"||_==="start"||_==="end")}),$.children?{default:$.children.tab}:void 0)))):p.map(($,w)=>(a.value.push($.props.name),uy(w!==0&&!_?ly($):$))),!r&&i&&b?sy(i,(g?h.length:p.length)!==0):null,_?null:M("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return M("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},b&&i?M(Wi,{onResize:this.handleTabsResize},{default:()=>S}):S,b?M("div",{class:`${e}-tabs-pad`}):null,b?null:M("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},x=v?"top":n;return M("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${o}-size`,_&&`${e}-tabs--flex`,`${e}-tabs--${x}`],style:this.cssVars},M("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${x}`,`${e}-tabs-nav`]},Bt(d,S=>S&&M("div",{class:`${e}-tabs-nav__prefix`},S)),v?M(Wi,{onResize:this.handleSegmentResize},{default:()=>M("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},M("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},M("div",{class:`${e}-tabs-wrapper`},M("div",{class:`${e}-tabs-tab`}))),g?h.map((S,$)=>(a.value.push(S.props.name),M(M0,Object.assign({},S.props,{internalCreatedByPane:!0,internalLeftPadded:$!==0}),S.children?{default:S.children.tab}:void 0))):p.map((S,$)=>(a.value.push(S.props.name),$===0?S:ly(S))))}):M(Wi,{onResize:this.handleNavResize},{default:()=>M("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(x)?M(b9,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:y}):M("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},y()))}),r&&i&&b?sy(i,!0):null,Bt(f,S=>S&&M("div",{class:`${e}-tabs-nav__suffix`},S))),g&&(this.animated&&(x==="top"||x==="bottom")?M("div",{ref:"tabsPaneWrapperRef",style:u,class:[`${e}-tabs-pane-wrapper`,l]},ay(h,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):ay(h,this.mergedValue,this.renderedNames)))}});function ay(e,t,n,r,i,o,a){const s=[];return e.forEach(l=>{const{name:u,displayDirective:c,"display-directive":d}=l.props,f=p=>c===p||d===p,h=t===u;if(l.key!==void 0&&(l.key=u),h||f("show")||f("show:lazy")&&n.has(u)){n.has(u)||n.add(u);const p=!f("if");s.push(p?lo(l,[[yd,h]]):l)}}),a?M(Kw,{name:`${a}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:o},{default:()=>s}):s}function sy(e,t){return M(M0,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function ly(e){const t=Vr(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function uy(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function z5(e,t,n){try{const{data:r}=await bu().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){Bl(r)}}async function lF(e,t,n,r){try{if(t)await I5(t,n,r);else return await z5(e,n,r)}catch(i){Bl(i)}}async function I5(e,t,n){try{await bu().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(r){Bl(r)}}function qs(e){return String(e).toLowerCase()==="true"}async function uF(e,t={}){const n=xu(e.settings,t.settings),r=e.specs,i=dF(e.tracks,t.tracks);return{plugin:e,settings:n,specs:r,tracks:i}}function cF(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=qs(n)),n}function fF(e,t={}){var n,r,i;const o=t,a=(n=e.test_param)==null?void 0:n.name;if(!a)console.error(`Test parameter has no name: ${e.name}.`);else{const s=o[a]??((r=e.test_param)==null?void 0:r.value);for(const l of e.cases||[])l.value===s&&(o[a]=s,(i=l.inputs)!=null&&i.length&&xu(l.inputs,o))}return o}function xu(e,t){const n=t||{};return e==null||e.forEach(r=>{r.type==="conditional"?n[r.name]=fF(r,n[r.name]):n[r.name]=cF(r,n[r.name])}),n}function dF(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=xu(e,r)})),n}const hF={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},pF=Ie({__name:"InputConditional",props:Xc({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:Xc(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,r=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=ne(n.input.test_param),o=i.value.name;o||console.error(`Test parameter has no name: ${n.input.name}.`);const a=Kg(e,"value");(!a.value||!(o in a.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,a.value);const s=ne(f()),l=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=xu(g.inputs),p[g.value][o]=g.value;return p}),u=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=g.inputs;return p}),c=pe(()=>u.value[s.value]),d=pe({get(){return s.value==="true"},set(p){s.value=String(p)}});function f(){return a.value&&a.value[o]}function h(p){let g={...l.value[s.value]};if(p){const b={};c.value.forEach(v=>{b[v.name]=p[v.name]}),g={...g,...p}}r("update:value",g)}return vt(()=>a.value,()=>{s.value=f()}),vt(()=>s.value,()=>{h()}),(p,g)=>(We(),xt(Tt,null,[i.value.type==="boolean"?(We(),Ft(qe(P5),{key:0,value:d.value,"onUpdate:value":g[0]||(g[0]=b=>d.value=b)},null,8,["value"])):(We(),Ft(qe(Rd),{key:1,value:s.value,"onUpdate:value":g[1]||(g[1]=b=>s.value=b),options:i.value.data},null,8,["value","options"])),c.value?(We(),xt("div",hF,[Ye(Cv,{"dataset-id":p.datasetId,inputs:c.value,values:a.value,"onUpdate:values":h},null,8,["dataset-id","inputs","values"])])):Xn("",!0)],64))}}),oc=ne({});function F5(){async function e(t){return oc.value[t]||(oc.value[t]=bu().GET(`/api/datasets/${t}`).catch(n=>{throw delete oc.value[t],n})),await oc.value[t]}return{getDataset:e}}const gF={key:0},vF={key:0,class:"text-red-600 mb-1"},bF={key:1},cy=100,mF=Ie({__name:"InputData",props:Xc({datasetId:{},extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=F5(),n=e,r=ne([]),i=Kg(e,"value"),o=ne(!1),a=ne(null);async function s(d){if(n.datasetId){o.value=!0;try{const{data:f}=await t(n.datasetId),h=f.history_id,p="v=dev&order=hid&q=deleted&qv=false&q=visible&qv=true&",g=n.extension?`q=extension-eq&qv=${n.extension}&`:"",b=d?`q=name-contains&qv=${d}&`:"",{data:v}=await bu().GET(`/api/histories/${h}/contents?${p}${g}${b}limit=${cy}`);if(v&&v.length>0){const _=v.map(y=>({label:`${y.hid}: ${y.name}`,value:{id:y.id,hid:y.hid,name:y.name}}));v.length>=cy&&_.push({label:"...filter for more",value:null,disabled:!0}),n.optional&&_.unshift({label:"-- Clear Selection --",value:null}),r.value=_}}catch(f){console.log(f)}finally{o.value=!1}}else console.debug("Data selector disabled, since `datasetId` is unavailable.")}function l(){i.value=a.value}function u(d){return M("div",{class:"my-1 whitespace-normal break-all"},[M(mr,{class:"size-3 mr-1"},{default:()=>M(e2)}),d.label])}function c({option:d}){return M("div",{class:"z-[1] whitespace-nowrap text-ellipsis overflow-hidden"},d.label)}return vt(()=>i.value,()=>{var d;a.value=((d=i.value)==null?void 0:d.name)||null},{immediate:!0}),s(),(d,f)=>d.datasetId?(We(),xt("div",gF,[!d.optional&&!i.value?(We(),xt("div",vF,[Ye(qe(mr),{class:"size-3 mr-1"},{default:mt(()=>[Ye(qe(Qw))]),_:1}),f[1]||(f[1]=ot("span",null,"Please select a dataset.",-1))])):Xn("",!0),Ye(qe(Rd),{value:a.value,"onUpdate:value":[f[0]||(f[0]=h=>a.value=h),l],filterable:"",placeholder:"Select a Dataset",loading:o.value,"render-label":u,"render-tag":c,options:r.value,onSearch:s},null,8,["value","loading","options"])])):(We(),xt("div",bF,"Selection deferred."))}});function yF(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const o=e.metadata_column_types;for(const a in o)(r&&["int","float"].includes(o[a])||n&&o[a]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(a)+1),value:a});return i}const _F=Ie({__name:"InputDataColumn",props:Xc({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=F5(),n=e,r=ne([]),i=Kg(e,"value");async function o(){if(n.datasetId)try{const{data:s}=await t(n.datasetId),l=yF(s,n.isAuto,n.isText,n.isNumber);r.value=l,a()}catch(s){console.debug(s)}else console.debug("Data column selector disabled, since `datasetId` is unavailable.")}function a(){r.value.length>0&&i.value===null&&(i.value=r.value[0].value)}return o(),vt(()=>i.value,()=>a()),(s,l)=>s.datasetId?(We(),Ft(qe(Rd),{key:0,value:i.value,"onUpdate:value":l[0]||(l[0]=u=>i.value=u),options:r.value},null,8,["value","options"])):(We(),Ft(qe(ts),{key:1,value:i.value,"onUpdate:value":l[1]||(l[1]=u=>i.value=u)},null,8,["value"]))}}),xF={class:"select-none"},wF={class:"font-bold mb-1"},CF={key:0,class:"text-xs mb-1"},SF={key:5},fy=.01,Cv=Ie({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=t,i=ne(o());function o(){const s={...n.values};return n.inputs.forEach(l=>{s[l.name]===void 0&&(s[l.name]=null)}),s}function a(){r("update:values",i.value)}return vt(()=>n.values,()=>{i.value=o()}),(s,l)=>(We(),xt("div",xF,[(We(!0),xt(Tt,null,bw(s.inputs,(u,c)=>(We(),xt("div",{key:c,class:pu(c<s.inputs.length-1?"pb-2":"")},[ot("div",wF,hi(u.label||u.name),1),u.help?(We(),xt("div",CF,hi(u.help),1)):Xn("",!0),ot("div",null,[u.type==="boolean"?(We(),Ft(qe(P5),{key:0,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a]},null,8,["value","onUpdate:value"])):u.type==="color"?(We(),Ft(qe(CI),{key:1,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):u.type==="conditional"?(We(),Ft(pF,{key:2,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,input:u},null,8,["value","onUpdate:value","dataset-id","input"])):u.type==="data"?(We(),Ft(mF,{key:3,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,extension:u.extension,optional:qe(qs)(u.optional)},null,8,["value","onUpdate:value","dataset-id","extension","optional"])):u.type==="data_column"?(We(),Ft(_F,{key:4,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,"is-auto":qe(qs)(u.is_auto),"is-text":qe(qs)(u.is_text),"is-number":qe(qs)(u.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):["float","integer"].includes(u.type)?(We(),xt("div",SF,[u.min!==void 0&&u.max!==void 0?(We(),Ft(qe(tF),{key:0,class:"mb-2",value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],min:Number(u.min),max:Number(u.max),step:u.type==="float"?fy:1},null,8,["value","onUpdate:value","min","max","step"])):Xn("",!0),Ye(qe(ZI),{value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],size:"small",min:Number(u.min),max:Number(u.max),step:u.type==="float"?fy:1},null,8,["value","onUpdate:value","min","max","step"])])):u.type==="select"?(We(),Ft(qe(Rd),{key:6,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],options:u.data},null,8,["value","onUpdate:value","options"])):u.type==="textarea"?(We(),Ft(qe(ts),{key:7,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],rows:Number(u.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(We(),Ft(qe(ts),{key:8,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,l[0]||(l[0]=d=>a())]},null,8,["value","onUpdate:value"]))])],2))),128))]))}}),$F={class:"border border-dotted border-green-600 rounded p-2"},kF={class:"mx-1"},MF=Ie({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=pe(()=>xu(n.inputs));function o(){const l=[...n.valuesArray];l.unshift(i.value),r("update:values-array",l)}function a(l){const u=[...n.valuesArray];u.splice(l,1),r("update:values-array",u)}function s(l,u){const c=[...n.valuesArray];c[l]={...u},r("update:values-array",c)}return(l,u)=>(We(),xt(Tt,null,[Ye(qe(Lr),{size:"tiny",type:"primary",onClick:o},{default:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(e2))]),_:1}),u[0]||(u[0]=ot("span",{class:"mx-1"},"Add New Track",-1))]),_:1}),(We(!0),xt(Tt,null,bw(l.valuesArray,(c,d)=>(We(),xt("div",{key:d,class:"py-2"},[ot("div",$F,[Ye(Cv,{"dataset-id":l.datasetId,inputs:l.inputs,values:c,"onUpdate:values":f=>s(d,f)},null,8,["dataset-id","inputs","values","onUpdate:values"]),Ye(qe(Lr),{class:"w-full mt-2","data-description":"remove repeat block",disabled:l.valuesArray.length<=1,size:"tiny",type:"primary",onClick:f=>a(d)},{default:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Lk))]),_:1}),ot("span",kF,"Remove Track "+hi(l.valuesArray.length-d),1)]),_:2},1032,["disabled","onClick"])])]))),128))],64))}}),TF=2e3,EF=Ie({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return vt(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),TF)}),(o,a)=>o.message?(We(),Ft(qe(k5),{key:0,type:o.messageType},{default:mt(()=>[Wo(hi(o.message),1)]),_:1},8,["type"])):Xn("",!0)}}),AF={class:"text-xs"},PF=Ie({__name:"ApiStatus",setup(e){const t=ne("...");async function n(){try{const{data:r}=await bu().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(r,i)=>t.value?(We(),Ft(qe(Wl),{key:0,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(mr),{class:"mx-1"},{default:mt(()=>[Ye(qe(Ik),{class:"text-green-600"})]),_:1})]),default:mt(()=>[ot("span",AF,"Connected to Galaxy Version "+hi(t.value)+".",1)]),_:1})):(We(),Ft(qe(Wl),{key:1,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(mr),{class:"mx-1"},{default:mt(()=>[Ye(qe(Qw),{class:"text-red-600"})]),_:1})]),default:mt(()=>[i[0]||(i[0]=ot("span",{class:"text-xs"},"Galaxy is not accessible!",-1))]),_:1}))}}),RF=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},zF={},IF={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"};function FF(e,t){return We(),xt("svg",IF,t[0]||(t[0]=[ot("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),ot("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)]))}const BF=RF(zF,[["render",FF]]),OF={class:"overflow-auto select-none bg-white z-10 p-2"},NF={key:0,class:"flex"},LF={class:"flex-1 font-thin text-lg mt-1"},DF={class:"bg-sky-50 text-sky-900 rounded my-2 p-2"},HF={class:"flex"},UF={class:"flex justify-center center-items"},jF={class:"m-2"},WF=["src"],VF={class:"overflow-hidden break-words p-1"},qF={class:"font-bold"},YF=["innerHTML"],GF=Ie({__name:"SidePanel",props:{datasetId:{},datasetUrl:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,r=t,i=ne(""),o=ne("info"),a=pe(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await I5(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",o.value="success";else{const d=await z5(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});d?(i.value="Successfully created.",o.value="success",r("update:visualization-id",d)):(i.value="Something went wrong.",o.value="error")}}catch(d){i.value=Zw(d),o.value="error"}}function l(d){r("update:settings",d)}function u(d){r("update:tracks",d)}function c(d){r("update:visualization-title",d)}return(d,f)=>(We(),xt("div",OF,[d.datasetUrl?(We(),xt("div",NF,[ot("div",LF,[f[2]||(f[2]=ot("span",null,"Charts",-1)),Ye(PF)]),ot("div",null,[d.datasetId?(We(),Ft(qe(Wl),{key:0,trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 mr-2","data-description":"sidepanel save button",onClick:s},{icon:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Ok))]),_:1})]),_:1})]),default:mt(()=>[f[3]||(f[3]=ot("span",{class:"text-xs"},"Save",-1))]),_:1})):Xn("",!0),Ye(qe(Wl),{trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100",onClick:f[0]||(f[0]=h=>r("toggle"))},{icon:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Bk))]),_:1})]),_:1})]),default:mt(()=>[f[4]||(f[4]=ot("span",{class:"text-xs"},"Collapse",-1))]),_:1})])])):Xn("",!0),Ye(EF,{message:i.value,"message-type":o.value,onTimeout:f[1]||(f[1]=h=>i.value=""),class:"mt-2"},null,8,["message","message-type"]),ot("div",DF,[ot("div",HF,[ot("div",UF,[ot("div",jF,[n.logoUrl?(We(),xt("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,WF)):(We(),Ft(BF,{key:1}))])]),ot("div",VF,[ot("span",qF,hi(d.html),1),ot("div",{class:"text-xs",innerHTML:d.description},null,8,YF)])])]),ot("div",null,[f[5]||(f[5]=ot("div",{class:"font-bold"},"Title",-1)),f[6]||(f[6]=ot("div",{class:"text-xs py-1"},"Specify a visualization title.",-1)),Ye(qe(ts),{value:d.visualizationTitle,onInput:c},null,8,["value"])]),Ye(qe(sF),{type:"line",animated:"",class:"mt-2","pane-wrapper-class":"!overflow-visible","tab-class":a.value?"!hidden":""},{default:mt(()=>[d.trackInputs.length>0?(We(),Ft(qe(oy),{key:0,name:"tracks"},{tab:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Nk))]),_:1}),f[7]||(f[7]=ot("span",{class:"mx-1"},"Tracks",-1))]),default:mt(()=>[Ye(MF,{"dataset-id":d.datasetId,inputs:d.trackInputs,"values-array":d.trackValues,"onUpdate:valuesArray":u},null,8,["dataset-id","inputs","values-array"])]),_:1})):Xn("",!0),d.settingInputs.length>0?(We(),Ft(qe(oy),{key:1,name:"settings"},{tab:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Rk))]),_:1}),f[8]||(f[8]=ot("span",{class:"mx-1"},"Settings",-1))]),default:mt(()=>[Ye(Cv,{"dataset-id":d.datasetId,inputs:d.settingInputs,values:d.settingValues,"onUpdate:values":l},null,8,["dataset-id","inputs","values"])]),_:1})):Xn("",!0)]),_:1},8,["tab-class"])]))}});function XF(e,t="app"){if(e===void 0){const s=document.getElementById(t);if(s)e=JSON.parse((s==null?void 0:s.dataset.incoming)||"{}");else throw new Error(`Container element '${t}' not found.`)}const n=(e==null?void 0:e.root)??"/",r=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,o=(e==null?void 0:e.visualization_plugin)??{},a=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}}const KF={key:1,class:"m-2"},ZF={key:0,class:"relative max-w-full h-screen overflow-hidden"},JF=Ie({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}=XF(t.incoming,t.container),s=ne(!0),l=ne(""),u=ne(""),c=ne(""),d=ne(!0),f=ne(""),h=ne(""),p=ne([]),g=ne({}),b=ne({}),v=ne([]),_=ne([]),y=ne(i),x=ne(a),S=Jw();S.setCredentials(t.credentials||"include"),S.setRoot(n||"/"),uF(o,r).then(({plugin:ie,settings:he,specs:_e,tracks:oe})=>{l.value=ie.description||"",c.value=ie.html||"",d.value=!1,f.value=ie.logo||"",h.value=ie.name||"",p.value=ie.settings||[],g.value=he,b.value=_e||{},v.value=ie.tracks||[],_.value=oe});const $=pe(()=>r.dataset_id||""),w=pe(()=>$.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${$.value}.`),Pk(n,$.value)):""),T=pe(()=>f.value&&`${n}${f.value}`),k=pe(()=>p.value.length===0&&v.value.length===0);async function P(){s.value=!s.value,await fn(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function R(){try{window.postMessage({container:t.container,from:"galaxy-visualization",visualization_config:JSON.parse(JSON.stringify(C())),visualization_id:y.value,visualization_title:x.value},"*")}catch(ie){u.value=`Failed to postMessage: ${ie}`}}function C(){return{dataset_id:$.value,settings:g.value,tracks:_.value}}function E(ie){g.value={...ie},R()}function I(ie){_.value=[...ie],R()}function z(ie){y.value=ie,R()}function j(ie){x.value=ie,R()}async function Z(ie){J(ie);try{const he=await lF(h.value,y.value,x.value,C());he&&z(he)}catch(he){u.value=`Failed to save: ${he}`}}function J(ie){E({...g.value,...ie})}return(ie,he)=>(We(),xt(Tt,null,[u.value?(We(),Ft(qe(k5),{key:0,type:"error",class:"m-2"},{default:mt(()=>[Wo(hi(u.value),1)]),_:1})):Xn("",!0),d.value?(We(),xt("div",KF,[ot("span",null,[Ye(qe(zk),{class:"animate-spin size-4 inline mx-1"})]),he[0]||(he[0]=ot("span",{class:"text-xs"},"Please wait...",-1))])):(We(),xt("div",{key:2,class:pu(["grid h-screen",{"grid-cols-[1fr_17rem]":!s.value&&!k.value&&w.value}])},[w.value?(We(),xt("div",ZF,[Yg(ie.$slots,"default",{datasetId:$.value,datasetUrl:w.value,root:qe(n),settings:g.value,specs:b.value,tracks:_.value,save:Z,update:J})])):Xn("",!0),s.value&&!k.value&&w.value?(We(),Ft(qe(Wl),{key:1,trigger:"hover",to:!1},{trigger:mt(()=>[Ye(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2 absolute right-0",onClick:P},{icon:mt(()=>[Ye(qe(mr),null,{default:mt(()=>[Ye(qe(Fk))]),_:1})]),_:1})]),default:mt(()=>[he[1]||(he[1]=ot("span",{class:"text-xs"},"Expand",-1))]),_:1})):Xn("",!0),lo(Ye(GF,{"dataset-id":$.value,"dataset-url":w.value,description:l.value,html:c.value,"logo-url":T.value,name:h.value,"setting-inputs":p.value,"setting-values":g.value,"track-inputs":v.value,"track-values":_.value,"visualization-id":y.value,"visualization-title":x.value,"onUpdate:settings":E,"onUpdate:tracks":I,"onUpdate:visualizationId":z,"onUpdate:visualizationTitle":j,onToggle:P},null,8,["dataset-id","dataset-url","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]),[[yd,!s.value&&!k.value||!w.value]])],2))],64))}}),B5="0.14.0";class Zi{constructor(){this._items=new Map}get(t){if(!this._items.has(t))throw new Error(`Item not found: ${t}`);return this._items.get(t)}add(t,n,r=!1){if(!r&&this._items.has(t))throw new Error(`Item ${t} is already defined`);return this._items.set(t,n),n}remove(t){return this._items.delete(t)}has(t){return this._items.has(t)}list(){return Array.from(this._items.keys())}}class Sv extends Zi{create(t,...n){const r=this.get(t);return new r(...n)}extend(t,n,r){if(console.warn("Deprecation warning: .extend method will be removed in future versions, in favor of explicit ES6 subclasses"),arguments.length!==3)throw new Error("Invalid arguments to .extend");const i=this.get(t);class o extends i{}return Object.assign(o.prototype,r,i),this.add(n,o),o}}class QF{constructor(t,n,r={},i=null,o=null){this.key=t,this.value=n,this.metadata=r,this.prev=i,this.next=o}}class eB{constructor(t=3){if(this._max_size=t,this._cur_size=0,this._store=new Map,this._head=null,this._tail=null,t===null||t<0)throw new Error('Cache "max_size" must be >= 0')}has(t){return this._store.has(t)}get(t){const n=this._store.get(t);return n?(this._head!==n&&this.add(t,n.value),n.value):null}add(t,n,r={}){if(this._max_size===0)return;const i=this._store.get(t);i&&this._remove(i);const o=new QF(t,n,r,null,this._head);if(this._head?this._head.prev=o:this._tail=o,this._head=o,this._store.set(t,o),this._max_size>=0&&this._cur_size>=this._max_size){const a=this._tail;this._tail=this._tail.prev,this._remove(a)}this._cur_size+=1}clear(){this._head=null,this._tail=null,this._cur_size=0,this._store=new Map}remove(t){const n=this._store.get(t);return n?(this._remove(n),!0):!1}_remove(t){t.prev!==null?t.prev.next=t.next:this._head=t.next,t.next!==null?t.next.prev=t.prev:this._tail=t.prev,this._store.delete(t.key),this._cur_size-=1}find(t){let n=this._head;for(;n;){const r=n.next;if(t(n))return n;n=r}}}function tB(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ep,dy;function nB(){if(dy)return ep;dy=1,ep=e;function e(n){if(typeof n=="function")return n;var r=Array.isArray(n)?[]:{};for(var i in n){var o=n[i],a={}.toString.call(o).slice(8,-1);a=="Array"||a=="Object"?r[i]=e(o):a=="Date"?r[i]=new Date(o.getTime()):a=="RegExp"?r[i]=RegExp(o.source,t(o)):r[i]=o}return r}function t(n){if(typeof n.source.flags=="string")return n.source.flags;var r=[];return n.global&&r.push("g"),n.ignoreCase&&r.push("i"),n.multiline&&r.push("m"),n.sticky&&r.push("y"),n.unicode&&r.push("u"),r.join("")}return ep}var rB=nB();const iB=tB(rB);function Ys(e){return typeof e!="object"?e:iB(e)}let oB=class{constructor(t={}){this._config=t;const{cache_enabled:n=!0,cache_size:r=3}=t;this._enable_cache=n,this._cache=new eB(r)}_buildRequestOptions(t,n){return Object.assign({},t)}_getCacheKey(t){if(this._enable_cache)throw new Error("Method not implemented");return null}_performRequest(t){throw new Error("Not implemented")}_normalizeResponse(t,n){return t}_annotateRecords(t,n){return t}_postProcessResponse(t,n){return t}getData(t={},...n){t=this._buildRequestOptions(t,...n);const r=this._getCacheKey(t);let i;return this._enable_cache&&this._cache.has(r)?i=this._cache.get(r):(i=Promise.resolve(this._performRequest(t)).then(o=>this._normalizeResponse(o,t)),this._cache.add(r,i,t._cache_meta),i.catch(o=>this._cache.remove(r))),i.then(o=>Ys(o)).then(o=>this._annotateRecords(o,t)).then(o=>this._postProcessResponse(o,t))}};class aB extends oB{constructor(t={}){super(t),this._url=t.url}_getCacheKey(t){return this._getURL(t)}_getURL(t){return this._url}_performRequest(t){const n=this._getURL(t);if(!this._url)throw new Error('Web based resources must specify a resource URL as option "url"');return fetch(n).then(r=>{if(!r.ok)throw new Error(r.statusText);return r.text()})}_normalizeResponse(t,n){return typeof t=="string"?JSON.parse(t):t}}var tp={},ac={exports:{}},np,hy;function sB(){return hy||(hy=1,np=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}),np}var py;function lB(){return py||(py=1,function(e,t){const n=sB();e.exports=class extends Error{constructor(r){const i=r.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:n(o));super(i.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t.assert)}}}(ac,ac.exports)),ac.exports}var rp,gy;function uB(){if(gy)return rp;gy=1;const e=lB();return rp=function(t,...n){if(!t)throw n.length===1&&n[0]instanceof Error?n[0]:new e(n)},rp}var vy;function cB(){if(vy)return tp;vy=1;const e=uB(),t={};return tp.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(n,r){r=r||{};const i=[].concat(r.before||[]),o=[].concat(r.after||[]),a=r.group||"?",s=r.sort||0;e(!i.includes(a),`Item cannot come before itself: ${a}`),e(!i.includes("?"),"Item cannot come before unassociated items"),e(!o.includes(a),`Item cannot come after itself: ${a}`),e(!o.includes("?"),"Item cannot come after unassociated items"),Array.isArray(n)||(n=[n]);for(const l of n){const u={seq:this._items.length,sort:s,before:i,after:o,group:a,node:l};this._items.push(u)}if(!r.manual){const l=this._sort();e(l,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(n){Array.isArray(n)||(n=[n]);for(const i of n)if(i)for(const o of i._items)this._items.push(Object.assign({},o));this._items.sort(t.mergeSort);for(let i=0;i<this._items.length;++i)this._items[i].seq=i;const r=this._sort();return e(r,"merge created a dependencies error"),this.nodes}sort(){const n=this._sort();return e(n,"sort created a dependencies error"),this.nodes}_sort(){const n={},r=Object.create(null),i=Object.create(null);for(const u of this._items){const c=u.seq,d=u.group;i[d]=i[d]||[],i[d].push(c),n[c]=u.before;for(const f of u.after)r[f]=r[f]||[],r[f].push(c)}for(const u in n){const c=[];for(const d in n[u]){const f=n[u][d];i[f]=i[f]||[],c.push(...i[f])}n[u]=c}for(const u in r)if(i[u])for(const c of i[u])n[c].push(...r[u]);const o={};for(const u in n){const c=n[u];for(const d of c)o[d]=o[d]||[],o[d].push(u)}const a={},s=[];for(let u=0;u<this._items.length;++u){let c=u;if(o[u]){c=null;for(let d=0;d<this._items.length;++d){if(a[d]===!0)continue;o[d]||(o[d]=[]);const f=o[d].length;let h=0;for(let p=0;p<f;++p)a[o[d][p]]&&++h;if(h===f){c=d;break}}}c!==null&&(a[c]=!0,s.push(c))}if(s.length!==this._items.length)return!1;const l={};for(const u of this._items)l[u.seq]=u;this._items=[],this.nodes=[];for(const u of s){const c=l[u];this.nodes.push(c.node),this._items.push(c)}return!0}},t.mergeSort=(n,r)=>n.sort===r.sort?0:n.sort<r.sort?-1:1,tp}var fB=cB();function dB(e){const t=/^(?<name_alone>\w+)$|((?<name_deps>\w+)+\(\s*(?<deps>[^)]+?)\s*\))/.exec(e);if(!t)throw new Error(`Unable to parse dependency specification: ${e}`);let{name_alone:n,name_deps:r,deps:i}=t.groups;return n?[n,[]]:(i=i.split(/\s*,\s*/),[r,i])}function hB(e,t,n,r=!0){if(!n.length)return[];const i=n.map(u=>dB(u)),o=new Map(i),a=new fB.Sorter;for(let[u,c]of o.entries())try{a.add(u,{after:c,group:u})}catch{throw new Error(`Invalid or possible circular dependency specification for: ${u}`)}const s=a.nodes,l=new Map;for(let u of s){const c=t.get(u);if(!c)throw new Error(`Data has been requested from source '${u}', but no matching source was provided`);const d=o.get(u)||[],h=Promise.all(d.map(p=>l.get(p))).then(p=>{const g=Object.assign({_provider_name:u},e);return c.getData(g,...p)});l.set(u,h)}return Promise.all([...l.values()]).then(u=>r?u[u.length-1]:u)}function T0(e,t){const n=new Map;for(let r of e){const i=r[t];if(typeof i>"u")throw new Error(`All records must specify a value for the field "${t}"`);if(typeof i=="object")throw new Error("Attempted to group on a field with non-primitive values");let o=n.get(i);o||(o=[],n.set(i,o)),o.push(r)}return n}function $v(e,t,n,r,i){const o=T0(n,i),a=[];for(let s of t){const l=s[r],u=o.get(l)||[];u.length?a.push(...u.map(c=>Object.assign({},Ys(c),Ys(s)))):e!=="inner"&&a.push(Ys(s))}if(e==="outer"){const s=T0(t,r);for(let l of n){const u=l[i];(s.get(u)||[]).length||a.push(Ys(l))}}return a}function O5(e,t,n,r){return $v("left",...arguments)}function pB(e,t,n,r){return $v("inner",...arguments)}function gB(e,t,n,r){return $v("outer",...arguments)}const vB=/^(?:chr)?([a-zA-Z0-9]+?)[_:-](\d+)[_:|-]?(\w+)?[/_:|-]?([^_]+)?_?(.*)?/;function N5(e,t=!1){const n=e&&e.match(vB);if(n)return n.slice(1);if(t)return null;throw new Error(`Could not understand marker format for ${e}. Should be of format chr:pos or chr:pos_ref/alt`)}class L5{constructor(){throw new Error('The "BaseAdapter" and "BaseApiAdapter" classes have been replaced in LocusZoom 0.14. See migration guide for details.')}}class bB extends L5{}class zd extends aB{constructor(t={}){t.params&&(console.warn('Deprecation warning: all options in "config.params" should now be specified as top level keys.'),Object.assign(t,t.params||{}),delete t.params),super(t);const{prefix_namespace:n=!0,limit_fields:r}=t;this._prefix_namespace=n,this._limit_fields=r?new Set(r):!1}_getCacheKey(t){let{chr:n,start:r,end:i}=t;const o=this._cache.find(({metadata:a})=>n===a.chr&&r>=a.start&&i<=a.end);return o&&({chr:n,start:r,end:i}=o.metadata),t._cache_meta={chr:n,start:r,end:i},`${n}_${r}_${i}`}_postProcessResponse(t,n){if(!this._prefix_namespace||!Array.isArray(t))return t;const{_limit_fields:r}=this,{_provider_name:i}=n;return t.map(o=>Object.entries(o).reduce((a,[s,l])=>((!r||r.has(s))&&(a[`${i}:${s}`]=l),a),{}))}_findPrefixedKey(t,n){const r=new RegExp(`:${n}$`),i=Object.keys(t).find(o=>r.test(o));if(!i)throw new Error(`Could not locate the required key name: ${n} in dependent data`);return i}}class da extends zd{constructor(t={}){super(t),this._genome_build=t.genome_build||t.build}_validateBuildSource(t,n){if(t&&n||!(t||n))throw new Error(`${this.constructor.name} must provide a parameter specifying either "build" or "source". It should not specify both.`);if(t&&!["GRCh37","GRCh38"].includes(t))throw new Error(`${this.constructor.name} must specify a valid 'genome_build'`)}_normalizeResponse(t,n){let r=super._normalizeResponse(...arguments);if(r=r.data||r,Array.isArray(r))return r;const i=Object.keys(r),o=r[i[0]].length;if(!i.every(function(u){return r[u].length===o}))throw new Error(`${this.constructor.name} expects a response in which all arrays of data are the same length`);const s=[],l=Object.keys(r);for(let u=0;u<o;u++){const c={};for(let d=0;d<l.length;d++)c[l[d]]=r[l[d]][u];s.push(c)}return s}}class mB extends da{constructor(t={}){super(t);const{source:n}=t;this._source_id=n}_getURL(t){const{chr:n,start:r,end:i}=t;return`${super._getURL(t)}results/?filter=analysis in ${this._source_id} and chromosome in '${n}' and position ge ${r} and position le ${i}`}}class yB extends da{constructor(t){t.limit_fields||(t.limit_fields=["log_pvalue","pos","rsid","trait","variant"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build,r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id eq ${r}`;return`${super._getURL(t)}?format=objects&sort=pos&filter=chrom eq '${t.chr}' and pos ge ${t.start} and pos le ${t.end}${i}`}}class _B extends da{constructor(t={}){super(t),this._prefix_namespace=!1}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and source in ${r}`;return`${super._getURL(t)}?filter=chrom eq '${t.chr}' and start le ${t.end} and end ge ${t.start}${i}`}}class xB extends zd{constructor(t={}){super(t),this._prefix_namespace=!1}_buildRequestOptions(t,n){const r=t.genome_build||this._config.build;if(!r)throw new Error(`Adapter ${this.constructor.name} must specify a 'genome_build' option`);const i=new Set;for(let o of n)i.add(o.gene_name);return t.query=[...i.values()].map(function(o){return`${`_${o.replace(/[^A-Za-z0-9_]/g,"_")}`}: gene(gene_symbol: "${o}", reference_genome: ${r}) { gnomad_constraint { exp_syn obs_syn syn_z oe_syn oe_syn_lower oe_syn_upper exp_mis obs_mis mis_z oe_mis oe_mis_lower oe_mis_upper exp_lof obs_lof pLI oe_lof oe_lof_lower oe_lof_upper } } `}),t.build=r,Object.assign({},t)}_performRequest(t){let{query:n,build:r}=t;if(!n.length||n.length>25||r==="GRCh38")return Promise.resolve([]);n=`{${n.join(" ")} }`;const i=this._getURL(t),o=JSON.stringify({query:n});return fetch(i,{method:"POST",body:o,headers:{"Content-Type":"application/json"}}).then(s=>s.ok?s.text():[]).catch(s=>[])}_normalizeResponse(t){return typeof t!="string"?t:JSON.parse(t).data}}class D5 extends da{constructor(t){t.limit_fields||(t.limit_fields=["variant2","position2","correlation"]),super(t)}__find_ld_refvar(t,n){const r=this._findPrefixedKey(n[0],"variant"),i=this._findPrefixedKey(n[0],"log_pvalue");let o,a={};if(t.ldrefvar)o=t.ldrefvar,a=n.find(h=>h[r]===o)||{};else{let h=0;for(let p of n){const{[r]:g,[i]:b}=p;b>h&&(h=b,o=g,a=p)}}a.lz_is_ld_refvar=!0;const s=N5(o,!0);if(!s)throw new Error("Could not request LD for a missing or incomplete marker format");const[l,u,c,d]=s;o=`${l}:${u}`,c&&d&&(o+=`_${c}/${d}`);const f=+u;return f&&t.ldrefvar&&t.chr&&(l!==String(t.chr)||f<t.start||f>t.end)?(t.ldrefvar=null,this.__find_ld_refvar(t,n)):o}_buildRequestOptions(t,n){if(!n)throw new Error("LD request must depend on association data");const r=super._buildRequestOptions(...arguments);if(!n.length)return r._skip_request=!0,r;r.ld_refvar=this.__find_ld_refvar(t,n);const i=t.genome_build||this._config.build||"GRCh37";let o=t.ld_source||this._config.source||"1000G";const a=t.ld_pop||this._config.population||"ALL";return o==="1000G"&&i==="GRCh38"&&(o="1000G-FRZ09"),this._validateBuildSource(i,null),Object.assign({},r,{genome_build:i,ld_source:o,ld_population:a})}_getURL(t){const n=this._config.method||"rsquare",{chr:r,start:i,end:o,ld_refvar:a,genome_build:s,ld_source:l,ld_population:u}=t;return[super._getURL(t),"genome_builds/",s,"/references/",l,"/populations/",u,"/variants","?correlation=",n,"&variant=",encodeURIComponent(a),"&chrom=",encodeURIComponent(r),"&start=",encodeURIComponent(i),"&stop=",encodeURIComponent(o)].join("")}_getCacheKey(t){const n=super._getCacheKey(t),{ld_refvar:r,ld_source:i,ld_population:o}=t;return`${n}_${r}_${i}_${o}`}_performRequest(t){if(t._skip_request)return Promise.resolve([]);const n=this._getURL(t);let r={data:{}},i=function(o){return fetch(o).then().then(a=>{if(!a.ok)throw new Error(a.statusText);return a.text()}).then(function(a){return a=JSON.parse(a),Object.keys(a.data).forEach(function(s){r.data[s]=(r.data[s]||[]).concat(a.data[s])}),a.next?i(a.next):r})};return i(n)}}class wB extends da{constructor(t){t.limit_fields||(t.limit_fields=["position","recomb_rate"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id in ${r}`;return`${super._getURL(t)}?filter=chromosome eq '${t.chr}' and position le ${t.end} and position ge ${t.start}${i}`}}class H5 extends zd{constructor(t={}){super(...arguments);const{data:n}=t;if(!n||Array.isArray(t))throw new Error("'StaticSource' must provide data as required option 'config.data'");this._data=n}_performRequest(t){return Promise.resolve(this._data)}}class CB extends da{_getURL(t){const n=(t.genome_build?[t.genome_build]:null)||this._config.build;if(!n||!Array.isArray(n)||!n.length)throw new Error(["Adapter",this.constructor.name,"requires that you specify array of one or more desired genome build names"].join(" "));return[super._getURL(t),"?filter=variant eq '",encodeURIComponent(t.variant),"'&format=objects&",n.map(function(o){return`build=${encodeURIComponent(o)}`}).join("&")].join("")}_getCacheKey(t){return this._getURL(t)}}const SB=Object.freeze(Object.defineProperty({__proto__:null,AssociationLZ:mB,BaseAdapter:L5,BaseApiAdapter:bB,BaseLZAdapter:zd,BaseUMAdapter:da,GeneConstraintLZ:xB,GeneLZ:_B,GwasCatalogLZ:yB,LDServer:D5,PheWASLZ:CB,RecombLZ:wB,StaticSource:H5},Symbol.toStringTag,{value:"Module"})),ns=new Sv;for(let[e,t]of Object.entries(SB))ns.add(e,t);ns.add("StaticJSON",H5);ns.add("LDLZ2",D5);var $B="5.16.0";function Sr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function kv(e){return e.length===1&&(e=kB(e)),{left:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function kB(e){return function(t,n){return Sr(e(t),n)}}var U5=kv(Sr),Ji=U5.right,MB=U5.left;function TB(e,t){t==null&&(t=j5);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return o}function j5(e,t){return[e,t]}function EB(e,t,n){var r=e.length,i=t.length,o=new Array(r*i),a,s,l,u;for(n==null&&(n=j5),a=l=0;a<r;++a)for(u=e[a],s=0;s<i;++s,++l)o[l]=n(u,t[s]);return o}function AB(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Qi(e){return e===null?NaN:+e}function W5(e,t){var n=e.length,r=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<n;)isNaN(a=Qi(e[i]))||(s=a-o,o+=s/++r,l+=s*(a-o));else for(;++i<n;)isNaN(a=Qi(t(e[i],i,e)))||(s=a-o,o+=s/++r,l+=s*(a-o));if(r>1)return l/(r-1)}function V5(e,t){var n=W5(e,t);return n&&Math.sqrt(n)}function qo(e,t){var n=e.length,r=-1,i,o,a;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=a=i;++r<n;)(i=e[r])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=a=i;++r<n;)(i=t(e[r],r,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var q5=Array.prototype,PB=q5.slice,RB=q5.map;function sc(e){return function(){return e}}function zB(e){return e}function Jn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}var E0=Math.sqrt(50),A0=Math.sqrt(10),P0=Math.sqrt(2);function Mv(e,t,n){var r,i=-1,o,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),(s=wl(e,t,n))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return r&&a.reverse(),a}function wl(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=E0?10:o>=A0?5:o>=P0?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=E0?10:o>=A0?5:o>=P0?2:1)}function Yo(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=E0?i*=10:o>=A0?i*=5:o>=P0&&(i*=2),t<e?-i:i}function Tv(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function IB(){var e=zB,t=qo,n=Tv;function r(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var u=t(l),c=u[0],d=u[1],f=n(l,c,d);Array.isArray(f)||(f=Yo(c,d,f),f=Jn(Math.ceil(c/f)*f,d,f));for(var h=f.length;f[0]<=c;)f.shift(),--h;for(;f[h-1]>d;)f.pop(),--h;var p=new Array(h+1),g;for(o=0;o<=h;++o)g=p[o]=[],g.x0=o>0?f[o-1]:c,g.x1=o<h?f[o]:d;for(o=0;o<a;++o)s=l[o],c<=s&&s<=d&&p[Ji(f,s,0,h)].push(i[o]);return p}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:sc(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:sc([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Array.isArray(i)?sc(PB.call(i)):sc(i),r):n},r}function Vl(e,t,n){if(n==null&&(n=Qi),!!(r=e.length)){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function FB(e,t,n){return e=RB.call(e,Qi).sort(Sr),Math.ceil((n-t)/(2*(Vl(e,.75)-Vl(e,.25))*Math.pow(e.length,-1/3)))}function BB(e,t,n){return Math.ceil((n-t)/(3.5*V5(e)*Math.pow(e.length,-1/3)))}function Y5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&i>o&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&i>o&&(o=i);return o}function OB(e,t){var n=e.length,r=n,i=-1,o,a=0;if(t==null)for(;++i<n;)isNaN(o=Qi(e[i]))?--r:a+=o;else for(;++i<n;)isNaN(o=Qi(t(e[i],i,e)))?--r:a+=o;if(r)return a/r}function NB(e,t){var n=e.length,r=-1,i,o=[];if(t==null)for(;++r<n;)isNaN(i=Qi(e[r]))||o.push(i);else for(;++r<n;)isNaN(i=Qi(t(e[r],r,e)))||o.push(i);return Vl(o.sort(Sr),.5)}function Ev(e){for(var t=e.length,n,r=-1,i=0,o,a;++r<t;)i+=e[r].length;for(o=new Array(i);--t>=0;)for(a=e[t],n=a.length;--n>=0;)o[--i]=a[n];return o}function G5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&o>i&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&o>i&&(o=i);return o}function LB(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}function DB(e,t){if(n=e.length){var n,r=0,i=0,o,a=e[i];for(t==null&&(t=Sr);++r<n;)(t(o=e[r],a)<0||t(a,a)!==0)&&(a=o,i=r);if(t(a,a)===0)return i}}function HB(e,t,n){for(var r=(n??e.length)-(t=t==null?0:+t),i,o;r;)o=Math.random()*r--|0,i=e[r+t],e[r+t]=e[o+t],e[o+t]=i;return e}function UB(e,t){var n=e.length,r=-1,i,o=0;if(t==null)for(;++r<n;)(i=+e[r])&&(o+=i);else for(;++r<n;)(i=+t(e[r],r,e))&&(o+=i);return o}function X5(e){if(!(o=e.length))return[];for(var t=-1,n=G5(e,jB),r=new Array(n);++t<n;)for(var i=-1,o,a=r[t]=new Array(o);++i<o;)a[i]=e[i][t];return r}function jB(e){return e.length}function WB(){return X5(arguments)}var ip=Array.prototype.slice;function VB(e){return e}var Ic=1,Fc=2,R0=3,Gs=4,by=1e-6;function qB(e){return"translate("+(e+.5)+",0)"}function YB(e){return"translate(0,"+(e+.5)+")"}function GB(e){return function(t){return+e(t)}}function XB(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function KB(){return!this.__axis}function Id(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=e===Ic||e===Gs?-1:1,u=e===Gs||e===Fc?"x":"y",c=e===Ic||e===R0?qB:YB;function d(f){var h=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):VB),g=Math.max(o,0)+s,b=t.range(),v=+b[0]+.5,_=+b[b.length-1]+.5,y=(t.bandwidth?XB:GB)(t.copy()),x=f.selection?f.selection():f,S=x.selectAll(".domain").data([null]),$=x.selectAll(".tick").data(h,t).order(),w=$.exit(),T=$.enter().append("g").attr("class","tick"),k=$.select("line"),P=$.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),$=$.merge(T),k=k.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",l*o)),P=P.merge(T.append("text").attr("fill","currentColor").attr(u,l*g).attr("dy",e===Ic?"0em":e===R0?"0.71em":"0.32em")),f!==x&&(S=S.transition(f),$=$.transition(f),k=k.transition(f),P=P.transition(f),w=w.transition(f).attr("opacity",by).attr("transform",function(R){return isFinite(R=y(R))?c(R):this.getAttribute("transform")}),T.attr("opacity",by).attr("transform",function(R){var C=this.parentNode.__axis;return c(C&&isFinite(C=C(R))?C:y(R))})),w.remove(),S.attr("d",e===Gs||e==Fc?a?"M"+l*a+","+v+"H0.5V"+_+"H"+l*a:"M0.5,"+v+"V"+_:a?"M"+v+","+l*a+"V0.5H"+_+"V"+l*a:"M"+v+",0.5H"+_),$.attr("opacity",1).attr("transform",function(R){return c(y(R))}),k.attr(u+"2",l*o),P.attr(u,l*g).text(p),x.filter(KB).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Fc?"start":e===Gs?"end":"middle"),x.each(function(){this.__axis=y})}return d.scale=function(f){return arguments.length?(t=f,d):t},d.ticks=function(){return n=ip.call(arguments),d},d.tickArguments=function(f){return arguments.length?(n=f==null?[]:ip.call(f),d):n.slice()},d.tickValues=function(f){return arguments.length?(r=f==null?null:ip.call(f),d):r&&r.slice()},d.tickFormat=function(f){return arguments.length?(i=f,d):i},d.tickSize=function(f){return arguments.length?(o=a=+f,d):o},d.tickSizeInner=function(f){return arguments.length?(o=+f,d):o},d.tickSizeOuter=function(f){return arguments.length?(a=+f,d):a},d.tickPadding=function(f){return arguments.length?(s=+f,d):s},d}function K5(e){return Id(Ic,e)}function Av(e){return Id(Fc,e)}function Z5(e){return Id(R0,e)}function J5(e){return Id(Gs,e)}var ZB={value:function(){}};function ha(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Bc(n)}function Bc(e){this._=e}function JB(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Bc.prototype=ha.prototype={constructor:Bc,on:function(e,t){var n=this._,r=JB(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=QB(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=my(n[i],e.name,t);else if(t==null)for(i in n)n[i]=my(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Bc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function QB(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function my(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ZB,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var z0="http://www.w3.org/1999/xhtml";const I0={svg:"http://www.w3.org/2000/svg",xhtml:z0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wu(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),I0.hasOwnProperty(t)?{space:I0[t],local:e}:e}function eO(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===z0&&t.documentElement.namespaceURI===z0?t.createElement(e):t.createElementNS(n,e)}}function tO(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fd(e){var t=wu(e);return(t.local?tO:eO)(t)}function nO(){}function Bd(e){return e==null?nO:function(){return this.querySelector(e)}}function rO(e){typeof e!="function"&&(e=Bd(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=e.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Rn(r,this._parents)}function iO(){return[]}function Pv(e){return e==null?iO:function(){return this.querySelectorAll(e)}}function oO(e){typeof e!="function"&&(e=Pv(e));for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new Rn(r,i)}function Rv(e){return function(){return this.matches(e)}}function aO(e){typeof e!="function"&&(e=Rv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Rn(r,this._parents)}function Q5(e){return new Array(e.length)}function sO(){return new Rn(this._enter||this._groups.map(Q5),this._parents)}function gf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}gf.prototype={constructor:gf,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function lO(e){return function(){return e}}var yy="$";function uO(e,t,n,r,i,o){for(var a=0,s,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new gf(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function cO(e,t,n,r,i,o,a){var s,l,u={},c=t.length,d=o.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=yy+a.call(l,l.__data__,s,t),h in u?i[s]=l:u[h]=l);for(s=0;s<d;++s)h=yy+a.call(e,o[s],s,o),(l=u[h])?(r[s]=l,l.__data__=o[s],u[h]=null):n[s]=new gf(e,o[s]);for(s=0;s<c;++s)(l=t[s])&&u[f[s]]===l&&(i[s]=l)}function fO(e,t){if(!e)return h=new Array(this.size()),u=-1,this.each(function($){h[++u]=$}),h;var n=t?cO:uO,r=this._parents,i=this._groups;typeof e!="function"&&(e=lO(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],d=i[u],f=d.length,h=e.call(c,c&&c.__data__,u,r),p=h.length,g=s[u]=new Array(p),b=a[u]=new Array(p),v=l[u]=new Array(f);n(c,d,g,b,v,h,t);for(var _=0,y=0,x,S;_<p;++_)if(x=g[_]){for(_>=y&&(y=_+1);!(S=b[y])&&++y<p;);x._next=S||null}}return a=new Rn(a,r),a._enter=s,a._exit=l,a}function dO(){return new Rn(this._exit||this._groups.map(Q5),this._parents)}function hO(e,t,n){var r=this.enter(),i=this,o=this.exit();return r=typeof e=="function"?e(r):r.append(e+""),t!=null&&(i=t(i)),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function pO(e){for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<r;++s)a[s]=t[s];return new Rn(a,this._parents)}function gO(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function vO(e){e||(e=bO);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Rn(i,this._parents).order()}function bO(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function mO(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yO(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function _O(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function xO(){var e=0;return this.each(function(){++e}),e}function wO(){return!this.node()}function CO(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function SO(e){return function(){this.removeAttribute(e)}}function $O(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kO(e,t){return function(){this.setAttribute(e,t)}}function MO(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function TO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function EO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function AO(e,t){var n=wu(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?$O:SO:typeof t=="function"?n.local?EO:TO:n.local?MO:kO)(n,t))}function zv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function PO(e){return function(){this.style.removeProperty(e)}}function RO(e,t,n){return function(){this.style.setProperty(e,t,n)}}function zO(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function IO(e,t,n){return arguments.length>1?this.each((t==null?PO:typeof t=="function"?zO:RO)(e,t,n??"")):Go(this.node(),e)}function Go(e,t){return e.style.getPropertyValue(t)||zv(e).getComputedStyle(e,null).getPropertyValue(t)}function FO(e){return function(){delete this[e]}}function BO(e,t){return function(){this[e]=t}}function OO(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function NO(e,t){return arguments.length>1?this.each((t==null?FO:typeof t=="function"?OO:BO)(e,t)):this.node()[e]}function e8(e){return e.trim().split(/^|\s+/)}function Iv(e){return e.classList||new t8(e)}function t8(e){this._node=e,this._names=e8(e.getAttribute("class")||"")}t8.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function n8(e,t){for(var n=Iv(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function r8(e,t){for(var n=Iv(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function LO(e){return function(){n8(this,e)}}function DO(e){return function(){r8(this,e)}}function HO(e,t){return function(){(t.apply(this,arguments)?n8:r8)(this,e)}}function UO(e,t){var n=e8(e+"");if(arguments.length<2){for(var r=Iv(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?HO:t?LO:DO)(n,t))}function jO(){this.textContent=""}function WO(e){return function(){this.textContent=e}}function VO(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function qO(e){return arguments.length?this.each(e==null?jO:(typeof e=="function"?VO:WO)(e)):this.node().textContent}function YO(){this.innerHTML=""}function GO(e){return function(){this.innerHTML=e}}function XO(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function KO(e){return arguments.length?this.each(e==null?YO:(typeof e=="function"?XO:GO)(e)):this.node().innerHTML}function ZO(){this.nextSibling&&this.parentNode.appendChild(this)}function JO(){return this.each(ZO)}function QO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function eN(){return this.each(QO)}function tN(e){var t=typeof e=="function"?e:Fd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function nN(){return null}function rN(e,t){var n=typeof e=="function"?e:Fd(e),r=t==null?nN:typeof t=="function"?t:Bd(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function iN(){var e=this.parentNode;e&&e.removeChild(this)}function oN(){return this.each(iN)}function aN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function sN(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lN(e){return this.select(e?sN:aN)}function uN(e){return arguments.length?this.property("__data__",e):this.node().__data__}var i8={},Ce=null;if(typeof document<"u"){var cN=document.documentElement;"onmouseenter"in cN||(i8={mouseenter:"mouseover",mouseleave:"mouseout"})}function fN(e,t,n){return e=o8(e,t,n),function(r){var i=r.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,r)}}function o8(e,t,n){return function(r){var i=Ce;Ce=r;try{e.call(this,this.__data__,t,n)}finally{Ce=i}}}function dN(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function hN(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++r]=o;++r?t.length=r:delete this.__on}}}function pN(e,t,n){var r=i8.hasOwnProperty(e.type)?fN:o8;return function(i,o,a){var s=this.__on,l,u=r(t,o,a);if(s){for(var c=0,d=s.length;c<d;++c)if((l=s[c]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),l.value=t;return}}this.addEventListener(e.type,u,n),l={type:e.type,name:e.name,value:t,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function gN(e,t,n){var r=dN(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?pN:hN,n==null&&(n=!1),i=0;i<o;++i)this.each(s(r[i],t,n));return this}function ql(e,t,n,r){var i=Ce;e.sourceEvent=Ce,Ce=e;try{return t.apply(n,r)}finally{Ce=i}}function a8(e,t,n){var r=zv(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function vN(e,t){return function(){return a8(this,e,t)}}function bN(e,t){return function(){return a8(this,e,t.apply(this,arguments))}}function mN(e,t){return this.each((typeof t=="function"?bN:vN)(e,t))}var Fv=[null];function Rn(e,t){this._groups=e,this._parents=t}function pa(){return new Rn([[document.documentElement]],Fv)}Rn.prototype=pa.prototype={constructor:Rn,select:rO,selectAll:oO,filter:aO,data:fO,enter:sO,exit:dO,join:hO,merge:pO,order:gO,sort:vO,call:mO,nodes:yO,node:_O,size:xO,empty:wO,each:CO,attr:AO,style:IO,property:NO,classed:UO,text:qO,html:KO,raise:JO,lower:eN,append:tN,insert:rN,remove:oN,clone:lN,datum:uN,on:gN,dispatch:mN};function Ue(e){return typeof e=="string"?new Rn([[document.querySelector(e)]],[document.documentElement]):new Rn([[e]],Fv)}function yN(e){return Ue(Fd(e).call(document.documentElement))}var _N=0;function s8(){return new F0}function F0(){this._="@"+(++_N).toString(36)}F0.prototype=s8.prototype={constructor:F0,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function Bv(){for(var e=Ce,t;t=e.sourceEvent;)e=t;return e}function Od(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function lr(e){var t=Bv();return t.changedTouches&&(t=t.changedTouches[0]),Od(e,t)}function l8(e){return typeof e=="string"?new Rn([document.querySelectorAll(e)],[document.documentElement]):new Rn([e??[]],Fv)}function Yl(e,t,n){arguments.length<3&&(n=t,t=Bv().changedTouches);for(var r=0,i=t?t.length:0,o;r<i;++r)if((o=t[r]).identifier===n)return Od(e,o);return null}function xN(e,t){t==null&&(t=Bv().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n<r;++n)i[n]=Od(e,t[n]);return i}function op(){Ce.stopImmediatePropagation()}function Wa(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function Nd(e){var t=e.document.documentElement,n=Ue(e).on("dragstart.drag",Wa,!0);"onselectstart"in t?n.on("selectstart.drag",Wa,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Ld(e,t){var n=e.document.documentElement,r=Ue(e).on("dragstart.drag",null);t&&(r.on("click.drag",Wa,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function lc(e){return function(){return e}}function B0(e,t,n,r,i,o,a,s,l,u){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=u}B0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function wN(){return!Ce.ctrlKey&&!Ce.button}function CN(){return this.parentNode}function SN(e){return e??{x:Ce.x,y:Ce.y}}function $N(){return navigator.maxTouchPoints||"ontouchstart"in this}function O0(){var e=wN,t=CN,n=SN,r=$N,i={},o=ha("start","drag","end"),a=0,s,l,u,c,d=0;function f(x){x.on("mousedown.drag",h).filter(r).on("touchstart.drag",b).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){if(!(c||!e.apply(this,arguments))){var x=y("mouse",t.apply(this,arguments),lr,this,arguments);x&&(Ue(Ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Nd(Ce.view),op(),u=!1,s=Ce.clientX,l=Ce.clientY,x("start"))}}function p(){if(Wa(),!u){var x=Ce.clientX-s,S=Ce.clientY-l;u=x*x+S*S>d}i.mouse("drag")}function g(){Ue(Ce.view).on("mousemove.drag mouseup.drag",null),Ld(Ce.view,u),Wa(),i.mouse("end")}function b(){if(e.apply(this,arguments)){var x=Ce.changedTouches,S=t.apply(this,arguments),$=x.length,w,T;for(w=0;w<$;++w)(T=y(x[w].identifier,S,Yl,this,arguments))&&(op(),T("start"))}}function v(){var x=Ce.changedTouches,S=x.length,$,w;for($=0;$<S;++$)(w=i[x[$].identifier])&&(Wa(),w("drag"))}function _(){var x=Ce.changedTouches,S=x.length,$,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),$=0;$<S;++$)(w=i[x[$].identifier])&&(op(),w("end"))}function y(x,S,$,w,T){var k=$(S,x),P,R,C,E=o.copy();if(ql(new B0(f,"beforestart",P,x,a,k[0],k[1],0,0,E),function(){return(Ce.subject=P=n.apply(w,T))==null?!1:(R=P.x-k[0]||0,C=P.y-k[1]||0,!0)}))return function I(z){var j=k,Z;switch(z){case"start":i[x]=I,Z=a++;break;case"end":delete i[x],--a;case"drag":k=$(S,x),Z=a;break}ql(new B0(f,z,P,x,Z,k[0]+R,k[1]+C,k[0]-j[0],k[1]-j[1],E),E.apply,E,[z,w,T])}}return f.filter=function(x){return arguments.length?(e=typeof x=="function"?x:lc(!!x),f):e},f.container=function(x){return arguments.length?(t=typeof x=="function"?x:lc(x),f):t},f.subject=function(x){return arguments.length?(n=typeof x=="function"?x:lc(x),f):n},f.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:lc(!!x),f):r},f.on=function(){var x=o.on.apply(o,arguments);return x===o?f:x},f.clickDistance=function(x){return arguments.length?(d=(x=+x)*x,f):Math.sqrt(d)},f}function ms(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fo(){}var Xo=.7,rs=1/Xo,Va="\\s*([+-]?\\d+)\\s*",Gl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kN=/^#([0-9a-f]{3,8})$/,MN=new RegExp("^rgb\\("+[Va,Va,Va]+"\\)$"),TN=new RegExp("^rgb\\("+[Wr,Wr,Wr]+"\\)$"),EN=new RegExp("^rgba\\("+[Va,Va,Va,Gl]+"\\)$"),AN=new RegExp("^rgba\\("+[Wr,Wr,Wr,Gl]+"\\)$"),PN=new RegExp("^hsl\\("+[Gl,Wr,Wr]+"\\)$"),RN=new RegExp("^hsla\\("+[Gl,Wr,Wr,Gl]+"\\)$"),_y={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};ms(fo,eo,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:xy,formatHex:xy,formatHsl:zN,formatRgb:wy,toString:wy});function xy(){return this.rgb().formatHex()}function zN(){return u8(this).formatHsl()}function wy(){return this.rgb().formatRgb()}function eo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=kN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Cy(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?uc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?uc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=MN.exec(e))?new un(t[1],t[2],t[3],1):(t=TN.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=EN.exec(e))?uc(t[1],t[2],t[3],t[4]):(t=AN.exec(e))?uc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PN.exec(e))?ky(t[1],t[2]/100,t[3]/100,1):(t=RN.exec(e))?ky(t[1],t[2]/100,t[3]/100,t[4]):_y.hasOwnProperty(e)?Cy(_y[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function Cy(e){return new un(e>>16&255,e>>8&255,e&255,1)}function uc(e,t,n,r){return r<=0&&(e=t=n=NaN),new un(e,t,n,r)}function Ov(e){return e instanceof fo||(e=eo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function is(e,t,n,r){return arguments.length===1?Ov(e):new un(e,t,n,r??1)}function un(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ms(un,is,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:Sy,formatHex:Sy,formatRgb:$y,toString:$y}));function Sy(){return"#"+ap(this.r)+ap(this.g)+ap(this.b)}function $y(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function ap(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function ky(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fr(e,t,n,r)}function u8(e){if(e instanceof Fr)return new Fr(e.h,e.s,e.l,e.opacity);if(e instanceof fo||(e=eo(e)),!e)return new Fr;if(e instanceof Fr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Fr(a,s,l,e.opacity)}function vf(e,t,n,r){return arguments.length===1?u8(e):new Fr(e,t,n,r??1)}function Fr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Fr,vf,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Fr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Fr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new un(sp(e>=240?e-240:e+120,i,r),sp(e,i,r),sp(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function sp(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var c8=Math.PI/180,f8=180/Math.PI,bf=18,d8=.96422,h8=1,p8=.82521,g8=4/29,qa=6/29,v8=3*qa*qa,IN=qa*qa*qa;function b8(e){if(e instanceof _r)return new _r(e.l,e.a,e.b,e.opacity);if(e instanceof Dr)return y8(e);e instanceof un||(e=Ov(e));var t=fp(e.r),n=fp(e.g),r=fp(e.b),i=lp((.2225045*t+.7168786*n+.0606169*r)/h8),o,a;return t===n&&n===r?o=a=i:(o=lp((.4360747*t+.3850649*n+.1430804*r)/d8),a=lp((.0139322*t+.0971045*n+.7141733*r)/p8)),new _r(116*i-16,500*(o-i),200*(i-a),e.opacity)}function FN(e,t){return new _r(e,0,0,t??1)}function mf(e,t,n,r){return arguments.length===1?b8(e):new _r(e,t,n,r??1)}function _r(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ms(_r,mf,Cu(fo,{brighter:function(e){return new _r(this.l+bf*(e??1),this.a,this.b,this.opacity)},darker:function(e){return new _r(this.l-bf*(e??1),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=d8*up(t),e=h8*up(e),n=p8*up(n),new un(cp(3.1338561*t-1.6168667*e-.4906146*n),cp(-.9787684*t+1.9161415*e+.033454*n),cp(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function lp(e){return e>IN?Math.pow(e,1/3):e/v8+g8}function up(e){return e>qa?e*e*e:v8*(e-g8)}function cp(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function fp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function m8(e){if(e instanceof Dr)return new Dr(e.h,e.c,e.l,e.opacity);if(e instanceof _r||(e=b8(e)),e.a===0&&e.b===0)return new Dr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*f8;return new Dr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function BN(e,t,n,r){return arguments.length===1?m8(e):new Dr(n,t,e,r??1)}function yf(e,t,n,r){return arguments.length===1?m8(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function y8(e){if(isNaN(e.h))return new _r(e.l,0,0,e.opacity);var t=e.h*c8;return new _r(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ms(Dr,yf,Cu(fo,{brighter:function(e){return new Dr(this.h,this.c,this.l+bf*(e??1),this.opacity)},darker:function(e){return new Dr(this.h,this.c,this.l-bf*(e??1),this.opacity)},rgb:function(){return y8(this).rgb()}}));var _8=-.14861,Nv=1.78277,Lv=-.29227,Dd=-.90649,Xl=1.97294,My=Xl*Dd,Ty=Xl*Nv,Ey=Nv*Lv-Dd*_8;function ON(e){if(e instanceof Ho)return new Ho(e.h,e.s,e.l,e.opacity);e instanceof un||(e=Ov(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Ey*r+My*t-Ty*n)/(Ey+My-Ty),o=r-i,a=(Xl*(n-i)-Lv*o)/Dd,s=Math.sqrt(a*a+o*o)/(Xl*i*(1-i)),l=s?Math.atan2(a,o)*f8-120:NaN;return new Ho(l<0?l+360:l,s,i,e.opacity)}function $r(e,t,n,r){return arguments.length===1?ON(e):new Ho(e,t,n,r??1)}function Ho(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Ho,$r,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Ho(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Ho(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*c8,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new un(255*(t+n*(_8*r+Nv*i)),255*(t+n*(Lv*r+Dd*i)),255*(t+n*(Xl*r)),this.opacity)}}));function x8(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function w8(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return x8((n-r/t)*t,a,i,o,s)}}function C8(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return x8((n-r/t)*t,i,o,a,s)}}function Hd(e){return function(){return e}}function S8(e,t){return function(n){return e+n*t}}function NN(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ud(e,t){var n=t-e;return n?S8(e,n>180||n<-180?n-360*Math.round(n/360):n):Hd(isNaN(e)?t:e)}function LN(e){return(e=+e)==1?tn:function(t,n){return n-t?NN(t,n,e):Hd(isNaN(t)?n:t)}}function tn(e,t){var n=t-e;return n?S8(e,n):Hd(isNaN(e)?t:e)}const Kl=function e(t){var n=LN(t);function r(i,o){var a=n((i=is(i)).r,(o=is(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=tn(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function $8(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=is(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=o(l),s+""}}}var k8=$8(w8),DN=$8(C8);function Dv(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function M8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function HN(e,t){return(M8(t)?Dv:T8)(e,t)}function T8(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=ys(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function E8(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function A8(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ys(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var N0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dp=new RegExp(N0.source,"g");function UN(e){return function(){return e}}function jN(e){return function(t){return e(t)+""}}function Hv(e,t){var n=N0.lastIndex=dp.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=N0.exec(e))&&(i=dp.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:or(r,i)})),n=dp.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?jN(l[0].x):UN(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}function ys(e,t){var n=typeof t,r;return t==null||n==="boolean"?Hd(t):(n==="number"?or:n==="string"?(r=eo(t))?(t=r,Kl):Hv:t instanceof eo?Kl:t instanceof Date?E8:M8(t)?Dv:Array.isArray(t)?T8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?A8:or)(e,t)}function WN(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function VN(e,t){var n=Ud(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function P8(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ay=180/Math.PI,L0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function R8(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ay,skewX:Math.atan(l)*Ay,scaleX:a,scaleY:s}}var zs,hp,Py,cc;function qN(e){return e==="none"?L0:(zs||(zs=document.createElement("DIV"),hp=document.documentElement,Py=document.defaultView),zs.style.transform=e,e=Py.getComputedStyle(hp.appendChild(zs),null).getPropertyValue("transform"),hp.removeChild(zs),e=e.slice(7,-1).split(","),R8(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function YN(e){return e==null||(cc||(cc=document.createElementNS("http://www.w3.org/2000/svg","g")),cc.setAttribute("transform",e),!(e=cc.transform.baseVal.consolidate()))?L0:(e=e.matrix,R8(e.a,e.b,e.c,e.d,e.e,e.f))}function z8(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push("translate(",null,t,null,n);p.push({i:g-4,x:or(u,d)},{i:g-2,x:or(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:or(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:or(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function l(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");p.push({i:g-4,x:or(u,d)},{i:g-2,x:or(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var p=-1,g=f.length,b;++p<g;)d[(b=f[p]).i]=b.x(h);return d.join("")}}}var I8=z8(qN,"px, ","px)","deg)"),F8=z8(YN,", ",")",")"),Is=Math.SQRT2,pp=2,Ry=4,GN=1e-12;function zy(e){return((e=Math.exp(e))+1/e)/2}function XN(e){return((e=Math.exp(e))-1/e)/2}function KN(e){return((e=Math.exp(2*e))-1)/(e+1)}function B8(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-n,u=a-r,c=l*l+u*u,d,f;if(c<GN)f=Math.log(s/i)/Is,d=function(_){return[n+_*l,r+_*u,i*Math.exp(Is*_*f)]};else{var h=Math.sqrt(c),p=(s*s-i*i+Ry*c)/(2*i*pp*h),g=(s*s-i*i-Ry*c)/(2*s*pp*h),b=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);f=(v-b)/Is,d=function(_){var y=_*f,x=zy(b),S=i/(pp*h)*(x*KN(Is*y+b)-XN(b));return[n+S*l,r+S*u,i*x/zy(Is*y+b)]}}return d.duration=f*1e3,d}function O8(e){return function(t,n){var r=e((t=vf(t)).h,(n=vf(n)).h),i=tn(t.s,n.s),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const ZN=O8(Ud);var JN=O8(tn);function QN(e,t){var n=tn((e=mf(e)).l,(t=mf(t)).l),r=tn(e.a,t.a),i=tn(e.b,t.b),o=tn(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function N8(e){return function(t,n){var r=e((t=yf(t)).h,(n=yf(n)).h),i=tn(t.c,n.c),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const eL=N8(Ud);var tL=N8(tn);function L8(e){return function t(n){n=+n;function r(i,o){var a=e((i=$r(i)).h,(o=$r(o)).h),s=tn(i.s,o.s),l=tn(i.l,o.l),u=tn(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=t,r}(1)}const nL=L8(Ud);var jd=L8(tn);function rL(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function iL(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var os=0,Xs=0,Fs=0,D8=1e3,_f,Ks,xf=0,Ko=0,Wd=0,Zl=typeof performance=="object"&&performance.now?performance:Date,H8=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _s(){return Ko||(H8(oL),Ko=Zl.now()+Wd)}function oL(){Ko=0}function Jl(){this._call=this._time=this._next=null}Jl.prototype=Vd.prototype={constructor:Jl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_s():+n)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:_f=this,Ks=this),this._call=e,this._time=n,D0()},stop:function(){this._call&&(this._call=null,this._time=1/0,D0())}};function Vd(e,t,n){var r=new Jl;return r.restart(e,t,n),r}function U8(){_s(),++os;for(var e=_f,t;e;)(t=Ko-e._time)>=0&&e._call.call(null,t),e=e._next;--os}function Iy(){Ko=(xf=Zl.now())+Wd,os=Xs=0;try{U8()}finally{os=0,sL(),Ko=0}}function aL(){var e=Zl.now(),t=e-xf;t>D8&&(Wd-=t,xf=e)}function sL(){for(var e,t=_f,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:_f=n);Ks=e,D0(r)}function D0(e){if(!os){Xs&&(Xs=clearTimeout(Xs));var t=e-Ko;t>24?(e<1/0&&(Xs=setTimeout(Iy,e-Zl.now()-Wd)),Fs&&(Fs=clearInterval(Fs))):(Fs||(xf=Zl.now(),Fs=setInterval(aL,D8)),os=1,H8(Iy))}}function H0(e,t,n){var r=new Jl;return t=t==null?0:+t,r.restart(function(i){r.stop(),e(i+t)},t,n),r}function lL(e,t,n){var r=new Jl,i=t;return t==null?(r.restart(e,t,n),r):(t=+t,n=n==null?_s():+n,r.restart(function o(a){a+=i,r.restart(o,i+=t,n),e(a)},t,n),r)}var uL=ha("start","end","cancel","interrupt"),cL=[],j8=0,U0=1,j0=2,Oc=3,Fy=4,W0=5,Nc=6;function qd(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;fL(e,n,{name:t,index:r,group:i,on:uL,tween:cL,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:j8})}function Uv(e,t){var n=Mr(e,t);if(n.state>j8)throw new Error("too late; already scheduled");return n}function wi(e,t){var n=Mr(e,t);if(n.state>Oc)throw new Error("too late; already running");return n}function Mr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fL(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Vd(o,0,n.time);function o(u){n.state=U0,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==U0)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Oc)return H0(a);h.state===Fy?(h.state=Nc,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=Nc,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(H0(function(){n.state===Oc&&(n.state=Fy,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=j0,n.on.call("start",e,e.__data__,n.index,n.group),n.state===j0){for(n.state=Oc,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=W0,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===W0&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Nc,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Uo(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>j0&&r.state<W0,r.state=Nc,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function dL(e){return this.each(function(){Uo(this,e)})}function hL(e,t){var n,r;return function(){var i=wi(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function pL(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=wi(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function gL(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Mr(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?hL:pL)(n,e,t))}function jv(e,t,n){var r=e._id;return e.each(function(){var i=wi(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Mr(i,r).value[t]}}function W8(e,t){var n;return(typeof t=="number"?or:t instanceof eo?Kl:(n=eo(t))?(t=n,Kl):Hv)(e,t)}function vL(e){return function(){this.removeAttribute(e)}}function bL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function yL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function _L(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function xL(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function wL(e,t){var n=wu(e),r=n==="transform"?F8:W8;return this.attrTween(e,typeof t=="function"?(n.local?xL:_L)(n,r,jv(this,"attr."+e,t)):t==null?(n.local?bL:vL)(n):(n.local?yL:mL)(n,r,t))}function CL(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function SL(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function $L(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&SL(e,o)),n}return i._value=t,i}function kL(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&CL(e,o)),n}return i._value=t,i}function ML(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=wu(e);return this.tween(n,(r.local?$L:kL)(r,t))}function TL(e,t){return function(){Uv(this,e).delay=+t.apply(this,arguments)}}function EL(e,t){return t=+t,function(){Uv(this,e).delay=t}}function AL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?TL:EL)(t,e)):Mr(this.node(),t).delay}function PL(e,t){return function(){wi(this,e).duration=+t.apply(this,arguments)}}function RL(e,t){return t=+t,function(){wi(this,e).duration=t}}function zL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?PL:RL)(t,e)):Mr(this.node(),t).duration}function IL(e,t){if(typeof t!="function")throw new Error;return function(){wi(this,e).ease=t}}function FL(e){var t=this._id;return arguments.length?this.each(IL(t,e)):Mr(this.node(),t).ease}function BL(e){typeof e!="function"&&(e=Rv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Gr(r,this._parents,this._name,this._id)}function OL(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<r;++s)a[s]=t[s];return new Gr(a,this._parents,this._name,this._id)}function NL(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function LL(e,t,n){var r,i,o=NL(t)?Uv:wi;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function DL(e,t){var n=this._id;return arguments.length<2?Mr(this.node(),n).on.on(e):this.each(LL(n,e,t))}function HL(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function UL(){return this.on("end.remove",HL(this._id))}function jL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Bd(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,d,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,qd(u[f],t,n,f,u,Mr(c,n)));return new Gr(o,this._parents,t,n)}function WL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Pv(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,p=Mr(c,n),g=0,b=f.length;g<b;++g)(h=f[g])&&qd(h,t,n,g,f,p);o.push(f),a.push(c)}return new Gr(o,a,t,n)}var VL=pa.prototype.constructor;function qL(){return new VL(this._groups,this._parents)}function YL(e,t){var n,r,i;return function(){var o=Go(this,e),a=(this.style.removeProperty(e),Go(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function V8(e){return function(){this.style.removeProperty(e)}}function GL(e,t,n){var r,i=n+"",o;return function(){var a=Go(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function XL(e,t,n){var r,i,o;return function(){var a=Go(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Go(this,e))),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}function KL(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var l=wi(this,e),u=l.on,c=l.value[o]==null?s||(s=V8(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function ZL(e,t,n){var r=(e+="")=="transform"?I8:W8;return t==null?this.styleTween(e,YL(e,r)).on("end.style."+e,V8(e)):typeof t=="function"?this.styleTween(e,XL(e,r,jv(this,"style."+e,t))).each(KL(this._id,e)):this.styleTween(e,GL(e,r,t),n).on("end.style."+e,null)}function JL(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function QL(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&JL(e,a,n)),r}return o._value=t,o}function eD(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,QL(e,t,n??""))}function tD(e){return function(){this.textContent=e}}function nD(e){return function(){var t=e(this);this.textContent=t??""}}function rD(e){return this.tween("text",typeof e=="function"?nD(jv(this,"text",e)):tD(e==null?"":e+""))}function iD(e){return function(t){this.textContent=e.call(this,t)}}function oD(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&iD(i)),t}return r._value=e,r}function aD(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,oD(e))}function sD(){for(var e=this._name,t=this._id,n=Y8(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Mr(l,t);qd(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Gr(r,this._parents,e,n)}function lD(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=wi(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t})})}var uD=0;function Gr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function q8(e){return pa().transition(e)}function Y8(){return++uD}var Ma=pa.prototype;Gr.prototype=q8.prototype={constructor:Gr,select:jL,selectAll:WL,filter:BL,merge:OL,selection:qL,transition:sD,call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:DL,attr:wL,attrTween:ML,style:ZL,styleTween:eD,text:rD,textTween:aD,remove:UL,tween:gL,delay:AL,duration:zL,ease:FL,end:lD};function cD(e){return+e}function fD(e){return e*e}function dD(e){return e*(2-e)}function By(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function hD(e){return e*e*e}function pD(e){return--e*e*e+1}function V0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Wv=3,gD=function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n}(Wv),vD=function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n}(Wv),Oy=function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n}(Wv),G8=Math.PI,X8=G8/2;function bD(e){return+e==1?1:1-Math.cos(e*X8)}function mD(e){return Math.sin(e*X8)}function Ny(e){return(1-Math.cos(G8*e))/2}function to(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function yD(e){return to(1-+e)}function _D(e){return 1-to(e)}function Ly(e){return((e*=2)<=1?to(1-e):2-to(e-1))/2}function xD(e){return 1-Math.sqrt(1-e*e)}function wD(e){return Math.sqrt(1- --e*e)}function Dy(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var q0=4/11,CD=6/11,SD=8/11,$D=3/4,kD=9/11,MD=10/11,TD=15/16,ED=21/22,AD=63/64,fc=1/q0/q0;function PD(e){return 1-Ql(1-e)}function Ql(e){return(e=+e)<q0?fc*e*e:e<SD?fc*(e-=CD)*e+$D:e<MD?fc*(e-=kD)*e+TD:fc*(e-=ED)*e+AD}function RD(e){return((e*=2)<=1?1-Ql(1-e):Ql(e-1)+1)/2}var Vv=1.70158,zD=function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n}(Vv),ID=function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n}(Vv),Hy=function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n}(Vv),as=2*Math.PI,qv=1,Yv=.3,FD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return t*to(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(qv,Yv),Uy=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return 1-t*to(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(qv,Yv),BD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return((o=o*2-1)<0?t*to(-o)*Math.sin((r-o)/n):2-t*to(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(qv,Yv),Y0={time:null,delay:0,duration:250,ease:V0};function OD(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return Y0.time=_s(),Y0;return n}function ND(e){var t,n;e instanceof Gr?(t=e._id,e=e._name):(t=Y8(),(n=Y0).time=_s(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&qd(l,e,t,u,a,n||OD(l,t));return new Gr(r,this._parents,e,t)}pa.prototype.interrupt=dL;pa.prototype.transition=ND;var LD=[null];function DD(e,t){var n=e.__transition,r,i;if(n){t=t==null?null:t+"";for(i in n)if((r=n[i]).state>U0&&r.name===t)return new Gr([[e]],LD,t,+i)}return null}function gp(e){return function(){return e}}function HD(e,t,n){this.target=e,this.type=t,this.selection=n}function jy(){Ce.stopImmediatePropagation()}function vp(){Ce.preventDefault(),Ce.stopImmediatePropagation()}var Wy={},bp={name:"space"},Ta={name:"handle"},Ea={name:"center"};function Vy(e){return[+e[0],+e[1]]}function G0(e){return[Vy(e[0]),Vy(e[1])]}function UD(e){return function(t){return Yl(t,Ce.touches,e)}}var Lc={name:"x",handles:["w","e"].map(eu),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Dc={name:"y",handles:["n","s"].map(eu),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},jD={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(eu),input:function(e){return e==null?null:G0(e)},output:function(e){return e}},ti={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},qy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Yy={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},WD={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},VD={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function eu(e){return{type:e}}function qD(){return!Ce.ctrlKey&&!Ce.button}function YD(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function GD(){return navigator.maxTouchPoints||"ontouchstart"in this}function mp(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function XD(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function KD(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function ZD(){return Gv(Lc)}function JD(){return Gv(Dc)}function QD(){return Gv(jD)}function Gv(e){var t=YD,n=qD,r=GD,i=!0,o=ha("start","brush","end"),a=6,s;function l(b){var v=b.property("__brush",g).selectAll(".overlay").data([eu("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ti.overlay).merge(v).each(function(){var y=mp(this).extent;Ue(this).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1])}),b.selectAll(".selection").data([eu("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ti.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var _=b.selectAll(".handle").data(e.handles,function(y){return y.type});_.exit().remove(),_.enter().append("rect").attr("class",function(y){return"handle handle--"+y.type}).attr("cursor",function(y){return ti[y.type]}),b.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(b,v){b.selection?b.on("start.brush",function(){c(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){c(this,arguments).end()}).tween("brush",function(){var _=this,y=_.__brush,x=c(_,arguments),S=y.selection,$=e.input(typeof v=="function"?v.apply(this,arguments):v,y.extent),w=ys(S,$);function T(k){y.selection=k===1&&$===null?null:w(k),u.call(_),x.brush()}return S!==null&&$!==null?T:T(1)}):b.each(function(){var _=this,y=arguments,x=_.__brush,S=e.input(typeof v=="function"?v.apply(_,y):v,x.extent),$=c(_,y).beforestart();Uo(_),x.selection=S===null?null:S,u.call(_),$.start().brush().end()})},l.clear=function(b){l.move(b,null)};function u(){var b=Ue(this),v=mp(this).selection;v?(b.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),b.selectAll(".handle").style("display",null).attr("x",function(_){return _.type[_.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(_){return _.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(_){return _.type==="n"||_.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(_){return _.type==="e"||_.type==="w"?v[1][1]-v[0][1]+a:a})):b.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(b,v,_){var y=b.__brush.emitter;return y&&(!_||!y.clean)?y:new d(b,v,_)}function d(b,v,_){this.that=b,this.args=v,this.state=b.__brush,this.active=0,this.clean=_}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(b){ql(new HD(l,b,e.output(this.state.selection)),o.apply,o,[b,this.that,this.args])}};function f(){if(s&&!Ce.touches||!n.apply(this,arguments))return;var b=this,v=Ce.target.__data__.type,_=(i&&Ce.metaKey?v="overlay":v)==="selection"?Wy:i&&Ce.altKey?Ea:Ta,y=e===Dc?null:WD[v],x=e===Lc?null:VD[v],S=mp(b),$=S.extent,w=S.selection,T=$[0][0],k,P,R=$[0][1],C,E,I=$[1][0],z,j,Z=$[1][1],J,ie,he=0,_e=0,oe,ve=y&&x&&i&&Ce.shiftKey,we,Oe,xe=Ce.touches?UD(Ce.changedTouches[0].identifier):lr,Xe=xe(b),Ve=Xe,fe=c(b,arguments,!0).beforestart();v==="overlay"?(w&&(oe=!0),S.selection=w=[[k=e===Dc?T:Xe[0],C=e===Lc?R:Xe[1]],[z=e===Dc?I:k,J=e===Lc?Z:C]]):(k=w[0][0],C=w[0][1],z=w[1][0],J=w[1][1]),P=k,E=C,j=z,ie=J;var Ee=Ue(b).attr("pointer-events","none"),Pe=Ee.selectAll(".overlay").attr("cursor",ti[v]);if(Ce.touches)fe.moved=H,fe.ended=de;else{var A=Ue(Ce.view).on("mousemove.brush",H,!0).on("mouseup.brush",de,!0);i&&A.on("keydown.brush",le,!0).on("keyup.brush",q,!0),Nd(Ce.view)}jy(),Uo(b),u.call(b),fe.start();function H(){var N=xe(b);ve&&!we&&!Oe&&(Math.abs(N[0]-Ve[0])>Math.abs(N[1]-Ve[1])?Oe=!0:we=!0),Ve=N,oe=!0,vp(),G()}function G(){var N;switch(he=Ve[0]-Xe[0],_e=Ve[1]-Xe[1],_){case bp:case Wy:{y&&(he=Math.max(T-k,Math.min(I-z,he)),P=k+he,j=z+he),x&&(_e=Math.max(R-C,Math.min(Z-J,_e)),E=C+_e,ie=J+_e);break}case Ta:{y<0?(he=Math.max(T-k,Math.min(I-k,he)),P=k+he,j=z):y>0&&(he=Math.max(T-z,Math.min(I-z,he)),P=k,j=z+he),x<0?(_e=Math.max(R-C,Math.min(Z-C,_e)),E=C+_e,ie=J):x>0&&(_e=Math.max(R-J,Math.min(Z-J,_e)),E=C,ie=J+_e);break}case Ea:{y&&(P=Math.max(T,Math.min(I,k-he*y)),j=Math.max(T,Math.min(I,z+he*y))),x&&(E=Math.max(R,Math.min(Z,C-_e*x)),ie=Math.max(R,Math.min(Z,J+_e*x)));break}}j<P&&(y*=-1,N=k,k=z,z=N,N=P,P=j,j=N,v in qy&&Pe.attr("cursor",ti[v=qy[v]])),ie<E&&(x*=-1,N=C,C=J,J=N,N=E,E=ie,ie=N,v in Yy&&Pe.attr("cursor",ti[v=Yy[v]])),S.selection&&(w=S.selection),we&&(P=w[0][0],j=w[1][0]),Oe&&(E=w[0][1],ie=w[1][1]),(w[0][0]!==P||w[0][1]!==E||w[1][0]!==j||w[1][1]!==ie)&&(S.selection=[[P,E],[j,ie]],u.call(b),fe.brush())}function de(){if(jy(),Ce.touches){if(Ce.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ld(Ce.view,oe),A.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Ee.attr("pointer-events","all"),Pe.attr("cursor",ti.overlay),S.selection&&(w=S.selection),XD(w)&&(S.selection=null,u.call(b)),fe.end()}function le(){switch(Ce.keyCode){case 16:{ve=y&&x;break}case 18:{_===Ta&&(y&&(z=j-he*y,k=P+he*y),x&&(J=ie-_e*x,C=E+_e*x),_=Ea,G());break}case 32:{(_===Ta||_===Ea)&&(y<0?z=j-he:y>0&&(k=P-he),x<0?J=ie-_e:x>0&&(C=E-_e),_=bp,Pe.attr("cursor",ti.selection),G());break}default:return}vp()}function q(){switch(Ce.keyCode){case 16:{ve&&(we=Oe=ve=!1,G());break}case 18:{_===Ea&&(y<0?z=j:y>0&&(k=P),x<0?J=ie:x>0&&(C=E),_=Ta,G());break}case 32:{_===bp&&(Ce.altKey?(y&&(z=j-he*y,k=P+he*y),x&&(J=ie-_e*x,C=E+_e*x),_=Ea):(y<0?z=j:y>0&&(k=P),x<0?J=ie:x>0&&(C=E),_=Ta),Pe.attr("cursor",ti[v]),G());break}default:return}vp()}}function h(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var b=this.__brush||{selection:null};return b.extent=G0(t.apply(this,arguments)),b.dim=e,b}return l.extent=function(b){return arguments.length?(t=typeof b=="function"?b:gp(G0(b)),l):t},l.filter=function(b){return arguments.length?(n=typeof b=="function"?b:gp(!!b),l):n},l.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:gp(!!b),l):r},l.handleSize=function(b){return arguments.length?(a=+b,l):a},l.keyModifiers=function(b){return arguments.length?(i=!!b,l):i},l.on=function(){var b=o.on.apply(o,arguments);return b===o?l:b},l}var Gy=Math.cos,Xy=Math.sin,K8=Math.PI,dc=K8/2,Ky=K8*2,Zy=Math.max;function eH(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}function tH(){var e=0,t=null,n=null,r=null;function i(o){var a=o.length,s=[],l=Jn(a),u=[],c=[],d=c.groups=new Array(a),f=new Array(a*a),h,p,g,b,v,_;for(h=0,v=-1;++v<a;){for(p=0,_=-1;++_<a;)p+=o[v][_];s.push(p),u.push(Jn(a)),h+=p}for(t&&l.sort(function(P,R){return t(s[P],s[R])}),n&&u.forEach(function(P,R){P.sort(function(C,E){return n(o[R][C],o[R][E])})}),h=Zy(0,Ky-e*a)/h,b=h?e:Ky/a,p=0,v=-1;++v<a;){for(g=p,_=-1;++_<a;){var y=l[v],x=u[y][_],S=o[y][x],$=p,w=p+=S*h;f[x*a+y]={index:y,subindex:x,startAngle:$,endAngle:w,value:S}}d[y]={index:y,startAngle:g,endAngle:p,value:s[y]},p+=b}for(v=-1;++v<a;)for(_=v-1;++_<a;){var T=f[_*a+v],k=f[v*a+_];(T.value||k.value)&&c.push(T.value<k.value?{source:k,target:T}:{source:T,target:k})}return r?c.sort(r):c}return i.padAngle=function(o){return arguments.length?(e=Zy(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(n=o,i):n},i.sortChords=function(o){return arguments.length?(o==null?r=null:(r=eH(o))._=o,i):r&&r._},i}var nH=Array.prototype.slice;function yp(e){return function(){return e}}var X0=Math.PI,K0=2*X0,ko=1e-6,rH=K0-ko;function Z0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ho(){return new Z0}Z0.prototype=ho.prototype={constructor:Z0,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,u=o-e,c=a-t,d=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>ko)if(!(Math.abs(c*s-l*u)>ko)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=n-o,h=r-a,p=s*s+l*l,g=f*f+h*h,b=Math.sqrt(p),v=Math.sqrt(d),_=i*Math.tan((X0-Math.acos((p+d-g)/(2*b*v)))/2),y=_/v,x=_/b;Math.abs(y-1)>ko&&(this._+="L"+(e+y*u)+","+(t+y*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>u*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,u=t+s,c=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>ko||Math.abs(this._y1-u)>ko)&&(this._+="L"+l+","+u),n&&(d<0&&(d=d%K0+K0),d>rH?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):d>ko&&(this._+="A"+n+","+n+",0,"+ +(d>=X0)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function iH(e){return e.source}function oH(e){return e.target}function aH(e){return e.radius}function sH(e){return e.startAngle}function lH(e){return e.endAngle}function uH(){var e=iH,t=oH,n=aH,r=sH,i=lH,o=null;function a(){var s,l=nH.call(arguments),u=e.apply(this,l),c=t.apply(this,l),d=+n.apply(this,(l[0]=u,l)),f=r.apply(this,l)-dc,h=i.apply(this,l)-dc,p=d*Gy(f),g=d*Xy(f),b=+n.apply(this,(l[0]=c,l)),v=r.apply(this,l)-dc,_=i.apply(this,l)-dc;if(o||(o=s=ho()),o.moveTo(p,g),o.arc(0,0,d,f,h),(f!==v||h!==_)&&(o.quadraticCurveTo(0,0,b*Gy(v),b*Xy(v)),o.arc(0,0,b,v,_)),o.quadraticCurveTo(0,0,p,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(n=typeof s=="function"?s:yp(+s),a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:yp(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:yp(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s??null,a):o},a}var rr="$";function wf(){}wf.prototype=pi.prototype={constructor:wf,has:function(e){return rr+e in this},get:function(e){return this[rr+e]},set:function(e,t){return this[rr+e]=t,this},remove:function(e){var t=rr+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===rr&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===rr&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===rr&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===rr&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===rr&&++e;return e},empty:function(){for(var e in this)if(e[0]===rr)return!1;return!0},each:function(e){for(var t in this)t[0]===rr&&e(this[t],t.slice(1),this)}};function pi(e,t){var n=new wf;if(e instanceof wf)e.each(function(s,l){n.set(l,s)});else if(Array.isArray(e)){var r=-1,i=e.length,o;if(t==null)for(;++r<i;)n.set(r,e[r]);else for(;++r<i;)n.set(t(o=e[r],r,e),o)}else if(e)for(var a in e)n.set(a,e[a]);return n}function cH(){var e=[],t=[],n,r,i;function o(s,l,u,c){if(l>=e.length)return n!=null&&s.sort(n),r!=null?r(s):s;for(var d=-1,f=s.length,h=e[l++],p,g,b=pi(),v,_=u();++d<f;)(v=b.get(p=h(g=s[d])+""))?v.push(g):b.set(p,[g]);return b.each(function(y,x){c(_,x,o(y,l,u,c))}),_}function a(s,l){if(++l>e.length)return s;var u,c=t[l-1];return r!=null&&l>=e.length?u=s.entries():(u=[],s.each(function(d,f){u.push({key:f,values:a(d,l)})})),c!=null?u.sort(function(d,f){return c(d.key,f.key)}):u}return i={object:function(s){return o(s,0,fH,dH)},map:function(s){return o(s,0,Jy,Qy)},entries:function(s){return a(o(s,0,Jy,Qy),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return n=s,i},rollup:function(s){return r=s,i}}}function fH(){return{}}function dH(e,t,n){e[t]=n}function Jy(){return pi()}function Qy(e,t,n){e.set(t,n)}function Cf(){}var So=pi.prototype;Cf.prototype=Z8.prototype={constructor:Cf,has:So.has,add:function(e){return e+="",this[rr+e]=e,this},remove:So.remove,clear:So.clear,values:So.keys,size:So.size,empty:So.empty,each:So.each};function Z8(e,t){var n=new Cf;if(e instanceof Cf)e.each(function(o){n.add(o)});else if(e){var r=-1,i=e.length;if(t==null)for(;++r<i;)n.add(e[r]);else for(;++r<i;)n.add(t(e[r],r,e))}return n}function hH(e){var t=[];for(var n in e)t.push(n);return t}function pH(e){var t=[];for(var n in e)t.push(e[n]);return t}function gH(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t}var vH=Array.prototype,J8=vH.slice;function bH(e,t){return e-t}function mH(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}function zi(e){return function(){return e}}function yH(e,t){for(var n=-1,r=t.length,i;++n<r;)if(i=_H(e,t[n]))return i;return 0}function _H(e,t){for(var n=t[0],r=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],u=l[0],c=l[1],d=e[s],f=d[0],h=d[1];if(xH(l,d,t))return 0;c>r!=h>r&&n<(f-u)*(r-c)/(h-c)+u&&(i=-i)}return i}function xH(e,t,n){var r;return wH(e,t,n)&&CH(e[r=+(e[0]===t[0])],n[r],t[r])}function wH(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function CH(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function SH(){}var ni=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Q8(){var e=1,t=1,n=Tv,r=l;function i(u){var c=n(u);if(Array.isArray(c))c=c.slice().sort(bH);else{var d=qo(u),f=d[0],h=d[1];c=Yo(f,h,c),c=Jn(Math.floor(f/c)*c,Math.floor(h/c)*c,c)}return c.map(function(p){return o(u,p)})}function o(u,c){var d=[],f=[];return a(u,c,function(h){r(h,u,c),mH(h)>0?d.push([h]):f.push(h)}),f.forEach(function(h){for(var p=0,g=d.length,b;p<g;++p)if(yH((b=d[p])[0],h)!==-1){b.push(h);return}}),{type:"MultiPolygon",value:c,coordinates:d}}function a(u,c,d){var f=new Array,h=new Array,p,g,b,v,_,y;for(p=g=-1,v=u[0]>=c,ni[v<<1].forEach(x);++p<e-1;)b=v,v=u[p+1]>=c,ni[b|v<<1].forEach(x);for(ni[v<<0].forEach(x);++g<t-1;){for(p=-1,v=u[g*e+e]>=c,_=u[g*e]>=c,ni[v<<1|_<<2].forEach(x);++p<e-1;)b=v,v=u[g*e+e+p+1]>=c,y=_,_=u[g*e+p+1]>=c,ni[b|v<<1|_<<2|y<<3].forEach(x);ni[v|_<<3].forEach(x)}for(p=-1,_=u[g*e]>=c,ni[_<<2].forEach(x);++p<e-1;)y=_,_=u[g*e+p+1]>=c,ni[_<<2|y<<3].forEach(x);ni[_<<3].forEach(x);function x(S){var $=[S[0][0]+p,S[0][1]+g],w=[S[1][0]+p,S[1][1]+g],T=s($),k=s(w),P,R;(P=h[T])?(R=f[k])?(delete h[P.end],delete f[R.start],P===R?(P.ring.push(w),d(P.ring)):f[P.start]=h[R.end]={start:P.start,end:R.end,ring:P.ring.concat(R.ring)}):(delete h[P.end],P.ring.push(w),h[P.end=k]=P):(P=f[k])?(R=h[T])?(delete f[P.start],delete h[R.end],P===R?(P.ring.push(w),d(P.ring)):f[R.start]=h[P.end]={start:R.start,end:P.end,ring:R.ring.concat(P.ring)}):(delete f[P.start],P.ring.unshift($),f[P.start=T]=P):f[T]=h[k]={start:T,end:k,ring:[$,w]}}}function s(u){return u[0]*2+u[1]*(e+1)*4}function l(u,c,d){u.forEach(function(f){var h=f[0],p=f[1],g=h|0,b=p|0,v,_=c[b*e+g];h>0&&h<e&&g===h&&(v=c[b*e+g-1],f[0]=h+(d-v)/(_-v)-.5),p>0&&p<t&&b===p&&(v=c[(b-1)*e+g],f[1]=p+(d-v)/(_-v)-.5)})}return i.contour=o,i.size=function(u){if(!arguments.length)return[e,t];var c=Math.ceil(u[0]),d=Math.ceil(u[1]);if(!(c>0)||!(d>0))throw new Error("invalid size");return e=c,t=d,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?zi(J8.call(u)):zi(u),i):n},i.smooth=function(u){return arguments.length?(r=u?l:SH,i):r===l},i}function _p(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<i;++a)for(var s=0,l=0;s<r+n;++s)s<r&&(l+=e.data[s+a*r]),s>=n&&(s>=o&&(l-=e.data[s-o+a*r]),t.data[s-n+a*r]=l/Math.min(s+1,r-1+o-s,o))}function xp(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<r;++a)for(var s=0,l=0;s<i+n;++s)s<i&&(l+=e.data[a+s*r]),s>=n&&(s>=o&&(l-=e.data[a+(s-o)*r]),t.data[a+(s-n)*r]=l/Math.min(s+1,i-1+o-s,o))}function $H(e){return e[0]}function kH(e){return e[1]}function MH(){return 1}function TH(){var e=$H,t=kH,n=MH,r=960,i=500,o=20,a=2,s=o*3,l=r+s*2>>a,u=i+s*2>>a,c=zi(20);function d(v){var _=new Float32Array(l*u),y=new Float32Array(l*u);v.forEach(function($,w,T){var k=+e($,w,T)+s>>a,P=+t($,w,T)+s>>a,R=+n($,w,T);k>=0&&k<l&&P>=0&&P<u&&(_[k+P*l]+=R)}),_p({width:l,height:u,data:_},{data:y},o>>a),xp({width:l,height:u,data:y},{data:_},o>>a),_p({width:l,height:u,data:_},{data:y},o>>a),xp({width:l,height:u,data:y},{data:_},o>>a),_p({width:l,height:u,data:_},{data:y},o>>a),xp({width:l,height:u,data:y},{data:_},o>>a);var x=c(_);if(!Array.isArray(x)){var S=Y5(_);x=Yo(0,S,x),x=Jn(0,Math.floor(S/x)*x,x),x.shift()}return Q8().thresholds(x).size([l,u])(_).map(f)}function f(v){return v.value*=Math.pow(2,-2*a),v.coordinates.forEach(h),v}function h(v){v.forEach(p)}function p(v){v.forEach(g)}function g(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function b(){return s=o*3,l=r+s*2>>a,u=i+s*2>>a,d}return d.x=function(v){return arguments.length?(e=typeof v=="function"?v:zi(+v),d):e},d.y=function(v){return arguments.length?(t=typeof v=="function"?v:zi(+v),d):t},d.weight=function(v){return arguments.length?(n=typeof v=="function"?v:zi(+v),d):n},d.size=function(v){if(!arguments.length)return[r,i];var _=Math.ceil(v[0]),y=Math.ceil(v[1]);if(!(_>=0)&&!(_>=0))throw new Error("invalid size");return r=_,i=y,b()},d.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),b()},d.thresholds=function(v){return arguments.length?(c=typeof v=="function"?v:Array.isArray(v)?zi(J8.call(v)):zi(v),d):c},d.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*v*v+1)-1)/2),b()},d}var e_={},wp={},Cp=34,Bs=10,Sp=13;function e3(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function EH(e,t){var n=e3(e);return function(r,i){return t(n(r),i,e)}}function t_(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Dn(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function AH(e){return e<0?"-"+Dn(-e,6):e>9999?"+"+Dn(e,6):Dn(e,4)}function PH(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":AH(e.getUTCFullYear())+"-"+Dn(e.getUTCMonth()+1,2)+"-"+Dn(e.getUTCDate(),2)+(i?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"."+Dn(i,3)+"Z":r?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"Z":n||t?"T"+Dn(t,2)+":"+Dn(n,2)+"Z":"")}function Yd(e){var t=new RegExp('["'+e+`
|
|
1997
|
+
\r]`),n=e.charCodeAt(0);function r(d,f){var h,p,g=i(d,function(b,v){if(h)return h(b,v-1);p=b,h=f?EH(b,f):e3(b)});return g.columns=p||[],g}function i(d,f){var h=[],p=d.length,g=0,b=0,v,_=p<=0,y=!1;d.charCodeAt(p-1)===Bs&&--p,d.charCodeAt(p-1)===Sp&&--p;function x(){if(_)return wp;if(y)return y=!1,e_;var $,w=g,T;if(d.charCodeAt(w)===Cp){for(;g++<p&&d.charCodeAt(g)!==Cp||d.charCodeAt(++g)===Cp;);return($=g)>=p?_=!0:(T=d.charCodeAt(g++))===Bs?y=!0:T===Sp&&(y=!0,d.charCodeAt(g)===Bs&&++g),d.slice(w+1,$-1).replace(/""/g,'"')}for(;g<p;){if((T=d.charCodeAt($=g++))===Bs)y=!0;else if(T===Sp)y=!0,d.charCodeAt(g)===Bs&&++g;else if(T!==n)continue;return d.slice(w,$)}return _=!0,d.slice(w,p)}for(;(v=x())!==wp;){for(var S=[];v!==e_&&v!==wp;)S.push(v),v=x();f&&(S=f(S,b++))==null||h.push(S)}return h}function o(d,f){return d.map(function(h){return f.map(function(p){return c(h[p])}).join(e)})}function a(d,f){return f==null&&(f=t_(d)),[f.map(c).join(e)].concat(o(d,f)).join(`
|
|
1998
|
+
`)}function s(d,f){return f==null&&(f=t_(d)),o(d,f).join(`
|
|
1999
1999
|
`)}function l(d){return d.map(u).join(`
|
|
2000
|
-
`)}function u(d){return d.map(c).join(e)}function c(d){return d==null?"":d instanceof Date?PH(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:u,formatValue:c}}var ga=Yd(","),e3=ga.parse,RH=ga.parseRows,zH=ga.format,IH=ga.formatBody,FH=ga.formatRows,BH=ga.formatRow,OH=ga.formatValue,va=Yd(" "),t3=va.parse,NH=va.parseRows,LH=va.format,DH=va.formatBody,HH=va.formatRows,UH=va.formatRow,jH=va.formatValue;function WH(e){for(var t in e){var n=e[t].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))VH&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;e[t]=n}return e}var VH=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function qH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function YH(e,t){return fetch(e,t).then(qH)}function GH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function XH(e,t){return fetch(e,t).then(GH)}function KH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Gd(e,t){return fetch(e,t).then(KH)}function n3(e){return function(t,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gd(t,n).then(function(i){return e(i,r)})}}function ZH(e,t,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Yd(e);return Gd(t,n).then(function(o){return i.parse(o,r)})}var JH=n3(e3),QH=n3(t3);function eU(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function tU(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function nU(e,t){return fetch(e,t).then(tU)}function Xv(e){return function(t,n){return Gd(t,n).then(function(r){return new DOMParser().parseFromString(r,e)})}}const rU=Xv("application/xml");var iU=Xv("text/html"),oU=Xv("image/svg+xml");function aU(e,t){var n;e==null&&(e=0),t==null&&(t=0);function r(){var i,o=n.length,a,s=0,l=0;for(i=0;i<o;++i)a=n[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=n[i],a.x-=s,a.y-=l}return r.initialize=function(i){n=i},r.x=function(i){return arguments.length?(e=+i,r):e},r.y=function(i){return arguments.length?(t=+i,r):t},r}function Jt(e){return function(){return e}}function Ni(){return(Math.random()-.5)*1e-6}function sU(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return r3(this.cover(t,n),t,n,e)}function r3(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,c=e._y1,d,f,h,p,g,b,v,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(d=(s+u)/2))?s=d:u=d,(b=n>=(f=(l+c)/2))?l=f:c=f,i=o,!(o=o[v=b<<1|g]))return i[v]=a,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&n===p)return a.next=o,i?i[v]=a:e._root=a,e;do i=i?i[v]=new Array(4):e._root=new Array(4),(g=t>=(d=(s+u)/2))?s=d:u=d,(b=n>=(f=(l+c)/2))?l=f:c=f;while((v=b<<1|g)===(x=(p>=f)<<1|h>=d));return i[x]=o,i[v]=a,e}function lU(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,c=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<l&&(l=i),i>c&&(c=i),o<u&&(u=o),o>d&&(d=o));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),n=0;n<r;++n)r3(this,a[n],s[n],e[n]);return this}function uU(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function cU(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function fU(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function An(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function dU(e,t,n){var r,i=this._x0,o=this._y0,a,s,l,u,c=this._x1,d=this._y1,f=[],h=this._root,p,g;for(h&&f.push(new An(h,i,o,c,d)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,d=t+n,n*=n);p=f.pop();)if(!(!(h=p.node)||(a=p.x0)>c||(s=p.y0)>d||(l=p.x1)<i||(u=p.y1)<o))if(h.length){var b=(a+l)/2,v=(s+u)/2;f.push(new An(h[3],b,v,l,u),new An(h[2],a,v,b,u),new An(h[1],b,s,l,v),new An(h[0],a,s,b,v)),(g=(t>=v)<<1|e>=b)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var x=e-+this._x.call(null,h.data),y=t-+this._y.call(null,h.data),_=x*x+y*y;if(_<n){var S=Math.sqrt(n=_);i=e-S,o=t-S,c=e+S,d=t+S,r=h.data}}return r}function hU(e){if(isNaN(c=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,c,d,f,h,p,g,b,v;if(!n)return this;if(n.length)for(;;){if((p=c>=(f=(a+l)/2))?a=f:l=f,(g=d>=(h=(s+u)/2))?s=h:u=h,t=n,!(n=n[b=g<<1|p]))return this;if(!n.length)break;(t[b+1&3]||t[b+2&3]||t[b+3&3])&&(r=t,v=b)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[b]=o:delete t[b],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[v]=n:this._root=n),this):(this._root=o,this)}function pU(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function gU(){return this._root}function vU(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function bU(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new An(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,c=(a+l)/2;(i=r[3])&&t.push(new An(i,u,c,s,l)),(i=r[2])&&t.push(new An(i,o,c,u,l)),(i=r[1])&&t.push(new An(i,u,a,s,c)),(i=r[0])&&t.push(new An(i,o,a,u,c))}return this}function mU(e){var t=[],n=[],r;for(this._root&&t.push(new An(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&t.push(new An(o,a,s,c,d)),(o=i[1])&&t.push(new An(o,c,s,l,d)),(o=i[2])&&t.push(new An(o,a,d,c,u)),(o=i[3])&&t.push(new An(o,c,d,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function yU(e){return e[0]}function _U(e){return arguments.length?(this._x=e,this):this._x}function xU(e){return e[1]}function wU(e){return arguments.length?(this._y=e,this):this._y}function Xd(e,t,n){var r=new Kv(t??yU,n??xU,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Kv(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function t_(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var On=Xd.prototype=Kv.prototype;On.copy=function(){var e=new Kv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=t_(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=t_(r));return e};On.add=sU;On.addAll=lU;On.cover=uU;On.data=cU;On.extent=fU;On.find=dU;On.remove=hU;On.removeAll=pU;On.root=gU;On.size=vU;On.visit=bU;On.visitAfter=mU;On.x=_U;On.y=wU;function CU(e){return e.x+e.vx}function SU(e){return e.y+e.vy}function $U(e){var t,n,r=1,i=1;typeof e!="function"&&(e=Jt(e==null?1:+e));function o(){for(var l,u=t.length,c,d,f,h,p,g,b=0;b<i;++b)for(c=Xd(t,CU,SU).visitAfter(a),l=0;l<u;++l)d=t[l],p=n[d.index],g=p*p,f=d.x+d.vx,h=d.y+d.vy,c.visit(v);function v(x,y,_,S,$){var w=x.data,T=x.r,M=p+T;if(w){if(w.index>d.index){var P=f-w.x-w.vx,R=h-w.y-w.vy,C=P*P+R*R;C<M*M&&(P===0&&(P=Ni(),C+=P*P),R===0&&(R=Ni(),C+=R*R),C=(M-(C=Math.sqrt(C)))/C*r,d.vx+=(P*=C)*(M=(T*=T)/(g+T)),d.vy+=(R*=C)*M,w.vx-=P*(M=1-M),w.vy-=R*M)}return}return y>f+M||S<f-M||_>h+M||$<h-M}}function a(l){if(l.data)return l.r=n[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function s(){if(t){var l,u=t.length,c;for(n=new Array(u),l=0;l<u;++l)c=t[l],n[c.index]=+e(c,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(r=+l,o):r},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Jt(+l),s(),o):e},o}function kU(e){return e.index}function n_(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function MU(e){var t=kU,n=c,r,i=Jt(30),o,a,s,l,u=1;e==null&&(e=[]);function c(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var b=0,v=e.length;b<u;++b)for(var x=0,y,_,S,$,w,T,M;x<v;++x)y=e[x],_=y.source,S=y.target,$=S.x+S.vx-_.x-_.vx||Ni(),w=S.y+S.vy-_.y-_.vy||Ni(),T=Math.sqrt($*$+w*w),T=(T-o[x])/T*g*r[x],$*=T,w*=T,S.vx-=$*(M=l[x]),S.vy-=w*M,_.vx+=$*(M=1-M),_.vy+=w*M}function f(){if(a){var g,b=a.length,v=e.length,x=hi(a,t),y;for(g=0,s=new Array(b);g<v;++g)y=e[g],y.index=g,typeof y.source!="object"&&(y.source=n_(x,y.source)),typeof y.target!="object"&&(y.target=n_(x,y.target)),s[y.source.index]=(s[y.source.index]||0)+1,s[y.target.index]=(s[y.target.index]||0)+1;for(g=0,l=new Array(v);g<v;++g)y=e[g],l[g]=s[y.source.index]/(s[y.source.index]+s[y.target.index]);r=new Array(v),h(),o=new Array(v),p()}}function h(){if(a)for(var g=0,b=e.length;g<b;++g)r[g]=+n(e[g],g,e)}function p(){if(a)for(var g=0,b=e.length;g<b;++g)o[g]=+i(e[g],g,e)}return d.initialize=function(g){a=g,f()},d.links=function(g){return arguments.length?(e=g,f(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Jt(+g),h(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Jt(+g),p(),d):i},d}function TU(e){return e.x}function EU(e){return e.y}var AU=10,PU=Math.PI*(3-Math.sqrt(5));function RU(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=hi(),l=Vd(c),u=ha("tick","end");e==null&&(e=[]);function c(){d(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function d(p){var g,b=e.length,v;p===void 0&&(p=1);for(var x=0;x<p;++x)for(n+=(o-n)*i,s.each(function(y){y(n)}),g=0;g<b;++g)v=e[g],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return t}function f(){for(var p=0,g=e.length,b;p<g;++p){if(b=e[p],b.index=p,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var v=AU*Math.sqrt(p),x=p*PU;b.x=v*Math.cos(x),b.y=v*Math.sin(x)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function h(p){return p.initialize&&p.initialize(e),p}return f(),t={tick:d,restart:function(){return l.restart(c),t},stop:function(){return l.stop(),t},nodes:function(p){return arguments.length?(e=p,f(),s.each(h),t):e},alpha:function(p){return arguments.length?(n=+p,t):n},alphaMin:function(p){return arguments.length?(r=+p,t):r},alphaDecay:function(p){return arguments.length?(i=+p,t):+i},alphaTarget:function(p){return arguments.length?(o=+p,t):o},velocityDecay:function(p){return arguments.length?(a=1-p,t):1-a},force:function(p,g){return arguments.length>1?(g==null?s.remove(p):s.set(p,h(g)),t):s.get(p)},find:function(p,g,b){var v=0,x=e.length,y,_,S,$,w;for(b==null?b=1/0:b*=b,v=0;v<x;++v)$=e[v],y=p-$.x,_=g-$.y,S=y*y+_*_,S<b&&(w=$,b=S);return w},on:function(p,g){return arguments.length>1?(u.on(p,g),t):u.on(p)}}}function zU(){var e,t,n,r=Jt(-30),i,o=1,a=1/0,s=.81;function l(f){var h,p=e.length,g=Xd(e,TU,EU).visitAfter(c);for(n=f,h=0;h<p;++h)t=e[h],g.visit(d)}function u(){if(e){var f,h=e.length,p;for(i=new Array(h),f=0;f<h;++f)p=e[f],i[p.index]=+r(p,f,e)}}function c(f){var h=0,p,g,b=0,v,x,y;if(f.length){for(v=x=y=0;y<4;++y)(p=f[y])&&(g=Math.abs(p.value))&&(h+=p.value,b+=g,v+=g*p.x,x+=g*p.y);f.x=v/b,f.y=x/b}else{p=f,p.x=p.data.x,p.y=p.data.y;do h+=i[p.data.index];while(p=p.next)}f.value=h}function d(f,h,p,g){if(!f.value)return!0;var b=f.x-t.x,v=f.y-t.y,x=g-h,y=b*b+v*v;if(x*x/s<y)return y<a&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)),t.vx+=b*f.value*n/y,t.vy+=v*f.value*n/y),!0;if(f.length||y>=a)return;(f.data!==t||f.next)&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)));do f.data!==t&&(x=i[f.data.index]*n/y,t.vx+=b*x,t.vy+=v*x);while(f=f.next)}return l.initialize=function(f){e=f,u()},l.strength=function(f){return arguments.length?(r=typeof f=="function"?f:Jt(+f),u(),l):r},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l}function IU(e,t,n){var r,i=Jt(.1),o,a;typeof e!="function"&&(e=Jt(+e)),t==null&&(t=0),n==null&&(n=0);function s(u){for(var c=0,d=r.length;c<d;++c){var f=r[c],h=f.x-t||1e-6,p=f.y-n||1e-6,g=Math.sqrt(h*h+p*p),b=(a[c]-g)*o[c]*u/g;f.vx+=h*b,f.vy+=p*b}}function l(){if(r){var u,c=r.length;for(o=new Array(c),a=new Array(c),u=0;u<c;++u)a[u]=+e(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,l()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Jt(+u),l(),s):i},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Jt(+u),l(),s):e},s.x=function(u){return arguments.length?(t=+u,s):t},s.y=function(u){return arguments.length?(n=+u,s):n},s}function FU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(i[l]-c.x)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function BU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(i[l]-c.y)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function OU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Sf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ss(e){return e=Sf(Math.abs(e)),e?e[1]:NaN}function NU(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function LU(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var DU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tu(e){if(!(t=DU.exec(e)))throw new Error("invalid format: "+e);var t;return new Kd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}tu.prototype=Kd.prototype;function Kd(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function HU(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var i3;function UU(e,t){var n=Sf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(i3=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Sf(e,Math.max(0,t+o-1))[0]}function r_(e,t){var n=Sf(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const i_={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:OU,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return r_(e*100,t)},r:r_,s:UU,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function o_(e){return e}var a_=Array.prototype.map,s_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function o3(e){var t=e.grouping===void 0||e.thousands===void 0?o_:NU(a_.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?o_:LU(a_.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=tu(d);var f=d.fill,h=d.align,p=d.sign,g=d.symbol,b=d.zero,v=d.width,x=d.comma,y=d.precision,_=d.trim,S=d.type;S==="n"?(x=!0,S="g"):i_[S]||(y===void 0&&(y=12),_=!0,S="g"),(b||f==="0"&&h==="=")&&(b=!0,f="0",h="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",w=g==="$"?r:/[%p]/.test(S)?a:"",T=i_[S],M=/[defgprs%]/.test(S);y=y===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function P(R){var C=$,E=w,I,z,j;if(S==="c")E=T(R)+E,R="";else{R=+R;var Z=R<0||1/R<0;if(R=isNaN(R)?l:T(Math.abs(R),y),_&&(R=HU(R)),Z&&+R==0&&p!=="+"&&(Z=!1),C=(Z?p==="("?p:s:p==="-"||p==="("?"":p)+C,E=(S==="s"?s_[8+i3/3]:"")+E+(Z&&p==="("?")":""),M){for(I=-1,z=R.length;++I<z;)if(j=R.charCodeAt(I),48>j||j>57){E=(j===46?i+R.slice(I+1):R.slice(I))+E,R=R.slice(0,I);break}}}x&&!b&&(R=t(R,1/0));var J=C.length+R.length+E.length,ie=J<v?new Array(v-J+1).join(f):"";switch(x&&b&&(R=t(ie+R,ie.length?v-E.length:1/0),ie=""),h){case"<":R=C+R+E+ie;break;case"=":R=C+ie+R+E;break;case"^":R=ie.slice(0,J=ie.length>>1)+C+R+E+ie.slice(J);break;default:R=ie+C+R+E;break}return o(R)}return P.toString=function(){return d+""},P}function c(d,f){var h=u((d=tu(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(ss(f)/3)))*3,g=Math.pow(10,-p),b=s_[8+p/3];return function(v){return h(g*v)+b}}return{format:u,formatPrefix:c}}var hc,Zd,Zv;a3({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function a3(e){return hc=o3(e),Zd=hc.format,Zv=hc.formatPrefix,hc}function s3(e){return Math.max(0,-ss(Math.abs(e)))}function l3(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ss(t)/3)))*3-ss(Math.abs(e)))}function u3(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ss(t)-ss(e))+1}function po(){return new $f}function $f(){this.reset()}$f.prototype={constructor:$f,reset:function(){this.s=this.t=0},add:function(e){l_(pc,e,this.t),l_(this,pc.s,this.s),this.s?this.t+=pc.t:this.s=pc.t},valueOf:function(){return this.s}};var pc=new $f;function l_(e,t,n){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}var Qe=1e-6,kf=1e-12,ct=Math.PI,jt=ct/2,Mf=ct/4,zn=ct*2,Et=180/ct,Ze=ct/180,bt=Math.abs,xs=Math.atan,In=Math.atan2,je=Math.cos,gc=Math.ceil,c3=Math.exp,Tf=Math.log,$p=Math.pow,Fe=Math.sin,ur=Math.sign||function(e){return e>0?1:e<0?-1:0},Kt=Math.sqrt,Jv=Math.tan;function f3(e){return e>1?0:e<-1?ct:Math.acos(e)}function Fn(e){return e>1?jt:e<-1?-jt:Math.asin(e)}function u_(e){return(e=Fe(e/2))*e}function Nt(){}function Ef(e,t){e&&f_.hasOwnProperty(e.type)&&f_[e.type](e,t)}var c_={Feature:function(e,t){Ef(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Ef(n[r].geometry,t)}},f_={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){J0(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)J0(n[r],t,0)},Polygon:function(e,t){d_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)d_(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Ef(n[r],t)}};function J0(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function d_(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)J0(e[n],t,1);t.polygonEnd()}function br(e,t){e&&c_.hasOwnProperty(e.type)?c_[e.type](e,t):Ef(e,t)}var Af=po(),Pf=po(),d3,h3,Q0,eg,tg,Xr={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){Af.reset(),Xr.lineStart=jU,Xr.lineEnd=WU},polygonEnd:function(){var e=+Af;Pf.add(e<0?zn+e:e),this.lineStart=this.lineEnd=this.point=Nt},sphere:function(){Pf.add(zn)}};function jU(){Xr.point=VU}function WU(){p3(d3,h3)}function VU(e,t){Xr.point=p3,d3=e,h3=t,e*=Ze,t*=Ze,Q0=e,eg=je(t=t/2+Mf),tg=Fe(t)}function p3(e,t){e*=Ze,t*=Ze,t=t/2+Mf;var n=e-Q0,r=n>=0?1:-1,i=r*n,o=je(t),a=Fe(t),s=tg*a,l=eg*o+s*je(i),u=s*r*Fe(i);Af.add(In(u,l)),Q0=e,eg=o,tg=a}function qU(e){return Pf.reset(),br(e,Xr),Pf*2}function Rf(e){return[In(e[1],e[0]),Fn(e[2])]}function Zo(e){var t=e[0],n=e[1],r=je(n);return[r*je(t),r*Fe(t),Fe(n)]}function vc(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ls(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function kp(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function bc(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function zf(e){var t=Kt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ot,Un,Dt,qn,Mo,g3,v3,Ya,Cl=po(),zi,pi,ai={point:ng,lineStart:h_,lineEnd:p_,polygonStart:function(){ai.point=m3,ai.lineStart=YU,ai.lineEnd=GU,Cl.reset(),Xr.polygonStart()},polygonEnd:function(){Xr.polygonEnd(),ai.point=ng,ai.lineStart=h_,ai.lineEnd=p_,Af<0?(Ot=-(Dt=180),Un=-(qn=90)):Cl>Qe?qn=90:Cl<-1e-6&&(Un=-90),pi[0]=Ot,pi[1]=Dt},sphere:function(){Ot=-(Dt=180),Un=-(qn=90)}};function ng(e,t){zi.push(pi=[Ot=e,Dt=e]),t<Un&&(Un=t),t>qn&&(qn=t)}function b3(e,t){var n=Zo([e*Ze,t*Ze]);if(Ya){var r=ls(Ya,n),i=[r[1],-r[0],0],o=ls(i,r);zf(o),o=Rf(o);var a=e-Mo,s=a>0?1:-1,l=o[0]*Et*s,u,c=bt(a)>180;c^(s*Mo<l&&l<s*e)?(u=o[1]*Et,u>qn&&(qn=u)):(l=(l+360)%360-180,c^(s*Mo<l&&l<s*e)?(u=-o[1]*Et,u<Un&&(Un=u)):(t<Un&&(Un=t),t>qn&&(qn=t))),c?e<Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e):Dt>=Ot?(e<Ot&&(Ot=e),e>Dt&&(Dt=e)):e>Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e)}else zi.push(pi=[Ot=e,Dt=e]);t<Un&&(Un=t),t>qn&&(qn=t),Ya=n,Mo=e}function h_(){ai.point=b3}function p_(){pi[0]=Ot,pi[1]=Dt,ai.point=ng,Ya=null}function m3(e,t){if(Ya){var n=e-Mo;Cl.add(bt(n)>180?n+(n>0?360:-360):n)}else g3=e,v3=t;Xr.point(e,t),b3(e,t)}function YU(){Xr.lineStart()}function GU(){m3(g3,v3),Xr.lineEnd(),bt(Cl)>Qe&&(Ot=-(Dt=180)),pi[0]=Ot,pi[1]=Dt,Ya=null}function Vn(e,t){return(t-=e)<0?t+360:t}function XU(e,t){return e[0]-t[0]}function g_(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function KU(e){var t,n,r,i,o,a,s;if(qn=Dt=-(Ot=Un=1/0),zi=[],br(e,ai),n=zi.length){for(zi.sort(XU),t=1,r=zi[0],o=[r];t<n;++t)i=zi[t],g_(r,i[0])||g_(r,i[1])?(Vn(r[0],i[1])>Vn(r[0],r[1])&&(r[1]=i[1]),Vn(i[0],r[1])>Vn(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,t=0,r=o[n];t<=n;r=i,++t)i=o[t],(s=Vn(r[1],i[0]))>a&&(a=s,Ot=i[0],Dt=r[1])}return zi=pi=null,Ot===1/0||Un===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ot,Un],[Dt,qn]]}var Zs,If,Ff,Bf,Of,Nf,Lf,Df,rg,ig,og,y3,_3,Mn,Tn,En,yr={sphere:Nt,point:Qv,lineStart:v_,lineEnd:b_,polygonStart:function(){yr.lineStart=QU,yr.lineEnd=ej},polygonEnd:function(){yr.lineStart=v_,yr.lineEnd=b_}};function Qv(e,t){e*=Ze,t*=Ze;var n=je(t);Su(n*je(e),n*Fe(e),Fe(t))}function Su(e,t,n){++Zs,Ff+=(e-Ff)/Zs,Bf+=(t-Bf)/Zs,Of+=(n-Of)/Zs}function v_(){yr.point=ZU}function ZU(e,t){e*=Ze,t*=Ze;var n=je(t);Mn=n*je(e),Tn=n*Fe(e),En=Fe(t),yr.point=JU,Su(Mn,Tn,En)}function JU(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Fe(e),o=Fe(t),a=In(Kt((a=Tn*o-En*i)*a+(a=En*r-Mn*o)*a+(a=Mn*i-Tn*r)*a),Mn*r+Tn*i+En*o);If+=a,Nf+=a*(Mn+(Mn=r)),Lf+=a*(Tn+(Tn=i)),Df+=a*(En+(En=o)),Su(Mn,Tn,En)}function b_(){yr.point=Qv}function QU(){yr.point=tj}function ej(){x3(y3,_3),yr.point=Qv}function tj(e,t){y3=e,_3=t,e*=Ze,t*=Ze,yr.point=x3;var n=je(t);Mn=n*je(e),Tn=n*Fe(e),En=Fe(t),Su(Mn,Tn,En)}function x3(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Fe(e),o=Fe(t),a=Tn*o-En*i,s=En*r-Mn*o,l=Mn*i-Tn*r,u=Kt(a*a+s*s+l*l),c=Fn(u),d=u&&-c/u;rg+=d*a,ig+=d*s,og+=d*l,If+=c,Nf+=c*(Mn+(Mn=r)),Lf+=c*(Tn+(Tn=i)),Df+=c*(En+(En=o)),Su(Mn,Tn,En)}function nj(e){Zs=If=Ff=Bf=Of=Nf=Lf=Df=rg=ig=og=0,br(e,yr);var t=rg,n=ig,r=og,i=t*t+n*n+r*r;return i<kf&&(t=Nf,n=Lf,r=Df,If<Qe&&(t=Ff,n=Bf,r=Of),i=t*t+n*n+r*r,i<kf)?[NaN,NaN]:[In(n,t)*Et,Fn(r/Kt(i))*Et]}function Aa(e){return function(){return e}}function ag(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function sg(e,t){return[bt(e)>ct?e+Math.round(-e/zn)*zn:e,t]}sg.invert=sg;function eb(e,t,n){return(e%=zn)?t||n?ag(y_(e),__(t,n)):y_(e):t||n?__(t,n):sg}function m_(e){return function(t,n){return t+=e,[t>ct?t-zn:t<-ct?t+zn:t,n]}}function y_(e){var t=m_(e);return t.invert=m_(-e),t}function __(e,t){var n=je(e),r=Fe(e),i=je(t),o=Fe(t);function a(s,l){var u=je(l),c=je(s)*u,d=Fe(s)*u,f=Fe(l),h=f*n+c*r;return[In(d*i-h*o,c*n-f*r),Fn(h*i+d*o)]}return a.invert=function(s,l){var u=je(l),c=je(s)*u,d=Fe(s)*u,f=Fe(l),h=f*i-d*o;return[In(d*i+f*o,c*n+h*r),Fn(h*n-c*r)]},a}function w3(e){e=eb(e[0]*Ze,e[1]*Ze,e.length>2?e[2]*Ze:0);function t(n){return n=e(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n}return t.invert=function(n){return n=e.invert(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n},t}function C3(e,t,n,r,i,o){if(n){var a=je(t),s=Fe(t),l=r*n;i==null?(i=t+r*zn,o=t-l/2):(i=x_(a,i),o=x_(a,o),(r>0?i<o:i>o)&&(i+=r*zn));for(var u,c=i;r>0?c>o:c<o;c-=l)u=Rf([a,-s*je(c),-s*Fe(c)]),e.point(u[0],u[1])}}function x_(e,t){t=Zo(t),t[0]-=e,zf(t);var n=f3(-t[1]);return((-t[2]<0?-n:n)+zn-Qe)%zn}function rj(){var e=Aa([0,0]),t=Aa(90),n=Aa(6),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=Et,l[1]*=Et}function s(){var l=e.apply(this,arguments),u=t.apply(this,arguments)*Ze,c=n.apply(this,arguments)*Ze;return r=[],i=eb(-l[0]*Ze,-l[1]*Ze,0).invert,C3(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:Aa([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Aa(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:Aa(+l),s):n},s}function S3(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Nt,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Hc(e,t){return bt(e[0]-t[0])<Qe&&bt(e[1]-t[1])<Qe}function mc(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function $3(e,t,n,r,i){var o=[],a=[],s,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,b=p[0],v=p[g],x;if(Hc(b,v)){if(!b[2]&&!v[2]){for(i.lineStart(),s=0;s<g;++s)i.point((b=p[s])[0],b[1]);i.lineEnd();return}v[0]+=2*Qe}o.push(x=new mc(b,p,null,!0)),a.push(x.o=new mc(b,null,x,!1)),o.push(x=new mc(v,p,null,!1)),a.push(x.o=new mc(v,null,x,!0))}}),!!o.length){for(a.sort(t),w_(o),w_(a),s=0,l=a.length;s<l;++s)a[s].e=n=!n;for(var u=o[0],c,d;;){for(var f=u,h=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(s=0,l=c.length;s<l;++s)i.point((d=c[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h)for(c=f.p.z,s=c.length-1;s>=0;--s)i.point((d=c[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,h=!h}while(!f.v);i.lineEnd()}}}function w_(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}var Mp=po();function Tp(e){return bt(e[0])<=ct?e[0]:ur(e[0])*((bt(e[0])+ct)%zn-ct)}function k3(e,t){var n=Tp(t),r=t[1],i=Fe(r),o=[Fe(n),-je(n),0],a=0,s=0;Mp.reset(),i===1?r=jt+Qe:i===-1&&(r=-jt-Qe);for(var l=0,u=e.length;l<u;++l)if(d=(c=e[l]).length)for(var c,d,f=c[d-1],h=Tp(f),p=f[1]/2+Mf,g=Fe(p),b=je(p),v=0;v<d;++v,h=y,g=S,b=$,f=x){var x=c[v],y=Tp(x),_=x[1]/2+Mf,S=Fe(_),$=je(_),w=y-h,T=w>=0?1:-1,M=T*w,P=M>ct,R=g*S;if(Mp.add(In(R*T*Fe(M),b*$+R*je(M))),a+=P?w+T*zn:w,P^h>=n^y>=n){var C=ls(Zo(f),Zo(x));zf(C);var E=ls(o,C);zf(E);var I=(P^w>=0?-1:1)*Fn(E[2]);(r>I||r===I&&(C[0]||C[1]))&&(s+=P^w>=0?1:-1)}}return(a<-1e-6||a<Qe&&Mp<-1e-6)^s&1}function M3(e,t,n,r){return function(i){var o=t(i),a=S3(),s=t(a),l=!1,u,c,d,f={point:h,lineStart:g,lineEnd:b,polygonStart:function(){f.point=v,f.lineStart=x,f.lineEnd=y,c=[],u=[]},polygonEnd:function(){f.point=h,f.lineStart=g,f.lineEnd=b,c=Ev(c);var _=k3(u,r);c.length?(l||(i.polygonStart(),l=!0),$3(c,oj,_,n,i)):_&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(_,S){e(_,S)&&i.point(_,S)}function p(_,S){o.point(_,S)}function g(){f.point=p,o.lineStart()}function b(){f.point=h,o.lineEnd()}function v(_,S){d.push([_,S]),s.point(_,S)}function x(){s.lineStart(),d=[]}function y(){v(d[0][0],d[0][1]),s.lineEnd();var _=s.clean(),S=a.result(),$,w=S.length,T,M,P;if(d.pop(),u.push(d),d=null,!!w){if(_&1){if(M=S[0],(T=M.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),$=0;$<T;++$)i.point((P=M[$])[0],P[1]);i.lineEnd()}return}w>1&&_&2&&S.push(S.pop().concat(S.shift())),c.push(S.filter(ij))}}return f}}function ij(e){return e.length>1}function oj(e,t){return((e=e.x)[0]<0?e[1]-jt-Qe:jt-e[1])-((t=t.x)[0]<0?t[1]-jt-Qe:jt-t[1])}const lg=M3(function(){return!0},aj,lj,[-ct,-jt]);function aj(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?ct:-ct,l=bt(o-t);bt(l-ct)<Qe?(e.point(t,n=(n+a)/2>0?jt:-jt),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),i=0):r!==s&&l>=ct&&(bt(t-r)<Qe&&(t-=r*Qe),bt(o-s)<Qe&&(o-=s*Qe),n=sj(t,n,o,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=o,n=a),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function sj(e,t,n,r){var i,o,a=Fe(e-n);return bt(a)>Qe?xs((Fe(t)*(o=je(r))*Fe(n)-Fe(r)*(i=je(t))*Fe(e))/(i*o*a)):(t+r)/2}function lj(e,t,n,r){var i;if(e==null)i=n*jt,r.point(-ct,i),r.point(0,i),r.point(ct,i),r.point(ct,0),r.point(ct,-i),r.point(0,-i),r.point(-ct,-i),r.point(-ct,0),r.point(-ct,i);else if(bt(e[0]-t[0])>Qe){var o=e[0]<t[0]?ct:-ct;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function T3(e){var t=je(e),n=6*Ze,r=t>0,i=bt(t)>Qe;function o(c,d,f,h){C3(h,e,n,f,c,d)}function a(c,d){return je(c)*je(d)>t}function s(c){var d,f,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(b,v){var x=[b,v],y,_=a(b,v),S=r?_?0:u(b,v):_?u(b+(b<0?ct:-ct),v):0;if(!d&&(p=h=_)&&c.lineStart(),_!==h&&(y=l(d,x),(!y||Hc(d,y)||Hc(x,y))&&(x[2]=1)),_!==h)g=0,_?(c.lineStart(),y=l(x,d),c.point(y[0],y[1])):(y=l(d,x),c.point(y[0],y[1],2),c.lineEnd()),d=y;else if(i&&d&&r^_){var $;!(S&f)&&($=l(x,d,!0))&&(g=0,r?(c.lineStart(),c.point($[0][0],$[0][1]),c.point($[1][0],$[1][1]),c.lineEnd()):(c.point($[1][0],$[1][1]),c.lineEnd(),c.lineStart(),c.point($[0][0],$[0][1],3)))}_&&(!d||!Hc(d,x))&&c.point(x[0],x[1]),d=x,h=_,f=S},lineEnd:function(){h&&c.lineEnd(),d=null},clean:function(){return g|(p&&h)<<1}}}function l(c,d,f){var h=Zo(c),p=Zo(d),g=[1,0,0],b=ls(h,p),v=vc(b,b),x=b[0],y=v-x*x;if(!y)return!f&&c;var _=t*v/y,S=-t*x/y,$=ls(g,b),w=bc(g,_),T=bc(b,S);kp(w,T);var M=$,P=vc(w,M),R=vc(M,M),C=P*P-R*(vc(w,w)-1);if(!(C<0)){var E=Kt(C),I=bc(M,(-P-E)/R);if(kp(I,w),I=Rf(I),!f)return I;var z=c[0],j=d[0],Z=c[1],J=d[1],ie;j<z&&(ie=z,z=j,j=ie);var he=j-z,_e=bt(he-ct)<Qe,oe=_e||he<Qe;if(!_e&&J<Z&&(ie=Z,Z=J,J=ie),oe?_e?Z+J>0^I[1]<(bt(I[0]-z)<Qe?Z:J):Z<=I[1]&&I[1]<=J:he>ct^(z<=I[0]&&I[0]<=j)){var ve=bc(M,(-P+E)/R);return kp(ve,w),[I,Rf(ve)]}}}function u(c,d){var f=r?e:ct-e,h=0;return c<-f?h|=1:c>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return M3(a,s,o,r?[0,-e]:[-ct,e-ct])}function uj(e,t,n,r,i,o){var a=e[0],s=e[1],l=t[0],u=t[1],c=0,d=1,f=l-a,h=u-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<c)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>c&&(c=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>c&&(c=p)}else if(f>0){if(p<c)return;p<d&&(d=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<c)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>c&&(c=p)}if(p=o-s,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>c&&(c=p)}else if(h>0){if(p<c)return;p<d&&(d=p)}return c>0&&(e[0]=a+c*f,e[1]=s+c*h),d<1&&(t[0]=a+d*f,t[1]=s+d*h),!0}}}}}var yc=1e9,_c=-1e9;function Jd(e,t,n,r){function i(u,c){return e<=u&&u<=n&&t<=c&&c<=r}function o(u,c,d,f){var h=0,p=0;if(u==null||(h=a(u,d))!==(p=a(c,d))||l(u,c)<0^d>0)do f.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+d+4)%4)!==p);else f.point(c[0],c[1])}function a(u,c){return bt(u[0]-e)<Qe?c>0?0:3:bt(u[0]-n)<Qe?c>0?2:1:bt(u[1]-t)<Qe?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var d=a(u,1),f=a(c,1);return d!==f?d-f:d===0?c[1]-u[1]:d===1?u[0]-c[0]:d===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,d=S3(),f,h,p,g,b,v,x,y,_,S,$,w={point:T,lineStart:C,lineEnd:E,polygonStart:P,polygonEnd:R};function T(z,j){i(z,j)&&c.point(z,j)}function M(){for(var z=0,j=0,Z=h.length;j<Z;++j)for(var J=h[j],ie=1,he=J.length,_e=J[0],oe,ve,we=_e[0],Oe=_e[1];ie<he;++ie)oe=we,ve=Oe,_e=J[ie],we=_e[0],Oe=_e[1],ve<=r?Oe>r&&(we-oe)*(r-ve)>(Oe-ve)*(e-oe)&&++z:Oe<=r&&(we-oe)*(r-ve)<(Oe-ve)*(e-oe)&&--z;return z}function P(){c=d,f=[],h=[],$=!0}function R(){var z=M(),j=$&&z,Z=(f=Ev(f)).length;(j||Z)&&(u.polygonStart(),j&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),Z&&$3(f,s,z,o,u),u.polygonEnd()),c=u,f=h=p=null}function C(){w.point=I,h&&h.push(p=[]),S=!0,_=!1,x=y=NaN}function E(){f&&(I(g,b),v&&_&&d.rejoin(),f.push(d.result())),w.point=T,_&&c.lineEnd()}function I(z,j){var Z=i(z,j);if(h&&p.push([z,j]),S)g=z,b=j,v=Z,S=!1,Z&&(c.lineStart(),c.point(z,j));else if(Z&&_)c.point(z,j);else{var J=[x=Math.max(_c,Math.min(yc,x)),y=Math.max(_c,Math.min(yc,y))],ie=[z=Math.max(_c,Math.min(yc,z)),j=Math.max(_c,Math.min(yc,j))];uj(J,ie,e,t,n,r)?(_||(c.lineStart(),c.point(J[0],J[1])),c.point(ie[0],ie[1]),Z||c.lineEnd(),$=!1):Z&&(c.lineStart(),c.point(z,j),$=!1)}x=z,y=j,_=Z}return w}}function cj(){var e=0,t=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Jd(e,t,n,r)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[e,t],[n,r]]}}}var ug=po(),cg,Uc,jc,us={sphere:Nt,point:Nt,lineStart:fj,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt};function fj(){us.point=hj,us.lineEnd=dj}function dj(){us.point=us.lineEnd=Nt}function hj(e,t){e*=Ze,t*=Ze,cg=e,Uc=Fe(t),jc=je(t),us.point=pj}function pj(e,t){e*=Ze,t*=Ze;var n=Fe(t),r=je(t),i=bt(e-cg),o=je(i),a=Fe(i),s=r*a,l=jc*n-Uc*r*o,u=Uc*n+jc*r*o;ug.add(In(Kt(s*s+l*l),u)),cg=e,Uc=n,jc=r}function E3(e){return ug.reset(),br(e,us),+ug}var fg=[null,null],gj={type:"LineString",coordinates:fg};function Hf(e,t){return fg[0]=e,fg[1]=t,E3(gj)}var C_={Feature:function(e,t){return Uf(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Uf(n[r].geometry,t))return!0;return!1}},S_={Sphere:function(){return!0},Point:function(e,t){return $_(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if($_(n[r],t))return!0;return!1},LineString:function(e,t){return k_(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(k_(n[r],t))return!0;return!1},Polygon:function(e,t){return M_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(M_(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Uf(n[r],t))return!0;return!1}};function Uf(e,t){return e&&S_.hasOwnProperty(e.type)?S_[e.type](e,t):!1}function $_(e,t){return Hf(e,t)===0}function k_(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(r=Hf(e[o],t),r===0||o>0&&(i=Hf(e[o],e[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<kf*i))return!0;n=r}return!1}function M_(e,t){return!!k3(e.map(vj),A3(t))}function vj(e){return e=e.map(A3),e.pop(),e}function A3(e){return[e[0]*Ze,e[1]*Ze]}function bj(e,t){return(e&&C_.hasOwnProperty(e.type)?C_[e.type]:Uf)(e,t)}function T_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function E_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function P3(){var e,t,n,r,i,o,a,s,l=10,u=l,c=90,d=360,f,h,p,g,b=2.5;function v(){return{type:"MultiLineString",coordinates:x()}}function x(){return Jn(gc(r/c)*c,n,c).map(p).concat(Jn(gc(s/d)*d,a,d).map(g)).concat(Jn(gc(t/l)*l,e,l).filter(function(y){return bt(y%c)>Qe}).map(f)).concat(Jn(gc(o/u)*u,i,u).filter(function(y){return bt(y%d)>Qe}).map(h))}return v.lines=function(){return x().map(function(y){return{type:"LineString",coordinates:y}})},v.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},v.extent=function(y){return arguments.length?v.extentMajor(y).extentMinor(y):v.extentMinor()},v.extentMajor=function(y){return arguments.length?(r=+y[0][0],n=+y[1][0],s=+y[0][1],a=+y[1][1],r>n&&(y=r,r=n,n=y),s>a&&(y=s,s=a,a=y),v.precision(b)):[[r,s],[n,a]]},v.extentMinor=function(y){return arguments.length?(t=+y[0][0],e=+y[1][0],o=+y[0][1],i=+y[1][1],t>e&&(y=t,t=e,e=y),o>i&&(y=o,o=i,i=y),v.precision(b)):[[t,o],[e,i]]},v.step=function(y){return arguments.length?v.stepMajor(y).stepMinor(y):v.stepMinor()},v.stepMajor=function(y){return arguments.length?(c=+y[0],d=+y[1],v):[c,d]},v.stepMinor=function(y){return arguments.length?(l=+y[0],u=+y[1],v):[l,u]},v.precision=function(y){return arguments.length?(b=+y,f=T_(o,i,90),h=E_(t,e,b),p=T_(s,a,90),g=E_(r,n,b),v):b},v.extentMajor([[-180,-90+Qe],[180,90-Qe]]).extentMinor([[-180,-80-Qe],[180,80+Qe]])}function mj(){return P3()()}function yj(e,t){var n=e[0]*Ze,r=e[1]*Ze,i=t[0]*Ze,o=t[1]*Ze,a=je(r),s=Fe(r),l=je(o),u=Fe(o),c=a*je(n),d=a*Fe(n),f=l*je(i),h=l*Fe(i),p=2*Fn(Kt(u_(o-r)+a*l*u_(i-n))),g=Fe(p),b=p?function(v){var x=Fe(v*=p)/g,y=Fe(p-v)/g,_=y*c+x*f,S=y*d+x*h,$=y*s+x*u;return[In(S,_)*Et,In($,Kt(_*_+S*S))*Et]}:function(){return[n*Et,r*Et]};return b.distance=p,b}function nu(e){return e}var Ep=po(),dg=po(),R3,z3,hg,pg,li={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){li.lineStart=_j,li.lineEnd=wj},polygonEnd:function(){li.lineStart=li.lineEnd=li.point=Nt,Ep.add(bt(dg)),dg.reset()},result:function(){var e=Ep/2;return Ep.reset(),e}};function _j(){li.point=xj}function xj(e,t){li.point=I3,R3=hg=e,z3=pg=t}function I3(e,t){dg.add(pg*e-hg*t),hg=e,pg=t}function wj(){I3(R3,z3)}var cs=1/0,jf=cs,ru=-cs,Wf=ru,Vf={point:Cj,lineStart:Nt,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt,result:function(){var e=[[cs,jf],[ru,Wf]];return ru=Wf=-(jf=cs=1/0),e}};function Cj(e,t){e<cs&&(cs=e),e>ru&&(ru=e),t<jf&&(jf=t),t>Wf&&(Wf=t)}var gg=0,vg=0,Js=0,qf=0,Yf=0,Ia=0,bg=0,mg=0,Qs=0,F3,B3,Br,Or,ar={point:Jo,lineStart:A_,lineEnd:P_,polygonStart:function(){ar.lineStart=kj,ar.lineEnd=Mj},polygonEnd:function(){ar.point=Jo,ar.lineStart=A_,ar.lineEnd=P_},result:function(){var e=Qs?[bg/Qs,mg/Qs]:Ia?[qf/Ia,Yf/Ia]:Js?[gg/Js,vg/Js]:[NaN,NaN];return gg=vg=Js=qf=Yf=Ia=bg=mg=Qs=0,e}};function Jo(e,t){gg+=e,vg+=t,++Js}function A_(){ar.point=Sj}function Sj(e,t){ar.point=$j,Jo(Br=e,Or=t)}function $j(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);qf+=i*(Br+e)/2,Yf+=i*(Or+t)/2,Ia+=i,Jo(Br=e,Or=t)}function P_(){ar.point=Jo}function kj(){ar.point=Tj}function Mj(){O3(F3,B3)}function Tj(e,t){ar.point=O3,Jo(F3=Br=e,B3=Or=t)}function O3(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);qf+=i*(Br+e)/2,Yf+=i*(Or+t)/2,Ia+=i,i=Or*e-Br*t,bg+=i*(Br+e),mg+=i*(Or+t),Qs+=i*3,Jo(Br=e,Or=t)}function N3(e){this._context=e}N3.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,zn);break}}},result:Nt};var yg=po(),Ap,L3,D3,el,tl,iu={point:Nt,lineStart:function(){iu.point=Ej},lineEnd:function(){Ap&&H3(L3,D3),iu.point=Nt},polygonStart:function(){Ap=!0},polygonEnd:function(){Ap=null},result:function(){var e=+yg;return yg.reset(),e}};function Ej(e,t){iu.point=H3,L3=el=e,D3=tl=t}function H3(e,t){el-=e,tl-=t,yg.add(Kt(el*el+tl*tl)),el=e,tl=t}function U3(){this._string=[]}U3.prototype={_radius:4.5,_circle:R_(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=R_(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function R_(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Aj(e,t){var n=4.5,r,i;function o(a){return a&&(typeof n=="function"&&i.pointRadius(+n.apply(this,arguments)),br(a,r(i))),i.result()}return o.area=function(a){return br(a,r(li)),li.result()},o.measure=function(a){return br(a,r(iu)),iu.result()},o.bounds=function(a){return br(a,r(Vf)),Vf.result()},o.centroid=function(a){return br(a,r(ar)),ar.result()},o.projection=function(a){return arguments.length?(r=a==null?(e=null,nu):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new U3):new N3(t=a),typeof n!="function"&&i.pointRadius(n),o):t},o.pointRadius=function(a){return arguments.length?(n=typeof a=="function"?a:(i.pointRadius(+a),+a),o):n},o.projection(e).context(t)}function Pj(e){return{stream:$u(e)}}function $u(e){return function(t){var n=new _g;for(var r in e)n[r]=e[r];return n.stream=t,n}}function _g(){}_g.prototype={constructor:_g,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function tb(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),br(n,e.stream(Vf)),t(Vf.result()),r!=null&&e.clipExtent(r),e}function Qd(e,t,n){return tb(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,l])},n)}function nb(e,t,n){return Qd(e,[[0,0],t],n)}function rb(e,t,n){return tb(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];e.scale(150*o).translate([a,s])},n)}function ib(e,t,n){return tb(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])},n)}var z_=16,Rj=je(30*Ze);function I_(e,t){return+t?Ij(e,t):zj(e)}function zj(e){return $u({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Ij(e,t){function n(r,i,o,a,s,l,u,c,d,f,h,p,g,b){var v=u-r,x=c-i,y=v*v+x*x;if(y>4*t&&g--){var _=a+f,S=s+h,$=l+p,w=Kt(_*_+S*S+$*$),T=Fn($/=w),M=bt(bt($)-1)<Qe||bt(o-d)<Qe?(o+d)/2:In(S,_),P=e(M,T),R=P[0],C=P[1],E=R-r,I=C-i,z=x*E-v*I;(z*z/y>t||bt((v*E+x*I)/y-.5)>.3||a*f+s*h+l*p<Rj)&&(n(r,i,o,a,s,l,R,C,M,_/=w,S/=w,$,g,b),b.point(R,C),n(R,C,M,_,S,$,u,c,d,f,h,p,g,b))}}return function(r){var i,o,a,s,l,u,c,d,f,h,p,g,b={point:v,lineStart:x,lineEnd:_,polygonStart:function(){r.polygonStart(),b.lineStart=S},polygonEnd:function(){r.polygonEnd(),b.lineStart=x}};function v(T,M){T=e(T,M),r.point(T[0],T[1])}function x(){d=NaN,b.point=y,r.lineStart()}function y(T,M){var P=Zo([T,M]),R=e(T,M);n(d,f,c,h,p,g,d=R[0],f=R[1],c=T,h=P[0],p=P[1],g=P[2],z_,r),r.point(d,f)}function _(){b.point=v,r.lineEnd()}function S(){x(),b.point=$,b.lineEnd=w}function $(T,M){y(i=T,M),o=d,a=f,s=h,l=p,u=g,b.point=y}function w(){n(d,f,c,h,p,g,o,a,i,s,l,u,z_,r),b.lineEnd=_,_()}return b}}var Fj=$u({point:function(e,t){this.stream.point(e*Ze,t*Ze)}});function Bj(e){return $u({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Oj(e,t,n,r,i){function o(a,s){return a*=r,s*=i,[t+e*a,n-e*s]}return o.invert=function(a,s){return[(a-t)/e*r,(n-s)/e*i]},o}function F_(e,t,n,r,i,o){var a=je(o),s=Fe(o),l=a*e,u=s*e,c=a/e,d=s/e,f=(s*n-a*t)/e,h=(s*t+a*n)/e;function p(g,b){return g*=r,b*=i,[l*g-u*b+t,n-u*g-l*b]}return p.invert=function(g,b){return[r*(c*g-d*b+f),i*(h-d*g-c*b)]},p}function Jr(e){return ob(function(){return e})()}function ob(e){var t,n=150,r=480,i=250,o=0,a=0,s=0,l=0,u=0,c,d=0,f=1,h=1,p=null,g=lg,b=null,v,x,y,_=nu,S=.5,$,w,T,M,P;function R(z){return T(z[0]*Ze,z[1]*Ze)}function C(z){return z=T.invert(z[0],z[1]),z&&[z[0]*Et,z[1]*Et]}R.stream=function(z){return M&&P===z?M:M=Fj(Bj(c)(g($(_(P=z)))))},R.preclip=function(z){return arguments.length?(g=z,p=void 0,I()):g},R.postclip=function(z){return arguments.length?(_=z,b=v=x=y=null,I()):_},R.clipAngle=function(z){return arguments.length?(g=+z?T3(p=z*Ze):(p=null,lg),I()):p*Et},R.clipExtent=function(z){return arguments.length?(_=z==null?(b=v=x=y=null,nu):Jd(b=+z[0][0],v=+z[0][1],x=+z[1][0],y=+z[1][1]),I()):b==null?null:[[b,v],[x,y]]},R.scale=function(z){return arguments.length?(n=+z,E()):n},R.translate=function(z){return arguments.length?(r=+z[0],i=+z[1],E()):[r,i]},R.center=function(z){return arguments.length?(o=z[0]%360*Ze,a=z[1]%360*Ze,E()):[o*Et,a*Et]},R.rotate=function(z){return arguments.length?(s=z[0]%360*Ze,l=z[1]%360*Ze,u=z.length>2?z[2]%360*Ze:0,E()):[s*Et,l*Et,u*Et]},R.angle=function(z){return arguments.length?(d=z%360*Ze,E()):d*Et},R.reflectX=function(z){return arguments.length?(f=z?-1:1,E()):f<0},R.reflectY=function(z){return arguments.length?(h=z?-1:1,E()):h<0},R.precision=function(z){return arguments.length?($=I_(w,S=z*z),I()):Kt(S)},R.fitExtent=function(z,j){return Qd(R,z,j)},R.fitSize=function(z,j){return nb(R,z,j)},R.fitWidth=function(z,j){return rb(R,z,j)},R.fitHeight=function(z,j){return ib(R,z,j)};function E(){var z=F_(n,0,0,f,h,d).apply(null,t(o,a)),j=(d?F_:Oj)(n,r-z[0],i-z[1],f,h,d);return c=eb(s,l,u),w=ag(t,j),T=ag(c,w),$=I_(w,S),I()}function I(){return M=P=null,R}return function(){return t=e.apply(this,arguments),R.invert=t.invert&&C,E()}}function ab(e){var t=0,n=ct/3,r=ob(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*Ze,n=o[1]*Ze):[t*Et,n*Et]},i}function Nj(e){var t=je(e);function n(r,i){return[r*t,Fe(i)/t]}return n.invert=function(r,i){return[r/t,Fn(i*t)]},n}function j3(e,t){var n=Fe(e),r=(n+Fe(t))/2;if(bt(r)<Qe)return Nj(e);var i=1+n*(2*r-n),o=Kt(i)/r;function a(s,l){var u=Kt(i-2*r*Fe(l))/r;return[u*Fe(s*=r),o-u*je(s)]}return a.invert=function(s,l){var u=o-l,c=In(s,bt(u))*ur(u);return u*r<0&&(c-=ct*ur(s)*ur(u)),[c/r,Fn((i-(s*s+u*u)*r*r)/(2*r))]},a}function Gf(){return ab(j3).scale(155.424).center([0,33.6442])}function W3(){return Gf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Lj(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function Dj(){var e,t,n=W3(),r,i=Gf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Gf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,u={point:function(f,h){l=[f,h]}};function c(f){var h=f[0],p=f[1];return l=null,r.point(h,p),l||(o.point(h,p),l)||(s.point(h,p),l)}c.invert=function(f){var h=n.scale(),p=n.translate(),g=(f[0]-p[0])/h,b=(f[1]-p[1])/h;return(b>=.12&&b<.234&&g>=-.425&&g<-.214?i:b>=.166&&b<.234&&g>=-.214&&g<-.115?a:n).invert(f)},c.stream=function(f){return e&&t===f?e:e=Lj([n.stream(t=f),i.stream(f),a.stream(f)])},c.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),d()):n.precision()},c.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),c.translate(n.translate())):n.scale()},c.translate=function(f){if(!arguments.length)return n.translate();var h=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(u),o=i.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+Qe,g+.12*h+Qe],[p-.214*h-Qe,g+.234*h-Qe]]).stream(u),s=a.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+Qe,g+.166*h+Qe],[p-.115*h-Qe,g+.234*h-Qe]]).stream(u),d()},c.fitExtent=function(f,h){return Qd(c,f,h)},c.fitSize=function(f,h){return nb(c,f,h)},c.fitWidth=function(f,h){return rb(c,f,h)},c.fitHeight=function(f,h){return ib(c,f,h)};function d(){return e=t=null,c}return c.scale(1070)}function V3(e){return function(t,n){var r=je(t),i=je(n),o=e(r*i);return[o*i*Fe(t),o*Fe(n)]}}function ku(e){return function(t,n){var r=Kt(t*t+n*n),i=e(r),o=Fe(i),a=je(i);return[In(t*o,r*a),Fn(r&&n*o/r)]}}var sb=V3(function(e){return Kt(2/(1+e))});sb.invert=ku(function(e){return 2*Fn(e/2)});function Hj(){return Jr(sb).scale(124.75).clipAngle(180-.001)}var lb=V3(function(e){return(e=f3(e))&&e/Fe(e)});lb.invert=ku(function(e){return e});function Uj(){return Jr(lb).scale(79.4188).clipAngle(180-.001)}function Mu(e,t){return[e,Tf(Jv((jt+t)/2))]}Mu.invert=function(e,t){return[e,2*xs(c3(t))-jt]};function jj(){return q3(Mu).scale(961/zn)}function q3(e){var t=Jr(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,u;t.scale=function(d){return arguments.length?(r(d),c()):r()},t.translate=function(d){return arguments.length?(i(d),c()):i()},t.center=function(d){return arguments.length?(n(d),c()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=s=l=u=null:(a=+d[0][0],s=+d[0][1],l=+d[1][0],u=+d[1][1]),c()):a==null?null:[[a,s],[l,u]]};function c(){var d=ct*r(),f=t(w3(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===Mu?[[Math.max(f[0]-d,a),s],[Math.min(f[0]+d,l),u]]:[[a,Math.max(f[1]-d,s)],[l,Math.min(f[1]+d,u)]])}return c()}function xc(e){return Jv((jt+e)/2)}function Y3(e,t){var n=je(e),r=e===t?Fe(e):Tf(n/je(t))/Tf(xc(t)/xc(e)),i=n*$p(xc(e),r)/r;if(!r)return Mu;function o(a,s){i>0?s<-jt+Qe&&(s=-jt+Qe):s>jt-Qe&&(s=jt-Qe);var l=i/$p(xc(s),r);return[l*Fe(r*a),i-l*je(r*a)]}return o.invert=function(a,s){var l=i-s,u=ur(r)*Kt(a*a+l*l),c=In(a,bt(l))*ur(l);return l*r<0&&(c-=ct*ur(a)*ur(l)),[c/r,2*xs($p(i/u,1/r))-jt]},o}function Wj(){return ab(Y3).scale(109.5).parallels([30,30])}function ou(e,t){return[e,t]}ou.invert=ou;function Vj(){return Jr(ou).scale(152.63)}function G3(e,t){var n=je(e),r=e===t?Fe(e):(n-je(t))/(t-e),i=n/r+e;if(bt(r)<Qe)return ou;function o(a,s){var l=i-s,u=r*a;return[l*Fe(u),i-l*je(u)]}return o.invert=function(a,s){var l=i-s,u=In(a,bt(l))*ur(l);return l*r<0&&(u-=ct*ur(a)*ur(l)),[u/r,i-ur(r)*Kt(a*a+l*l)]},o}function qj(){return ab(G3).scale(131.154).center([0,13.9389])}var Sl=1.340264,$l=-.081106,kl=893e-6,Ml=.003796,Xf=Kt(3)/2,Yj=12;function ub(e,t){var n=Fn(Xf*Fe(t)),r=n*n,i=r*r*r;return[e*je(n)/(Xf*(Sl+3*$l*r+i*(7*kl+9*Ml*r))),n*(Sl+$l*r+i*(kl+Ml*r))]}ub.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,a,s,l;o<Yj&&(s=n*(Sl+$l*r+i*(kl+Ml*r))-t,l=Sl+3*$l*r+i*(7*kl+9*Ml*r),n-=a=s/l,r=n*n,i=r*r*r,!(bt(a)<kf));++o);return[Xf*e*(Sl+3*$l*r+i*(7*kl+9*Ml*r))/je(n),Fn(Fe(n)/Xf)]};function Gj(){return Jr(ub).scale(177.158)}function cb(e,t){var n=je(t),r=je(e)*n;return[n*Fe(e)/r,Fe(t)/r]}cb.invert=ku(xs);function Xj(){return Jr(cb).scale(144.049).clipAngle(60)}function Kj(){var e=1,t=0,n=0,r=1,i=1,o=0,a,s,l=null,u,c,d,f=1,h=1,p=$u({point:function(_,S){var $=y([_,S]);this.stream.point($[0],$[1])}}),g=nu,b,v;function x(){return f=e*r,h=e*i,b=v=null,y}function y(_){var S=_[0]*f,$=_[1]*h;if(o){var w=$*a-S*s;S=S*a+$*s,$=w}return[S+t,$+n]}return y.invert=function(_){var S=_[0]-t,$=_[1]-n;if(o){var w=$*a+S*s;S=S*a-$*s,$=w}return[S/f,$/h]},y.stream=function(_){return b&&v===_?b:b=p(g(v=_))},y.postclip=function(_){return arguments.length?(g=_,l=u=c=d=null,x()):g},y.clipExtent=function(_){return arguments.length?(g=_==null?(l=u=c=d=null,nu):Jd(l=+_[0][0],u=+_[0][1],c=+_[1][0],d=+_[1][1]),x()):l==null?null:[[l,u],[c,d]]},y.scale=function(_){return arguments.length?(e=+_,x()):e},y.translate=function(_){return arguments.length?(t=+_[0],n=+_[1],x()):[t,n]},y.angle=function(_){return arguments.length?(o=_%360*Ze,s=Fe(o),a=je(o),x()):o*Et},y.reflectX=function(_){return arguments.length?(r=_?-1:1,x()):r<0},y.reflectY=function(_){return arguments.length?(i=_?-1:1,x()):i<0},y.fitExtent=function(_,S){return Qd(y,_,S)},y.fitSize=function(_,S){return nb(y,_,S)},y.fitWidth=function(_,S){return rb(y,_,S)},y.fitHeight=function(_,S){return ib(y,_,S)},y}function fb(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}fb.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(bt(i)>Qe&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function Zj(){return Jr(fb).scale(175.295)}function db(e,t){return[je(t)*Fe(e),Fe(t)]}db.invert=ku(Fn);function Jj(){return Jr(db).scale(249.5).clipAngle(90+Qe)}function hb(e,t){var n=je(t),r=1+je(e)*n;return[n*Fe(e)/r,Fe(t)/r]}hb.invert=ku(function(e){return 2*xs(e)});function Qj(){return Jr(hb).scale(250).clipAngle(142)}function pb(e,t){return[Tf(Jv((jt+t)/2)),-e]}pb.invert=function(e,t){return[-t,2*xs(c3(e))-jt]};function eW(){var e=q3(pb),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function tW(e,t){return e.parent===t.parent?1:2}function nW(e){return e.reduce(rW,0)/e.length}function rW(e,t){return e+t.x}function iW(e){return 1+e.reduce(oW,0)}function oW(e,t){return Math.max(e,t.y)}function aW(e){for(var t;t=e.children;)e=t[0];return e}function sW(e){for(var t;t=e.children;)e=t[t.length-1];return e}function lW(){var e=tW,t=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var h=f.children;h?(f.x=nW(h),f.y=iW(h)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=aW(o),u=sW(o),c=l.x-e(l,u)/2,d=u.x+e(u,l)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-c)/(d-c)*t,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function uW(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function cW(){return this.eachAfter(uW)}function fW(e){var t=this,n,r=[t],i,o,a;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);while(r.length);return this}function dW(e){for(var t=this,n=[t],r,i;t=n.pop();)if(e(t),r=t.children,r)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function hW(e){for(var t=this,n=[t],r=[],i,o,a;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this}function pW(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function gW(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function vW(e){for(var t=this,n=bW(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function bW(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function mW(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function yW(){var e=[];return this.each(function(t){e.push(t)}),e}function _W(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function xW(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function gb(e,t){var n=new fs(e),r=+e.value&&(n.value=e.value),i,o=[n],a,s,l,u;for(t==null&&(t=CW);i=o.pop();)if(r&&(i.value=+i.data.value),(s=t(i.data))&&(u=s.length))for(i.children=new Array(u),l=u-1;l>=0;--l)o.push(a=i.children[l]=new fs(s[l])),a.parent=i,a.depth=i.depth+1;return n.eachBefore(X3)}function wW(){return gb(this).eachBefore(SW)}function CW(e){return e.children}function SW(e){e.data=e.data.data}function X3(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function fs(e){this.data=e,this.depth=this.height=0,this.parent=null}fs.prototype=gb.prototype={constructor:fs,count:cW,each:fW,eachAfter:hW,eachBefore:dW,sum:pW,sort:gW,path:vW,ancestors:mW,descendants:yW,leaves:_W,links:xW,copy:wW};var $W=Array.prototype.slice;function kW(e){for(var t=e.length,n,r;t;)r=Math.random()*t--|0,n=e[t],e[t]=e[r],e[r]=n;return e}function K3(e){for(var t=0,n=(e=kW($W.call(e))).length,r=[],i,o;t<n;)i=e[t],o&&Z3(o,i)?++t:(o=TW(r=MW(r,i)),t=0);return o}function MW(e,t){var n,r;if(Pp(t,e))return[t];for(n=0;n<e.length;++n)if(wc(t,e[n])&&Pp(nl(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(wc(nl(e[n],e[r]),t)&&wc(nl(e[n],t),e[r])&&wc(nl(e[r],t),e[n])&&Pp(J3(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function wc(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function Z3(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Pp(e,t){for(var n=0;n<t.length;++n)if(!Z3(e,t[n]))return!1;return!0}function TW(e){switch(e.length){case 1:return EW(e[0]);case 2:return nl(e[0],e[1]);case 3:return J3(e[0],e[1],e[2])}}function EW(e){return{x:e.x,y:e.y,r:e.r}}function nl(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-n,u=a-r,c=s-i,d=Math.sqrt(l*l+u*u);return{x:(n+o+l/d*c)/2,y:(r+a+u/d*c)/2,r:(d+i+s)/2}}function J3(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,u=n.x,c=n.y,d=n.r,f=r-a,h=r-u,p=i-s,g=i-c,b=l-o,v=d-o,x=r*r+i*i-o*o,y=x-a*a-s*s+l*l,_=x-u*u-c*c+d*d,S=h*p-f*g,$=(p*_-g*y)/(S*2)-r,w=(g*b-p*v)/S,T=(h*y-f*_)/(S*2)-i,M=(f*v-h*b)/S,P=w*w+M*M-1,R=2*(o+$*w+T*M),C=$*$+T*T-o*o,E=-(P?(R+Math.sqrt(R*R-4*P*C))/(2*P):C/R);return{x:r+$+w*E,y:i+T+M*E,r:E}}function B_(e,t,n){var r=e.x-t.x,i,o,a=e.y-t.y,s,l,u=r*r+a*a;u?(o=t.r+n.r,o*=o,l=e.r+n.r,l*=l,o>l?(i=(u+l-o)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),n.x=e.x-i*r-s*a,n.y=e.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=t.x+i*r-s*a,n.y=t.y+i*a+s*r)):(n.x=t.x+n.r,n.y=t.y)}function O_(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function N_(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function Cc(e){this._=e,this.next=null,this.previous=null}function Q3(e){if(!(i=e.length))return 0;var t,n,r,i,o,a,s,l,u,c,d;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;B_(n,t,r=e[2]),t=new Cc(t),n=new Cc(n),r=new Cc(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s<i;++s){B_(t._,n._,r=e[s]),r=new Cc(r),l=n.next,u=t.previous,c=n._.r,d=t._.r;do if(c<=d){if(O_(l._,r._)){n=l,t.next=n,n.previous=t,--s;continue e}c+=l._.r,l=l.next}else{if(O_(u._,r._)){t=u,t.next=n,n.previous=t,--s;continue e}d+=u._.r,u=u.previous}while(l!==u.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=N_(t);(r=r.next)!==n;)(a=N_(r))<o&&(t=r,o=a);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=K3(t),s=0;s<i;++s)t=e[s],t.x-=r.x,t.y-=r.y;return r.r}function AW(e){return Q3(e),e}function PW(e){return e==null?null:Kf(e)}function Kf(e){if(typeof e!="function")throw new Error;return e}function Po(){return 0}function Ra(e){return function(){return e}}function RW(e){return Math.sqrt(e.value)}function zW(){var e=null,t=1,n=1,r=Po;function i(o){return o.x=t/2,o.y=n/2,e?o.eachBefore(L_(e)).eachAfter(Rp(r,.5)).eachBefore(D_(1)):o.eachBefore(L_(RW)).eachAfter(Rp(Po,1)).eachAfter(Rp(r,o.r/Math.min(t,n))).eachBefore(D_(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=PW(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Ra(+o),i):r},i}function L_(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Rp(e,t){return function(n){if(r=n.children){var r,i,o=r.length,a=e(n)*t||0,s;if(a)for(i=0;i<o;++i)r[i].r+=a;if(s=Q3(r),a)for(i=0;i<o;++i)r[i].r-=a;n.r=s+a}}}function D_(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function eC(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Tu(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function IW(){var e=1,t=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),r&&a.eachBefore(eC),a}function o(a,s){return function(l){l.children&&Tu(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var u=l.x0,c=l.y0,d=l.x1-n,f=l.y1-n;d<u&&(u=d=(u+d)/2),f<c&&(c=f=(c+f)/2),l.x0=u,l.y0=c,l.x1=d,l.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var H_="$",FW={depth:-1},U_={};function BW(e){return e.id}function OW(e){return e.parentId}function NW(){var e=BW,t=OW;function n(r){var i,o,a=r.length,s,l,u,c=new Array(a),d,f,h={};for(o=0;o<a;++o)i=r[o],u=c[o]=new fs(i),(d=e(i,o,r))!=null&&(d+="")&&(f=H_+(u.id=d),h[f]=f in h?U_:u);for(o=0;o<a;++o)if(u=c[o],d=t(r[o],o,r),d==null||!(d+="")){if(s)throw new Error("multiple roots");s=u}else{if(l=h[H_+d],!l)throw new Error("missing: "+d);if(l===U_)throw new Error("ambiguous: "+d);l.children?l.children.push(u):l.children=[u],u.parent=l}if(!s)throw new Error("no root");if(s.parent=FW,s.eachBefore(function(p){p.depth=p.parent.depth+1,--a}).eachBefore(X3),s.parent=null,a>0)throw new Error("cycle");return s}return n.id=function(r){return arguments.length?(e=Kf(r),n):e},n.parentId=function(r){return arguments.length?(t=Kf(r),n):t},n}function LW(e,t){return e.parent===t.parent?1:2}function zp(e){var t=e.children;return t?t[0]:e.t}function Ip(e){var t=e.children;return t?t[t.length-1]:e.t}function DW(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function HW(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function UW(e,t,n){return e.a.parent===t.parent?e.a:n}function Wc(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Wc.prototype=Object.create(fs.prototype);function jW(e){for(var t=new Wc(e,0),n,r=[t],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Wc(o[a],a)),i.parent=n;return(t.parent=new Wc(null,0)).children=[t],t}function WW(){var e=LW,t=1,n=1,r=null;function i(u){var c=jW(u);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)u.eachBefore(l);else{var d=u,f=u,h=u;u.eachBefore(function(x){x.x<d.x&&(d=x),x.x>f.x&&(f=x),x.depth>h.depth&&(h=x)});var p=d===f?1:e(d,f)/2,g=p-d.x,b=t/(f.x+p+g),v=n/(h.depth||1);u.eachBefore(function(x){x.x=(x.x+g)*b,x.y=x.depth*v})}return u}function o(u){var c=u.children,d=u.parent.children,f=u.i?d[u.i-1]:null;if(c){HW(u);var h=(c[0].z+c[c.length-1].z)/2;f?(u.z=f.z+e(u._,f._),u.m=u.z-h):u.z=h}else f&&(u.z=f.z+e(u._,f._));u.parent.A=s(u,f,u.parent.A||d[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,d){if(c){for(var f=u,h=u,p=c,g=f.parent.children[0],b=f.m,v=h.m,x=p.m,y=g.m,_;p=Ip(p),f=zp(f),p&&f;)g=zp(g),h=Ip(h),h.a=u,_=p.z+x-f.z-b+e(p._,f._),_>0&&(DW(UW(p,u,d),u,_),b+=_,v+=_),x+=p.m,b+=f.m,y+=g.m,v+=h.m;p&&!Ip(h)&&(h.t=p,h.m+=x-v),f&&!zp(g)&&(g.t=f,g.m+=b-y,d=u)}return d}function l(u){u.x*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}function eh(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var tC=(1+Math.sqrt(5))/2;function nC(e,t,n,r,i,o){for(var a=[],s=t.children,l,u,c=0,d=0,f=s.length,h,p,g=t.value,b,v,x,y,_,S,$;c<f;){h=i-n,p=o-r;do b=s[d++].value;while(!b&&d<f);for(v=x=b,S=Math.max(p/h,h/p)/(g*e),$=b*b*S,_=Math.max(x/$,$/v);d<f;++d){if(b+=u=s[d].value,u<v&&(v=u),u>x&&(x=u),$=b*b*S,y=Math.max(x/$,$/v),y>_){b-=u;break}_=y}a.push(l={value:b,dice:h<p,children:s.slice(c,d)}),l.dice?Tu(l,n,r,i,g?r+=p*b/g:o):eh(l,n,r,g?n+=h*b/g:i,o),g-=b,c=d}return a}const rC=function e(t){function n(r,i,o,a,s){nC(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(tC);function VW(){var e=rC,t=!1,n=1,r=1,i=[0],o=Po,a=Po,s=Po,l=Po,u=Po;function c(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(d),i=[0],t&&f.eachBefore(eC),f}function d(f){var h=i[f.depth],p=f.x0+h,g=f.y0+h,b=f.x1-h,v=f.y1-h;b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),f.x0=p,f.y0=g,f.x1=b,f.y1=v,f.children&&(h=i[f.depth+1]=o(f)/2,p+=u(f)-h,g+=a(f)-h,b-=s(f)-h,v-=l(f)-h,b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),e(f,p,g,b,v))}return c.round=function(f){return arguments.length?(t=!!f,c):t},c.size=function(f){return arguments.length?(n=+f[0],r=+f[1],c):[n,r]},c.tile=function(f){return arguments.length?(e=Kf(f),c):e},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Ra(+f),c):o},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Ra(+f),c):a},c.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Ra(+f),c):s},c.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Ra(+f),c):l},c.paddingLeft=function(f){return arguments.length?(u=typeof f=="function"?f:Ra(+f),c):u},c}function qW(e,t,n,r,i){var o=e.children,a,s=o.length,l,u=new Array(s+1);for(u[0]=l=a=0;a<s;++a)u[a+1]=l+=o[a].value;c(0,s,e.value,t,n,r,i);function c(d,f,h,p,g,b,v){if(d>=f-1){var x=o[d];x.x0=p,x.y0=g,x.x1=b,x.y1=v;return}for(var y=u[d],_=h/2+y,S=d+1,$=f-1;S<$;){var w=S+$>>>1;u[w]<_?S=w+1:$=w}_-u[S-1]<u[S]-_&&d+1<S&&--S;var T=u[S]-y,M=h-T;if(b-p>v-g){var P=(p*M+b*T)/h;c(d,S,T,p,g,P,v),c(S,f,M,P,g,b,v)}else{var R=(g*M+v*T)/h;c(d,S,T,p,g,b,R),c(S,f,M,p,R,b,v)}}}function YW(e,t,n,r,i){(e.depth&1?eh:Tu)(e,t,n,r,i)}const GW=function e(t){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===t)for(var l,u,c,d,f=-1,h,p=l.length,g=r.value;++f<p;){for(u=l[f],c=u.children,d=u.value=0,h=c.length;d<h;++d)u.value+=c[d].value;u.dice?Tu(u,i,o,a,o+=(s-o)*u.value/g):eh(u,i,o,i+=(a-i)*u.value/g,s),g-=u.value}else r._squarify=l=nC(t,r,i,o,a,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(tC);function XW(e){for(var t=-1,n=e.length,r,i=e[n-1],o=0;++t<n;)r=i,i=e[t],o+=r[1]*i[0]-r[0]*i[1];return o/2}function KW(e){for(var t=-1,n=e.length,r=0,i=0,o,a=e[n-1],s,l=0;++t<n;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[r/l,i/l]}function ZW(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function JW(e,t){return e[0]-t[0]||e[1]-t[1]}function j_(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;++i){for(;r>1&&ZW(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function QW(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(JW),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=j_(r),a=j_(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(t=o.length-1;t>=0;--t)u.push(e[r[o[t]][2]]);for(t=+s;t<a.length-l;++t)u.push(e[r[a[t]][2]]);return u}function eV(e,t){for(var n=e.length,r=e[n-1],i=t[0],o=t[1],a=r[0],s=r[1],l,u,c=!1,d=0;d<n;++d)r=e[d],l=r[0],u=r[1],u>o!=s>o&&i<(a-l)*(o-u)/(s-u)+l&&(c=!c),a=l,s=u;return c}function tV(e){for(var t=-1,n=e.length,r=e[n-1],i,o,a=r[0],s=r[1],l=0;++t<n;)i=a,o=s,r=e[t],a=r[0],s=r[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}function ws(){return Math.random()}const nV=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return t()*i+r}}return n.source=e,n}(ws),iC=function e(t){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=e,n}(ws),rV=function e(t){function n(){var r=iC.source(t).apply(this,arguments);return function(){return Math.exp(r())}}return n.source=e,n}(ws),oC=function e(t){function n(r){return function(){for(var i=0,o=0;o<r;++o)i+=t();return i}}return n.source=e,n}(ws),iV=function e(t){function n(r){var i=oC.source(t)(r);return function(){return i()/r}}return n.source=e,n}(ws),oV=function e(t){function n(r){return function(){return-Math.log(1-t())/r}}return n.source=e,n}(ws);function Tr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function wi(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e);break}return this}var aC=Array.prototype,Zf=aC.map,Qo=aC.slice,xg={name:"implicit"};function vb(){var e=hi(),t=[],n=[],r=xg;function i(o){var a=o+"",s=e.get(a);if(!s){if(r!==xg)return r;e.set(a,s=t.push(o))}return n[(s-1)%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=hi();for(var a=-1,s=o.length,l,u;++a<s;)e.has(u=(l=o[a])+"")||e.set(u,t.push(l));return i},i.range=function(o){return arguments.length?(n=Qo.call(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return vb(t,n).unknown(r)},Tr.apply(i,arguments),i}function bb(){var e=vb().unknown(void 0),t=e.domain,n=e.range,r=[0,1],i,o,a=!1,s=0,l=0,u=.5;delete e.unknown;function c(){var d=t().length,f=r[1]<r[0],h=r[f-0],p=r[1-f];i=(p-h)/Math.max(1,d-s+l*2),a&&(i=Math.floor(i)),h+=(p-h-i*(d-s))*u,o=i*(1-s),a&&(h=Math.round(h),o=Math.round(o));var g=Jn(d).map(function(b){return h+i*b});return n(f?g.reverse():g)}return e.domain=function(d){return arguments.length?(t(d),c()):t()},e.range=function(d){return arguments.length?(r=[+d[0],+d[1]],c()):r.slice()},e.rangeRound=function(d){return r=[+d[0],+d[1]],a=!0,c()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(a=!!d,c()):a},e.padding=function(d){return arguments.length?(s=Math.min(1,l=+d),c()):s},e.paddingInner=function(d){return arguments.length?(s=Math.min(1,d),c()):s},e.paddingOuter=function(d){return arguments.length?(l=+d,c()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),c()):u},e.copy=function(){return bb(t(),r).round(a).paddingInner(s).paddingOuter(l).align(u)},Tr.apply(c(),arguments)}function sC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return sC(t())},e}function aV(){return sC(bb.apply(null,arguments).paddingInner(1))}function sV(e){return function(){return e}}function wg(e){return+e}var W_=[0,1];function cn(e){return e}function Cg(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sV(isNaN(t)?NaN:.5)}function V_(e){var t=e[0],n=e[e.length-1],r;return t>n&&(r=t,t=n,n=r),function(i){return Math.max(t,Math.min(n,i))}}function lV(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Cg(i,r),o=n(a,o)):(r=Cg(r,i),o=n(o,a)),function(s){return o(r(s))}}function uV(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Cg(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=Ji(e,s,1,r)-1;return o[l](i[l](s))}}function Eu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function th(){var e=W_,t=W_,n=ys,r,i,o,a=cn,s,l,u;function c(){return s=Math.min(e.length,t.length)>2?uV:lV,l=u=null,d}function d(f){return isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((u||(u=s(t,e.map(r),or)))(f)))},d.domain=function(f){return arguments.length?(e=Zf.call(f,wg),a===cn||(a=V_(e)),c()):e.slice()},d.range=function(f){return arguments.length?(t=Qo.call(f),c()):t.slice()},d.rangeRound=function(f){return t=Qo.call(f),n=A8,c()},d.clamp=function(f){return arguments.length?(a=f?V_(e):cn,d):a!==cn},d.interpolate=function(f){return arguments.length?(n=f,c()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,h){return r=f,i=h,c()}}function lC(e,t){return th()(e,t)}function uC(e,t,n,r){var i=Yo(e,t,n),o;switch(r=tu(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=l3(i,a))&&(r.precision=o),Zv(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=u3(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=s3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zd(r)}function ba(e){var t=e.domain;return e.ticks=function(n){var r=t();return Mv(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return uC(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=wl(a,s,n),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=wl(a,s,n)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=wl(a,s,n)),l>0?(r[i]=Math.floor(a/l)*l,r[o]=Math.ceil(s/l)*l,t(r)):l<0&&(r[i]=Math.ceil(a*l)/l,r[o]=Math.floor(s*l)/l,t(r)),e},e}function au(){var e=lC(cn,cn);return e.copy=function(){return Eu(e,au())},Tr.apply(e,arguments),ba(e)}function cC(e){var t;function n(r){return isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Zf.call(r,wg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return cC(e).unknown(t)},e=arguments.length?Zf.call(e,wg):[0,1],ba(n)}function fC(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function q_(e){return Math.log(e)}function Y_(e){return Math.exp(e)}function cV(e){return-Math.log(-e)}function fV(e){return-Math.exp(-e)}function dV(e){return isFinite(e)?+("1e"+e):e<0?0:e}function hV(e){return e===10?dV:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function pV(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function G_(e){return function(t){return-e(-t)}}function mb(e){var t=e(q_,Y_),n=t.domain,r=10,i,o;function a(){return i=pV(r),o=hV(r),n()[0]<0?(i=G_(i),o=G_(o),e(cV,fV)):e(q_,Y_),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=function(s){var l=n(),u=l[0],c=l[l.length-1],d;(d=c<u)&&(f=u,u=c,c=f);var f=i(u),h=i(c),p,g,b,v=s==null?10:+s,x=[];if(!(r%1)&&h-f<v){if(f=Math.round(f)-1,h=Math.round(h)+1,u>0){for(;f<h;++f)for(g=1,p=o(f);g<r;++g)if(b=p*g,!(b<u)){if(b>c)break;x.push(b)}}else for(;f<h;++f)for(g=r-1,p=o(f);g>=1;--g)if(b=p*g,!(b<u)){if(b>c)break;x.push(b)}}else x=Mv(f,h,Math.min(h-f,v)).map(o);return d?x.reverse():x},t.tickFormat=function(s,l){if(l==null&&(l=r===10?".0e":","),typeof l!="function"&&(l=Zd(l)),s===1/0)return l;s==null&&(s=10);var u=Math.max(1,r*s/t.ticks().length);return function(c){var d=c/o(Math.round(i(c)));return d*r<r-.5&&(d*=r),d<=u?l(c):""}},t.nice=function(){return n(fC(n(),{floor:function(s){return o(Math.floor(i(s)))},ceil:function(s){return o(Math.ceil(i(s)))}}))},t}function dC(){var e=mb(th()).domain([1,10]);return e.copy=function(){return Eu(e,dC()).base(e.base())},Tr.apply(e,arguments),e}function X_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function K_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yb(e){var t=1,n=e(X_(t),K_(t));return n.constant=function(r){return arguments.length?e(X_(t=+r),K_(t)):t},ba(n)}function hC(){var e=yb(th());return e.copy=function(){return Eu(e,hC()).constant(e.constant())},Tr.apply(e,arguments)}function Z_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function gV(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function vV(e){return e<0?-e*e:e*e}function _b(e){var t=e(cn,cn),n=1;function r(){return n===1?e(cn,cn):n===.5?e(gV,vV):e(Z_(n),Z_(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ba(t)}function xb(){var e=_b(th());return e.copy=function(){return Eu(e,xb()).exponent(e.exponent())},Tr.apply(e,arguments),e}function bV(){return xb.apply(null,arguments).exponent(.5)}function pC(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=Vl(e,a/s);return o}function o(a){return isNaN(a=+a)?r:t[Ji(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(var s=0,l=a.length,u;s<l;++s)u=a[s],u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Sr),i()},o.range=function(a){return arguments.length?(t=Qo.call(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return pC().domain(e).range(t).unknown(r)},Tr.apply(o,arguments)}function gC(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l<=l?i[Ji(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?(e=+l[0],t=+l[1],s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Qo.call(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return gC().domain([e,t]).range(i).unknown(o)},Tr.apply(ba(a),arguments)}function vC(){var e=[.5],t=[0,1],n,r=1;function i(o){return o<=o?t[Ji(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Qo.call(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Qo.call(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return vC().domain(e).range(t).unknown(n)},Tr.apply(i,arguments)}var Fp=new Date,Bp=new Date;function Qt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],u;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(u=new Date(+o)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=function(o){return Qt(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return Fp.setTime(+o),Bp.setTime(+a),e(Fp),e(Bp),Math.floor(n(Fp,Bp))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var ea=Qt(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});ea.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Qt(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):ea};var J_=ea.range,Jf=1e3,ta=6e4,Qf=36e5,bC=864e5,mC=6048e5,su=Qt(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Jf)},function(e,t){return(t-e)/Jf},function(e){return e.getUTCSeconds()}),Q_=su.range,wb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jf)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getMinutes()}),mV=wb.range,Cb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jf-e.getMinutes()*ta)},function(e,t){e.setTime(+e+t*Qf)},function(e,t){return(t-e)/Qf},function(e){return e.getHours()}),yV=Cb.range,Au=Qt(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ta)/bC},function(e){return e.getDate()-1}),_V=Au.range;function ma(e){return Qt(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ta)/mC})}var lu=ma(0),uu=ma(1),yC=ma(2),_C=ma(3),na=ma(4),xC=ma(5),wC=ma(6),ex=lu.range,xV=uu.range,wV=yC.range,CV=_C.range,SV=na.range,$V=xC.range,kV=wC.range,Sb=Qt(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),MV=Sb.range,gi=Qt(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});gi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};var TV=gi.range,$b=Qt(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getUTCMinutes()}),EV=$b.range,kb=Qt(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Qf)},function(e,t){return(t-e)/Qf},function(e){return e.getUTCHours()}),AV=kb.range,Pu=Qt(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/bC},function(e){return e.getUTCDate()-1}),PV=Pu.range;function ya(e){return Qt(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/mC})}var cu=ya(0),fu=ya(1),CC=ya(2),SC=ya(3),ra=ya(4),$C=ya(5),kC=ya(6),tx=cu.range,RV=fu.range,zV=CC.range,IV=SC.range,FV=ra.range,BV=$C.range,OV=kC.range,Mb=Qt(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),NV=Mb.range,vi=Qt(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});vi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};var LV=vi.range;function Op(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Np(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Os(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function MC(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ns(i),c=Ls(i),d=Ns(o),f=Ls(o),h=Ns(a),p=Ls(a),g=Ns(s),b=Ls(s),v=Ns(l),x=Ls(l),y={a:Z,A:J,b:ie,B:he,c:null,d:sx,e:sx,f:lq,g:mq,G:_q,H:oq,I:aq,j:sq,L:TC,m:uq,M:cq,p:_e,q:oe,Q:cx,s:fx,S:fq,u:dq,U:hq,V:pq,w:gq,W:vq,x:null,X:null,y:bq,Y:yq,Z:xq,"%":ux},_={a:ve,A:we,b:Oe,B:xe,c:null,d:lx,e:lx,f:$q,g:Fq,G:Oq,H:wq,I:Cq,j:Sq,L:AC,m:kq,M:Mq,p:Xe,q:Ve,Q:cx,s:fx,S:Tq,u:Eq,U:Aq,V:Pq,w:Rq,W:zq,x:null,X:null,y:Iq,Y:Bq,Z:Nq,"%":ux},S={a:P,A:R,b:C,B:E,c:I,d:ox,e:ox,f:tq,g:ix,G:rx,H:ax,I:ax,j:ZV,L:eq,m:KV,M:JV,p:M,q:XV,Q:rq,s:iq,S:QV,u:WV,U:VV,V:qV,w:jV,W:YV,x:z,X:j,y:ix,Y:rx,Z:GV,"%":nq};y.x=$(n,y),y.X=$(r,y),y.c=$(t,y),_.x=$(n,_),_.X=$(r,_),_.c=$(t,_);function $(fe,Ee){return function(Pe){var A=[],H=-1,G=0,de=fe.length,le,q,N;for(Pe instanceof Date||(Pe=new Date(+Pe));++H<de;)fe.charCodeAt(H)===37&&(A.push(fe.slice(G,H)),(q=nx[le=fe.charAt(++H)])!=null?le=fe.charAt(++H):q=le==="e"?" ":"0",(N=Ee[le])&&(le=N(Pe,q)),A.push(le),G=H+1);return A.push(fe.slice(G,H)),A.join("")}}function w(fe,Ee){return function(Pe){var A=Os(1900,void 0,1),H=T(A,fe,Pe+="",0),G,de;if(H!=Pe.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(Ee&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(G=Np(Os(A.y,0,1)),de=G.getUTCDay(),G=de>4||de===0?fu.ceil(G):fu(G),G=Pu.offset(G,(A.V-1)*7),A.y=G.getUTCFullYear(),A.m=G.getUTCMonth(),A.d=G.getUTCDate()+(A.w+6)%7):(G=Op(Os(A.y,0,1)),de=G.getDay(),G=de>4||de===0?uu.ceil(G):uu(G),G=Au.offset(G,(A.V-1)*7),A.y=G.getFullYear(),A.m=G.getMonth(),A.d=G.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),de="Z"in A?Np(Os(A.y,0,1)).getUTCDay():Op(Os(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(de+5)%7:A.w+A.U*7-(de+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,Np(A)):Op(A)}}function T(fe,Ee,Pe,A){for(var H=0,G=Ee.length,de=Pe.length,le,q;H<G;){if(A>=de)return-1;if(le=Ee.charCodeAt(H++),le===37){if(le=Ee.charAt(H++),q=S[le in nx?Ee.charAt(H++):le],!q||(A=q(fe,Pe,A))<0)return-1}else if(le!=Pe.charCodeAt(A++))return-1}return A}function M(fe,Ee,Pe){var A=u.exec(Ee.slice(Pe));return A?(fe.p=c[A[0].toLowerCase()],Pe+A[0].length):-1}function P(fe,Ee,Pe){var A=h.exec(Ee.slice(Pe));return A?(fe.w=p[A[0].toLowerCase()],Pe+A[0].length):-1}function R(fe,Ee,Pe){var A=d.exec(Ee.slice(Pe));return A?(fe.w=f[A[0].toLowerCase()],Pe+A[0].length):-1}function C(fe,Ee,Pe){var A=v.exec(Ee.slice(Pe));return A?(fe.m=x[A[0].toLowerCase()],Pe+A[0].length):-1}function E(fe,Ee,Pe){var A=g.exec(Ee.slice(Pe));return A?(fe.m=b[A[0].toLowerCase()],Pe+A[0].length):-1}function I(fe,Ee,Pe){return T(fe,t,Ee,Pe)}function z(fe,Ee,Pe){return T(fe,n,Ee,Pe)}function j(fe,Ee,Pe){return T(fe,r,Ee,Pe)}function Z(fe){return a[fe.getDay()]}function J(fe){return o[fe.getDay()]}function ie(fe){return l[fe.getMonth()]}function he(fe){return s[fe.getMonth()]}function _e(fe){return i[+(fe.getHours()>=12)]}function oe(fe){return 1+~~(fe.getMonth()/3)}function ve(fe){return a[fe.getUTCDay()]}function we(fe){return o[fe.getUTCDay()]}function Oe(fe){return l[fe.getUTCMonth()]}function xe(fe){return s[fe.getUTCMonth()]}function Xe(fe){return i[+(fe.getUTCHours()>=12)]}function Ve(fe){return 1+~~(fe.getUTCMonth()/3)}return{format:function(fe){var Ee=$(fe+="",y);return Ee.toString=function(){return fe},Ee},parse:function(fe){var Ee=w(fe+="",!1);return Ee.toString=function(){return fe},Ee},utcFormat:function(fe){var Ee=$(fe+="",_);return Ee.toString=function(){return fe},Ee},utcParse:function(fe){var Ee=w(fe+="",!0);return Ee.toString=function(){return fe},Ee}}}var nx={"-":"",_:" ",0:"0"},on=/^\s*\d+/,DV=/^%/,HV=/[\\^$*+?|[\]().{}]/g;function Ct(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function UV(e){return e.replace(HV,"\\$&")}function Ns(e){return new RegExp("^(?:"+e.map(UV).join("|")+")","i")}function Ls(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function jV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function WV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function VV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function qV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function YV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function rx(e,t,n){var r=on.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ix(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function GV(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function XV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function KV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ox(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ZV(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ax(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function JV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function QV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function eq(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function tq(e,t,n){var r=on.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nq(e,t,n){var r=DV.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function rq(e,t,n){var r=on.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function iq(e,t,n){var r=on.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function sx(e,t){return Ct(e.getDate(),t,2)}function oq(e,t){return Ct(e.getHours(),t,2)}function aq(e,t){return Ct(e.getHours()%12||12,t,2)}function sq(e,t){return Ct(1+Au.count(gi(e),e),t,3)}function TC(e,t){return Ct(e.getMilliseconds(),t,3)}function lq(e,t){return TC(e,t)+"000"}function uq(e,t){return Ct(e.getMonth()+1,t,2)}function cq(e,t){return Ct(e.getMinutes(),t,2)}function fq(e,t){return Ct(e.getSeconds(),t,2)}function dq(e){var t=e.getDay();return t===0?7:t}function hq(e,t){return Ct(lu.count(gi(e)-1,e),t,2)}function EC(e){var t=e.getDay();return t>=4||t===0?na(e):na.ceil(e)}function pq(e,t){return e=EC(e),Ct(na.count(gi(e),e)+(gi(e).getDay()===4),t,2)}function gq(e){return e.getDay()}function vq(e,t){return Ct(uu.count(gi(e)-1,e),t,2)}function bq(e,t){return Ct(e.getFullYear()%100,t,2)}function mq(e,t){return e=EC(e),Ct(e.getFullYear()%100,t,2)}function yq(e,t){return Ct(e.getFullYear()%1e4,t,4)}function _q(e,t){var n=e.getDay();return e=n>=4||n===0?na(e):na.ceil(e),Ct(e.getFullYear()%1e4,t,4)}function xq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ct(t/60|0,"0",2)+Ct(t%60,"0",2)}function lx(e,t){return Ct(e.getUTCDate(),t,2)}function wq(e,t){return Ct(e.getUTCHours(),t,2)}function Cq(e,t){return Ct(e.getUTCHours()%12||12,t,2)}function Sq(e,t){return Ct(1+Pu.count(vi(e),e),t,3)}function AC(e,t){return Ct(e.getUTCMilliseconds(),t,3)}function $q(e,t){return AC(e,t)+"000"}function kq(e,t){return Ct(e.getUTCMonth()+1,t,2)}function Mq(e,t){return Ct(e.getUTCMinutes(),t,2)}function Tq(e,t){return Ct(e.getUTCSeconds(),t,2)}function Eq(e){var t=e.getUTCDay();return t===0?7:t}function Aq(e,t){return Ct(cu.count(vi(e)-1,e),t,2)}function PC(e){var t=e.getUTCDay();return t>=4||t===0?ra(e):ra.ceil(e)}function Pq(e,t){return e=PC(e),Ct(ra.count(vi(e),e)+(vi(e).getUTCDay()===4),t,2)}function Rq(e){return e.getUTCDay()}function zq(e,t){return Ct(fu.count(vi(e)-1,e),t,2)}function Iq(e,t){return Ct(e.getUTCFullYear()%100,t,2)}function Fq(e,t){return e=PC(e),Ct(e.getUTCFullYear()%100,t,2)}function Bq(e,t){return Ct(e.getUTCFullYear()%1e4,t,4)}function Oq(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ra(e):ra.ceil(e),Ct(e.getUTCFullYear()%1e4,t,4)}function Nq(){return"+0000"}function ux(){return"%"}function cx(e){return+e}function fx(e){return Math.floor(+e/1e3)}var Pa,Tb,RC,nh,Eb;zC({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function zC(e){return Pa=MC(e),Tb=Pa.format,RC=Pa.parse,nh=Pa.utcFormat,Eb=Pa.utcParse,Pa}var IC="%Y-%m-%dT%H:%M:%S.%LZ";function Lq(e){return e.toISOString()}var Dq=Date.prototype.toISOString?Lq:nh(IC);function Hq(e){var t=new Date(e);return isNaN(t)?null:t}var Uq=+new Date("2000-01-01T00:00:00.000Z")?Hq:Eb(IC),rl=1e3,il=rl*60,ol=il*60,du=ol*24,jq=du*7,dx=du*30,Lp=du*365;function Wq(e){return new Date(e)}function Vq(e){return e instanceof Date?+e:+new Date(+e)}function Ab(e,t,n,r,i,o,a,s,l){var u=lC(cn,cn),c=u.invert,d=u.domain,f=l(".%L"),h=l(":%S"),p=l("%I:%M"),g=l("%I %p"),b=l("%a %d"),v=l("%b %d"),x=l("%B"),y=l("%Y"),_=[[a,1,rl],[a,5,5*rl],[a,15,15*rl],[a,30,30*rl],[o,1,il],[o,5,5*il],[o,15,15*il],[o,30,30*il],[i,1,ol],[i,3,3*ol],[i,6,6*ol],[i,12,12*ol],[r,1,du],[r,2,2*du],[n,1,jq],[t,1,dx],[t,3,3*dx],[e,1,Lp]];function S(w){return(a(w)<w?f:o(w)<w?h:i(w)<w?p:r(w)<w?g:t(w)<w?n(w)<w?b:v:e(w)<w?x:y)(w)}function $(w,T,M,P){if(w==null&&(w=10),typeof w=="number"){var R=Math.abs(M-T)/w,C=kv(function(E){return E[2]}).right(_,R);C===_.length?(P=Yo(T/Lp,M/Lp,w),w=e):C?(C=_[R/_[C-1][2]<_[C][2]/R?C-1:C],P=C[1],w=C[0]):(P=Math.max(Yo(T,M,w),1),w=s)}return P==null?w:w.every(P)}return u.invert=function(w){return new Date(c(w))},u.domain=function(w){return arguments.length?d(Zf.call(w,Vq)):d().map(Wq)},u.ticks=function(w,T){var M=d(),P=M[0],R=M[M.length-1],C=R<P,E;return C&&(E=P,P=R,R=E),E=$(w,P,R,T),E=E?E.range(P,R+1):[],C?E.reverse():E},u.tickFormat=function(w,T){return T==null?S:l(T)},u.nice=function(w,T){var M=d();return(w=$(w,M[0],M[M.length-1],T))?d(fC(M,w)):u},u.copy=function(){return Eu(u,Ab(e,t,n,r,i,o,a,s,l))},u}function qq(){return Tr.apply(Ab(gi,Sb,lu,Au,Cb,wb,su,ea,Tb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Yq(){return Tr.apply(Ab(vi,Mb,cu,Pu,kb,$b,su,ea,nh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function rh(){var e=0,t=1,n,r,i,o,a=cn,s=!1,l;function u(c){return isNaN(c=+c)?l:a(i===0?.5:(c=(o(c)-n)*i,s?Math.max(0,Math.min(1,c)):c))}return u.domain=function(c){return arguments.length?(n=o(e=+c[0]),r=o(t=+c[1]),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(c){return arguments.length?(s=!!c,u):s},u.interpolator=function(c){return arguments.length?(a=c,u):a},u.unknown=function(c){return arguments.length?(l=c,u):l},function(c){return o=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),u}}function go(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function FC(){var e=ba(rh()(cn));return e.copy=function(){return go(e,FC())},wi.apply(e,arguments)}function BC(){var e=mb(rh()).domain([1,10]);return e.copy=function(){return go(e,BC()).base(e.base())},wi.apply(e,arguments)}function OC(){var e=yb(rh());return e.copy=function(){return go(e,OC()).constant(e.constant())},wi.apply(e,arguments)}function Pb(){var e=_b(rh());return e.copy=function(){return go(e,Pb()).exponent(e.exponent())},wi.apply(e,arguments)}function Gq(){return Pb.apply(null,arguments).exponent(.5)}function NC(){var e=[],t=cn;function n(r){if(!isNaN(r=+r))return t((Ji(e,r)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(var i=0,o=r.length,a;i<o;++i)a=r[i],a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Sr),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return NC(t).domain(e)},wi.apply(n,arguments)}function ih(){var e=0,t=.5,n=1,r,i,o,a,s,l=cn,u,c=!1,d;function f(h){return isNaN(h=+h)?d:(h=.5+((h=+u(h))-i)*(h<i?a:s),l(c?Math.max(0,Math.min(1,h)):h))}return f.domain=function(h){return arguments.length?(r=u(e=+h[0]),i=u(t=+h[1]),o=u(n=+h[2]),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),f):[e,t,n]},f.clamp=function(h){return arguments.length?(c=!!h,f):c},f.interpolator=function(h){return arguments.length?(l=h,f):l},f.unknown=function(h){return arguments.length?(d=h,f):d},function(h){return u=h,r=h(e),i=h(t),o=h(n),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),f}}function LC(){var e=ba(ih()(cn));return e.copy=function(){return go(e,LC())},wi.apply(e,arguments)}function DC(){var e=mb(ih()).domain([.1,1,10]);return e.copy=function(){return go(e,DC()).base(e.base())},wi.apply(e,arguments)}function HC(){var e=yb(ih());return e.copy=function(){return go(e,HC()).constant(e.constant())},wi.apply(e,arguments)}function Rb(){var e=_b(ih());return e.copy=function(){return go(e,Rb()).exponent(e.exponent())},wi.apply(e,arguments)}function Xq(){return Rb.apply(null,arguments).exponent(.5)}function st(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const Kq=st("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Zq=st("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Jq=st("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Qq=st("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),eY=st("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),tY=st("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),nY=st("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),rY=st("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),iY=st("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),oY=st("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function At(e){return $8(e[e.length-1])}var UC=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(st);const aY=At(UC);var jC=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(st);const sY=At(jC);var WC=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(st);const lY=At(WC);var VC=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(st);const uY=At(VC);var qC=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(st);const cY=At(qC);var YC=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(st);const fY=At(YC);var GC=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(st);const dY=At(GC);var XC=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(st);const hY=At(XC);var KC=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(st);const pY=At(KC);var ZC=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(st);const gY=At(ZC);var JC=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(st);const vY=At(JC);var QC=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(st);const bY=At(QC);var e6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(st);const mY=At(e6);var t6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(st);const yY=At(t6);var n6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(st);const _Y=At(n6);var r6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(st);const xY=At(r6);var i6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(st);const wY=At(i6);var o6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(st);const CY=At(o6);var a6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(st);const SY=At(a6);var s6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(st);const $Y=At(s6);var l6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(st);const kY=At(l6);var u6=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(st);const MY=At(u6);var c6=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(st);const TY=At(c6);var f6=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(st);const EY=At(f6);var d6=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(st);const AY=At(d6);var h6=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(st);const PY=At(h6);var p6=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(st);const RY=At(p6);function zY(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const IY=jd($r(300,.5,0),$r(-240,.5,1));var FY=jd($r(-100,.75,.35),$r(80,1.5,.8)),BY=jd($r(260,.75,.35),$r(80,1.5,.8)),Sc=$r();function OY(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Sc.h=360*e-100,Sc.s=1.5-1.5*t,Sc.l=.8-.9*t,Sc+""}var $c=is(),NY=Math.PI/3,LY=Math.PI*2/3;function DY(e){var t;return e=(.5-e)*Math.PI,$c.r=255*(t=Math.sin(e))*t,$c.g=255*(t=Math.sin(e+NY))*t,$c.b=255*(t=Math.sin(e+LY))*t,$c+""}function HY(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function oh(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const UY=oh(st("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var jY=oh(st("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),WY=oh(st("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),VY=oh(st("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function dt(e){return function(){return e}}var hx=Math.abs,vn=Math.atan2,$o=Math.cos,qY=Math.max,Dp=Math.min,Rr=Math.sin,Fa=Math.sqrt,bn=1e-12,no=Math.PI,ed=no/2,Vi=2*no;function YY(e){return e>1?0:e<-1?no:Math.acos(e)}function px(e){return e>=1?ed:e<=-1?-ed:Math.asin(e)}function GY(e){return e.innerRadius}function XY(e){return e.outerRadius}function KY(e){return e.startAngle}function ZY(e){return e.endAngle}function JY(e){return e&&e.padAngle}function QY(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,f=d*l-c*u;if(!(f*f<bn))return f=(c*(t-o)-d*(e-i))/f,[e+f*l,t+f*u]}function kc(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Fa(s*s+l*l),c=u*l,d=-u*s,f=e+c,h=t+d,p=n+c,g=r+d,b=(f+p)/2,v=(h+g)/2,x=p-f,y=g-h,_=x*x+y*y,S=i-o,$=f*g-p*h,w=(y<0?-1:1)*Fa(qY(0,S*S*_-$*$)),T=($*y-x*w)/_,M=(-$*x-y*w)/_,P=($*y+x*w)/_,R=(-$*x+y*w)/_,C=T-b,E=M-v,I=P-b,z=R-v;return C*C+E*E>I*I+z*z&&(T=P,M=R),{cx:T,cy:M,x01:-c,y01:-d,x11:T*(i/S-1),y11:M*(i/S-1)}}function eG(){var e=GY,t=XY,n=dt(0),r=null,i=KY,o=ZY,a=JY,s=null;function l(){var u,c,d=+e.apply(this,arguments),f=+t.apply(this,arguments),h=i.apply(this,arguments)-ed,p=o.apply(this,arguments)-ed,g=hx(p-h),b=p>h;if(s||(s=u=ho()),f<d&&(c=f,f=d,d=c),!(f>bn))s.moveTo(0,0);else if(g>Vi-bn)s.moveTo(f*$o(h),f*Rr(h)),s.arc(0,0,f,h,p,!b),d>bn&&(s.moveTo(d*$o(p),d*Rr(p)),s.arc(0,0,d,p,h,b));else{var v=h,x=p,y=h,_=p,S=g,$=g,w=a.apply(this,arguments)/2,T=w>bn&&(r?+r.apply(this,arguments):Fa(d*d+f*f)),M=Dp(hx(f-d)/2,+n.apply(this,arguments)),P=M,R=M,C,E;if(T>bn){var I=px(T/d*Rr(w)),z=px(T/f*Rr(w));(S-=I*2)>bn?(I*=b?1:-1,y+=I,_-=I):(S=0,y=_=(h+p)/2),($-=z*2)>bn?(z*=b?1:-1,v+=z,x-=z):($=0,v=x=(h+p)/2)}var j=f*$o(v),Z=f*Rr(v),J=d*$o(_),ie=d*Rr(_);if(M>bn){var he=f*$o(x),_e=f*Rr(x),oe=d*$o(y),ve=d*Rr(y),we;if(g<no&&(we=QY(j,Z,oe,ve,he,_e,J,ie))){var Oe=j-we[0],xe=Z-we[1],Xe=he-we[0],Ve=_e-we[1],fe=1/Rr(YY((Oe*Xe+xe*Ve)/(Fa(Oe*Oe+xe*xe)*Fa(Xe*Xe+Ve*Ve)))/2),Ee=Fa(we[0]*we[0]+we[1]*we[1]);P=Dp(M,(d-Ee)/(fe-1)),R=Dp(M,(f-Ee)/(fe+1))}}$>bn?R>bn?(C=kc(oe,ve,j,Z,f,R,b),E=kc(he,_e,J,ie,f,R,b),s.moveTo(C.cx+C.x01,C.cy+C.y01),R<M?s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,f,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),!b),s.arc(E.cx,E.cy,R,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):(s.moveTo(j,Z),s.arc(0,0,f,v,x,!b)):s.moveTo(j,Z),!(d>bn)||!(S>bn)?s.lineTo(J,ie):P>bn?(C=kc(J,ie,he,_e,d,-P,b),E=kc(j,Z,oe,ve,d,-P,b),s.lineTo(C.cx+C.x01,C.cy+C.y01),P<M?s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,d,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),b),s.arc(E.cx,E.cy,P,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):s.arc(0,0,d,_,y,b)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-no/2;return[$o(c)*u,Rr(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:dt(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:dt(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:dt(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:dt(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:dt(+u),l):i},l.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:dt(+u),l):o},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:dt(+u),l):a},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function g6(e){this._context=e}g6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ah(e){return new g6(e)}function zb(e){return e[0]}function Ib(e){return e[1]}function Cs(){var e=zb,t=Ib,n=dt(!0),r=null,i=ah,o=null;function a(s){var l,u=s.length,c,d=!1,f;for(r==null&&(o=i(f=ho())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(c,l,s),+t(c,l,s));if(f)return o=null,f+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:dt(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:dt(+s),a):t},a.defined=function(s){return arguments.length?(n=typeof s=="function"?s:dt(!!s),a):n},a.curve=function(s){return arguments.length?(i=s,r!=null&&(o=i(r)),a):i},a.context=function(s){return arguments.length?(s==null?r=o=null:o=i(r=s),a):r},a}function Fb(){var e=zb,t=null,n=dt(0),r=Ib,i=dt(!0),o=null,a=ah,s=null;function l(c){var d,f,h,p=c.length,g,b=!1,v,x=new Array(p),y=new Array(p);for(o==null&&(s=a(v=ho())),d=0;d<=p;++d){if(!(d<p&&i(g=c[d],d,c))===b)if(b=!b)f=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=d-1;h>=f;--h)s.point(x[h],y[h]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(g,d,c),y[d]=+n(g,d,c),s.point(t?+t(g,d,c):x[d],r?+r(g,d,c):y[d]))}if(v)return s=null,v+""||null}function u(){return Cs().defined(i).curve(a).context(o)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:dt(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:dt(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:dt(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:dt(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:dt(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:dt(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(i=typeof c=="function"?c:dt(!!c),l):i},l.curve=function(c){return arguments.length?(a=c,o!=null&&(s=a(o)),l):a},l.context=function(c){return arguments.length?(c==null?o=s=null:s=a(o=c),l):o},l}function tG(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function nG(e){return e}function rG(){var e=nG,t=tG,n=null,r=dt(0),i=dt(Vi),o=dt(0);function a(s){var l,u=s.length,c,d,f=0,h=new Array(u),p=new Array(u),g=+r.apply(this,arguments),b=Math.min(Vi,Math.max(-Vi,i.apply(this,arguments)-g)),v,x=Math.min(Math.abs(b)/u,o.apply(this,arguments)),y=x*(b<0?-1:1),_;for(l=0;l<u;++l)(_=p[h[l]=l]=+e(s[l],l,s))>0&&(f+=_);for(t!=null?h.sort(function(S,$){return t(p[S],p[$])}):n!=null&&h.sort(function(S,$){return n(s[S],s[$])}),l=0,d=f?(b-u*y)/f:0;l<u;++l,g=v)c=h[l],_=p[c],v=g+(_>0?_*d:0)+y,p[c]={data:s[c],index:l,value:_,startAngle:g,endAngle:v,padAngle:x};return p}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:dt(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:dt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:dt(+s),a):o},a}var v6=Bb(ah);function b6(e){this._curve=e}b6.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Bb(e){function t(n){return new b6(e(n))}return t._curve=e,t}function al(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Bb(n)):t()._curve},e}function gx(){return al(Cs().curve(v6))}function vx(){var e=Fb().curve(v6),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return al(n())},delete e.lineX0,e.lineEndAngle=function(){return al(r())},delete e.lineX1,e.lineInnerRadius=function(){return al(i())},delete e.lineY0,e.lineOuterRadius=function(){return al(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Bb(a)):t()._curve},e}function sl(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Sg=Array.prototype.slice;function iG(e){return e.source}function oG(e){return e.target}function Ob(e){var t=iG,n=oG,r=zb,i=Ib,o=null;function a(){var s,l=Sg.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(o||(o=s=ho()),e(o,+r.apply(this,(l[0]=u,l)),+i.apply(this,l),+r.apply(this,(l[0]=c,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(n=s,a):n},a.x=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),a):r},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:dt(+s),a):i},a.context=function(s){return arguments.length?(o=s??null,a):o},a}function aG(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function sG(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function lG(e,t,n,r,i){var o=sl(t,n),a=sl(t,n=(n+i)/2),s=sl(r,n),l=sl(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function uG(){return Ob(aG)}function cG(){return Ob(sG)}function fG(){var e=Ob(lG);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Nb={draw:function(e,t){var n=Math.sqrt(t/no);e.moveTo(n,0),e.arc(0,0,n,0,Vi)}},m6={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var y6=Math.sqrt(1/3),dG=y6*2;const _6={draw:function(e,t){var n=Math.sqrt(t/dG),r=n*y6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var hG=.8908130915292852,x6=Math.sin(no/10)/Math.sin(7*no/10),pG=Math.sin(Vi/10)*x6,gG=-Math.cos(Vi/10)*x6;const w6={draw:function(e,t){var n=Math.sqrt(t*hG),r=pG*n,i=gG*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=Vi*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},C6={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Hp=Math.sqrt(3);const S6={draw:function(e,t){var n=-Math.sqrt(t/(Hp*3));e.moveTo(0,n*2),e.lineTo(-Hp*n,-n),e.lineTo(Hp*n,-n),e.closePath()}};var tr=-.5,nr=Math.sqrt(3)/2,$g=1/Math.sqrt(12),vG=($g/2+1)*3;const $6={draw:function(e,t){var n=Math.sqrt(t/vG),r=n/2,i=n*$g,o=r,a=n*$g+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(tr*r-nr*i,nr*r+tr*i),e.lineTo(tr*o-nr*a,nr*o+tr*a),e.lineTo(tr*s-nr*l,nr*s+tr*l),e.lineTo(tr*r+nr*i,tr*i-nr*r),e.lineTo(tr*o+nr*a,tr*a-nr*o),e.lineTo(tr*s+nr*l,tr*l-nr*s),e.closePath()}};var bG=[Nb,m6,_6,C6,w6,S6,$6];function Lb(){var e=dt(Nb),t=dt(64),n=null;function r(){var i;if(n||(n=i=ho()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:dt(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:dt(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function ro(){}function td(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function sh(e){this._context=e}sh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:td(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mG(e){return new sh(e)}function k6(e){this._context=e}k6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yG(e){return new k6(e)}function M6(e){this._context=e}M6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _G(e){return new M6(e)}function T6(e,t){this._basis=new sh(e),this._beta=t}T6.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const xG=function e(t){function n(r){return t===1?new sh(r):new T6(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function nd(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Db(e,t){this._context=e,this._k=(1-t)/6}Db.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:nd(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:nd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wG=function e(t){function n(r){return new Db(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Hb(e,t){this._context=e,this._k=(1-t)/6}Hb.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:nd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CG=function e(t){function n(r){return new Hb(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ub(e,t){this._context=e,this._k=(1-t)/6}Ub.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:nd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const SG=function e(t){function n(r){return new Ub(r,t)}return n.tension=function(r){return e(+r)},n}(0);function jb(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>bn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bn){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function E6(e,t){this._context=e,this._alpha=t}E6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:jb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $G=function e(t){function n(r){return t?new E6(r,t):new Db(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function A6(e,t){this._context=e,this._alpha=t}A6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:jb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const kG=function e(t){function n(r){return t?new A6(r,t):new Hb(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function P6(e,t){this._context=e,this._alpha=t}P6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:jb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const MG=function e(t){function n(r){return t?new P6(r,t):new Ub(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function R6(e){this._context=e}R6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function TG(e){return new R6(e)}function bx(e){return e<0?-1:1}function mx(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(bx(o)+bx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function yx(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Up(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function rd(e){this._context=e}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Up(this,this._t0,yx(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Up(this,yx(this,n=mx(this,e,t)),n);break;default:Up(this,this._t0,n=mx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function z6(e){this._context=new I6(e)}(z6.prototype=Object.create(rd.prototype)).point=function(e,t){rd.prototype.point.call(this,t,e)};function I6(e){this._context=e}I6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function EG(e){return new rd(e)}function AG(e){return new z6(e)}function F6(e){this._context=e}F6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=_x(e),i=_x(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function _x(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function B6(e){return new F6(e)}function lh(e,t){this._context=e,this._t=t}lh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function PG(e){return new lh(e,.5)}function RG(e){return new lh(e,0)}function zG(e){return new lh(e,1)}function ds(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function hs(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function IG(e,t){return e[t]}function FG(){var e=dt([]),t=hs,n=ds,r=IG;function i(o){var a=e.apply(this,arguments),s,l=o.length,u=a.length,c=new Array(u),d;for(s=0;s<u;++s){for(var f=a[s],h=c[s]=new Array(l),p=0,g;p<l;++p)h[p]=g=[0,+r(o[p],f,p,o)],g.data=o[p];h.key=f}for(s=0,d=t(c);s<u;++s)c[d[s]].index=s;return n(c,d),c}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:dt(Sg.call(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:dt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?hs:typeof o=="function"?o:dt(Sg.call(o)),i):t},i.offset=function(o){return arguments.length?(n=o??ds,i):n},i}function BG(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}ds(e,t)}}function OG(e,t){if((l=e.length)>0)for(var n,r=0,i,o,a,s,l,u=e[t[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function NG(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ds(e,t)}}function LG(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=e[t[s]],d=c[r][1]||0,f=c[r-1][1]||0,h=(d-f)/2,p=0;p<s;++p){var g=e[t[p]],b=g[r][1]||0,v=g[r-1][1]||0;h+=b-v}l+=d,u+=h*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,ds(e,t)}}function O6(e){var t=e.map(DG);return hs(e).sort(function(n,r){return t[n]-t[r]})}function DG(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function N6(e){var t=e.map(L6);return hs(e).sort(function(n,r){return t[n]-t[r]})}function L6(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function HG(e){return N6(e).reverse()}function UG(e){var t=e.length,n,r,i=e.map(L6),o=O6(e),a=0,s=0,l=[],u=[];for(n=0;n<t;++n)r=o[n],a<s?(a+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)}function jG(e){return hs(e).reverse()}function xx(e){return function(){return e}}function WG(e){return e[0]}function VG(e){return e[1]}function id(){this._=null}function uh(e){e.U=e.C=e.L=e.R=e.P=e.N=null}id.prototype={constructor:id,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=wx(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Ds(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Hs(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Hs(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Ds(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,n,r=e.L,i=e.R,o,a;if(r?i?o=wx(i):o=r:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,r&&i?(a=o.C,o.C=e.C,o.L=r,r.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(n=t.R,n.C&&(n.C=!1,t.C=!0,Ds(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,Hs(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Ds(this,t),e=this._;break}}else if(n=t.L,n.C&&(n.C=!1,t.C=!0,Hs(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Ds(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,Hs(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function Ds(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Hs(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function wx(e){for(;e.L;)e=e.L;return e}function ll(e,t,n,r){var i=[null,null],o=mn.push(i)-1;return i.left=e,i.right=t,n&&od(i,e,t,n),r&&od(i,t,e,r),Yn[e.index].halfedges.push(o),Yn[t.index].halfedges.push(o),i}function Us(e,t,n){var r=[t,n];return r.left=e,r}function od(e,t,n,r){!e[0]&&!e[1]?(e[0]=r,e.left=t,e.right=n):e.left===n?e[1]=r:e[0]=r}function qG(e,t,n,r,i){var o=e[0],a=e[1],s=o[0],l=o[1],u=a[0],c=a[1],d=0,f=1,h=u-s,p=c-l,g;if(g=t-s,!(!h&&g>0)){if(g/=h,h<0){if(g<d)return;g<f&&(f=g)}else if(h>0){if(g>f)return;g>d&&(d=g)}if(g=r-s,!(!h&&g<0)){if(g/=h,h<0){if(g>f)return;g>d&&(d=g)}else if(h>0){if(g<d)return;g<f&&(f=g)}if(g=n-l,!(!p&&g>0)){if(g/=p,p<0){if(g<d)return;g<f&&(f=g)}else if(p>0){if(g>f)return;g>d&&(d=g)}if(g=i-l,!(!p&&g<0)){if(g/=p,p<0){if(g>f)return;g>d&&(d=g)}else if(p>0){if(g<d)return;g<f&&(f=g)}return!(d>0)&&!(f<1)||(d>0&&(e[0]=[s+d*h,l+d*p]),f<1&&(e[1]=[s+f*h,l+f*p])),!0}}}}}function YG(e,t,n,r,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,u=s[0],c=s[1],d=l[0],f=l[1],h=(u+d)/2,p=(c+f)/2,g,b;if(f===c){if(h<t||h>=r)return;if(u>d){if(!a)a=[h,n];else if(a[1]>=i)return;o=[h,i]}else{if(!a)a=[h,i];else if(a[1]<n)return;o=[h,n]}}else if(g=(u-d)/(f-c),b=p-g*h,g<-1||g>1)if(u>d){if(!a)a=[(n-b)/g,n];else if(a[1]>=i)return;o=[(i-b)/g,i]}else{if(!a)a=[(i-b)/g,i];else if(a[1]<n)return;o=[(n-b)/g,n]}else if(c<f){if(!a)a=[t,g*t+b];else if(a[0]>=r)return;o=[r,g*r+b]}else{if(!a)a=[r,g*r+b];else if(a[0]<t)return;o=[t,g*t+b]}return e[0]=a,e[1]=o,!0}function GG(e,t,n,r){for(var i=mn.length,o;i--;)(!YG(o=mn[i],e,t,n,r)||!qG(o,e,t,n,r)||!(Math.abs(o[0][0]-o[1][0])>Pt||Math.abs(o[0][1]-o[1][1])>Pt))&&delete mn[i]}function XG(e){return Yn[e.index]={site:e,halfedges:[]}}function KG(e,t){var n=e.site,r=t.left,i=t.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=t[1],i=t[0]):(r=t[0],i=t[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function D6(e,t){return t[+(t.left!==e.site)]}function ZG(e,t){return t[+(t.left===e.site)]}function JG(){for(var e=0,t=Yn.length,n,r,i,o;e<t;++e)if((n=Yn[e])&&(o=(r=n.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=KG(n,mn[r[i]]);for(a.sort(function(l,u){return s[u]-s[l]}),i=0;i<o;++i)s[i]=r[a[i]];for(i=0;i<o;++i)r[i]=s[i]}}function QG(e,t,n,r){var i=Yn.length,o,a,s,l,u,c,d,f,h,p,g,b,v=!0;for(o=0;o<i;++o)if(a=Yn[o]){for(s=a.site,u=a.halfedges,l=u.length;l--;)mn[u[l]]||u.splice(l,1);for(l=0,c=u.length;l<c;)p=ZG(a,mn[u[l]]),g=p[0],b=p[1],d=D6(a,mn[u[++l%c]]),f=d[0],h=d[1],(Math.abs(g-f)>Pt||Math.abs(b-h)>Pt)&&(u.splice(l,0,mn.push(Us(s,p,Math.abs(g-e)<Pt&&r-b>Pt?[e,Math.abs(f-e)<Pt?h:r]:Math.abs(b-r)<Pt&&n-g>Pt?[Math.abs(h-r)<Pt?f:n,r]:Math.abs(g-n)<Pt&&b-t>Pt?[n,Math.abs(f-n)<Pt?h:t]:Math.abs(b-t)<Pt&&g-e>Pt?[Math.abs(h-t)<Pt?f:e,t]:null))-1),++c);c&&(v=!1)}if(v){var x,y,_,S=1/0;for(o=0,v=null;o<i;++o)(a=Yn[o])&&(s=a.site,x=s[0]-e,y=s[1]-t,_=x*x+y*y,_<S&&(S=_,v=a));if(v){var $=[e,t],w=[e,r],T=[n,r],M=[n,t];v.halfedges.push(mn.push(Us(s=v.site,$,w))-1,mn.push(Us(s,w,T))-1,mn.push(Us(s,T,M))-1,mn.push(Us(s,M,$))-1)}}for(o=0;o<i;++o)(a=Yn[o])&&(a.halfedges.length||delete Yn[o])}var H6=[],Wb;function eX(){uh(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ba(e){var t=e.P,n=e.N;if(!(!t||!n)){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i[0],s=i[1],l=r[0]-a,u=r[1]-s,c=o[0]-a,d=o[1]-s,f=2*(l*d-u*c);if(!(f>=-1e-12)){var h=l*l+u*u,p=c*c+d*d,g=(d*h-u*p)/f,b=(l*p-c*h)/f,v=H6.pop()||new eX;v.arc=e,v.site=i,v.x=g+a,v.y=(v.cy=b+s)+Math.sqrt(g*g+b*b),e.circle=v;for(var x=null,y=hu._;y;)if(v.y<y.y||v.y===y.y&&v.x<=y.x)if(y.L)y=y.L;else{x=y.P;break}else if(y.R)y=y.R;else{x=y;break}hu.insert(x,v),x||(Wb=v)}}}}function Ga(e){var t=e.circle;t&&(t.P||(Wb=t.N),hu.remove(t),H6.push(t),uh(t),e.circle=null)}var U6=[];function tX(){uh(this),this.edge=this.site=this.circle=null}function Cx(e){var t=U6.pop()||new tX;return t.site=e,t}function jp(e){Ga(e),Xa.remove(e),U6.push(e),uh(e)}function nX(e){var t=e.circle,n=t.x,r=t.cy,i=[n,r],o=e.P,a=e.N,s=[e];jp(e);for(var l=o;l.circle&&Math.abs(n-l.circle.x)<Pt&&Math.abs(r-l.circle.cy)<Pt;)o=l.P,s.unshift(l),jp(l),l=o;s.unshift(l),Ga(l);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<Pt&&Math.abs(r-u.circle.cy)<Pt;)a=u.N,s.push(u),jp(u),u=a;s.push(u),Ga(u);var c=s.length,d;for(d=1;d<c;++d)u=s[d],l=s[d-1],od(u.edge,l.site,u.site,i);l=s[0],u=s[c-1],u.edge=ll(l.site,u.site,null,i),Ba(l),Ba(u)}function rX(e){for(var t=e[0],n=e[1],r,i,o,a,s=Xa._;s;)if(o=j6(s,n)-t,o>Pt)s=s.L;else if(a=t-iX(s,n),a>Pt){if(!s.R){r=s;break}s=s.R}else{o>-1e-6?(r=s.P,i=s):a>-1e-6?(r=s,i=s.N):r=i=s;break}XG(e);var l=Cx(e);if(Xa.insert(r,l),!(!r&&!i)){if(r===i){Ga(r),i=Cx(r.site),Xa.insert(l,i),l.edge=i.edge=ll(r.site,l.site),Ba(r),Ba(i);return}if(!i){l.edge=ll(r.site,l.site);return}Ga(r),Ga(i);var u=r.site,c=u[0],d=u[1],f=e[0]-c,h=e[1]-d,p=i.site,g=p[0]-c,b=p[1]-d,v=2*(f*b-h*g),x=f*f+h*h,y=g*g+b*b,_=[(b*x-h*y)/v+c,(f*y-g*x)/v+d];od(i.edge,u,p,_),l.edge=ll(u,e,null,_),i.edge=ll(e,p,null,_),Ba(r),Ba(i)}}function j6(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;n=a.site;var s=n[0],l=n[1],u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,f=c/u;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function iX(e,t){var n=e.N;if(n)return j6(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var Pt=1e-6,Xa,Yn,hu,mn;function oX(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function aX(e,t){return t[1]-e[1]||t[0]-e[0]}function kg(e,t){var n=e.sort(aX).pop(),r,i,o;for(mn=[],Yn=new Array(e.length),Xa=new id,hu=new id;;)if(o=Wb,n&&(!o||n[1]<o.y||n[1]===o.y&&n[0]<o.x))(n[0]!==r||n[1]!==i)&&(rX(n),r=n[0],i=n[1]),n=e.pop();else if(o)nX(o.arc);else break;if(JG(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],u=+t[1][1];GG(a,s,l,u),QG(a,s,l,u)}this.edges=mn,this.cells=Yn,Xa=hu=mn=Yn=null}kg.prototype={constructor:kg,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(r){return D6(t,e[r])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,r){if(s=(o=n.halfedges).length)for(var i=n.site,o,a=-1,s,l,u=t[o[s-1]],c=u.left===i?u.right:u.left;++a<s;)l=c,u=t[o[a]],c=u.left===i?u.right:u.left,l&&c&&r<l.index&&r<c.index&&oX(i,l,c)<0&&e.push([i.data,l.data,c.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,n){for(var r=this,i,o=r._found||0,a=r.cells.length,s;!(s=r.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],u=t-s.site[1],c=l*l+u*u;do s=r.cells[i=o],o=null,s.halfedges.forEach(function(d){var f=r.edges[d],h=f.left;if(!((h===s.site||!h)&&!(h=f.right))){var p=e-h[0],g=t-h[1],b=p*p+g*g;b<c&&(c=b,o=h.index)}});while(o!==null);return r._found=i,n==null||c<=n*n?s.site:null}};function sX(){var e=WG,t=VG,n=null;function r(i){return new kg(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Pt)*Pt,Math.round(t(o,a,i)/Pt)*Pt];return s.index=a,s.data=o,s}),n)}return r.polygons=function(i){return r(i).polygons()},r.links=function(i){return r(i).links()},r.triangles=function(i){return r(i).triangles()},r.x=function(i){return arguments.length?(e=typeof i=="function"?i:xx(+i),r):e},r.y=function(i){return arguments.length?(t=typeof i=="function"?i:xx(+i),r):t},r.extent=function(i){return arguments.length?(n=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(i){return arguments.length?(n=i==null?null:[[0,0],[+i[0],+i[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function Mc(e){return function(){return e}}function lX(e,t,n){this.target=e,this.type=t,this.transform=n}function ui(e,t,n){this.k=e,this.x=t,this.y=n}ui.prototype={constructor:ui,scale:function(e){return e===1?this:new ui(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ui(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ch=new ui(1,0,0);W6.prototype=ui.prototype;function W6(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ch;return e.__zoom}function Wp(){Ce.stopImmediatePropagation()}function js(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function uX(){return!Ce.ctrlKey&&!Ce.button}function cX(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Sx(){return this.__zoom||ch}function fX(){return-Ce.deltaY*(Ce.deltaMode===1?.05:Ce.deltaMode?1:.002)}function dX(){return navigator.maxTouchPoints||"ontouchstart"in this}function hX(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function pX(){var e=uX,t=cX,n=hX,r=fX,i=dX,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=F8,u=ha("start","zoom","end"),c,d,f=500,h=150,p=0;function g(C){C.property("__zoom",Sx).on("wheel.zoom",$).on("mousedown.zoom",w).on("dblclick.zoom",T).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(C,E,I){var z=C.selection?C.selection():C;z.property("__zoom",Sx),C!==z?y(C,E,I):z.interrupt().each(function(){_(this,arguments).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},g.scaleBy=function(C,E,I){g.scaleTo(C,function(){var z=this.__zoom.k,j=typeof E=="function"?E.apply(this,arguments):E;return z*j},I)},g.scaleTo=function(C,E,I){g.transform(C,function(){var z=t.apply(this,arguments),j=this.__zoom,Z=I==null?x(z):typeof I=="function"?I.apply(this,arguments):I,J=j.invert(Z),ie=typeof E=="function"?E.apply(this,arguments):E;return n(v(b(j,ie),Z,J),z,a)},I)},g.translateBy=function(C,E,I){g.transform(C,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),a)})},g.translateTo=function(C,E,I,z){g.transform(C,function(){var j=t.apply(this,arguments),Z=this.__zoom,J=z==null?x(j):typeof z=="function"?z.apply(this,arguments):z;return n(ch.translate(J[0],J[1]).scale(Z.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof I=="function"?-I.apply(this,arguments):-I),j,a)},z)};function b(C,E){return E=Math.max(o[0],Math.min(o[1],E)),E===C.k?C:new ui(E,C.x,C.y)}function v(C,E,I){var z=E[0]-I[0]*C.k,j=E[1]-I[1]*C.k;return z===C.x&&j===C.y?C:new ui(C.k,z,j)}function x(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function y(C,E,I){C.on("start.zoom",function(){_(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).end()}).tween("zoom",function(){var z=this,j=arguments,Z=_(z,j),J=t.apply(z,j),ie=I==null?x(J):typeof I=="function"?I.apply(z,j):I,he=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),_e=z.__zoom,oe=typeof E=="function"?E.apply(z,j):E,ve=l(_e.invert(ie).concat(he/_e.k),oe.invert(ie).concat(he/oe.k));return function(we){if(we===1)we=oe;else{var Oe=ve(we),xe=he/Oe[2];we=new ui(xe,ie[0]-Oe[0]*xe,ie[1]-Oe[1]*xe)}Z.zoom(null,we)}})}function _(C,E,I){return!I&&C.__zooming||new S(C,E)}function S(C,E){this.that=C,this.args=E,this.active=0,this.extent=t.apply(C,E),this.taps=0}S.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,E){return this.mouse&&C!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){ql(new lX(g,C,this.that.__zoom),u.apply,u,[C,this.that,this.args])}};function $(){if(!e.apply(this,arguments))return;var C=_(this,arguments),E=this.__zoom,I=Math.max(o[0],Math.min(o[1],E.k*Math.pow(2,r.apply(this,arguments)))),z=lr(this);if(C.wheel)(C.mouse[0][0]!==z[0]||C.mouse[0][1]!==z[1])&&(C.mouse[1]=E.invert(C.mouse[0]=z)),clearTimeout(C.wheel);else{if(E.k===I)return;C.mouse=[z,E.invert(z)],Uo(this),C.start()}js(),C.wheel=setTimeout(j,h),C.zoom("mouse",n(v(b(E,I),C.mouse[0],C.mouse[1]),C.extent,a));function j(){C.wheel=null,C.end()}}function w(){if(d||!e.apply(this,arguments))return;var C=_(this,arguments,!0),E=Ue(Ce.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",J,!0),I=lr(this),z=Ce.clientX,j=Ce.clientY;Nd(Ce.view),Wp(),C.mouse=[I,this.__zoom.invert(I)],Uo(this),C.start();function Z(){if(js(),!C.moved){var ie=Ce.clientX-z,he=Ce.clientY-j;C.moved=ie*ie+he*he>p}C.zoom("mouse",n(v(C.that.__zoom,C.mouse[0]=lr(C.that),C.mouse[1]),C.extent,a))}function J(){E.on("mousemove.zoom mouseup.zoom",null),Ld(Ce.view,C.moved),js(),C.end()}}function T(){if(e.apply(this,arguments)){var C=this.__zoom,E=lr(this),I=C.invert(E),z=C.k*(Ce.shiftKey?.5:2),j=n(v(b(C,z),E,I),t.apply(this,arguments),a);js(),s>0?Ue(this).transition().duration(s).call(y,j,E):Ue(this).call(g.transform,j)}}function M(){if(e.apply(this,arguments)){var C=Ce.touches,E=C.length,I=_(this,arguments,Ce.changedTouches.length===E),z,j,Z,J;for(Wp(),j=0;j<E;++j)Z=C[j],J=Yl(this,C,Z.identifier),J=[J,this.__zoom.invert(J),Z.identifier],I.touch0?!I.touch1&&I.touch0[2]!==J[2]&&(I.touch1=J,I.taps=0):(I.touch0=J,z=!0,I.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(I.taps<2&&(c=setTimeout(function(){c=null},f)),Uo(this),I.start())}}function P(){if(this.__zooming){var C=_(this,arguments),E=Ce.changedTouches,I=E.length,z,j,Z,J;for(js(),c&&(c=clearTimeout(c)),C.taps=0,z=0;z<I;++z)j=E[z],Z=Yl(this,E,j.identifier),C.touch0&&C.touch0[2]===j.identifier?C.touch0[0]=Z:C.touch1&&C.touch1[2]===j.identifier&&(C.touch1[0]=Z);if(j=C.that.__zoom,C.touch1){var ie=C.touch0[0],he=C.touch0[1],_e=C.touch1[0],oe=C.touch1[1],ve=(ve=_e[0]-ie[0])*ve+(ve=_e[1]-ie[1])*ve,we=(we=oe[0]-he[0])*we+(we=oe[1]-he[1])*we;j=b(j,Math.sqrt(ve/we)),Z=[(ie[0]+_e[0])/2,(ie[1]+_e[1])/2],J=[(he[0]+oe[0])/2,(he[1]+oe[1])/2]}else if(C.touch0)Z=C.touch0[0],J=C.touch0[1];else return;C.zoom("touch",n(v(j,Z,J),C.extent,a))}}function R(){if(this.__zooming){var C=_(this,arguments),E=Ce.changedTouches,I=E.length,z,j;for(Wp(),d&&clearTimeout(d),d=setTimeout(function(){d=null},f),z=0;z<I;++z)j=E[z],C.touch0&&C.touch0[2]===j.identifier?delete C.touch0:C.touch1&&C.touch1[2]===j.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2){var Z=Ue(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return g.wheelDelta=function(C){return arguments.length?(r=typeof C=="function"?C:Mc(+C),g):r},g.filter=function(C){return arguments.length?(e=typeof C=="function"?C:Mc(!!C),g):e},g.touchable=function(C){return arguments.length?(i=typeof C=="function"?C:Mc(!!C),g):i},g.extent=function(C){return arguments.length?(t=typeof C=="function"?C:Mc([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),g):t},g.scaleExtent=function(C){return arguments.length?(o[0]=+C[0],o[1]=+C[1],g):[o[0],o[1]]},g.translateExtent=function(C){return arguments.length?(a[0][0]=+C[0][0],a[1][0]=+C[1][0],a[0][1]=+C[0][1],a[1][1]=+C[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(C){return arguments.length?(n=C,g):n},g.duration=function(C){return arguments.length?(s=+C,g):s},g.interpolate=function(C){return arguments.length?(l=C,g):l},g.on=function(){var C=u.on.apply(u,arguments);return C===u?g:C},g.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,g):Math.sqrt(p)},g}const V6=Object.freeze(Object.defineProperty({__proto__:null,FormatSpecifier:Kd,active:DD,arc:eG,area:Fb,areaRadial:vx,ascending:Sr,autoType:WH,axisBottom:K5,axisLeft:Z5,axisRight:Av,axisTop:X5,bisect:Ji,bisectLeft:MB,bisectRight:Ji,bisector:kv,blob:YH,brush:QD,brushSelection:KD,brushX:ZD,brushY:JD,buffer:XH,chord:tH,clientPoint:Od,cluster:lW,color:eo,contourDensity:TH,contours:J8,create:yN,creator:Fd,cross:EB,csv:JH,csvFormat:zH,csvFormatBody:IH,csvFormatRow:BH,csvFormatRows:FH,csvFormatValue:OH,csvParse:e3,csvParseRows:RH,cubehelix:$r,curveBasis:mG,curveBasisClosed:yG,curveBasisOpen:_G,curveBundle:xG,curveCardinal:wG,curveCardinalClosed:CG,curveCardinalOpen:SG,curveCatmullRom:$G,curveCatmullRomClosed:kG,curveCatmullRomOpen:MG,curveLinear:ah,curveLinearClosed:TG,curveMonotoneX:EG,curveMonotoneY:AG,curveNatural:B6,curveStep:PG,curveStepAfter:zG,curveStepBefore:RG,customEvent:ql,descending:AB,deviation:W5,dispatch:ha,drag:O0,dragDisable:Nd,dragEnable:Ld,dsv:ZH,dsvFormat:Yd,easeBack:Dy,easeBackIn:zD,easeBackInOut:Dy,easeBackOut:ID,easeBounce:Ql,easeBounceIn:PD,easeBounceInOut:RD,easeBounceOut:Ql,easeCircle:Ly,easeCircleIn:xD,easeCircleInOut:Ly,easeCircleOut:wD,easeCubic:V0,easeCubicIn:hD,easeCubicInOut:V0,easeCubicOut:pD,easeElastic:Hy,easeElasticIn:FD,easeElasticInOut:BD,easeElasticOut:Hy,easeExp:Ny,easeExpIn:yD,easeExpInOut:Ny,easeExpOut:_D,easeLinear:cD,easePoly:By,easePolyIn:gD,easePolyInOut:By,easePolyOut:vD,easeQuad:Fy,easeQuadIn:fD,easeQuadInOut:Fy,easeQuadOut:dD,easeSin:Oy,easeSinIn:bD,easeSinInOut:Oy,easeSinOut:mD,entries:gH,get event(){return Ce},extent:qo,forceCenter:aU,forceCollide:$U,forceLink:MU,forceManyBody:zU,forceRadial:IU,forceSimulation:RU,forceX:FU,forceY:BU,get format(){return Zd},formatDefaultLocale:a3,formatLocale:o3,get formatPrefix(){return Zv},formatSpecifier:tu,geoAlbers:W3,geoAlbersUsa:Dj,geoArea:qU,geoAzimuthalEqualArea:Hj,geoAzimuthalEqualAreaRaw:sb,geoAzimuthalEquidistant:Uj,geoAzimuthalEquidistantRaw:lb,geoBounds:KU,geoCentroid:nj,geoCircle:rj,geoClipAntimeridian:lg,geoClipCircle:T3,geoClipExtent:cj,geoClipRectangle:Jd,geoConicConformal:Wj,geoConicConformalRaw:Y3,geoConicEqualArea:Gf,geoConicEqualAreaRaw:j3,geoConicEquidistant:qj,geoConicEquidistantRaw:G3,geoContains:bj,geoDistance:Hf,geoEqualEarth:Gj,geoEqualEarthRaw:ub,geoEquirectangular:Vj,geoEquirectangularRaw:ou,geoGnomonic:Xj,geoGnomonicRaw:cb,geoGraticule:P3,geoGraticule10:mj,geoIdentity:Kj,geoInterpolate:yj,geoLength:E3,geoMercator:jj,geoMercatorRaw:Mu,geoNaturalEarth1:Zj,geoNaturalEarth1Raw:fb,geoOrthographic:Jj,geoOrthographicRaw:db,geoPath:Aj,geoProjection:Jr,geoProjectionMutator:ob,geoRotation:w3,geoStereographic:Qj,geoStereographicRaw:hb,geoStream:br,geoTransform:Pj,geoTransverseMercator:eW,geoTransverseMercatorRaw:pb,gray:FN,hcl:yf,hierarchy:gb,histogram:IB,hsl:vf,html:iU,image:eU,interpolate:ys,interpolateArray:HN,interpolateBasis:x8,interpolateBasisClosed:w8,interpolateBlues:MY,interpolateBrBG:aY,interpolateBuGn:gY,interpolateBuPu:vY,interpolateCividis:zY,interpolateCool:BY,interpolateCubehelix:nL,interpolateCubehelixDefault:IY,interpolateCubehelixLong:jd,interpolateDate:T8,interpolateDiscrete:WN,interpolateGnBu:bY,interpolateGreens:TY,interpolateGreys:EY,interpolateHcl:eL,interpolateHclLong:tL,interpolateHsl:ZN,interpolateHslLong:JN,interpolateHue:VN,interpolateInferno:WY,interpolateLab:QN,interpolateMagma:jY,interpolateNumber:or,interpolateNumberArray:Dv,interpolateObject:E8,interpolateOrRd:mY,interpolateOranges:RY,interpolatePRGn:sY,interpolatePiYG:lY,interpolatePlasma:VY,interpolatePuBu:_Y,interpolatePuBuGn:yY,interpolatePuOr:uY,interpolatePuRd:xY,interpolatePurples:AY,interpolateRainbow:OY,interpolateRdBu:cY,interpolateRdGy:fY,interpolateRdPu:wY,interpolateRdYlBu:dY,interpolateRdYlGn:hY,interpolateReds:PY,interpolateRgb:Kl,interpolateRgbBasis:$8,interpolateRgbBasisClosed:DN,interpolateRound:A8,interpolateSinebow:DY,interpolateSpectral:pY,interpolateString:Hv,interpolateTransformCss:z8,interpolateTransformSvg:I8,interpolateTurbo:HY,interpolateViridis:UY,interpolateWarm:FY,interpolateYlGn:SY,interpolateYlGnBu:CY,interpolateYlOrBr:$Y,interpolateYlOrRd:kY,interpolateZoom:F8,interrupt:Uo,interval:lL,isoFormat:Dq,isoParse:Uq,json:nU,keys:hH,lab:mf,lch:BN,line:Cs,lineRadial:gx,linkHorizontal:uG,linkRadial:fG,linkVertical:cG,local:a8,map:hi,matcher:Rv,max:q5,mean:OB,median:NB,merge:Ev,min:Y5,mouse:lr,namespace:wu,namespaces:I0,nest:cH,now:_s,pack:zW,packEnclose:K3,packSiblings:AW,pairs:TB,partition:IW,path:ho,permute:LB,pie:rG,piecewise:rL,pointRadial:sl,polygonArea:XW,polygonCentroid:KW,polygonContains:eV,polygonHull:QW,polygonLength:tV,precisionFixed:s3,precisionPrefix:l3,precisionRound:u3,quadtree:Xd,quantile:Vl,quantize:iL,radialArea:vx,radialLine:gx,randomBates:iV,randomExponential:oV,randomIrwinHall:oC,randomLogNormal:rV,randomNormal:iC,randomUniform:nV,range:Jn,rgb:is,ribbon:uH,scaleBand:bb,scaleDiverging:LC,scaleDivergingLog:DC,scaleDivergingPow:Rb,scaleDivergingSqrt:Xq,scaleDivergingSymlog:HC,scaleIdentity:cC,scaleImplicit:xg,scaleLinear:au,scaleLog:dC,scaleOrdinal:vb,scalePoint:aV,scalePow:xb,scaleQuantile:pC,scaleQuantize:gC,scaleSequential:FC,scaleSequentialLog:BC,scaleSequentialPow:Pb,scaleSequentialQuantile:NC,scaleSequentialSqrt:Gq,scaleSequentialSymlog:OC,scaleSqrt:bV,scaleSymlog:hC,scaleThreshold:vC,scaleTime:qq,scaleUtc:Yq,scan:DB,schemeAccent:Zq,schemeBlues:u6,schemeBrBG:UC,schemeBuGn:ZC,schemeBuPu:JC,schemeCategory10:Kq,schemeDark2:Jq,schemeGnBu:QC,schemeGreens:c6,schemeGreys:f6,schemeOrRd:e6,schemeOranges:p6,schemePRGn:jC,schemePaired:Qq,schemePastel1:eY,schemePastel2:tY,schemePiYG:WC,schemePuBu:n6,schemePuBuGn:t6,schemePuOr:VC,schemePuRd:r6,schemePurples:d6,schemeRdBu:qC,schemeRdGy:YC,schemeRdPu:i6,schemeRdYlBu:GC,schemeRdYlGn:XC,schemeReds:h6,schemeSet1:nY,schemeSet2:rY,schemeSet3:iY,schemeSpectral:KC,schemeTableau10:oY,schemeYlGn:a6,schemeYlGnBu:o6,schemeYlOrBr:s6,schemeYlOrRd:l6,select:Ue,selectAll:s8,selection:pa,selector:Bd,selectorAll:Pv,set:K8,shuffle:HB,stack:FG,stackOffsetDiverging:OG,stackOffsetExpand:BG,stackOffsetNone:ds,stackOffsetSilhouette:NG,stackOffsetWiggle:LG,stackOrderAppearance:O6,stackOrderAscending:N6,stackOrderDescending:HG,stackOrderInsideOut:UG,stackOrderNone:hs,stackOrderReverse:jG,stratify:NW,style:Go,sum:UB,svg:oU,symbol:Lb,symbolCircle:Nb,symbolCross:m6,symbolDiamond:_6,symbolSquare:C6,symbolStar:w6,symbolTriangle:S6,symbolWye:$6,symbols:bG,text:Gd,thresholdFreedmanDiaconis:FB,thresholdScott:BB,thresholdSturges:Tv,tickFormat:uC,tickIncrement:wl,tickStep:Yo,ticks:Mv,timeDay:Au,timeDays:_V,get timeFormat(){return Tb},timeFormatDefaultLocale:zC,timeFormatLocale:MC,timeFriday:xC,timeFridays:$V,timeHour:Cb,timeHours:yV,timeInterval:Qt,timeMillisecond:ea,timeMilliseconds:J_,timeMinute:wb,timeMinutes:mV,timeMonday:uu,timeMondays:xV,timeMonth:Sb,timeMonths:MV,get timeParse(){return RC},timeSaturday:wC,timeSaturdays:kV,timeSecond:su,timeSeconds:Q_,timeSunday:lu,timeSundays:ex,timeThursday:na,timeThursdays:SV,timeTuesday:yC,timeTuesdays:wV,timeWednesday:_C,timeWednesdays:CV,timeWeek:lu,timeWeeks:ex,timeYear:gi,timeYears:TV,timeout:H0,timer:Vd,timerFlush:H8,touch:Yl,touches:xN,transition:V8,transpose:G5,tree:WW,treemap:VW,treemapBinary:qW,treemapDice:Tu,treemapResquarify:GW,treemapSlice:eh,treemapSliceDice:YW,treemapSquarify:rC,tsv:QH,tsvFormat:LH,tsvFormatBody:DH,tsvFormatRow:UH,tsvFormatRows:HH,tsvFormatValue:jH,tsvParse:t3,tsvParseRows:NH,utcDay:Pu,utcDays:PV,get utcFormat(){return nh},utcFriday:$C,utcFridays:BV,utcHour:kb,utcHours:AV,utcMillisecond:ea,utcMilliseconds:J_,utcMinute:$b,utcMinutes:EV,utcMonday:fu,utcMondays:RV,utcMonth:Mb,utcMonths:NV,get utcParse(){return Eb},utcSaturday:kC,utcSaturdays:OV,utcSecond:su,utcSeconds:Q_,utcSunday:cu,utcSundays:tx,utcThursday:ra,utcThursdays:FV,utcTuesday:CC,utcTuesdays:zV,utcWednesday:SC,utcWednesdays:IV,utcWeek:cu,utcWeeks:tx,utcYear:vi,utcYears:LV,values:pH,variance:j5,version:$B,voronoi:sX,window:zv,xml:rU,zip:WB,zoom:pX,zoomIdentity:ch,zoomTransform:W6},Symbol.toStringTag,{value:"Module"})),qi={verbs:["highlight","select","fade","hide"],adjectives:["highlighted","selected","faded","hidden"]};function gX(e){return isNaN(e)||e<=0?null:Math.log(e)/Math.LN10}function vX(e){return isNaN(e)||e<=0?null:-Math.log(e)/Math.LN10}function bX(e){if(isNaN(e))return"NaN";if(e===0)return"1";const t=Math.ceil(e),n=t-e,r=Math.pow(10,n);return t===1?(r/10).toFixed(4):t===2?(r/100).toFixed(3):`${r.toFixed(2)} × 10^-${t}`}function mX(e){if(isNaN(e))return"NaN";if(e===0)return"0";const t=Math.abs(e);let n;return t>1?n=Math.ceil(Math.log(t)/Math.LN10):n=Math.floor(Math.log(t)/Math.LN10),Math.abs(n)<=3?e.toFixed(3):e.toExponential(2).replace("+","").replace("e"," × 10^")}function yX(e){return e?(e=`${e}`,e.replace(/['"<>&`]/g,function(t){switch(t){case"'":return"'";case'"':return""";case"<":return"<";case">":return">";case"&":return"&";case"`":return"`"}})):""}function _X(e){return typeof e=="number"}function xX(e){return encodeURIComponent(e)}const wX=Object.freeze(Object.defineProperty({__proto__:null,htmlescape:yX,is_numeric:_X,log10:gX,logtoscinotation:bX,neglog10:vX,scinotation:mX,urlencode:xX},Symbol.toStringTag,{value:"Module"}));class CX extends Zi{_collectTransforms(t){const n=t.match(/\|([^|]+)/g).map(r=>super.get(r.substring(1)));return r=>n.reduce((i,o)=>o(i),r)}get(t){return t?t.substring(0,1)==="|"?this._collectTransforms(t):super.get(t):null}}const Vb=new CX;for(let[e,t]of Object.entries(wX))Vb.add(e,t);class za{constructor(t){if(!/^(?:\w+:\w+|^\w+)(?:\|\w+)*$/.test(t))throw new Error(`Invalid field specifier: '${t}'`);const[r,...i]=t.split("|");this.full_name=t,this.field_name=r,this.transformations=i.map(o=>Vb.get(o))}_applyTransformations(t){return this.transformations.forEach(function(n){t=n(t)}),t}resolve(t,n){if(typeof t[this.full_name]>"u"){let r=null;t[this.field_name]!==void 0?r=t[this.field_name]:n&&n[this.field_name]!==void 0&&(r=n[this.field_name]),t[this.full_name]=this._applyTransformations(r)}return t[this.full_name]}}const $x=/^(\*|[\w]+)/,SX=/^\[\?\(@((?:\.[\w]+)+) *===? *([0-9.eE-]+|"[^"]*"|'[^']*')\)\]/;function $X(e){if(e.substr(0,2)===".."){if(e[2]==="[")return{text:"..",attr:"*",depth:".."};const t=$x.exec(e.substr(2));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dotdot_attr.`;return{text:`..${t[0]}`,attr:t[1],depth:".."}}else if(e[0]==="."){const t=$x.exec(e.substr(1));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dot_attr.`;return{text:`.${t[0]}`,attr:t[1],depth:"."}}else if(e[0]==="["){const t=SX.exec(e);if(!t)throw`Cannot parse ${JSON.stringify(e)} as expr.`;let n;try{n=JSON.parse(t[2])}catch{n=JSON.parse(t[2].replace(/^'|'$/g,'"'))}return{text:t[0],attrs:t[1].substr(1).split("."),value:n}}else throw`The query ${JSON.stringify(e)} doesn't look valid.`}function kX(e){return e?(["$","["].includes(e[0])||(e=`$.${e}`),e[0]==="$"&&(e=e.substr(1)),e):""}function MX(e){e=kX(e);let t=[];for(;e.length;){const n=$X(e);e=e.substr(n.text.length),t.push(n)}return t}function q6(e,t){let n;for(let r of t)n=e,e=e[r];return[n,t[t.length-1],e]}function To(e,t){if(!t.length)return[[]];const n=t[0],r=t.slice(1);let i=[];if(n.attr&&n.depth==="."&&n.attr!=="*"){const a=e[n.attr];t.length===1?a!==void 0&&i.push([n.attr]):i.push(...To(a,r).map(s=>[n.attr].concat(s)))}else if(n.attr&&n.depth==="."&&n.attr==="*")for(let[a,s]of Object.entries(e))i.push(...To(s,r).map(l=>[a].concat(l)));else if(n.attr&&n.depth===".."){if(typeof e=="object"&&e!==null){n.attr!=="*"&&n.attr in e&&i.push(...To(e[n.attr],r).map(a=>[n.attr].concat(a)));for(let[a,s]of Object.entries(e))i.push(...To(s,t).map(l=>[a].concat(l))),n.attr==="*"&&i.push(...To(s,r).map(l=>[a].concat(l)))}}else if(n.attrs)for(let[a,s]of Object.entries(e)){const[l,u,c]=q6(s,n.attrs);c===n.value&&i.push(...To(s,r).map(d=>[a].concat(d)))}const o=TX(i,JSON.stringify);return o.sort((a,s)=>s.length-a.length||JSON.stringify(a).localeCompare(JSON.stringify(s))),o}function TX(e,t){return[...new Map(e.map(n=>[t(n),n])).values()]}function EX(e,t){let n=[];for(let r of To(e,t))n.push(q6(e,r));return n}function Y6(e,t){const n=MX(t),r=EX(e,n);return r.length||console.warn(`No items matched the specified query: '${t}'`),r}function AX(e,t){return Y6(e,t).map(n=>n[2])}function PX(e,t,n){return Y6(e,t).map(([i,o,a])=>{const s=typeof n=="function"?n(a):n;return i[o]=s,s})}const Vp=Math.sqrt(3),RX={draw(e,t){const n=-Math.sqrt(t/(Vp*3));e.moveTo(0,-n*2),e.lineTo(-Vp*n,n),e.lineTo(Vp*n,n),e.closePath()}};function G6(e,t){if(t=t||{},!e||typeof e!="object"||typeof t!="object")throw new Error("Layout and shared namespaces must be provided as objects");for(let[n,r]of Object.entries(e))n==="namespace"?Object.keys(r).forEach(i=>{const o=t[i];o&&(r[i]=o)}):r!==null&&typeof r=="object"&&(e[n]=G6(r,t));return e}function qt(e,t){if(typeof e!="object"||typeof t!="object")throw new Error(`LocusZoom.Layouts.merge only accepts two layout objects; ${typeof e}, ${typeof t} given`);for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=e[n]===null?"undefined":typeof e[n],i=typeof t[n];if(r==="object"&&Array.isArray(e[n])&&(r="array"),i==="object"&&Array.isArray(t[n])&&(i="array"),r==="function"||i==="function")throw new Error("LocusZoom.Layouts.merge encountered an unsupported property type");if(r==="undefined"){e[n]=at(t[n]);continue}if(r==="object"&&i==="object"){e[n]=qt(e[n],t[n]);continue}}return e}function at(e){return JSON.parse(JSON.stringify(e))}function X6(e){if(!e)return null;if(e==="triangledown")return RX;const t=`symbol${e.charAt(0).toUpperCase()+e.slice(1)}`;return V6[t]||null}function qb(e,t,n=null){const r=new Set;if(!n){if(!t.length)return r;const i=t.join("|");n=new RegExp(`(?:{{)?(?:#if *)?((?:${i}):\\w+)`,"g")}for(const i of Object.values(e)){const o=typeof i;let a=[];if(o==="string"){let s;for(;(s=n.exec(i))!==null;)a.push(s[1])}else if(i!==null&&o==="object")a=qb(i,t,n);else continue;for(let s of a)r.add(s)}return r}function Mg(e,t,n,r=!0){const i=typeof e;if(Array.isArray(e))return e.map(o=>Mg(o,t,n,r));if(i==="object"&&e!==null)return Object.keys(e).reduce((o,a)=>(o[a]=Mg(e[a],t,n,r),o),{});if(i!=="string")return e;{const o=t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(r){const s=new RegExp(`${o}\\|\\w+`,"g");(e.match(s)||[]).forEach(u=>console.warn(`renameFields is renaming a field that uses transform functions: was '${u}' . Verify that these transforms are still appropriate.`))}const a=new RegExp(`${o}(?!\\w+)`,"g");return e.replace(a,n)}}function zX(e,t,n){return PX(e,t,n)}function IX(e,t){return AX(e,t)}class FX{constructor(t,n,r){this._callable=_a.get(t),this._initiator=n,this._params=r||[]}getData(t,...n){const r={plot_state:t,data_layer:this._initiator};return Promise.resolve(this._callable(r,n,...this._params))}}class BX{constructor(t){this._sources=t}config_to_sources(t={},n=[],r){const i=new Map,o=Object.keys(t);let a=n.find(u=>u.type==="fetch");a||(a={type:"fetch",from:o},n.unshift(a));const s=/^\w+$/;for(let[u,c]of Object.entries(t)){if(!s.test(u))throw new Error(`Invalid namespace name: '${u}'. Must contain only alphanumeric characters`);const d=this._sources.get(c);if(!d)throw new Error(`A data layer has requested an item not found in DataSources: data type '${u}' from ${c}`);i.set(u,d),a.from.find(f=>f.split("(")[0]===u)||a.from.push(u)}let l=Array.from(a.from);for(let u of n){let{type:c,name:d,requires:f,params:h}=u;if(c!=="fetch"){let p=0;if(d||(d=u.name=`join${p}`,p+=1),i.has(d))throw new Error(`Configuration error: within a layer, join name '${d}' must be unique`);f.forEach(b=>{if(!i.has(b))throw new Error(`Data operation cannot operate on unknown provider '${b}'`)});const g=new FX(c,r,h);i.set(d,g),l.push(`${d}(${f.join(", ")})`)}}return[i,l]}getData(t,n,r){return r.length?hB(t,n,r,!0):Promise.resolve([])}}function K6(){return{showing:!1,selector:null,content_selector:null,hide_delay:null,show:(e,t)=>(this.curtain.showing||(this.curtain.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-curtain").attr("id",`${this.id}.curtain`),this.curtain.content_selector=this.curtain.selector.append("div").attr("class","lz-curtain-content"),this.curtain.selector.append("div").attr("class","lz-curtain-dismiss").html("Dismiss").on("click",()=>this.curtain.hide()),this.curtain.showing=!0),this.curtain.update(e,t)),update:(e,t)=>{if(!this.curtain.showing)return this.curtain;clearTimeout(this.curtain.hide_delay),typeof t=="object"&&xn(this.curtain.selector,t);const n=this._getPageOrigin(),r=this.layout.height||this._total_height;return this.curtain.selector.style("top",`${n.y}px`).style("left",`${n.x}px`).style("width",`${this.parent_plot.layout.width}px`).style("height",`${r}px`),this.curtain.content_selector.style("max-width",`${this.parent_plot.layout.width-40}px`).style("max-height",`${r-40}px`),typeof e=="string"&&this.curtain.content_selector.html(e),this.curtain},hide:e=>this.curtain.showing?typeof e=="number"?(clearTimeout(this.curtain.hide_delay),this.curtain.hide_delay=setTimeout(this.curtain.hide,e),this.curtain):(this.curtain.selector.remove(),this.curtain.selector=null,this.curtain.content_selector=null,this.curtain.showing=!1,this.curtain):this.curtain}}function Z6(){return{showing:!1,selector:null,content_selector:null,progress_selector:null,cancel_selector:null,show:e=>(this.loader.showing||(this.loader.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-loader").attr("id",`${this.id}.loader`),this.loader.content_selector=this.loader.selector.append("div").attr("class","lz-loader-content"),this.loader.progress_selector=this.loader.selector.append("div").attr("class","lz-loader-progress-container").append("div").attr("class","lz-loader-progress"),this.loader.showing=!0,typeof e>"u"&&(e="Loading...")),this.loader.update(e)),update:(e,t)=>{if(!this.loader.showing)return this.loader;clearTimeout(this.loader.hide_delay),typeof e=="string"&&this.loader.content_selector.html(e);const n=6,r=this._getPageOrigin(),i=this.loader.selector.node().getBoundingClientRect();return this.loader.selector.style("top",`${r.y+this.layout.height-i.height-n}px`).style("left",`${r.x+n}px`),typeof t=="number"&&this.loader.progress_selector.style("width",`${Math.min(Math.max(t,1),100)}%`),this.loader},animate:()=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!0),this.loader),setPercentCompleted:e=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!1),this.loader.update(null,e)),hide:e=>this.loader.showing?typeof e=="number"?(clearTimeout(this.loader.hide_delay),this.loader.hide_delay=setTimeout(this.loader.hide,e),this.loader):(this.loader.selector.remove(),this.loader.selector=null,this.loader.content_selector=null,this.loader.progress_selector=null,this.loader.cancel_selector=null,this.loader.showing=!1,this.loader):this.loader}}function xn(e,t){t=t||{};for(let[n,r]of Object.entries(t))e.style(n,r)}function OX(e,t=500){let n;return()=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,arguments),t)}}class Sn{constructor(t,n){this.layout=t||{},this.layout.color||(this.layout.color="gray"),this.parent=n||null,this.parent_panel=null,this.parent_plot=null,this.parent_svg=null,this.parent&&(this.parent.type==="panel"?(this.parent_panel=this.parent.parent,this.parent_plot=this.parent.parent.parent,this.parent_svg=this.parent_panel):(this.parent_plot=this.parent.parent,this.parent_svg=this.parent_plot)),this.selector=null,this.button=null,this.persist=!1,this.layout.position||(this.layout.position="left")}show(){if(!(!this.parent||!this.parent.selector)){if(!this.selector){const t=["start","middle","end"].includes(this.layout.group_position)?` lz-toolbar-group-${this.layout.group_position}`:"";this.selector=this.parent.selector.append("div").attr("class",`lz-toolbar-${this.layout.position}${t}`),this.layout.style&&xn(this.selector,this.layout.style),typeof this.initialize=="function"&&this.initialize()}return this.button&&this.button.status==="highlighted"&&this.button.menu.show(),this.selector.style("visibility","visible"),this.update(),this.position()}}update(){}position(){return this.button&&this.button.menu.position(),this}shouldPersist(){return this.persist?!0:!!(this.button&&this.button.persist)}hide(){return!this.selector||this.shouldPersist()?this:(this.button&&this.button.menu.hide(),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.button&&this.button.menu&&this.button.menu.destroy(),this.selector.remove(),this.selector=null,this.button=null,this):this}}class gr{constructor(t){if(!(t instanceof Sn))throw new Error("Unable to create toolbar widget button, invalid parent");this.parent=t,this.parent_panel=this.parent.parent_panel,this.parent_plot=this.parent.parent_plot,this.parent_svg=this.parent.parent_svg,this.parent_toolbar=this.parent.parent,this.selector=null,this.tag="a",this.html="",this.title="",this.color="gray",this.style={},this.persist=!1,this.permanent=!1,this.status="",this.menu={outer_selector:null,inner_selector:null,scroll_position:0,hidden:!0,show:()=>(this.menu.outer_selector||(this.menu.outer_selector=Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class",`lz-toolbar-menu lz-toolbar-menu-${this.color}`).attr("id",`${this.parent_svg.getBaseId()}.toolbar.menu`),this.menu.inner_selector=this.menu.outer_selector.append("div").attr("class","lz-toolbar-menu-content"),this.menu.inner_selector.on("scroll",()=>{this.menu.scroll_position=this.menu.inner_selector.node().scrollTop})),this.menu.outer_selector.style("visibility","visible"),this.menu.hidden=!1,this.menu.update()),update:()=>this.menu.outer_selector?(this.menu.populate(),this.menu.inner_selector&&(this.menu.inner_selector.node().scrollTop=this.menu.scroll_position),this.menu.position()):this.menu,position:()=>{if(!this.menu.outer_selector)return this.menu;this.menu.outer_selector.style("height",null);const n=3,r=20,i=14,o=this.parent_svg._getPageOrigin(),a=document.documentElement.scrollTop||document.body.scrollTop,s=this.parent_plot.getContainerOffset(),l=this.parent_toolbar.selector.node().getBoundingClientRect(),u=this.selector.node().getBoundingClientRect(),c=this.menu.outer_selector.node().getBoundingClientRect(),d=this.menu.inner_selector.node().scrollHeight;let f,h;this.parent_toolbar.type==="panel"?(f=o.y+l.height+2*n,h=Math.max(o.x+this.parent_plot.layout.width-c.width-n,o.x+n)):(f=u.bottom+a+n-s.top,h=Math.max(u.left+u.width-c.width-s.left,o.x+n));const p=Math.max(this.parent_plot.layout.width-2*n-r,r),g=p,b=p-4*n,v=Math.max(this.parent_svg.layout.height-10*n-i,i),x=Math.min(d+i,v);return this.menu.outer_selector.style("top",`${f}px`).style("left",`${h}px`).style("max-width",`${g}px`).style("max-height",`${v}px`).style("height",`${x}px`),this.menu.inner_selector.style("max-width",`${b}px`),this.menu.inner_selector.node().scrollTop=this.menu.scroll_position,this.menu},hide:()=>this.menu.outer_selector?(this.menu.outer_selector.style("visibility","hidden"),this.menu.hidden=!0,this.menu):this.menu,destroy:()=>this.menu.outer_selector?(this.menu.inner_selector.remove(),this.menu.outer_selector.remove(),this.menu.inner_selector=null,this.menu.outer_selector=null,this.menu):this.menu,populate:()=>{throw new Error("Method must be implemented")},setPopulate:n=>(typeof n=="function"?(this.menu.populate=n,this.setOnclick(()=>{this.menu.hidden?(this.menu.show(),this.highlight().update(),this.persist=!0):(this.menu.hide(),this.highlight(!1).update(),this.permanent||(this.persist=!1))})):this.setOnclick(),this)}}setColor(t){return typeof t<"u"&&(["gray","red","orange","yellow","green","blue","purple"].includes(t)?this.color=t:this.color="gray"),this}setPermanent(t){return typeof t>"u"?t=!0:t=!!t,this.permanent=t,this.permanent&&(this.persist=!0),this}shouldPersist(){return this.permanent||this.persist}setStyle(t){return typeof t<"u"&&(this.style=t),this}getClass(){const t=["start","middle","end"].includes(this.parent.layout.group_position)?` lz-toolbar-button-group-${this.parent.layout.group_position}`:"";return`lz-toolbar-button lz-toolbar-button-${this.color}${this.status?`-${this.status}`:""}${t}`}setStatus(t){return typeof t<"u"&&["","highlighted","disabled"].includes(t)&&(this.status=t),this.update()}highlight(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("highlighted"):this.status==="highlighted"?this.setStatus(""):this}disable(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("disabled"):this.status==="disabled"?this.setStatus(""):this}onmouseover(){}setOnMouseover(t){return typeof t=="function"?this.onmouseover=t:this.onmouseover=function(){},this}onmouseout(){}setOnMouseout(t){return typeof t=="function"?this.onmouseout=t:this.onmouseout=function(){},this}onclick(){}setOnclick(t){return typeof t=="function"?this.onclick=t:this.onclick=function(){},this}setTitle(t){return typeof t<"u"&&(this.title=t.toString()),this}setHtml(t){return typeof t<"u"&&(this.html=t.toString()),this}show(){if(this.parent)return this.selector||(this.selector=this.parent.selector.append(this.tag).attr("class",this.getClass())),this.update()}preUpdate(){return this}update(){return this.selector?(this.preUpdate(),this.selector.attr("class",this.getClass()).attr("title",this.title).on("mouseover",this.status==="disabled"?null:this.onmouseover).on("mouseout",this.status==="disabled"?null:this.onmouseout).on("click",this.status==="disabled"?null:this.onclick).html(this.html).call(xn,this.style),this.menu.update(),this.postUpdate(),this):this}postUpdate(){return this}hide(){return this.selector&&!this.shouldPersist()&&(this.selector.remove(),this.selector=null),this}}class NX extends Sn{show(){return this.div_selector||(this.div_selector=this.parent.selector.append("div").attr("class",`lz-toolbar-title lz-toolbar-${this.layout.position}`),this.title_selector=this.div_selector.append("h3")),this.update()}update(){let t=this.layout.title.toString();return this.layout.subtitle&&(t+=` <small>${this.layout.subtitle}</small>`),this.title_selector.html(t),this}}class LX extends Sn{update(){return!isNaN(this.parent_plot.state.start)&&!isNaN(this.parent_plot.state.end)&&this.parent_plot.state.start!==null&&this.parent_plot.state.end!==null?(this.selector.style("display",null),this.selector.html(Gb(this.parent_plot.state.end-this.parent_plot.state.start,null,!0))):this.selector.style("display","none"),this.layout.class&&this.selector.attr("class",this.layout.class),this.layout.style&&xn(this.selector,this.layout.style),this}}class DX extends Sn{constructor(t,n){if(super(t,n),!this.parent_panel)throw new Error("Filter widget can only be used in panel toolbars");if(this._data_layer=this.parent_panel.data_layers[t.layer_name],!this._data_layer)throw new Error(`Filter widget could not locate the specified layer_name: '${t.layer_name}'`);if(this._event_name=t.custom_event_name||"widget_filter_field_action",this._field=t.field,this._field_display_html=t.field_display_html,this._operator=t.operator,this._filter_id=null,this._data_type=t.data_type||"number",!["number","string"].includes(this._data_type))throw new Error("Filter must be either string or number");this._value_selector=null}_getTarget(){this._data_layer.layout.filters||(this._data_layer.layout.filters=[]);let t=this._data_layer.layout.filters.find(n=>n.field===this._field&&n.operator===this._operator&&(!this._filter_id||n.id===this._filter_id));return t||(t={field:this._field,operator:this._operator,value:null},this._filter_id&&(t.id=this._filter_id),this._data_layer.layout.filters.push(t)),t}_clearFilter(){if(this._data_layer.layout.filters){const t=this._data_layer.layout.filters.indexOf(this._getTarget());this._data_layer.layout.filters.splice(t,1)}}_setFilter(t){if(t===null)this._value_selector.style("border","1px solid red").style("color","red"),this._clearFilter();else{const n=this._getTarget();n.value=t}this.parent_svg.emit(this._event_name,{field:this._field,operator:this._operator,value:t,filter_id:this._filter_id},!0)}_getValue(){let t=this._value_selector.property("value");return t===null||t===""||this._data_type==="number"&&(t=+t,Number.isNaN(t))?null:t}update(){this._value_selector||(this.selector.style("padding","0 6px"),this.selector.append("span").html(this._field_display_html).style("background","#fff").style("padding-left","3px"),this.selector.append("span").text(this._operator).style("padding","0 3px").style("background","#fff"),this._value_selector=this.selector.append("input").attr("size",this.layout.input_size||4).on("input",OX(()=>{this._value_selector.style("border",null).style("color",null);const t=this._getValue();this._setFilter(t),this.parent_panel.render()},750)))}}class J6 extends Sn{constructor(t,n){super(t,n),this._filename=this.layout.filename||"locuszoom.svg",this._button_html=this.layout.button_html||"Save SVG",this._button_title=this.layout.button_title||"Download hi-res image",this._event_name=t.custom_event_name||"widget_save_svg"}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this._button_html).setTitle(this._button_title).setOnMouseover(()=>{this.button.selector.classed("lz-toolbar-button-gray-disabled",!0).html("Preparing Image"),this._getBlobUrl().then(t=>{const n=this.button.selector.attr("href");n&&URL.revokeObjectURL(n),this.button.selector.attr("href",t).classed("lz-toolbar-button-gray-disabled",!1).classed("lz-toolbar-button-gray-highlighted",!0).html(this._button_html)})}).setOnMouseout(()=>{this.button.selector.classed("lz-toolbar-button-gray-highlighted",!1)}),this.button.show(),this.button.selector.attr("href-lang","image/svg+xml").attr("download",this._filename).on("click",()=>this.parent_svg.emit(this._event_name,{filename:this._filename},!0)),this)}_getCSS(t){const n=/^svg\.lz-locuszoom\s*/;let r="";for(let i=0;i<document.styleSheets.length;i++){const o=document.styleSheets[i];try{if(!o.cssRules)continue}catch(s){if(s.name!=="SecurityError")throw s;continue}let a=o.cssRules;for(let s=0;s<a.length;s++){const l=a[s];l.selectorText&&l.selectorText.match(n)&&(r+=l.cssText)}}return r}_appendCSS(t,n){var r=document.createElement("style");r.setAttribute("type","text/css"),r.innerHTML=t;var i=n.hasChildNodes()?n.children[0]:null;n.insertBefore(r,i)}_getDimensions(){let{width:t,height:n}=this.parent_plot.svg.node().getBoundingClientRect();const i=2400/t;return[i*t,i*n]}_generateSVG(){return new Promise(t=>{let n=this.parent_plot.svg.node().cloneNode(!0);n.setAttribute("xlink","http://www.w3.org/1999/xlink"),n=Ue(n),n.selectAll("g.lz-curtain").remove(),n.selectAll("g.lz-mouse_guide").remove(),n.selectAll("g.tick text").each(function(){const s=+Ue(this).attr("dy").substring(-2).slice(0,-2)*10;Ue(this).attr("dy",s)});const r=new XMLSerializer;n=n.node();const[i,o]=this._getDimensions();n.setAttribute("width",i),n.setAttribute("height",o),this._appendCSS(this._getCSS(n),n);let a=r.serializeToString(n);t(a)})}_getBlobUrl(){return this._generateSVG().then(t=>{const n=new Blob([t],{type:"image/svg+xml"});return URL.createObjectURL(n)})}}class HX extends J6{constructor(t,n){super(...arguments),this._filename=this.layout.filename||"locuszoom.png",this._button_html=this.layout.button_html||"Save PNG",this._button_title=this.layout.button_title||"Download image",this._event_name=t.custom_event_name||"widget_save_png"}_getBlobUrl(){return super._getBlobUrl().then(t=>{const n=document.createElement("canvas"),r=n.getContext("2d"),[i,o]=this._getDimensions();return n.width=i,n.height=o,new Promise((a,s)=>{const l=new Image;l.onload=()=>{r.drawImage(l,0,0,i,o),URL.revokeObjectURL(t),n.toBlob(u=>{a(URL.createObjectURL(u))})},l.src=t})})}}class UX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml("×").setTitle("Remove panel").setOnclick(()=>{if(!this.layout.suppress_confirm&&!confirm("Are you sure you want to remove this panel? This cannot be undone."))return!1;const t=this.parent_panel;return t.toolbar.hide(!0),Ue(t.parent.svg.node().parentNode).on(`mouseover.${t.getBaseId()}.toolbar`,null),Ue(t.parent.svg.node().parentNode).on(`mouseout.${t.getBaseId()}.toolbar`,null),t.parent.removePanel(t.id)}),this.button.show(),this)}}class jX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===0;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▴").setTitle("Move panel up").setOnclick(()=>{this.parent_panel.moveUp(),this.update()}),this.button.show(),this.update()}}class WX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===this.parent_plot._panel_ids_by_y_index.length-1;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▾").setTitle("Move panel down").setOnclick(()=>{this.parent_panel.moveDown(),this.update()}),this.button.show(),this.update()}}class VX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=5e4),typeof t.button_html!="string"&&(t.button_html=t.step>0?">":"<"),typeof t.button_title!="string"&&(t.button_title=`Shift region by ${t.step>0?"+":"-"}${Gb(Math.abs(t.step),null,!0)}`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add shift_region toolbar widget: plot state does not have region bounds")}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start+this.layout.step,1),end:this.parent_plot.state.end+this.layout.step})}),this.button.show(),this)}}class qX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=.2),typeof t.button_html!="string"&&(t.button_html=t.step>0?"z–":"z+"),typeof t.button_title!="string"&&(t.button_title=`Zoom region ${t.step>0?"out":"in"} by ${(Math.abs(t.step)*100).toFixed(1)}%`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add zoom_region toolbar widget: plot state does not have region bounds")}update(){if(this.button){let t=!0;const n=this.parent_plot.state.end-this.parent_plot.state.start;return this.layout.step>0&&!isNaN(this.parent_plot.layout.max_region_scale)&&n>=this.parent_plot.layout.max_region_scale&&(t=!1),this.layout.step<0&&!isNaN(this.parent_plot.layout.min_region_scale)&&n<=this.parent_plot.layout.min_region_scale&&(t=!1),this.button.disable(!t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{const t=this.parent_plot.state.end-this.parent_plot.state.start,n=1+this.layout.step;let r=t*n;isNaN(this.parent_plot.layout.max_region_scale)||(r=Math.min(r,this.parent_plot.layout.max_region_scale)),isNaN(this.parent_plot.layout.min_region_scale)||(r=Math.max(r,this.parent_plot.layout.min_region_scale));const i=Math.floor((r-t)/2);this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start-i,1),end:this.parent_plot.state.end+i})}),this.button.show(),this}}class YX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title),this.button.menu.setPopulate(()=>{this.button.menu.inner_selector.html(this.layout.menu_html)}),this.button.show(),this)}}class GX extends Sn{constructor(t){super(...arguments)}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html||"Resize to Data").setTitle(this.layout.button_title||"Automatically resize this panel to show all data available").setOnclick(()=>{this.parent_panel.scaleHeightToData(),this.update()}),this.button.show(),this)}}class XX extends Sn{update(){const t=this.parent_panel.legend.layout.hidden?"Show Legend":"Hide Legend";return this.button?(this.button.setHtml(t).show(),this.parent.position(),this):(this.button=new gr(this).setColor(this.layout.color).setTitle("Show or hide the legend for this panel").setOnclick(()=>{this.parent_panel.legend.layout.hidden=!this.parent_panel.legend.layout.hidden,this.parent_panel.legend.render(),this.update()}),this.update())}}class KX extends Sn{constructor(t,n){typeof t.button_html!="string"&&(t.button_html="Display options..."),typeof t.button_title!="string"&&(t.button_title="Control how plot items are displayed"),super(...arguments),this._event_name=t.custom_event_name||"widget_display_options_choice";const r=t.fields_whitelist||["color","fill_opacity","filters","label","legend","point_shape","point_size","tooltip","tooltip_positioning"],i=this.parent_panel.data_layers[t.layer_name];if(!i)throw new Error(`Display options could not locate the specified layer_name: '${t.layer_name}'`);const o=i.layout,a={};r.forEach(s=>{const l=o[s];l!==void 0&&(a[s]=at(l))}),this._selected_item="default",this.button=new gr(this).setColor(t.color).setHtml(t.button_html).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const s=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const l=this.button.menu.inner_selector.append("table"),u=this.layout,c=(f,h,p)=>{const g=l.append("tr"),b=`${s}${p}`;g.append("td").append("input").attr("id",b).attr("type","radio").attr("name",`display-option-${s}`).attr("value",p).style("margin",0).property("checked",p===this._selected_item).on("click",()=>{r.forEach(x=>{const y=typeof h[x]<"u";i.layout[x]=y?h[x]:a[x]}),this.parent_svg.emit(this._event_name,{choice:f},!0),this._selected_item=p,this.parent_panel.render();const v=this.parent_panel.legend;v&&v.render()}),g.append("td").append("label").style("font-weight","normal").attr("for",b).text(f)},d=u.default_config_display_name||"Default style";return c(d,a,"default"),u.options.forEach((f,h)=>c(f.display_name,f.display,h)),this})}update(){return this.button.show(),this}}class ZX extends Sn{constructor(t,n){if(typeof t.button_html!="string"&&(t.button_html="Set option..."),typeof t.button_title!="string"&&(t.button_title="Choose an option to customize the plot"),super(t,n),this.parent_panel)throw new Error("This widget is designed to set global options, so it can only be used at the top (plot) level");if(!t.state_field)throw new Error("Must specify the `state_field` that this widget controls");if(this._event_name=t.custom_event_name||"widget_set_state_choice",this._selected_item=this.parent_plot.state[t.state_field]||t.options[0].value,!t.options.find(r=>r.value===this._selected_item))throw new Error("There is an existing state value that does not match the known values in this widget");this.button=new gr(this).setColor(t.color).setHtml(t.button_html+(t.show_selected?this._selected_item:"")).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const r=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const i=this.button.menu.inner_selector.append("table"),o=(a,s,l)=>{const u=i.append("tr"),c=`${r}${l}`;u.append("td").append("input").attr("id",c).attr("type","radio").attr("name",`set-state-${r}`).attr("value",l).style("margin",0).property("checked",s===this._selected_item).on("click",()=>{const d={};d[t.state_field]=s,this._selected_item=s,this.parent_plot.applyState(d),this.button.setHtml(t.button_html+(t.show_selected?this._selected_item:"")),this.parent_svg.emit(this._event_name,{choice_name:a,choice_value:s,state_field:t.state_field},!0)}),u.append("td").append("label").style("font-weight","normal").attr("for",c).text(a)};return t.options.forEach((a,s)=>o(a.display_name,a.value,s)),this})}update(){return this.button.show(),this}}const JX=Object.freeze(Object.defineProperty({__proto__:null,BaseWidget:Sn,_Button:gr,display_options:KX,download:J6,download_png:HX,filter_field:DX,menu:YX,move_panel_down:WX,move_panel_up:jX,region_scale:LX,remove_panel:UX,resize_to_data:GX,set_state:ZX,shift_region:VX,title:NX,toggle_legend:XX,zoom_region:qX},Symbol.toStringTag,{value:"Module"})),Yb=new Sv;for(let[e,t]of Object.entries(JX))Yb.add(e,t);class Q6{constructor(t){this.parent=t,this.id=`${this.parent.getBaseId()}.toolbar`,this.type=this.parent.parent?"panel":"plot",this.parent_plot=this.parent.parent_plot,this.selector=null,this.widgets=[],this.hide_timeout=null,this.persist=!1,this.initialize()}initialize(){const t=this.parent.layout.toolbar.widgets;return Array.isArray(t)&&t.forEach(n=>{this.addWidget(n)}),this.type==="panel"&&Ue(this.parent.parent.svg.node().parentNode).on(`mouseover.${this.id}`,()=>{clearTimeout(this.hide_timeout),(!this.selector||this.selector.style("visibility")==="hidden")&&this.show()}).on(`mouseout.${this.id}`,()=>{clearTimeout(this.hide_timeout),this.hide_timeout=setTimeout(()=>{this.hide()},300)}),this}addWidget(t){try{const n=Yb.create(t.type,t,this);return this.widgets.push(n),n}catch(n){console.warn("Failed to create widget"),console.error(n)}}shouldPersist(){if(this.persist)return!0;let t=!1;return this.widgets.forEach(n=>{t=t||n.shouldPersist()}),t=t||this.parent_plot._panel_boundaries.dragging||this.parent_plot._interaction.dragging,!!t}show(){if(!this.selector){switch(this.type){case"plot":this.selector=Ue(this.parent.svg.node().parentNode).insert("div",":first-child");break;case"panel":this.selector=Ue(this.parent.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip, .lz-toolbar-menu, .lz-curtain").classed("lz-panel-toolbar",!0);break;default:throw new Error(`Toolbar cannot be a child of ${this.type}`)}this.selector.classed("lz-toolbar",!0).classed(`lz-${this.type}-toolbar`,!0).attr("id",this.id)}return this.widgets.forEach(t=>t.show()),this.selector.style("visibility","visible"),this.update()}update(){return this.selector?(this.widgets.forEach(t=>t.update()),this.position()):this}position(){if(!this.selector)return this;if(this.type==="panel"){const t=this.parent._getPageOrigin(),n=`${(t.y+3.5).toString()}px`,r=`${t.x.toString()}px`,i=`${(this.parent_plot.layout.width-4).toString()}px`;this.selector.style("position","absolute").style("top",n).style("left",r).style("width",i)}return this.widgets.forEach(t=>t.position()),this}hide(){return!this.selector||this.shouldPersist()?this:(this.widgets.forEach(t=>t.hide()),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.widgets.forEach(n=>n.destroy(!0)),this.widgets=[],this.selector.remove(),this.selector=null,this):this}}const QX={orientation:"vertical",origin:{x:0,y:0},width:10,height:10,padding:5,label_size:14,hidden:!1};class eK{constructor(t){return this.parent=t,this.id=`${this.parent.getBaseId()}.legend`,this.parent.layout.legend=qt(this.parent.layout.legend||{},QX),this.layout=this.parent.layout.legend,this.selector=null,this.background_rect=null,this.elements=[],this.elements_group=null,this.hidden=!1,this.render()}render(){this.selector||(this.selector=this.parent.svg.group.append("g").attr("id",`${this.parent.getBaseId()}.legend`).attr("class","lz-legend")),this.background_rect||(this.background_rect=this.selector.append("rect").attr("width",100).attr("height",100).attr("class","lz-legend-background")),this.elements_group||(this.elements_group=this.selector.append("g")),this.elements.forEach(a=>a.remove()),this.elements=[];const t=+this.layout.padding||1;let n=t,r=t,i=0;this.parent._data_layer_ids_by_z_index.slice().reverse().forEach(a=>{const s=this.parent.data_layers[a].layout.legend;Array.isArray(s)&&s.forEach(l=>{const u=this.elements_group.append("g").attr("transform",`translate(${n}, ${r})`),c=+l.label_size||+this.layout.label_size;let d=0,f=c/2+t/2;i=Math.max(i,c+t);const h=l.shape||"",p=X6(h);if(h==="line"){const b=+l.length||16,v=c/4+t/2;u.append("path").attr("class",l.class||"").attr("d",`M0,${v}L${b},${v}`).call(xn,l.style||{}),d=b+t}else if(h==="rect"){const b=+l.width||16,v=+l.height||b;u.append("rect").attr("class",l.class||"").attr("width",b).attr("height",v).attr("fill",l.color||{}).call(xn,l.style||{}),d=b+t,i=Math.max(i,v+t)}else if(h==="ribbon"){const b=+l.width||25,v=+l.height||b,x=(l.orientation||"vertical")==="horizontal";let y=l.color_stops;const _=u.append("g"),S=_.append("g"),$=_.append("g");let w=0;if(l.tick_labels){let T;x?T=[0,b*y.length-1]:T=[v*y.length-1,0];const M=au().domain(qo(l.tick_labels)).range(T),P=(x?X5:Av)(M).tickSize(3).tickValues(l.tick_labels).tickFormat(C=>C);$.call(P).attr("class","lz-axis"),w=$.node().getBoundingClientRect().height}x?($.attr("transform",`translate(0, ${w})`),S.attr("transform",`translate(0, ${w})`)):(_.attr("transform","translate(5, 0)"),$.attr("transform",`translate(${b}, 0)`)),x||(y=y.slice(),y.reverse());for(let T=0;T<y.length;T++){const M=y[T],P=x?`translate(${b*T}, 0)`:`translate(0, ${v*T})`;S.append("rect").attr("class",l.class||"").attr("stroke","black").attr("transform",P).attr("stroke-width",.5).attr("width",b).attr("height",v).attr("fill",M).call(xn,l.style||{})}if(!x&&l.label)throw new Error("Legend labels not supported for vertical ribbons (use a separate legend item as text instead)");d=b*y.length+t,f+=w}else if(p){const b=+l.size||40,v=Math.ceil(Math.sqrt(b/Math.PI));u.append("path").attr("class",l.class||"").attr("d",Lb().size(b).type(p)).attr("transform",`translate(${v}, ${v+t/2})`).attr("fill",l.color||{}).call(xn,l.style||{}),d=2*v+t,f=Math.max(2*v+t/2,f),i=Math.max(i,2*v+t)}u.append("text").attr("text-anchor","left").attr("class","lz-label").attr("x",d).attr("y",f).style("font-size",c).text(l.label);const g=u.node().getBoundingClientRect();if(this.layout.orientation==="vertical")r+=g.height+t,i=0;else{const b=this.layout.origin.x+n+g.width;n>t&&b>this.parent.parent.layout.width&&(r+=i,n=t,u.attr("transform",`translate(${n}, ${r})`)),n+=g.width+3*t}this.elements.push(u)})});const o=this.elements_group.node().getBoundingClientRect();return this.layout.width=o.width+2*this.layout.padding,this.layout.height=o.height+2*this.layout.padding,this.background_rect.attr("width",this.layout.width).attr("height",this.layout.height),this.selector.style("visibility",this.layout.hidden?"hidden":"visible"),this.position()}position(){if(!this.selector)return this;const t=this.selector.node().getBoundingClientRect();isNaN(+this.layout.pad_from_bottom)||(this.layout.origin.y=this.parent.layout.height-t.height-+this.layout.pad_from_bottom),isNaN(+this.layout.pad_from_right)||(this.layout.origin.x=this.parent.parent.layout.width-t.width-+this.layout.pad_from_right),this.selector.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`)}hide(){this.layout.hidden=!0,this.render()}show(){this.layout.hidden=!1,this.render()}}const tK={id:"",tag:"custom_data_type",title:{text:"",style:{},x:10,y:22},y_index:null,min_height:1,height:1,origin:{x:0,y:null},margin:{top:0,right:0,bottom:0,left:0},background_click:"clear_selections",toolbar:{widgets:[]},cliparea:{height:0,width:0,origin:{x:0,y:0}},axes:{x:{},y1:{},y2:{}},legend:null,interaction:{drag_background_to_pan:!1,drag_x_ticks_to_scale:!1,drag_y1_ticks_to_scale:!1,drag_y2_ticks_to_scale:!1,scroll_to_zoom:!1,x_linked:!1,y1_linked:!1,y2_linked:!1},show_loading_indicator:!0,data_layers:[]};class ad{constructor(t,n){if(typeof t!="object")throw new Error("Unable to create panel, invalid layout");if(this.parent=n||null,this.parent_plot=n,typeof t.id!="string"||!t.id)throw new Error('Panel layouts must specify "id"');if(this.parent&&typeof this.parent.panels[t.id]<"u")throw new Error(`Cannot create panel with id [${t.id}]; panel with that id already exists`);this.id=t.id,this._initialized=!1,this._layout_idx=null,this.svg={},this.layout=qt(t||{},tK),this.parent?(this.state=this.parent.state,this._state_id=this.id,this.state[this._state_id]=this.state[this._state_id]||{}):(this.state=null,this._state_id=null),this.data_layers={},this._data_layer_ids_by_z_index=[],this._data_promises=[],this.x_scale=null,this.y1_scale=null,this.y2_scale=null,this.x_extent=null,this.y1_extent=null,this.y2_extent=null,this.x_ticks=[],this.y1_ticks=[],this.y2_ticks=[],this._zoom_timeout=null,this._event_hooks={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n,r){if(r=r||!1,typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);typeof n=="boolean"&&arguments.length===2&&(r=n,n=null);const o={sourceID:this.getBaseId(),target:this,data:n||null};return this._event_hooks[t]&&this._event_hooks[t].forEach(a=>{a.call(this,o)}),r&&this.parent&&this.parent.emit(t,o),this}setTitle(t){if(typeof this.layout.title=="string"){const n=this.layout.title;this.layout.title={text:n,x:0,y:0,style:{}}}return typeof t=="string"?this.layout.title.text=t:typeof t=="object"&&t!==null&&(this.layout.title=qt(t,this.layout.title)),this.layout.title.text.length?this.title.attr("display",null).attr("x",parseFloat(this.layout.title.x)).attr("y",parseFloat(this.layout.title.y)).text(this.layout.title.text).call(xn,this.layout.title.style):this.title.attr("display","none"),this}addDataLayer(t){if(typeof t!="object"||typeof t.id!="string"||!t.id.length)throw new Error("Invalid data layer layout");if(typeof this.data_layers[t.id]<"u")throw new Error(`Cannot create data_layer with id '${t.id}'; data layer with that id already exists in the panel`);if(typeof t.type!="string")throw new Error("Invalid data layer type");typeof t.y_axis=="object"&&(typeof t.y_axis.axis>"u"||![1,2].includes(t.y_axis.axis))&&(t.y_axis.axis=1);const n=Xb.create(t.type,t,this);if(this.data_layers[n.id]=n,n.layout.z_index!==null&&!isNaN(n.layout.z_index)&&this._data_layer_ids_by_z_index.length>0)n.layout.z_index<0&&(n.layout.z_index=Math.max(this._data_layer_ids_by_z_index.length+n.layout.z_index,0)),this._data_layer_ids_by_z_index.splice(n.layout.z_index,0,n.id),this._data_layer_ids_by_z_index.forEach((i,o)=>{this.data_layers[i].layout.z_index=o});else{const i=this._data_layer_ids_by_z_index.push(n.id);this.data_layers[n.id].layout.z_index=i-1}let r=null;return this.layout.data_layers.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.data_layers.push(this.data_layers[n.id].layout)-1),this.data_layers[n.id]._layout_idx=r,this.data_layers[n.id]}removeDataLayer(t){const n=this.data_layers[t];if(!n)throw new Error(`Unable to remove data layer, ID not found: ${t}`);return n.destroyAllTooltips(),n.svg.container&&n.svg.container.remove(),this.layout.data_layers.splice(n._layout_idx,1),delete this.state[n._state_id],delete this.data_layers[t],this._data_layer_ids_by_z_index.splice(this._data_layer_ids_by_z_index.indexOf(t),1),this.applyDataLayerZIndexesToDataLayerLayouts(),this.layout.data_layers.forEach((r,i)=>{this.data_layers[r.id]._layout_idx=i}),this}clearSelections(){return this._data_layer_ids_by_z_index.forEach(t=>{this.data_layers[t].setAllElementStatus("selected",!1)}),this}render(){this.svg.container.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`),this.svg.clipRect.attr("width",this.parent_plot.layout.width).attr("height",this.layout.height);const{cliparea:t}=this.layout,{margin:n}=this.layout;this.inner_border.attr("x",n.left).attr("y",n.top).attr("width",this.parent_plot.layout.width-(n.left+n.right)).attr("height",this.layout.height-(n.top+n.bottom)),this.layout.inner_border&&this.inner_border.style("stroke-width",1).style("stroke",this.layout.inner_border),this.setTitle(),this.generateExtents();const r=function(l,u){const c=Math.pow(-10,u),d=Math.pow(-10,-3),f=Math.pow(10,-3),h=Math.pow(10,u);return l===1/0&&(l=h),l===-1/0&&(l=c),l===0&&(l=f),l>0&&(l=Math.max(Math.min(l,h),f)),l<0&&(l=Math.max(Math.min(l,d),c)),l},i={},o=this.layout.axes;if(this.x_extent){const l={start:0,end:this.layout.cliparea.width};o.x.range&&(l.start=o.x.range.start||l.start,l.end=o.x.range.end||l.end),i.x=[l.start,l.end],i.x_shifted=[l.start,l.end]}if(this.y1_extent){const l={start:t.height,end:0};o.y1.range&&(l.start=o.y1.range.start||l.start,l.end=o.y1.range.end||l.end),i.y1=[l.start,l.end],i.y1_shifted=[l.start,l.end]}if(this.y2_extent){const l={start:t.height,end:0};o.y2.range&&(l.start=o.y2.range.start||l.start,l.end=o.y2.range.end||l.end),i.y2=[l.start,l.end],i.y2_shifted=[l.start,l.end]}let{_interaction:a}=this.parent;const s=a.dragging;if(a.panel_id&&(a.panel_id===this.id||a.linked_panel_ids.includes(this.id))){let l,u=null;if(a.zooming&&typeof this.x_scale=="function"){const c=Math.abs(this.x_extent[1]-this.x_extent[0]),d=Math.round(this.x_scale.invert(i.x_shifted[1]))-Math.round(this.x_scale.invert(i.x_shifted[0]));let f=a.zooming.scale;const h=Math.floor(d*(1/f));f<1&&!isNaN(this.parent.layout.max_region_scale)?f=1/(Math.min(h,this.parent.layout.max_region_scale)/d):f>1&&!isNaN(this.parent.layout.min_region_scale)&&(f=1/(Math.max(h,this.parent.layout.min_region_scale)/d));const p=Math.floor(c*f);l=a.zooming.center-n.left-this.layout.origin.x;const g=l/t.width,b=Math.max(Math.floor(this.x_scale.invert(i.x_shifted[0])-(p-d)*g),1);i.x_shifted=[this.x_scale(b),this.x_scale(b+p)]}else if(s)switch(s.method){case"background":i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x;break;case"x_tick":Ce&&Ce.shiftKey?(i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x):(l=s.start_x-n.left-this.layout.origin.x,u=r(l/(l+s.dragged_x),3),i.x_shifted[0]=0,i.x_shifted[1]=Math.max(t.width*(1/u),1));break;case"y1_tick":case"y2_tick":{const c=`y${s.method[1]}_shifted`;Ce&&Ce.shiftKey?(i[c][0]=t.height+s.dragged_y,i[c][1]=+s.dragged_y):(l=t.height-(s.start_y-n.top-this.layout.origin.y),u=r(l/(l-s.dragged_y),3),i[c][0]=t.height,i[c][1]=t.height-t.height*(1/u))}}}if(["x","y1","y2"].forEach(l=>{this[`${l}_extent`]&&(this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[`${l}_shifted`]),this[`${l}_extent`]=[this[`${l}_scale`].invert(i[l][0]),this[`${l}_scale`].invert(i[l][1])],this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[l]),this.renderAxis(l))}),this.layout.interaction.scroll_to_zoom){const l=()=>{if(!(Ce.shiftKey||Ce.altKey)){this.parent._canInteract(this.id)&&this.loader.show("Press <tt>[SHIFT]</tt> or <tt>[ALT]</tt> while scrolling to zoom").hide(1e3);return}if(Ce.preventDefault(),!this.parent._canInteract(this.id))return;const u=lr(this.svg.container.node()),c=Math.max(-1,Math.min(1,Ce.wheelDelta||-Ce.detail||-Ce.deltaY));c!==0&&(this.parent._interaction={panel_id:this.id,linked_panel_ids:this.getLinkedPanelIds("x"),zooming:{scale:c<1?.9:1.1,center:u[0]}},this.render(),a=this.parent._interaction,a.linked_panel_ids.forEach(d=>{this.parent.panels[d].render()}),this._zoom_timeout!==null&&clearTimeout(this._zoom_timeout),this._zoom_timeout=setTimeout(()=>{this.parent._interaction={},this.parent.applyState({start:this.x_extent[0],end:this.x_extent[1]})},500))};this.svg.container.on("wheel.zoom",l).on("mousewheel.zoom",l).on("DOMMouseScroll.zoom",l)}return this._data_layer_ids_by_z_index.forEach(l=>{this.data_layers[l].draw().render()}),this.legend&&this.legend.render(),this}addBasicLoader(t=!0){return this.layout.show_loading_indicator&&this._initialized?this:(t&&this.loader.show("Loading...").animate(),this.on("data_requested",()=>{this.loader.show("Loading...").animate()}),this.on("data_rendered",()=>{this.loader.hide()}),this.layout.show_loading_indicator=!0,this)}applyDataLayerZIndexesToDataLayerLayouts(){this._data_layer_ids_by_z_index.forEach((t,n)=>{this.data_layers[t].layout.z_index=n})}getBaseId(){return`${this.parent.id}.${this.id}`}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.layout.origin.x,y:t.y+this.layout.origin.y}}initializeLayout(){return this.setDimensions(),this.setOrigin(),this.setMargin(),this.x_range=[0,this.layout.cliparea.width],this.y1_range=[this.layout.cliparea.height,0],this.y2_range=[this.layout.cliparea.height,0],["x","y1","y2"].forEach(t=>{const n=this.layout.axes[t];!Object.keys(n).length||n.render===!1?n.render=!1:(n.render=!0,n.label=n.label||null)}),this.layout.data_layers.forEach(t=>{this.addDataLayer(t)}),this}setDimensions(t,n){const r=this.layout;return typeof t<"u"&&typeof n<"u"&&!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0&&(this.parent.layout.width=Math.round(+t),r.height=Math.max(Math.round(+n),r.min_height)),r.cliparea.width=Math.max(this.parent_plot.layout.width-(r.margin.left+r.margin.right),0),r.cliparea.height=Math.max(r.height-(r.margin.top+r.margin.bottom),0),this.svg.clipRect&&this.svg.clipRect.attr("width",this.parent.layout.width).attr("height",r.height),this._initialized&&(this.render(),this.curtain.update(),this.loader.update(),this.toolbar.update(),this.legend&&this.legend.position()),this}setOrigin(t,n){return!isNaN(t)&&t>=0&&(this.layout.origin.x=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(this.layout.origin.y=Math.max(Math.round(+n),0)),this._initialized&&this.render(),this}setMargin(t,n,r,i){let o;const{cliparea:a,margin:s}=this.layout;return!isNaN(t)&&t>=0&&(s.top=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(s.right=Math.max(Math.round(+n),0)),!isNaN(r)&&r>=0&&(s.bottom=Math.max(Math.round(+r),0)),!isNaN(i)&&i>=0&&(s.left=Math.max(Math.round(+i),0)),s.top+s.bottom>this.layout.height&&(o=Math.floor((s.top+s.bottom-this.layout.height)/2),s.top-=o,s.bottom-=o),s.left+s.right>this.parent_plot.layout.width&&(o=Math.floor((s.left+s.right-this.parent_plot.layout.width)/2),s.left-=o,s.right-=o),["top","right","bottom","left"].forEach(l=>{s[l]=Math.max(s[l],0)}),a.width=Math.max(this.parent_plot.layout.width-(s.left+s.right),0),a.height=Math.max(this.layout.height-(s.top+s.bottom),0),a.origin.x=s.left,a.origin.y=s.top,this._initialized&&this.render(),this}initialize(){const t=this.getBaseId();this.svg.container=this.parent.svg.append("g").attr("id",`${t}.panel_container`).attr("transform",`translate(${this.layout.origin.x||0}, ${this.layout.origin.y||0})`);const n=this.svg.container.append("clipPath").attr("id",`${t}.clip`);if(this.svg.clipRect=n.append("rect").attr("width",this.parent_plot.layout.width).attr("height",this.layout.height),this.svg.group=this.svg.container.append("g").attr("id",`${t}.panel`).attr("clip-path",`url(#${t}.clip)`),this.curtain=K6.call(this),this.loader=Z6.call(this),this.layout.show_loading_indicator&&this.addBasicLoader(!1),this.toolbar=new Q6(this),this.inner_border=this.svg.group.append("rect").attr("class","lz-panel-background").on("click",()=>{this.layout.background_click==="clear_selections"&&this.clearSelections()}),this.title=this.svg.group.append("text").attr("class","lz-panel-title"),typeof this.layout.title<"u"&&this.setTitle(),this.svg.x_axis=this.svg.group.append("g").attr("id",`${t}.x_axis`).attr("class","lz-x lz-axis"),this.layout.axes.x.render&&(this.svg.x_axis_label=this.svg.x_axis.append("text").attr("class","lz-x lz-axis lz-label").attr("text-anchor","middle")),this.svg.y1_axis=this.svg.group.append("g").attr("id",`${t}.y1_axis`).attr("class","lz-y lz-y1 lz-axis"),this.layout.axes.y1.render&&(this.svg.y1_axis_label=this.svg.y1_axis.append("text").attr("class","lz-y1 lz-axis lz-label").attr("text-anchor","middle")),this.svg.y2_axis=this.svg.group.append("g").attr("id",`${t}.y2_axis`).attr("class","lz-y lz-y2 lz-axis"),this.layout.axes.y2.render&&(this.svg.y2_axis_label=this.svg.y2_axis.append("text").attr("class","lz-y2 lz-axis lz-label").attr("text-anchor","middle")),this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].initialize()}),this.legend=null,this.layout.legend&&(this.legend=new eK(this)),this.layout.interaction.drag_background_to_pan){const r=`.${this.parent.id}.${this.id}.interaction.drag`,i=()=>this.parent.startDrag(this,"background");this.svg.container.select(".lz-panel-background").on(`mousedown${r}.background`,i).on(`touchstart${r}.background`,i)}return this}resortDataLayers(){const t=[];this._data_layer_ids_by_z_index.forEach(n=>{t.push(this.data_layers[n].layout.z_index)}),this.svg.group.selectAll("g.lz-data_layer-container").data(t).sort(Sr),this.applyDataLayerZIndexesToDataLayerLayouts()}getLinkedPanelIds(t){t=t||null;const n=[];return!["x","y1","y2"].includes(t)||!this.layout.interaction[`${t}_linked`]||this.parent._panel_ids_by_y_index.forEach(r=>{r!==this.id&&this.parent.panels[r].layout.interaction[`${t}_linked`]&&n.push(r)}),n}moveUp(){const{parent:t}=this,n=this.layout.y_index;return t._panel_ids_by_y_index[n-1]&&(t._panel_ids_by_y_index[n]=t._panel_ids_by_y_index[n-1],t._panel_ids_by_y_index[n-1]=this.id,t.applyPanelYIndexesToPanelLayouts(),t.positionPanels()),this}moveDown(){const{_panel_ids_by_y_index:t}=this.parent;return t[this.layout.y_index+1]&&(t[this.layout.y_index]=t[this.layout.y_index+1],t[this.layout.y_index+1]=this.id,this.parent.applyPanelYIndexesToPanelLayouts(),this.parent.positionPanels()),this}reMap(){this.emit("data_requested"),this._data_promises=[],this.curtain.hide();for(let t in this.data_layers)try{this._data_promises.push(this.data_layers[t].reMap())}catch(n){console.error(n),this.curtain.show(n.message||n)}return Promise.all(this._data_promises).then(()=>{this._initialized=!0,this.render(),this.emit("layout_changed",!0),this.emit("data_rendered")}).catch(t=>{console.error(t),this.curtain.show(t.message||t)})}generateExtents(){["x","y1","y2"].forEach(t=>{this[`${t}_extent`]=null});for(let t in this.data_layers){const n=this.data_layers[t];if(n.layout.x_axis&&!n.layout.x_axis.decoupled&&(this.x_extent=qo((this.x_extent||[]).concat(n.getAxisExtent("x")))),n.layout.y_axis&&!n.layout.y_axis.decoupled){const r=`y${n.layout.y_axis.axis}`;this[`${r}_extent`]=qo((this[`${r}_extent`]||[]).concat(n.getAxisExtent("y")))}}return this.layout.axes.x&&this.layout.axes.x.extent==="state"&&(this.x_extent=[this.state.start,this.state.end]),this}generateTicks(t){if(this.layout.axes[t].ticks){const r=this.layout.axes[t].ticks;if(Array.isArray(r))return r;if(typeof r=="object"){const i=this,o={position:r.position};return this._data_layer_ids_by_z_index.reduce((s,l)=>{const u=i.data_layers[l];return s.concat(u.getTicks(t,o))},[]).map(s=>{let l={};return l=qt(l,r),qt(l,s)})}}return this[`${t}_extent`]?oK(this[`${t}_extent`],"both"):[]}renderAxis(t){if(!["x","y1","y2"].includes(t))throw new Error(`Unable to render axis; invalid axis identifier: ${t}`);const n=this.layout.axes[t].render&&typeof this[`${t}_scale`]=="function"&&!isNaN(this[`${t}_scale`](0));if(this[`${t}_axis`]&&this.svg.container.select(`g.lz-axis.lz-${t}`).style("display",n?null:"none"),!n)return this;const r={x:{position:`translate(${this.layout.margin.left}, ${this.layout.height-this.layout.margin.bottom})`,orientation:"bottom",label_x:this.layout.cliparea.width/2,label_y:this.layout.axes[t].label_offset||0,label_rotate:null},y1:{position:`translate(${this.layout.margin.left}, ${this.layout.margin.top})`,orientation:"left",label_x:-1*(this.layout.axes[t].label_offset||0),label_y:this.layout.cliparea.height/2,label_rotate:-90},y2:{position:`translate(${this.parent_plot.layout.width-this.layout.margin.right}, ${this.layout.margin.top})`,orientation:"right",label_x:this.layout.axes[t].label_offset||0,label_y:this.layout.cliparea.height/2,label_rotate:-90}};this[`${t}_ticks`]=this.generateTicks(t);const i=(s=>{for(let l=0;l<s.length;l++)if(isNaN(s[l]))return!1;return!0})(this[`${t}_ticks`]);let o;switch(r[t].orientation){case"right":o=Av;break;case"left":o=Z5;break;case"bottom":o=K5;break;default:throw new Error("Unrecognized axis orientation")}if(this[`${t}_axis`]=o(this[`${t}_scale`]).tickPadding(3),i)this[`${t}_axis`].tickValues(this[`${t}_ticks`]),this.layout.axes[t].tick_format==="region"&&this[`${t}_axis`].tickFormat(s=>Gb(s,6));else{let s=this[`${t}_ticks`].map(l=>l[t.substr(0,1)]);this[`${t}_axis`].tickValues(s).tickFormat((l,u)=>this[`${t}_ticks`][u].text)}if(this.svg[`${t}_axis`].attr("transform",r[t].position).call(this[`${t}_axis`]),!i){const s=s8(`g#${this.getBaseId().replace(".","\\.")}\\.${t}_axis g.tick`),l=this;s.each(function(u,c){const d=Ue(this).select("text");l[`${t}_ticks`][c].style&&xn(d,l[`${t}_ticks`][c].style),l[`${t}_ticks`][c].transform&&d.attr("transform",l[`${t}_ticks`][c].transform)})}const a=this.layout.axes[t].label||null;return a!==null&&(this.svg[`${t}_axis_label`].attr("x",r[t].label_x).attr("y",r[t].label_y).text(Tl(a,this.state)).attr("fill","currentColor"),r[t].label_rotate!==null&&this.svg[`${t}_axis_label`].attr("transform",`rotate(${r[t].label_rotate} ${r[t].label_x}, ${r[t].label_y})`)),["x","y1","y2"].forEach(s=>{if(this.layout.interaction[`drag_${s}_ticks_to_scale`]){const l=`.${this.parent.id}.${this.id}.interaction.drag`,u=function(){typeof Ue(this).node().focus=="function"&&Ue(this).node().focus();let c=s==="x"?"ew-resize":"ns-resize";Ce&&Ce.shiftKey&&(c="move"),Ue(this).style("font-weight","bold").style("cursor",c).on(`keydown${l}`,u).on(`keyup${l}`,u)};this.svg.container.selectAll(`.lz-axis.lz-${s} .tick text`).attr("tabindex",0).on(`mouseover${l}`,u).on(`mouseout${l}`,function(){Ue(this).style("font-weight","normal").on(`keydown${l}`,null).on(`keyup${l}`,null)}).on(`mousedown${l}`,()=>{this.parent.startDrag(this,`${s}_tick`)})}}),this}scaleHeightToData(t){t=+t||null,t===null&&this._data_layer_ids_by_z_index.forEach(n=>{const r=this.data_layers[n].getAbsoluteDataHeight();+r&&(t===null?t=+r:t=Math.max(t,+r))}),+t&&(t+=+this.layout.margin.top+ +this.layout.margin.bottom,this.setDimensions(this.parent_plot.layout.width,t),this.parent.setDimensions(),this.parent.positionPanels())}setAllElementStatus(t,n){this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].setAllElementStatus(t,n)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;ad.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},ad.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const nK={state:{},width:800,min_width:400,min_region_scale:null,max_region_scale:null,responsive_resize:!1,panels:[],toolbar:{widgets:[]},panel_boundaries:!0,mouse_guide:!0};function rK(e,t){e=e||{},t=t||{};let n=!1,r=null,i;if(typeof e.chr<"u"&&typeof e.start<"u"&&typeof e.end<"u"){if(e.start=Math.max(parseInt(e.start),1),e.end=Math.max(parseInt(e.end),1),isNaN(e.start)&&isNaN(e.end))e.start=1,e.end=1,r=.5,i=0;else if(isNaN(e.start)||isNaN(e.end))r=e.start||e.end,i=0,e.start=isNaN(e.start)?e.end:e.start,e.end=isNaN(e.end)?e.start:e.end;else{if(r=Math.round((e.start+e.end)/2),i=e.end-e.start,i<0){const o=e.start;e.end=e.start,e.start=o,i=e.end-e.start}r<0&&(e.start=1,e.end=1,i=0)}n=!0}return t.min_region_scale&&n&&i<t.min_region_scale&&(e.start=Math.max(r-Math.floor(t.min_region_scale/2),1),e.end=e.start+t.min_region_scale),t.max_region_scale&&n&&i>t.max_region_scale&&(e.start=Math.max(r-Math.floor(t.max_region_scale/2),1),e.end=e.start+t.max_region_scale),e}class iK{constructor(t,n,r){this._initialized=!1,this.parent_plot=this,this.id=t,this.container=null,this.svg=null,this.panels={},this._panel_ids_by_y_index=[],this._remap_promises=[],this.layout=r,qt(this.layout,nK),this._base_layout=at(this.layout),this.state=this.layout.state,this.lzd=new BX(n),this._external_listeners=new Map,this._event_hooks={},this._interaction={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n){const r=this._event_hooks[t];if(typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);if(!r&&!this._event_hooks.any_lz_event)return this;const i=this.getBaseId();let o;if(n&&n.sourceID?o=n:o={sourceID:i,target:this,data:n||null},r&&r.forEach(a=>{a.call(this,o)}),t!=="any_lz_event"){const a=Object.assign({event_name:t},o);this.emit("any_lz_event",a)}return this}addPanel(t){if(typeof t!="object")throw new Error("Invalid panel layout");const n=new ad(t,this);if(this.panels[n.id]=n,n.layout.y_index!==null&&!isNaN(n.layout.y_index)&&this._panel_ids_by_y_index.length>0)n.layout.y_index<0&&(n.layout.y_index=Math.max(this._panel_ids_by_y_index.length+n.layout.y_index,0)),this._panel_ids_by_y_index.splice(n.layout.y_index,0,n.id),this.applyPanelYIndexesToPanelLayouts();else{const i=this._panel_ids_by_y_index.push(n.id);this.panels[n.id].layout.y_index=i-1}let r=null;return this.layout.panels.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.panels.push(this.panels[n.id].layout)-1),this.panels[n.id]._layout_idx=r,this._initialized&&(this.positionPanels(),this.panels[n.id].initialize(),this.panels[n.id].reMap(),this.setDimensions(this.layout.width,this._total_height)),this.panels[n.id]}clearPanelData(t,n){n=n||"wipe";let r;return t?r=[t]:r=Object.keys(this.panels),r.forEach(i=>{this.panels[i]._data_layer_ids_by_z_index.forEach(o=>{const a=this.panels[i].data_layers[o];a.destroyAllTooltips(),delete a._layer_state,delete this.layout.state[a._state_id],n==="reset"&&a._setDefaultState()})}),this}removePanel(t){const n=this.panels[t];if(!n)throw new Error(`Unable to remove panel, ID not found: ${t}`);return this._panel_boundaries.hide(),this.clearPanelData(t),n.loader.hide(),n.toolbar.destroy(!0),n.curtain.hide(),n.svg.container&&n.svg.container.remove(),this.layout.panels.splice(n._layout_idx,1),delete this.panels[t],delete this.layout.state[t],this.layout.panels.forEach((r,i)=>{this.panels[r.id]._layout_idx=i}),this._panel_ids_by_y_index.splice(this._panel_ids_by_y_index.indexOf(t),1),this.applyPanelYIndexesToPanelLayouts(),this._initialized&&(this.positionPanels(),this.setDimensions(this.layout.width,this._total_height)),this.emit("panel_removed",t),this}refresh(){return this.applyState()}subscribeToData(t,n){const{from_layer:r,namespace:i,data_operations:o,onerror:a}=t,s=a||function(d){console.error("An error occurred while acting on an external callback",d)};if(r){const d=`${this.getBaseId()}.`,f=r.startsWith(d)?r:`${d}${r}`;let h=!1;for(let g of Object.values(this.panels))if(h=Object.values(g.data_layers).some(b=>b.getBaseId()===f),h)break;if(!h)throw new Error(`Could not subscribe to unknown data layer ${f}`);const p=g=>{if(g.data.layer===f)try{n(g.data.content,this)}catch(b){s(b)}};return this.on("data_from_layer",p),p}if(!i)throw new Error("subscribeToData must specify the desired data: either 'from_layer' or 'namespace' option");const[l,u]=this.lzd.config_to_sources(i,o),c=()=>{try{this.lzd.getData(this.state,l,u).then(d=>n(d,this)).catch(s)}catch(d){s(d)}};return this.on("data_rendered",c),c}applyState(t){if(t=t||{},typeof t!="object")throw new Error(`applyState only accepts an object; ${typeof t} given`);let n={chr:this.state.chr,start:this.state.start,end:this.state.end};for(let r in t)n[r]=t[r];n=rK(n,this.layout);for(let r in n)this.state[r]=n[r];this.emit("data_requested"),this._remap_promises=[],this.loading_data=!0;for(let r in this.panels)this._remap_promises.push(this.panels[r].reMap());return Promise.all(this._remap_promises).catch(r=>{console.error(r),this.curtain.show(r.message||r),this.loading_data=!1}).then(()=>{this.toolbar.update(),this._panel_ids_by_y_index.forEach(s=>{const l=this.panels[s];l.toolbar.update(),l._data_layer_ids_by_z_index.forEach(u=>{l.data_layers[u].applyAllElementStatus()})}),this.emit("layout_changed"),this.emit("data_rendered"),this.emit("state_changed",t);const{chr:r,start:i,end:o}=this.state;Object.keys(t).some(s=>["chr","start","end"].includes(s))&&this.emit("region_changed",{chr:r,start:i,end:o}),this.loading_data=!1})}trackExternalListener(t,n,r){this._external_listeners.has(t)||this._external_listeners.set(t,new Map);const i=this._external_listeners.get(t),o=i.get(n)||[];o.includes(r)||o.push(r),i.set(n,o)}destroy(){for(let[n,r]of this._external_listeners.entries())for(let[i,o]of r)for(let a of o)n.removeEventListener(i,a);const t=this.svg.node().parentNode;if(!t)throw new Error("Plot has already been removed");for(;t.lastElementChild;)t.removeChild(t.lastElementChild);t.outerHTML=t.outerHTML,this._initialized=!1,this.svg=null,this.panels=null}mutateLayout(){Object.values(this.panels).forEach(t=>{Object.values(t.data_layers).forEach(n=>n.mutateLayout())})}_canInteract(t){t=t||null;const{_interaction:n}=this;return t?(typeof n.panel_id>"u"||n.panel_id===t)&&!this.loading_data:!(n.dragging||n.zooming||this.loading_data)}_getPageOrigin(){const t=this.svg.node().getBoundingClientRect();let n=document.documentElement.scrollLeft||document.body.scrollLeft,r=document.documentElement.scrollTop||document.body.scrollTop,i=this.svg.node();for(;i.parentNode!==null;)if(i=i.parentNode,i!==document&&Ue(i).style("position")!=="static"){n=-1*i.getBoundingClientRect().left,r=-1*i.getBoundingClientRect().top;break}return{x:n+t.left,y:r+t.top,width:t.width,height:t.height}}getContainerOffset(){const t={top:0,left:0};let n=this.container.offsetParent||null;for(;n!==null;)t.top+=n.offsetTop,t.left+=n.offsetLeft,n=n.offsetParent||null;return t}applyPanelYIndexesToPanelLayouts(){this._panel_ids_by_y_index.forEach((t,n)=>{this.panels[t].layout.y_index=n})}getBaseId(){return this.id}rescaleSVG(){const t=this.svg.node().getBoundingClientRect();return this.setDimensions(t.width,t.height),this}initializeLayout(){if(isNaN(this.layout.width)||this.layout.width<=0)throw new Error("Plot layout parameter `width` must be a positive number");return this.layout.responsive_resize=!!this.layout.responsive_resize,this.layout.panels.forEach(t=>{this.addPanel(t)}),this}setDimensions(t,n){if(!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0){const i=n/this._total_height;this.layout.width=Math.max(Math.round(+t),this.layout.min_width),this.layout.responsive_resize&&this.svg&&(this.layout.width=Math.max(this.svg.node().parentNode.getBoundingClientRect().width,this.layout.min_width));let o=0;this._panel_ids_by_y_index.forEach(a=>{const s=this.panels[a],l=this.layout.width,u=s.layout.height*i;s.setDimensions(l,u),s.setOrigin(0,o),o+=u,s.toolbar.update()})}const r=this._total_height;return this.svg!==null&&(this.svg.attr("viewBox",`0 0 ${this.layout.width} ${r}`),this.svg.attr("width",this.layout.width).attr("height",r)),this._initialized&&(this._panel_boundaries.position(),this.toolbar.update(),this.curtain.update(),this.loader.update()),this.emit("layout_changed")}positionPanels(){const t={left:0,right:0};for(let r of Object.values(this.panels))r.layout.interaction.x_linked&&(t.left=Math.max(t.left,r.layout.margin.left),t.right=Math.max(t.right,r.layout.margin.right));let n=0;return this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r],o=i.layout;if(i.setOrigin(0,n),n+=this.panels[r].layout.height,o.interaction.x_linked){const a=Math.max(t.left-o.margin.left,0)+Math.max(t.right-o.margin.right,0);o.width+=a,o.margin.left=t.left,o.margin.right=t.right,o.cliparea.origin.x=t.left}}),this.setDimensions(),this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r];i.setDimensions(this.layout.width,i.layout.height)}),this}initialize(){if(this.layout.responsive_resize){Ue(this.container).classed("lz-container-responsive",!0);const u=()=>window.requestAnimationFrame(()=>this.rescaleSVG());if(window.addEventListener("resize",u),this.trackExternalListener(window,"resize",u),typeof IntersectionObserver<"u"){const d={root:document.documentElement,threshold:.9};new IntersectionObserver((h,p)=>{h.some(g=>g.intersectionRatio>0)&&this.rescaleSVG()},d).observe(this.container)}const c=()=>this.setDimensions();window.addEventListener("load",c),this.trackExternalListener(window,"load",c)}if(this.layout.mouse_guide){const u=this.svg.append("g").attr("class","lz-mouse_guide").attr("id",`${this.id}.mouse_guide`),c=u.append("rect").attr("class","lz-mouse_guide-vertical").attr("x",-1),d=u.append("rect").attr("class","lz-mouse_guide-horizontal").attr("y",-1);this._mouse_guide={svg:u,vertical:c,horizontal:d}}this.curtain=K6.call(this),this.loader=Z6.call(this),this._panel_boundaries={parent:this,hide_timeout:null,showing:!1,dragging:!1,selectors:[],corner_selector:null,show:function(){if(!this.showing&&!this.parent.curtain.showing){this.showing=!0,this.parent._panel_ids_by_y_index.forEach((d,f)=>{const h=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-boundary").attr("title","Resize panel");h.append("span");const p=O0();p.on("start",()=>{this.dragging=!0}),p.on("end",()=>{this.dragging=!1}),p.on("drag",()=>{const g=this.parent.panels[this.parent._panel_ids_by_y_index[f]],b=g.layout.height;g.setDimensions(this.parent.layout.width,g.layout.height+Ce.dy);const v=g.layout.height-b;this.parent._panel_ids_by_y_index.forEach((x,y)=>{const _=this.parent.panels[this.parent._panel_ids_by_y_index[y]];y>f&&(_.setOrigin(_.layout.origin.x,_.layout.origin.y+v),_.toolbar.position())}),this.parent.positionPanels(),this.position()}),h.call(p),this.parent._panel_boundaries.selectors.push(h)});const u=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-corner-boundary").attr("title","Resize plot");u.append("span").attr("class","lz-panel-corner-boundary-outer"),u.append("span").attr("class","lz-panel-corner-boundary-inner");const c=O0();c.on("start",()=>{this.dragging=!0}),c.on("end",()=>{this.dragging=!1}),c.on("drag",()=>{this.parent.setDimensions(this.parent.layout.width+Ce.dx,this.parent._total_height+Ce.dy)}),u.call(c),this.parent._panel_boundaries.corner_selector=u}return this.position()},position:function(){if(!this.showing)return this;const u=this.parent._getPageOrigin();this.selectors.forEach((f,h)=>{const p=this.parent.panels[this.parent._panel_ids_by_y_index[h]],g=p._getPageOrigin(),b=u.x,v=g.y+p.layout.height-12,x=this.parent.layout.width-1;f.style("top",`${v}px`).style("left",`${b}px`).style("width",`${x}px`),f.select("span").style("width",`${x}px`)});const c=10,d=16;return this.corner_selector.style("top",`${u.y+this.parent._total_height-c-d}px`).style("left",`${u.x+this.parent.layout.width-c-d}px`),this},hide:function(){return this.showing?(this.showing=!1,this.selectors.forEach(u=>{u.remove()}),this.selectors=[],this.corner_selector.remove(),this.corner_selector=null,this):this}},this.layout.panel_boundaries&&Ue(this.svg.node().parentNode).on(`mouseover.${this.id}.panel_boundaries`,()=>{clearTimeout(this._panel_boundaries.hide_timeout),this._panel_boundaries.show()}).on(`mouseout.${this.id}.panel_boundaries`,()=>{this._panel_boundaries.hide_timeout=setTimeout(()=>{this._panel_boundaries.hide()},300)}),this.toolbar=new Q6(this).show();for(let u in this.panels)this.panels[u].initialize();const t=`.${this.id}`;if(this.layout.mouse_guide){const u=()=>{this._mouse_guide.vertical.attr("x",-1),this._mouse_guide.horizontal.attr("y",-1)},c=()=>{const d=lr(this.svg.node());this._mouse_guide.vertical.attr("x",d[0]),this._mouse_guide.horizontal.attr("y",d[1])};this.svg.on(`mouseout${t}-mouse_guide`,u).on(`touchleave${t}-mouse_guide`,u).on(`mousemove${t}-mouse_guide`,c)}const n=()=>{this.stopDrag()},r=()=>{const{_interaction:u}=this;if(u.dragging){const c=lr(this.svg.node());Ce&&Ce.preventDefault(),u.dragging.dragged_x=c[0]-u.dragging.start_x,u.dragging.dragged_y=c[1]-u.dragging.start_y,this.panels[u.panel_id].render(),u.linked_panel_ids.forEach(d=>{this.panels[d].render()})}};this.svg.on(`mouseup${t}`,n).on(`touchend${t}`,n).on(`mousemove${t}`,r).on(`touchmove${t}`,r);const o=Ue("body").node();o&&(o.addEventListener("mouseup",n),o.addEventListener("touchend",n),this.trackExternalListener(o,"mouseup",n),this.trackExternalListener(o,"touchend",n)),this.on("match_requested",u=>{const c=u.data,d=c.active?c.value:null,f=u.target.id;Object.values(this.panels).forEach(h=>{h.id!==f&&Object.values(h.data_layers).forEach(p=>p.destroyAllTooltips(!1))}),this.applyState({lz_match_value:d})}),this._initialized=!0;const a=this.svg.node().getBoundingClientRect(),s=a.width?a.width:this.layout.width,l=a.height?a.height:this._total_height;return this.setDimensions(s,l),this}startDrag(t,n){t=t||null,n=n||null;let r=null;switch(n){case"background":case"x_tick":r="x";break;case"y1_tick":r="y1";break;case"y2_tick":r="y2";break}if(!(t instanceof ad)||!r||!this._canInteract())return this.stopDrag();const i=lr(this.svg.node());return this._interaction={panel_id:t.id,linked_panel_ids:t.getLinkedPanelIds(r),dragging:{method:n,start_x:i[0],start_y:i[1],dragged_x:0,dragged_y:0,axis:r}},this.svg.style("cursor","all-scroll"),this}stopDrag(){const{_interaction:t}=this;if(!t.dragging)return this;if(typeof this.panels[t.panel_id]!="object")return this._interaction={},this;const n=this.panels[t.panel_id],r=(i,o,a)=>{n._data_layer_ids_by_z_index.forEach(s=>{const l=n.data_layers[s].layout[`${i}_axis`];l.axis===o&&(l.floor=a[0],l.ceiling=a[1],delete l.lower_buffer,delete l.upper_buffer,delete l.min_extent,delete l.ticks)})};switch(t.dragging.method){case"background":case"x_tick":t.dragging.dragged_x!==0&&(r("x",1,n.x_extent),this.applyState({start:n.x_extent[0],end:n.x_extent[1]}));break;case"y1_tick":case"y2_tick":if(t.dragging.dragged_y!==0){const i=parseInt(t.dragging.method[1]);r("y",i,n[`y${i}_extent`])}break}return this._interaction={},this.svg.style("cursor",null),this}get _total_height(){return this.layout.panels.reduce((t,n)=>n.height+t,0)}}function Gb(e,t,n){const r={0:"",3:"K",6:"M",9:"G"};if(n=n||!1,isNaN(t)||t===null){const l=Math.log(e)/Math.LN10;t=Math.min(Math.max(l-l%3,0),9)}const i=t-Math.floor((Math.log(e)/Math.LN10).toFixed(t+3)),o=Math.min(Math.max(t,0),2),a=Math.min(Math.max(i,o),12);let s=`${(e/Math.pow(10,t)).toFixed(a)}`;return n&&typeof r[t]<"u"&&(s+=` ${r[t]}b`),s}function Ws(e){let t=e.toUpperCase();t=t.replace(/,/g,"");const n=/([KMG])[B]*$/,r=n.exec(t);let i=1;return r&&(r[1]==="M"?i=1e6:r[1]==="G"?i=1e9:i=1e3,t=t.replace(n,"")),t=Number(t)*i,t}function oK(e,t,n){(typeof n>"u"||isNaN(parseInt(n)))&&(n=5),n=+n;const r=n/3,i=.75,o=1.5,a=.5+1.5*o,s=Math.abs(e[0]-e[1]);let l=s/n;Math.log(s)/Math.LN10<-2&&(l=Math.max(Math.abs(s))*i/r);const u=Math.pow(10,Math.floor(Math.log(l)/Math.LN10));let c=0;u<1&&u!==0&&(c=Math.abs(Math.round(Math.log(u)/Math.LN10)));let d=u;2*u-l<o*(l-d)&&(d=2*u,5*u-l<a*(l-d)&&(d=5*u,10*u-l<o*(l-d)&&(d=10*u)));let f=[],h=parseFloat((Math.floor(e[0]/d)*d).toFixed(c));for(;h<e[1];)f.push(h),h+=d,c>0&&(h=parseFloat(h.toFixed(c)));return f.push(h),(typeof t>"u"||["low","high","both","neither"].indexOf(t)===-1)&&(t="neither"),(t==="low"||t==="both")&&f[0]<e[0]&&(f=f.slice(1)),(t==="high"||t==="both")&&f[f.length-1]>e[1]&&f.pop(),f}function Tl(e,t,n){if(typeof t!="object")throw new Error("invalid arguments: data is not an object");if(typeof e!="string")throw new Error("invalid arguments: html is not a string");const r=[],i=/{{(?:(#if )?([\w+_:|]+)|(#else)|(\/if))}}/;for(;e.length>0;){const u=i.exec(e);u?u.index!==0?(r.push({text:e.slice(0,u.index)}),e=e.slice(u.index)):u[1]==="#if "?(r.push({condition:u[2]}),e=e.slice(u[0].length)):u[2]?(r.push({variable:u[2]}),e=e.slice(u[0].length)):u[3]==="#else"?(r.push({branch:"else"}),e=e.slice(u[0].length)):u[4]==="/if"?(r.push({close:"if"}),e=e.slice(u[0].length)):(console.error(`Error tokenizing tooltip when remaining template is ${JSON.stringify(e)} and previous tokens are ${JSON.stringify(r)} and current regex match is ${JSON.stringify([u[1],u[2],u[3]])}`),e=e.slice(u[0].length)):(r.push({text:e}),e="")}const o=function(){const u=r.shift();if(typeof u.text<"u"||u.variable)return u;if(u.condition){let c=u.then=[];for(u.else=[];r.length>0;){if(r[0].close==="if"){r.shift();break}r[0].branch==="else"&&(r.shift(),c=u.else),c.push(o())}return u}else return console.error(`Error making tooltip AST due to unknown token ${JSON.stringify(u)}`),{text:""}},a=[];for(;r.length>0;)a.push(o());const s=function(u){return Object.prototype.hasOwnProperty.call(s.cache,u)||(s.cache[u]=new za(u).resolve(t,n)),s.cache[u]};s.cache={};const l=function(u){if(typeof u.text<"u")return u.text;if(u.variable){try{const c=s(u.variable);if(["string","number","boolean"].indexOf(typeof c)!==-1)return c;if(c===null)return""}catch{console.error(`Error while processing variable ${JSON.stringify(u.variable)}`)}return`{{${u.variable}}}`}else if(u.condition){try{if(s(u.condition))return u.then.map(l).join("");if(u.else)return u.else.map(l).join("")}catch{console.error(`Error while processing condition ${JSON.stringify(u.variable)}`)}return""}else console.error(`Error rendering tooltip due to unknown AST node ${JSON.stringify(u)}`)};return a.map(l).join("")}function aK(e,t,n){if(typeof e>"u")throw new Error("LocusZoom.populate selector not defined");Ue(e).html("");let r;return Ue(e).call(function(i){if(typeof i.node().id>"u"){let o=0;for(;!Ue(`#lz-${o}`).empty();)o++;i.attr("id",`#lz-${o}`)}if(r=new iK(i.node().id,t,n),r.container=i.node(),typeof i.node().dataset<"u"&&typeof i.node().dataset.region<"u"){const o=sK(i.node().dataset.region);Object.keys(o).forEach(function(a){r.state[a]=o[a]})}r.svg=Ue(`div#${r.id}`).append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("id",`${r.id}_svg`).attr("class","lz-locuszoom").call(xn,r.layout.style),r.setDimensions(),r.positionPanels(),r.initialize(),t&&r.refresh()}),r}function sK(e){const t=/^(\w+):([\d,.]+[kmgbKMGB]*)([-+])([\d,.]+[kmgbKMGB]*)$/,n=/^(\w+):([\d,.]+[kmgbKMGB]*)$/;let r=t.exec(e);if(r)if(r[3]==="+"){const i=Ws(r[2]),o=Ws(r[4]);return{chr:r[1],start:i-o,end:i+o}}else return{chr:r[1],start:Ws(r[2]),end:Ws(r[4])};return r=n.exec(e),r?{chr:r[1],position:Ws(r[2])}:null}const pr=new Zi;pr.add("=",(e,t)=>e===t);pr.add("!=",(e,t)=>e!=t);pr.add("<",(e,t)=>e<t);pr.add("<=",(e,t)=>e<=t);pr.add(">",(e,t)=>e>t);pr.add(">=",(e,t)=>e>=t);pr.add("%",(e,t)=>e%t);pr.add("in",(e,t)=>t&&t.includes(e));pr.add("match",(e,t)=>e&&e.includes(t));const e4=(e,t)=>typeof t>"u"||e.field_value!==t?typeof e.else<"u"?e.else:null:e.then,lK=(e,t)=>{const n=e.breaks||[],r=e.values||[];if(typeof t>"u"||t===null||isNaN(+t))return e.null_value?e.null_value:null;const i=n.reduce(function(o,a){return+t<o||+t>=o&&+t<a?o:a});return r[n.indexOf(i)]},uK=(e,t)=>typeof t>"u"||!e.categories.includes(t)?e.null_value?e.null_value:null:e.values[e.categories.indexOf(t)],cK=(e,t,n)=>{const r=e.values;return r[n%r.length]};let fK=(e,t,n)=>{const r=e._cache=e._cache||new Map,i=e.max_cache_size||500;if(r.size>=i&&r.clear(),r.has(t))return r.get(t);let o=0;t=String(t);for(let l=0;l<t.length;l++){let u=t.charCodeAt(l);o=(o<<5)-o+u,o|=0}const a=e.values,s=a[Math.abs(o)%a.length];return r.set(t,s),s};const dK=(e,t)=>{var n=e.breaks||[],r=e.values||[],i=e.null_value?e.null_value:null;if(n.length<2||n.length!==r.length||typeof t>"u"||t===null||isNaN(+t))return i;if(+t<=e.breaks[0])return r[0];if(+t>=e.breaks[e.breaks.length-1])return r[n.length-1];{var o=null;if(n.forEach(function(s,l){l&&n[l-1]<=+t&&n[l]>=+t&&(o=l)}),o===null)return i;const a=(+t-n[o-1])/(n[o]-n[o-1]);return isFinite(a)?ys(r[o-1],r[o])(a):i}};function hK(e,t){if(t===void 0)return null;const{beta_field:n,stderr_beta_field:r,"+":i=null,"-":o=null}=e;if(!n||!r)throw new Error("effect_direction must specify how to find required 'beta' and 'stderr_beta' fields");const a=t[n],s=t[r];if(a!==void 0)if(s!==void 0){if(a-1.96*s>0)return i;if(a+1.96*s<0)return o||null}else{if(a>0)return i;if(a<0)return o}return null}const pK=Object.freeze(Object.defineProperty({__proto__:null,categorical_bin:uK,effect_direction:hK,if_value:e4,interpolate:dK,numerical_bin:lK,ordinal_cycle:cK,stable_choice:fK},Symbol.toStringTag,{value:"Module"})),fh=new Zi;for(let[e,t]of Object.entries(pK))fh.add(e,t);fh.add("if",e4);const gK={id:"",type:"",tag:"custom_data_type",namespace:{},data_operations:[],id_field:"id",filters:null,match:{},x_axis:{},y_axis:{},legend:null,tooltip:{},tooltip_positioning:"horizontal",behaviors:{}};class cr{constructor(t,n){this._initialized=!1,this._layout_idx=null,this.id=null,this._base_id=null,this.parent=n||null,this.svg={},this.parent_plot=null,n&&(this.parent_plot=n.parent),this.layout=qt(t||{},gK),this.layout.id&&(this.id=this.layout.id),this._filter_func=null,this.layout.x_axis!=={}&&typeof this.layout.x_axis.axis!="number"&&(this.layout.x_axis.axis=1),this.layout.y_axis!=={}&&typeof this.layout.y_axis.axis!="number"&&(this.layout.y_axis.axis=1),this._base_layout=at(this.layout),this.state={},this._state_id=null,this._layer_state=null,this._setDefaultState(),this.data=[],this.layout.tooltip&&(this._tooltips={}),this._global_statuses={highlighted:!1,selected:!1,faded:!1,hidden:!1},this._data_contract=new Set,this._entities=new Map,this._dependencies=[],this.mutateLayout()}render(){throw new Error("Method must be implemented")}moveForward(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n+1]&&(t[n]=t[n+1],t[n+1]=this.id,this.parent.resortDataLayers()),this}moveBack(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n-1]&&(t[n]=t[n-1],t[n-1]=this.id,this.parent.resortDataLayers()),this}setElementAnnotation(t,n,r){const i=this.getElementId(t);return this._layer_state.extra_fields[i]||(this._layer_state.extra_fields[i]={}),this._layer_state.extra_fields[i][n]=r,this}setFilter(t){console.warn("The setFilter method is deprecated and will be removed in the future; please use the layout API with a custom filter function instead"),this._filter_func=t}mutateLayout(){if(this.parent_plot){const{namespace:t,data_operations:n}=this.layout;this._data_contract=qb(this.layout,Object.keys(t));const[r,i]=this.parent_plot.lzd.config_to_sources(t,n,this);this._entities=r,this._dependencies=i}}_getDataExtent(t,n){return t=t||this.data,qo(t,r=>+new za(n.field).resolve(r))}getElementId(t){const n=Symbol.for("lzID");if(t[n])return t[n];const r=this.layout.id_field;let i=t[r];if(typeof i>"u"&&/{{[^{}]*}}/.test(r)&&(i=Tl(r,t,{})),i==null)throw new Error("Unable to generate element ID");const o=i.toString().replace(/\W/g,""),a=`${this.getBaseId()}-${o}`.replace(/([:.[\],])/g,"_");return t[n]=a,a}getElementStatusNodeId(t){return null}getElementById(t){const n=Ue(`#${t.replace(/([:.[\],])/g,"\\$1")}`);return!n.empty()&&n.data()&&n.data().length?n.data()[0]:null}applyDataMethods(){const t=this.layout.match&&this.layout.match.receive,n=pr.get(this.layout.match&&this.layout.match.operator||"="),r=this.parent_plot.state.lz_match_value,i=t?new za(t):null;if(this.data.length&&this._data_contract.size){const o=new Set(this._data_contract);for(let a of this.data)if(Object.keys(a).forEach(s=>o.delete(s)),!o.size)break;o.size&&console.debug(`Data layer '${this.getBaseId()}' did not receive all expected fields from retrieved data. Missing fields are: ${[...o]}
|
|
2000
|
+
`)}function u(d){return d.map(c).join(e)}function c(d){return d==null?"":d instanceof Date?PH(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:u,formatValue:c}}var ga=Yd(","),t3=ga.parse,RH=ga.parseRows,zH=ga.format,IH=ga.formatBody,FH=ga.formatRows,BH=ga.formatRow,OH=ga.formatValue,va=Yd(" "),n3=va.parse,NH=va.parseRows,LH=va.format,DH=va.formatBody,HH=va.formatRows,UH=va.formatRow,jH=va.formatValue;function WH(e){for(var t in e){var n=e[t].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))VH&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;e[t]=n}return e}var VH=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function qH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function YH(e,t){return fetch(e,t).then(qH)}function GH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function XH(e,t){return fetch(e,t).then(GH)}function KH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Gd(e,t){return fetch(e,t).then(KH)}function r3(e){return function(t,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gd(t,n).then(function(i){return e(i,r)})}}function ZH(e,t,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Yd(e);return Gd(t,n).then(function(o){return i.parse(o,r)})}var JH=r3(t3),QH=r3(n3);function eU(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function tU(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function nU(e,t){return fetch(e,t).then(tU)}function Xv(e){return function(t,n){return Gd(t,n).then(function(r){return new DOMParser().parseFromString(r,e)})}}const rU=Xv("application/xml");var iU=Xv("text/html"),oU=Xv("image/svg+xml");function aU(e,t){var n;e==null&&(e=0),t==null&&(t=0);function r(){var i,o=n.length,a,s=0,l=0;for(i=0;i<o;++i)a=n[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=n[i],a.x-=s,a.y-=l}return r.initialize=function(i){n=i},r.x=function(i){return arguments.length?(e=+i,r):e},r.y=function(i){return arguments.length?(t=+i,r):t},r}function Jt(e){return function(){return e}}function Ni(){return(Math.random()-.5)*1e-6}function sU(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return i3(this.cover(t,n),t,n,e)}function i3(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,c=e._y1,d,f,h,p,g,b,v,_;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(d=(s+u)/2))?s=d:u=d,(b=n>=(f=(l+c)/2))?l=f:c=f,i=o,!(o=o[v=b<<1|g]))return i[v]=a,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&n===p)return a.next=o,i?i[v]=a:e._root=a,e;do i=i?i[v]=new Array(4):e._root=new Array(4),(g=t>=(d=(s+u)/2))?s=d:u=d,(b=n>=(f=(l+c)/2))?l=f:c=f;while((v=b<<1|g)===(_=(p>=f)<<1|h>=d));return i[_]=o,i[v]=a,e}function lU(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,c=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<l&&(l=i),i>c&&(c=i),o<u&&(u=o),o>d&&(d=o));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),n=0;n<r;++n)i3(this,a[n],s[n],e[n]);return this}function uU(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function cU(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function fU(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function An(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function dU(e,t,n){var r,i=this._x0,o=this._y0,a,s,l,u,c=this._x1,d=this._y1,f=[],h=this._root,p,g;for(h&&f.push(new An(h,i,o,c,d)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,d=t+n,n*=n);p=f.pop();)if(!(!(h=p.node)||(a=p.x0)>c||(s=p.y0)>d||(l=p.x1)<i||(u=p.y1)<o))if(h.length){var b=(a+l)/2,v=(s+u)/2;f.push(new An(h[3],b,v,l,u),new An(h[2],a,v,b,u),new An(h[1],b,s,l,v),new An(h[0],a,s,b,v)),(g=(t>=v)<<1|e>=b)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var _=e-+this._x.call(null,h.data),y=t-+this._y.call(null,h.data),x=_*_+y*y;if(x<n){var S=Math.sqrt(n=x);i=e-S,o=t-S,c=e+S,d=t+S,r=h.data}}return r}function hU(e){if(isNaN(c=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,c,d,f,h,p,g,b,v;if(!n)return this;if(n.length)for(;;){if((p=c>=(f=(a+l)/2))?a=f:l=f,(g=d>=(h=(s+u)/2))?s=h:u=h,t=n,!(n=n[b=g<<1|p]))return this;if(!n.length)break;(t[b+1&3]||t[b+2&3]||t[b+3&3])&&(r=t,v=b)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[b]=o:delete t[b],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[v]=n:this._root=n),this):(this._root=o,this)}function pU(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function gU(){return this._root}function vU(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function bU(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new An(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,c=(a+l)/2;(i=r[3])&&t.push(new An(i,u,c,s,l)),(i=r[2])&&t.push(new An(i,o,c,u,l)),(i=r[1])&&t.push(new An(i,u,a,s,c)),(i=r[0])&&t.push(new An(i,o,a,u,c))}return this}function mU(e){var t=[],n=[],r;for(this._root&&t.push(new An(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&t.push(new An(o,a,s,c,d)),(o=i[1])&&t.push(new An(o,c,s,l,d)),(o=i[2])&&t.push(new An(o,a,d,c,u)),(o=i[3])&&t.push(new An(o,c,d,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function yU(e){return e[0]}function _U(e){return arguments.length?(this._x=e,this):this._x}function xU(e){return e[1]}function wU(e){return arguments.length?(this._y=e,this):this._y}function Xd(e,t,n){var r=new Kv(t??yU,n??xU,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Kv(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function n_(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var On=Xd.prototype=Kv.prototype;On.copy=function(){var e=new Kv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=n_(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=n_(r));return e};On.add=sU;On.addAll=lU;On.cover=uU;On.data=cU;On.extent=fU;On.find=dU;On.remove=hU;On.removeAll=pU;On.root=gU;On.size=vU;On.visit=bU;On.visitAfter=mU;On.x=_U;On.y=wU;function CU(e){return e.x+e.vx}function SU(e){return e.y+e.vy}function $U(e){var t,n,r=1,i=1;typeof e!="function"&&(e=Jt(e==null?1:+e));function o(){for(var l,u=t.length,c,d,f,h,p,g,b=0;b<i;++b)for(c=Xd(t,CU,SU).visitAfter(a),l=0;l<u;++l)d=t[l],p=n[d.index],g=p*p,f=d.x+d.vx,h=d.y+d.vy,c.visit(v);function v(_,y,x,S,$){var w=_.data,T=_.r,k=p+T;if(w){if(w.index>d.index){var P=f-w.x-w.vx,R=h-w.y-w.vy,C=P*P+R*R;C<k*k&&(P===0&&(P=Ni(),C+=P*P),R===0&&(R=Ni(),C+=R*R),C=(k-(C=Math.sqrt(C)))/C*r,d.vx+=(P*=C)*(k=(T*=T)/(g+T)),d.vy+=(R*=C)*k,w.vx-=P*(k=1-k),w.vy-=R*k)}return}return y>f+k||S<f-k||x>h+k||$<h-k}}function a(l){if(l.data)return l.r=n[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function s(){if(t){var l,u=t.length,c;for(n=new Array(u),l=0;l<u;++l)c=t[l],n[c.index]=+e(c,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(r=+l,o):r},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Jt(+l),s(),o):e},o}function kU(e){return e.index}function r_(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function MU(e){var t=kU,n=c,r,i=Jt(30),o,a,s,l,u=1;e==null&&(e=[]);function c(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var b=0,v=e.length;b<u;++b)for(var _=0,y,x,S,$,w,T,k;_<v;++_)y=e[_],x=y.source,S=y.target,$=S.x+S.vx-x.x-x.vx||Ni(),w=S.y+S.vy-x.y-x.vy||Ni(),T=Math.sqrt($*$+w*w),T=(T-o[_])/T*g*r[_],$*=T,w*=T,S.vx-=$*(k=l[_]),S.vy-=w*k,x.vx+=$*(k=1-k),x.vy+=w*k}function f(){if(a){var g,b=a.length,v=e.length,_=pi(a,t),y;for(g=0,s=new Array(b);g<v;++g)y=e[g],y.index=g,typeof y.source!="object"&&(y.source=r_(_,y.source)),typeof y.target!="object"&&(y.target=r_(_,y.target)),s[y.source.index]=(s[y.source.index]||0)+1,s[y.target.index]=(s[y.target.index]||0)+1;for(g=0,l=new Array(v);g<v;++g)y=e[g],l[g]=s[y.source.index]/(s[y.source.index]+s[y.target.index]);r=new Array(v),h(),o=new Array(v),p()}}function h(){if(a)for(var g=0,b=e.length;g<b;++g)r[g]=+n(e[g],g,e)}function p(){if(a)for(var g=0,b=e.length;g<b;++g)o[g]=+i(e[g],g,e)}return d.initialize=function(g){a=g,f()},d.links=function(g){return arguments.length?(e=g,f(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Jt(+g),h(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Jt(+g),p(),d):i},d}function TU(e){return e.x}function EU(e){return e.y}var AU=10,PU=Math.PI*(3-Math.sqrt(5));function RU(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=pi(),l=Vd(c),u=ha("tick","end");e==null&&(e=[]);function c(){d(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function d(p){var g,b=e.length,v;p===void 0&&(p=1);for(var _=0;_<p;++_)for(n+=(o-n)*i,s.each(function(y){y(n)}),g=0;g<b;++g)v=e[g],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return t}function f(){for(var p=0,g=e.length,b;p<g;++p){if(b=e[p],b.index=p,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var v=AU*Math.sqrt(p),_=p*PU;b.x=v*Math.cos(_),b.y=v*Math.sin(_)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function h(p){return p.initialize&&p.initialize(e),p}return f(),t={tick:d,restart:function(){return l.restart(c),t},stop:function(){return l.stop(),t},nodes:function(p){return arguments.length?(e=p,f(),s.each(h),t):e},alpha:function(p){return arguments.length?(n=+p,t):n},alphaMin:function(p){return arguments.length?(r=+p,t):r},alphaDecay:function(p){return arguments.length?(i=+p,t):+i},alphaTarget:function(p){return arguments.length?(o=+p,t):o},velocityDecay:function(p){return arguments.length?(a=1-p,t):1-a},force:function(p,g){return arguments.length>1?(g==null?s.remove(p):s.set(p,h(g)),t):s.get(p)},find:function(p,g,b){var v=0,_=e.length,y,x,S,$,w;for(b==null?b=1/0:b*=b,v=0;v<_;++v)$=e[v],y=p-$.x,x=g-$.y,S=y*y+x*x,S<b&&(w=$,b=S);return w},on:function(p,g){return arguments.length>1?(u.on(p,g),t):u.on(p)}}}function zU(){var e,t,n,r=Jt(-30),i,o=1,a=1/0,s=.81;function l(f){var h,p=e.length,g=Xd(e,TU,EU).visitAfter(c);for(n=f,h=0;h<p;++h)t=e[h],g.visit(d)}function u(){if(e){var f,h=e.length,p;for(i=new Array(h),f=0;f<h;++f)p=e[f],i[p.index]=+r(p,f,e)}}function c(f){var h=0,p,g,b=0,v,_,y;if(f.length){for(v=_=y=0;y<4;++y)(p=f[y])&&(g=Math.abs(p.value))&&(h+=p.value,b+=g,v+=g*p.x,_+=g*p.y);f.x=v/b,f.y=_/b}else{p=f,p.x=p.data.x,p.y=p.data.y;do h+=i[p.data.index];while(p=p.next)}f.value=h}function d(f,h,p,g){if(!f.value)return!0;var b=f.x-t.x,v=f.y-t.y,_=g-h,y=b*b+v*v;if(_*_/s<y)return y<a&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)),t.vx+=b*f.value*n/y,t.vy+=v*f.value*n/y),!0;if(f.length||y>=a)return;(f.data!==t||f.next)&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)));do f.data!==t&&(_=i[f.data.index]*n/y,t.vx+=b*_,t.vy+=v*_);while(f=f.next)}return l.initialize=function(f){e=f,u()},l.strength=function(f){return arguments.length?(r=typeof f=="function"?f:Jt(+f),u(),l):r},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l}function IU(e,t,n){var r,i=Jt(.1),o,a;typeof e!="function"&&(e=Jt(+e)),t==null&&(t=0),n==null&&(n=0);function s(u){for(var c=0,d=r.length;c<d;++c){var f=r[c],h=f.x-t||1e-6,p=f.y-n||1e-6,g=Math.sqrt(h*h+p*p),b=(a[c]-g)*o[c]*u/g;f.vx+=h*b,f.vy+=p*b}}function l(){if(r){var u,c=r.length;for(o=new Array(c),a=new Array(c),u=0;u<c;++u)a[u]=+e(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,l()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Jt(+u),l(),s):i},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Jt(+u),l(),s):e},s.x=function(u){return arguments.length?(t=+u,s):t},s.y=function(u){return arguments.length?(n=+u,s):n},s}function FU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(i[l]-c.x)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function BU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(i[l]-c.y)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function OU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Sf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ss(e){return e=Sf(Math.abs(e)),e?e[1]:NaN}function NU(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function LU(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var DU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tu(e){if(!(t=DU.exec(e)))throw new Error("invalid format: "+e);var t;return new Kd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}tu.prototype=Kd.prototype;function Kd(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function HU(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var o3;function UU(e,t){var n=Sf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(o3=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Sf(e,Math.max(0,t+o-1))[0]}function i_(e,t){var n=Sf(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const o_={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:OU,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return i_(e*100,t)},r:i_,s:UU,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function a_(e){return e}var s_=Array.prototype.map,l_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function a3(e){var t=e.grouping===void 0||e.thousands===void 0?a_:NU(s_.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?a_:LU(s_.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=tu(d);var f=d.fill,h=d.align,p=d.sign,g=d.symbol,b=d.zero,v=d.width,_=d.comma,y=d.precision,x=d.trim,S=d.type;S==="n"?(_=!0,S="g"):o_[S]||(y===void 0&&(y=12),x=!0,S="g"),(b||f==="0"&&h==="=")&&(b=!0,f="0",h="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",w=g==="$"?r:/[%p]/.test(S)?a:"",T=o_[S],k=/[defgprs%]/.test(S);y=y===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function P(R){var C=$,E=w,I,z,j;if(S==="c")E=T(R)+E,R="";else{R=+R;var Z=R<0||1/R<0;if(R=isNaN(R)?l:T(Math.abs(R),y),x&&(R=HU(R)),Z&&+R==0&&p!=="+"&&(Z=!1),C=(Z?p==="("?p:s:p==="-"||p==="("?"":p)+C,E=(S==="s"?l_[8+o3/3]:"")+E+(Z&&p==="("?")":""),k){for(I=-1,z=R.length;++I<z;)if(j=R.charCodeAt(I),48>j||j>57){E=(j===46?i+R.slice(I+1):R.slice(I))+E,R=R.slice(0,I);break}}}_&&!b&&(R=t(R,1/0));var J=C.length+R.length+E.length,ie=J<v?new Array(v-J+1).join(f):"";switch(_&&b&&(R=t(ie+R,ie.length?v-E.length:1/0),ie=""),h){case"<":R=C+R+E+ie;break;case"=":R=C+ie+R+E;break;case"^":R=ie.slice(0,J=ie.length>>1)+C+R+E+ie.slice(J);break;default:R=ie+C+R+E;break}return o(R)}return P.toString=function(){return d+""},P}function c(d,f){var h=u((d=tu(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(ss(f)/3)))*3,g=Math.pow(10,-p),b=l_[8+p/3];return function(v){return h(g*v)+b}}return{format:u,formatPrefix:c}}var hc,Zd,Zv;s3({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function s3(e){return hc=a3(e),Zd=hc.format,Zv=hc.formatPrefix,hc}function l3(e){return Math.max(0,-ss(Math.abs(e)))}function u3(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ss(t)/3)))*3-ss(Math.abs(e)))}function c3(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ss(t)-ss(e))+1}function po(){return new $f}function $f(){this.reset()}$f.prototype={constructor:$f,reset:function(){this.s=this.t=0},add:function(e){u_(pc,e,this.t),u_(this,pc.s,this.s),this.s?this.t+=pc.t:this.s=pc.t},valueOf:function(){return this.s}};var pc=new $f;function u_(e,t,n){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}var Qe=1e-6,kf=1e-12,ct=Math.PI,jt=ct/2,Mf=ct/4,zn=ct*2,Et=180/ct,Ze=ct/180,bt=Math.abs,xs=Math.atan,In=Math.atan2,je=Math.cos,gc=Math.ceil,f3=Math.exp,Tf=Math.log,$p=Math.pow,Fe=Math.sin,ur=Math.sign||function(e){return e>0?1:e<0?-1:0},Kt=Math.sqrt,Jv=Math.tan;function d3(e){return e>1?0:e<-1?ct:Math.acos(e)}function Fn(e){return e>1?jt:e<-1?-jt:Math.asin(e)}function c_(e){return(e=Fe(e/2))*e}function Nt(){}function Ef(e,t){e&&d_.hasOwnProperty(e.type)&&d_[e.type](e,t)}var f_={Feature:function(e,t){Ef(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Ef(n[r].geometry,t)}},d_={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){J0(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)J0(n[r],t,0)},Polygon:function(e,t){h_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)h_(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Ef(n[r],t)}};function J0(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function h_(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)J0(e[n],t,1);t.polygonEnd()}function br(e,t){e&&f_.hasOwnProperty(e.type)?f_[e.type](e,t):Ef(e,t)}var Af=po(),Pf=po(),h3,p3,Q0,eg,tg,Xr={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){Af.reset(),Xr.lineStart=jU,Xr.lineEnd=WU},polygonEnd:function(){var e=+Af;Pf.add(e<0?zn+e:e),this.lineStart=this.lineEnd=this.point=Nt},sphere:function(){Pf.add(zn)}};function jU(){Xr.point=VU}function WU(){g3(h3,p3)}function VU(e,t){Xr.point=g3,h3=e,p3=t,e*=Ze,t*=Ze,Q0=e,eg=je(t=t/2+Mf),tg=Fe(t)}function g3(e,t){e*=Ze,t*=Ze,t=t/2+Mf;var n=e-Q0,r=n>=0?1:-1,i=r*n,o=je(t),a=Fe(t),s=tg*a,l=eg*o+s*je(i),u=s*r*Fe(i);Af.add(In(u,l)),Q0=e,eg=o,tg=a}function qU(e){return Pf.reset(),br(e,Xr),Pf*2}function Rf(e){return[In(e[1],e[0]),Fn(e[2])]}function Zo(e){var t=e[0],n=e[1],r=je(n);return[r*je(t),r*Fe(t),Fe(n)]}function vc(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ls(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function kp(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function bc(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function zf(e){var t=Kt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ot,Un,Dt,qn,Mo,v3,b3,Ya,Cl=po(),Ii,gi,si={point:ng,lineStart:p_,lineEnd:g_,polygonStart:function(){si.point=y3,si.lineStart=YU,si.lineEnd=GU,Cl.reset(),Xr.polygonStart()},polygonEnd:function(){Xr.polygonEnd(),si.point=ng,si.lineStart=p_,si.lineEnd=g_,Af<0?(Ot=-(Dt=180),Un=-(qn=90)):Cl>Qe?qn=90:Cl<-1e-6&&(Un=-90),gi[0]=Ot,gi[1]=Dt},sphere:function(){Ot=-(Dt=180),Un=-(qn=90)}};function ng(e,t){Ii.push(gi=[Ot=e,Dt=e]),t<Un&&(Un=t),t>qn&&(qn=t)}function m3(e,t){var n=Zo([e*Ze,t*Ze]);if(Ya){var r=ls(Ya,n),i=[r[1],-r[0],0],o=ls(i,r);zf(o),o=Rf(o);var a=e-Mo,s=a>0?1:-1,l=o[0]*Et*s,u,c=bt(a)>180;c^(s*Mo<l&&l<s*e)?(u=o[1]*Et,u>qn&&(qn=u)):(l=(l+360)%360-180,c^(s*Mo<l&&l<s*e)?(u=-o[1]*Et,u<Un&&(Un=u)):(t<Un&&(Un=t),t>qn&&(qn=t))),c?e<Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e):Dt>=Ot?(e<Ot&&(Ot=e),e>Dt&&(Dt=e)):e>Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e)}else Ii.push(gi=[Ot=e,Dt=e]);t<Un&&(Un=t),t>qn&&(qn=t),Ya=n,Mo=e}function p_(){si.point=m3}function g_(){gi[0]=Ot,gi[1]=Dt,si.point=ng,Ya=null}function y3(e,t){if(Ya){var n=e-Mo;Cl.add(bt(n)>180?n+(n>0?360:-360):n)}else v3=e,b3=t;Xr.point(e,t),m3(e,t)}function YU(){Xr.lineStart()}function GU(){y3(v3,b3),Xr.lineEnd(),bt(Cl)>Qe&&(Ot=-(Dt=180)),gi[0]=Ot,gi[1]=Dt,Ya=null}function Vn(e,t){return(t-=e)<0?t+360:t}function XU(e,t){return e[0]-t[0]}function v_(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function KU(e){var t,n,r,i,o,a,s;if(qn=Dt=-(Ot=Un=1/0),Ii=[],br(e,si),n=Ii.length){for(Ii.sort(XU),t=1,r=Ii[0],o=[r];t<n;++t)i=Ii[t],v_(r,i[0])||v_(r,i[1])?(Vn(r[0],i[1])>Vn(r[0],r[1])&&(r[1]=i[1]),Vn(i[0],r[1])>Vn(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,t=0,r=o[n];t<=n;r=i,++t)i=o[t],(s=Vn(r[1],i[0]))>a&&(a=s,Ot=i[0],Dt=r[1])}return Ii=gi=null,Ot===1/0||Un===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ot,Un],[Dt,qn]]}var Zs,If,Ff,Bf,Of,Nf,Lf,Df,rg,ig,og,_3,x3,Mn,Tn,En,yr={sphere:Nt,point:Qv,lineStart:b_,lineEnd:m_,polygonStart:function(){yr.lineStart=QU,yr.lineEnd=ej},polygonEnd:function(){yr.lineStart=b_,yr.lineEnd=m_}};function Qv(e,t){e*=Ze,t*=Ze;var n=je(t);Su(n*je(e),n*Fe(e),Fe(t))}function Su(e,t,n){++Zs,Ff+=(e-Ff)/Zs,Bf+=(t-Bf)/Zs,Of+=(n-Of)/Zs}function b_(){yr.point=ZU}function ZU(e,t){e*=Ze,t*=Ze;var n=je(t);Mn=n*je(e),Tn=n*Fe(e),En=Fe(t),yr.point=JU,Su(Mn,Tn,En)}function JU(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Fe(e),o=Fe(t),a=In(Kt((a=Tn*o-En*i)*a+(a=En*r-Mn*o)*a+(a=Mn*i-Tn*r)*a),Mn*r+Tn*i+En*o);If+=a,Nf+=a*(Mn+(Mn=r)),Lf+=a*(Tn+(Tn=i)),Df+=a*(En+(En=o)),Su(Mn,Tn,En)}function m_(){yr.point=Qv}function QU(){yr.point=tj}function ej(){w3(_3,x3),yr.point=Qv}function tj(e,t){_3=e,x3=t,e*=Ze,t*=Ze,yr.point=w3;var n=je(t);Mn=n*je(e),Tn=n*Fe(e),En=Fe(t),Su(Mn,Tn,En)}function w3(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Fe(e),o=Fe(t),a=Tn*o-En*i,s=En*r-Mn*o,l=Mn*i-Tn*r,u=Kt(a*a+s*s+l*l),c=Fn(u),d=u&&-c/u;rg+=d*a,ig+=d*s,og+=d*l,If+=c,Nf+=c*(Mn+(Mn=r)),Lf+=c*(Tn+(Tn=i)),Df+=c*(En+(En=o)),Su(Mn,Tn,En)}function nj(e){Zs=If=Ff=Bf=Of=Nf=Lf=Df=rg=ig=og=0,br(e,yr);var t=rg,n=ig,r=og,i=t*t+n*n+r*r;return i<kf&&(t=Nf,n=Lf,r=Df,If<Qe&&(t=Ff,n=Bf,r=Of),i=t*t+n*n+r*r,i<kf)?[NaN,NaN]:[In(n,t)*Et,Fn(r/Kt(i))*Et]}function Aa(e){return function(){return e}}function ag(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function sg(e,t){return[bt(e)>ct?e+Math.round(-e/zn)*zn:e,t]}sg.invert=sg;function eb(e,t,n){return(e%=zn)?t||n?ag(__(e),x_(t,n)):__(e):t||n?x_(t,n):sg}function y_(e){return function(t,n){return t+=e,[t>ct?t-zn:t<-ct?t+zn:t,n]}}function __(e){var t=y_(e);return t.invert=y_(-e),t}function x_(e,t){var n=je(e),r=Fe(e),i=je(t),o=Fe(t);function a(s,l){var u=je(l),c=je(s)*u,d=Fe(s)*u,f=Fe(l),h=f*n+c*r;return[In(d*i-h*o,c*n-f*r),Fn(h*i+d*o)]}return a.invert=function(s,l){var u=je(l),c=je(s)*u,d=Fe(s)*u,f=Fe(l),h=f*i-d*o;return[In(d*i+f*o,c*n+h*r),Fn(h*n-c*r)]},a}function C3(e){e=eb(e[0]*Ze,e[1]*Ze,e.length>2?e[2]*Ze:0);function t(n){return n=e(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n}return t.invert=function(n){return n=e.invert(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n},t}function S3(e,t,n,r,i,o){if(n){var a=je(t),s=Fe(t),l=r*n;i==null?(i=t+r*zn,o=t-l/2):(i=w_(a,i),o=w_(a,o),(r>0?i<o:i>o)&&(i+=r*zn));for(var u,c=i;r>0?c>o:c<o;c-=l)u=Rf([a,-s*je(c),-s*Fe(c)]),e.point(u[0],u[1])}}function w_(e,t){t=Zo(t),t[0]-=e,zf(t);var n=d3(-t[1]);return((-t[2]<0?-n:n)+zn-Qe)%zn}function rj(){var e=Aa([0,0]),t=Aa(90),n=Aa(6),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=Et,l[1]*=Et}function s(){var l=e.apply(this,arguments),u=t.apply(this,arguments)*Ze,c=n.apply(this,arguments)*Ze;return r=[],i=eb(-l[0]*Ze,-l[1]*Ze,0).invert,S3(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:Aa([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Aa(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:Aa(+l),s):n},s}function $3(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Nt,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Hc(e,t){return bt(e[0]-t[0])<Qe&&bt(e[1]-t[1])<Qe}function mc(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function k3(e,t,n,r,i){var o=[],a=[],s,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,b=p[0],v=p[g],_;if(Hc(b,v)){if(!b[2]&&!v[2]){for(i.lineStart(),s=0;s<g;++s)i.point((b=p[s])[0],b[1]);i.lineEnd();return}v[0]+=2*Qe}o.push(_=new mc(b,p,null,!0)),a.push(_.o=new mc(b,null,_,!1)),o.push(_=new mc(v,p,null,!1)),a.push(_.o=new mc(v,null,_,!0))}}),!!o.length){for(a.sort(t),C_(o),C_(a),s=0,l=a.length;s<l;++s)a[s].e=n=!n;for(var u=o[0],c,d;;){for(var f=u,h=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(s=0,l=c.length;s<l;++s)i.point((d=c[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h)for(c=f.p.z,s=c.length-1;s>=0;--s)i.point((d=c[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,h=!h}while(!f.v);i.lineEnd()}}}function C_(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}var Mp=po();function Tp(e){return bt(e[0])<=ct?e[0]:ur(e[0])*((bt(e[0])+ct)%zn-ct)}function M3(e,t){var n=Tp(t),r=t[1],i=Fe(r),o=[Fe(n),-je(n),0],a=0,s=0;Mp.reset(),i===1?r=jt+Qe:i===-1&&(r=-jt-Qe);for(var l=0,u=e.length;l<u;++l)if(d=(c=e[l]).length)for(var c,d,f=c[d-1],h=Tp(f),p=f[1]/2+Mf,g=Fe(p),b=je(p),v=0;v<d;++v,h=y,g=S,b=$,f=_){var _=c[v],y=Tp(_),x=_[1]/2+Mf,S=Fe(x),$=je(x),w=y-h,T=w>=0?1:-1,k=T*w,P=k>ct,R=g*S;if(Mp.add(In(R*T*Fe(k),b*$+R*je(k))),a+=P?w+T*zn:w,P^h>=n^y>=n){var C=ls(Zo(f),Zo(_));zf(C);var E=ls(o,C);zf(E);var I=(P^w>=0?-1:1)*Fn(E[2]);(r>I||r===I&&(C[0]||C[1]))&&(s+=P^w>=0?1:-1)}}return(a<-1e-6||a<Qe&&Mp<-1e-6)^s&1}function T3(e,t,n,r){return function(i){var o=t(i),a=$3(),s=t(a),l=!1,u,c,d,f={point:h,lineStart:g,lineEnd:b,polygonStart:function(){f.point=v,f.lineStart=_,f.lineEnd=y,c=[],u=[]},polygonEnd:function(){f.point=h,f.lineStart=g,f.lineEnd=b,c=Ev(c);var x=M3(u,r);c.length?(l||(i.polygonStart(),l=!0),k3(c,oj,x,n,i)):x&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(x,S){e(x,S)&&i.point(x,S)}function p(x,S){o.point(x,S)}function g(){f.point=p,o.lineStart()}function b(){f.point=h,o.lineEnd()}function v(x,S){d.push([x,S]),s.point(x,S)}function _(){s.lineStart(),d=[]}function y(){v(d[0][0],d[0][1]),s.lineEnd();var x=s.clean(),S=a.result(),$,w=S.length,T,k,P;if(d.pop(),u.push(d),d=null,!!w){if(x&1){if(k=S[0],(T=k.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),$=0;$<T;++$)i.point((P=k[$])[0],P[1]);i.lineEnd()}return}w>1&&x&2&&S.push(S.pop().concat(S.shift())),c.push(S.filter(ij))}}return f}}function ij(e){return e.length>1}function oj(e,t){return((e=e.x)[0]<0?e[1]-jt-Qe:jt-e[1])-((t=t.x)[0]<0?t[1]-jt-Qe:jt-t[1])}const lg=T3(function(){return!0},aj,lj,[-ct,-jt]);function aj(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?ct:-ct,l=bt(o-t);bt(l-ct)<Qe?(e.point(t,n=(n+a)/2>0?jt:-jt),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),i=0):r!==s&&l>=ct&&(bt(t-r)<Qe&&(t-=r*Qe),bt(o-s)<Qe&&(o-=s*Qe),n=sj(t,n,o,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=o,n=a),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function sj(e,t,n,r){var i,o,a=Fe(e-n);return bt(a)>Qe?xs((Fe(t)*(o=je(r))*Fe(n)-Fe(r)*(i=je(t))*Fe(e))/(i*o*a)):(t+r)/2}function lj(e,t,n,r){var i;if(e==null)i=n*jt,r.point(-ct,i),r.point(0,i),r.point(ct,i),r.point(ct,0),r.point(ct,-i),r.point(0,-i),r.point(-ct,-i),r.point(-ct,0),r.point(-ct,i);else if(bt(e[0]-t[0])>Qe){var o=e[0]<t[0]?ct:-ct;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function E3(e){var t=je(e),n=6*Ze,r=t>0,i=bt(t)>Qe;function o(c,d,f,h){S3(h,e,n,f,c,d)}function a(c,d){return je(c)*je(d)>t}function s(c){var d,f,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(b,v){var _=[b,v],y,x=a(b,v),S=r?x?0:u(b,v):x?u(b+(b<0?ct:-ct),v):0;if(!d&&(p=h=x)&&c.lineStart(),x!==h&&(y=l(d,_),(!y||Hc(d,y)||Hc(_,y))&&(_[2]=1)),x!==h)g=0,x?(c.lineStart(),y=l(_,d),c.point(y[0],y[1])):(y=l(d,_),c.point(y[0],y[1],2),c.lineEnd()),d=y;else if(i&&d&&r^x){var $;!(S&f)&&($=l(_,d,!0))&&(g=0,r?(c.lineStart(),c.point($[0][0],$[0][1]),c.point($[1][0],$[1][1]),c.lineEnd()):(c.point($[1][0],$[1][1]),c.lineEnd(),c.lineStart(),c.point($[0][0],$[0][1],3)))}x&&(!d||!Hc(d,_))&&c.point(_[0],_[1]),d=_,h=x,f=S},lineEnd:function(){h&&c.lineEnd(),d=null},clean:function(){return g|(p&&h)<<1}}}function l(c,d,f){var h=Zo(c),p=Zo(d),g=[1,0,0],b=ls(h,p),v=vc(b,b),_=b[0],y=v-_*_;if(!y)return!f&&c;var x=t*v/y,S=-t*_/y,$=ls(g,b),w=bc(g,x),T=bc(b,S);kp(w,T);var k=$,P=vc(w,k),R=vc(k,k),C=P*P-R*(vc(w,w)-1);if(!(C<0)){var E=Kt(C),I=bc(k,(-P-E)/R);if(kp(I,w),I=Rf(I),!f)return I;var z=c[0],j=d[0],Z=c[1],J=d[1],ie;j<z&&(ie=z,z=j,j=ie);var he=j-z,_e=bt(he-ct)<Qe,oe=_e||he<Qe;if(!_e&&J<Z&&(ie=Z,Z=J,J=ie),oe?_e?Z+J>0^I[1]<(bt(I[0]-z)<Qe?Z:J):Z<=I[1]&&I[1]<=J:he>ct^(z<=I[0]&&I[0]<=j)){var ve=bc(k,(-P+E)/R);return kp(ve,w),[I,Rf(ve)]}}}function u(c,d){var f=r?e:ct-e,h=0;return c<-f?h|=1:c>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return T3(a,s,o,r?[0,-e]:[-ct,e-ct])}function uj(e,t,n,r,i,o){var a=e[0],s=e[1],l=t[0],u=t[1],c=0,d=1,f=l-a,h=u-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<c)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>c&&(c=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>c&&(c=p)}else if(f>0){if(p<c)return;p<d&&(d=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<c)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>c&&(c=p)}if(p=o-s,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>c&&(c=p)}else if(h>0){if(p<c)return;p<d&&(d=p)}return c>0&&(e[0]=a+c*f,e[1]=s+c*h),d<1&&(t[0]=a+d*f,t[1]=s+d*h),!0}}}}}var yc=1e9,_c=-1e9;function Jd(e,t,n,r){function i(u,c){return e<=u&&u<=n&&t<=c&&c<=r}function o(u,c,d,f){var h=0,p=0;if(u==null||(h=a(u,d))!==(p=a(c,d))||l(u,c)<0^d>0)do f.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+d+4)%4)!==p);else f.point(c[0],c[1])}function a(u,c){return bt(u[0]-e)<Qe?c>0?0:3:bt(u[0]-n)<Qe?c>0?2:1:bt(u[1]-t)<Qe?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var d=a(u,1),f=a(c,1);return d!==f?d-f:d===0?c[1]-u[1]:d===1?u[0]-c[0]:d===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,d=$3(),f,h,p,g,b,v,_,y,x,S,$,w={point:T,lineStart:C,lineEnd:E,polygonStart:P,polygonEnd:R};function T(z,j){i(z,j)&&c.point(z,j)}function k(){for(var z=0,j=0,Z=h.length;j<Z;++j)for(var J=h[j],ie=1,he=J.length,_e=J[0],oe,ve,we=_e[0],Oe=_e[1];ie<he;++ie)oe=we,ve=Oe,_e=J[ie],we=_e[0],Oe=_e[1],ve<=r?Oe>r&&(we-oe)*(r-ve)>(Oe-ve)*(e-oe)&&++z:Oe<=r&&(we-oe)*(r-ve)<(Oe-ve)*(e-oe)&&--z;return z}function P(){c=d,f=[],h=[],$=!0}function R(){var z=k(),j=$&&z,Z=(f=Ev(f)).length;(j||Z)&&(u.polygonStart(),j&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),Z&&k3(f,s,z,o,u),u.polygonEnd()),c=u,f=h=p=null}function C(){w.point=I,h&&h.push(p=[]),S=!0,x=!1,_=y=NaN}function E(){f&&(I(g,b),v&&x&&d.rejoin(),f.push(d.result())),w.point=T,x&&c.lineEnd()}function I(z,j){var Z=i(z,j);if(h&&p.push([z,j]),S)g=z,b=j,v=Z,S=!1,Z&&(c.lineStart(),c.point(z,j));else if(Z&&x)c.point(z,j);else{var J=[_=Math.max(_c,Math.min(yc,_)),y=Math.max(_c,Math.min(yc,y))],ie=[z=Math.max(_c,Math.min(yc,z)),j=Math.max(_c,Math.min(yc,j))];uj(J,ie,e,t,n,r)?(x||(c.lineStart(),c.point(J[0],J[1])),c.point(ie[0],ie[1]),Z||c.lineEnd(),$=!1):Z&&(c.lineStart(),c.point(z,j),$=!1)}_=z,y=j,x=Z}return w}}function cj(){var e=0,t=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Jd(e,t,n,r)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[e,t],[n,r]]}}}var ug=po(),cg,Uc,jc,us={sphere:Nt,point:Nt,lineStart:fj,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt};function fj(){us.point=hj,us.lineEnd=dj}function dj(){us.point=us.lineEnd=Nt}function hj(e,t){e*=Ze,t*=Ze,cg=e,Uc=Fe(t),jc=je(t),us.point=pj}function pj(e,t){e*=Ze,t*=Ze;var n=Fe(t),r=je(t),i=bt(e-cg),o=je(i),a=Fe(i),s=r*a,l=jc*n-Uc*r*o,u=Uc*n+jc*r*o;ug.add(In(Kt(s*s+l*l),u)),cg=e,Uc=n,jc=r}function A3(e){return ug.reset(),br(e,us),+ug}var fg=[null,null],gj={type:"LineString",coordinates:fg};function Hf(e,t){return fg[0]=e,fg[1]=t,A3(gj)}var S_={Feature:function(e,t){return Uf(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Uf(n[r].geometry,t))return!0;return!1}},$_={Sphere:function(){return!0},Point:function(e,t){return k_(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(k_(n[r],t))return!0;return!1},LineString:function(e,t){return M_(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(M_(n[r],t))return!0;return!1},Polygon:function(e,t){return T_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(T_(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Uf(n[r],t))return!0;return!1}};function Uf(e,t){return e&&$_.hasOwnProperty(e.type)?$_[e.type](e,t):!1}function k_(e,t){return Hf(e,t)===0}function M_(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(r=Hf(e[o],t),r===0||o>0&&(i=Hf(e[o],e[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<kf*i))return!0;n=r}return!1}function T_(e,t){return!!M3(e.map(vj),P3(t))}function vj(e){return e=e.map(P3),e.pop(),e}function P3(e){return[e[0]*Ze,e[1]*Ze]}function bj(e,t){return(e&&S_.hasOwnProperty(e.type)?S_[e.type]:Uf)(e,t)}function E_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function A_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function R3(){var e,t,n,r,i,o,a,s,l=10,u=l,c=90,d=360,f,h,p,g,b=2.5;function v(){return{type:"MultiLineString",coordinates:_()}}function _(){return Jn(gc(r/c)*c,n,c).map(p).concat(Jn(gc(s/d)*d,a,d).map(g)).concat(Jn(gc(t/l)*l,e,l).filter(function(y){return bt(y%c)>Qe}).map(f)).concat(Jn(gc(o/u)*u,i,u).filter(function(y){return bt(y%d)>Qe}).map(h))}return v.lines=function(){return _().map(function(y){return{type:"LineString",coordinates:y}})},v.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},v.extent=function(y){return arguments.length?v.extentMajor(y).extentMinor(y):v.extentMinor()},v.extentMajor=function(y){return arguments.length?(r=+y[0][0],n=+y[1][0],s=+y[0][1],a=+y[1][1],r>n&&(y=r,r=n,n=y),s>a&&(y=s,s=a,a=y),v.precision(b)):[[r,s],[n,a]]},v.extentMinor=function(y){return arguments.length?(t=+y[0][0],e=+y[1][0],o=+y[0][1],i=+y[1][1],t>e&&(y=t,t=e,e=y),o>i&&(y=o,o=i,i=y),v.precision(b)):[[t,o],[e,i]]},v.step=function(y){return arguments.length?v.stepMajor(y).stepMinor(y):v.stepMinor()},v.stepMajor=function(y){return arguments.length?(c=+y[0],d=+y[1],v):[c,d]},v.stepMinor=function(y){return arguments.length?(l=+y[0],u=+y[1],v):[l,u]},v.precision=function(y){return arguments.length?(b=+y,f=E_(o,i,90),h=A_(t,e,b),p=E_(s,a,90),g=A_(r,n,b),v):b},v.extentMajor([[-180,-90+Qe],[180,90-Qe]]).extentMinor([[-180,-80-Qe],[180,80+Qe]])}function mj(){return R3()()}function yj(e,t){var n=e[0]*Ze,r=e[1]*Ze,i=t[0]*Ze,o=t[1]*Ze,a=je(r),s=Fe(r),l=je(o),u=Fe(o),c=a*je(n),d=a*Fe(n),f=l*je(i),h=l*Fe(i),p=2*Fn(Kt(c_(o-r)+a*l*c_(i-n))),g=Fe(p),b=p?function(v){var _=Fe(v*=p)/g,y=Fe(p-v)/g,x=y*c+_*f,S=y*d+_*h,$=y*s+_*u;return[In(S,x)*Et,In($,Kt(x*x+S*S))*Et]}:function(){return[n*Et,r*Et]};return b.distance=p,b}function nu(e){return e}var Ep=po(),dg=po(),z3,I3,hg,pg,ui={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){ui.lineStart=_j,ui.lineEnd=wj},polygonEnd:function(){ui.lineStart=ui.lineEnd=ui.point=Nt,Ep.add(bt(dg)),dg.reset()},result:function(){var e=Ep/2;return Ep.reset(),e}};function _j(){ui.point=xj}function xj(e,t){ui.point=F3,z3=hg=e,I3=pg=t}function F3(e,t){dg.add(pg*e-hg*t),hg=e,pg=t}function wj(){F3(z3,I3)}var cs=1/0,jf=cs,ru=-cs,Wf=ru,Vf={point:Cj,lineStart:Nt,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt,result:function(){var e=[[cs,jf],[ru,Wf]];return ru=Wf=-(jf=cs=1/0),e}};function Cj(e,t){e<cs&&(cs=e),e>ru&&(ru=e),t<jf&&(jf=t),t>Wf&&(Wf=t)}var gg=0,vg=0,Js=0,qf=0,Yf=0,Ia=0,bg=0,mg=0,Qs=0,B3,O3,Br,Or,ar={point:Jo,lineStart:P_,lineEnd:R_,polygonStart:function(){ar.lineStart=kj,ar.lineEnd=Mj},polygonEnd:function(){ar.point=Jo,ar.lineStart=P_,ar.lineEnd=R_},result:function(){var e=Qs?[bg/Qs,mg/Qs]:Ia?[qf/Ia,Yf/Ia]:Js?[gg/Js,vg/Js]:[NaN,NaN];return gg=vg=Js=qf=Yf=Ia=bg=mg=Qs=0,e}};function Jo(e,t){gg+=e,vg+=t,++Js}function P_(){ar.point=Sj}function Sj(e,t){ar.point=$j,Jo(Br=e,Or=t)}function $j(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);qf+=i*(Br+e)/2,Yf+=i*(Or+t)/2,Ia+=i,Jo(Br=e,Or=t)}function R_(){ar.point=Jo}function kj(){ar.point=Tj}function Mj(){N3(B3,O3)}function Tj(e,t){ar.point=N3,Jo(B3=Br=e,O3=Or=t)}function N3(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);qf+=i*(Br+e)/2,Yf+=i*(Or+t)/2,Ia+=i,i=Or*e-Br*t,bg+=i*(Br+e),mg+=i*(Or+t),Qs+=i*3,Jo(Br=e,Or=t)}function L3(e){this._context=e}L3.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,zn);break}}},result:Nt};var yg=po(),Ap,D3,H3,el,tl,iu={point:Nt,lineStart:function(){iu.point=Ej},lineEnd:function(){Ap&&U3(D3,H3),iu.point=Nt},polygonStart:function(){Ap=!0},polygonEnd:function(){Ap=null},result:function(){var e=+yg;return yg.reset(),e}};function Ej(e,t){iu.point=U3,D3=el=e,H3=tl=t}function U3(e,t){el-=e,tl-=t,yg.add(Kt(el*el+tl*tl)),el=e,tl=t}function j3(){this._string=[]}j3.prototype={_radius:4.5,_circle:z_(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=z_(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function z_(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Aj(e,t){var n=4.5,r,i;function o(a){return a&&(typeof n=="function"&&i.pointRadius(+n.apply(this,arguments)),br(a,r(i))),i.result()}return o.area=function(a){return br(a,r(ui)),ui.result()},o.measure=function(a){return br(a,r(iu)),iu.result()},o.bounds=function(a){return br(a,r(Vf)),Vf.result()},o.centroid=function(a){return br(a,r(ar)),ar.result()},o.projection=function(a){return arguments.length?(r=a==null?(e=null,nu):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new j3):new L3(t=a),typeof n!="function"&&i.pointRadius(n),o):t},o.pointRadius=function(a){return arguments.length?(n=typeof a=="function"?a:(i.pointRadius(+a),+a),o):n},o.projection(e).context(t)}function Pj(e){return{stream:$u(e)}}function $u(e){return function(t){var n=new _g;for(var r in e)n[r]=e[r];return n.stream=t,n}}function _g(){}_g.prototype={constructor:_g,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function tb(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),br(n,e.stream(Vf)),t(Vf.result()),r!=null&&e.clipExtent(r),e}function Qd(e,t,n){return tb(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,l])},n)}function nb(e,t,n){return Qd(e,[[0,0],t],n)}function rb(e,t,n){return tb(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];e.scale(150*o).translate([a,s])},n)}function ib(e,t,n){return tb(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])},n)}var I_=16,Rj=je(30*Ze);function F_(e,t){return+t?Ij(e,t):zj(e)}function zj(e){return $u({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Ij(e,t){function n(r,i,o,a,s,l,u,c,d,f,h,p,g,b){var v=u-r,_=c-i,y=v*v+_*_;if(y>4*t&&g--){var x=a+f,S=s+h,$=l+p,w=Kt(x*x+S*S+$*$),T=Fn($/=w),k=bt(bt($)-1)<Qe||bt(o-d)<Qe?(o+d)/2:In(S,x),P=e(k,T),R=P[0],C=P[1],E=R-r,I=C-i,z=_*E-v*I;(z*z/y>t||bt((v*E+_*I)/y-.5)>.3||a*f+s*h+l*p<Rj)&&(n(r,i,o,a,s,l,R,C,k,x/=w,S/=w,$,g,b),b.point(R,C),n(R,C,k,x,S,$,u,c,d,f,h,p,g,b))}}return function(r){var i,o,a,s,l,u,c,d,f,h,p,g,b={point:v,lineStart:_,lineEnd:x,polygonStart:function(){r.polygonStart(),b.lineStart=S},polygonEnd:function(){r.polygonEnd(),b.lineStart=_}};function v(T,k){T=e(T,k),r.point(T[0],T[1])}function _(){d=NaN,b.point=y,r.lineStart()}function y(T,k){var P=Zo([T,k]),R=e(T,k);n(d,f,c,h,p,g,d=R[0],f=R[1],c=T,h=P[0],p=P[1],g=P[2],I_,r),r.point(d,f)}function x(){b.point=v,r.lineEnd()}function S(){_(),b.point=$,b.lineEnd=w}function $(T,k){y(i=T,k),o=d,a=f,s=h,l=p,u=g,b.point=y}function w(){n(d,f,c,h,p,g,o,a,i,s,l,u,I_,r),b.lineEnd=x,x()}return b}}var Fj=$u({point:function(e,t){this.stream.point(e*Ze,t*Ze)}});function Bj(e){return $u({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Oj(e,t,n,r,i){function o(a,s){return a*=r,s*=i,[t+e*a,n-e*s]}return o.invert=function(a,s){return[(a-t)/e*r,(n-s)/e*i]},o}function B_(e,t,n,r,i,o){var a=je(o),s=Fe(o),l=a*e,u=s*e,c=a/e,d=s/e,f=(s*n-a*t)/e,h=(s*t+a*n)/e;function p(g,b){return g*=r,b*=i,[l*g-u*b+t,n-u*g-l*b]}return p.invert=function(g,b){return[r*(c*g-d*b+f),i*(h-d*g-c*b)]},p}function Jr(e){return ob(function(){return e})()}function ob(e){var t,n=150,r=480,i=250,o=0,a=0,s=0,l=0,u=0,c,d=0,f=1,h=1,p=null,g=lg,b=null,v,_,y,x=nu,S=.5,$,w,T,k,P;function R(z){return T(z[0]*Ze,z[1]*Ze)}function C(z){return z=T.invert(z[0],z[1]),z&&[z[0]*Et,z[1]*Et]}R.stream=function(z){return k&&P===z?k:k=Fj(Bj(c)(g($(x(P=z)))))},R.preclip=function(z){return arguments.length?(g=z,p=void 0,I()):g},R.postclip=function(z){return arguments.length?(x=z,b=v=_=y=null,I()):x},R.clipAngle=function(z){return arguments.length?(g=+z?E3(p=z*Ze):(p=null,lg),I()):p*Et},R.clipExtent=function(z){return arguments.length?(x=z==null?(b=v=_=y=null,nu):Jd(b=+z[0][0],v=+z[0][1],_=+z[1][0],y=+z[1][1]),I()):b==null?null:[[b,v],[_,y]]},R.scale=function(z){return arguments.length?(n=+z,E()):n},R.translate=function(z){return arguments.length?(r=+z[0],i=+z[1],E()):[r,i]},R.center=function(z){return arguments.length?(o=z[0]%360*Ze,a=z[1]%360*Ze,E()):[o*Et,a*Et]},R.rotate=function(z){return arguments.length?(s=z[0]%360*Ze,l=z[1]%360*Ze,u=z.length>2?z[2]%360*Ze:0,E()):[s*Et,l*Et,u*Et]},R.angle=function(z){return arguments.length?(d=z%360*Ze,E()):d*Et},R.reflectX=function(z){return arguments.length?(f=z?-1:1,E()):f<0},R.reflectY=function(z){return arguments.length?(h=z?-1:1,E()):h<0},R.precision=function(z){return arguments.length?($=F_(w,S=z*z),I()):Kt(S)},R.fitExtent=function(z,j){return Qd(R,z,j)},R.fitSize=function(z,j){return nb(R,z,j)},R.fitWidth=function(z,j){return rb(R,z,j)},R.fitHeight=function(z,j){return ib(R,z,j)};function E(){var z=B_(n,0,0,f,h,d).apply(null,t(o,a)),j=(d?B_:Oj)(n,r-z[0],i-z[1],f,h,d);return c=eb(s,l,u),w=ag(t,j),T=ag(c,w),$=F_(w,S),I()}function I(){return k=P=null,R}return function(){return t=e.apply(this,arguments),R.invert=t.invert&&C,E()}}function ab(e){var t=0,n=ct/3,r=ob(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*Ze,n=o[1]*Ze):[t*Et,n*Et]},i}function Nj(e){var t=je(e);function n(r,i){return[r*t,Fe(i)/t]}return n.invert=function(r,i){return[r/t,Fn(i*t)]},n}function W3(e,t){var n=Fe(e),r=(n+Fe(t))/2;if(bt(r)<Qe)return Nj(e);var i=1+n*(2*r-n),o=Kt(i)/r;function a(s,l){var u=Kt(i-2*r*Fe(l))/r;return[u*Fe(s*=r),o-u*je(s)]}return a.invert=function(s,l){var u=o-l,c=In(s,bt(u))*ur(u);return u*r<0&&(c-=ct*ur(s)*ur(u)),[c/r,Fn((i-(s*s+u*u)*r*r)/(2*r))]},a}function Gf(){return ab(W3).scale(155.424).center([0,33.6442])}function V3(){return Gf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Lj(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function Dj(){var e,t,n=V3(),r,i=Gf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Gf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,u={point:function(f,h){l=[f,h]}};function c(f){var h=f[0],p=f[1];return l=null,r.point(h,p),l||(o.point(h,p),l)||(s.point(h,p),l)}c.invert=function(f){var h=n.scale(),p=n.translate(),g=(f[0]-p[0])/h,b=(f[1]-p[1])/h;return(b>=.12&&b<.234&&g>=-.425&&g<-.214?i:b>=.166&&b<.234&&g>=-.214&&g<-.115?a:n).invert(f)},c.stream=function(f){return e&&t===f?e:e=Lj([n.stream(t=f),i.stream(f),a.stream(f)])},c.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),d()):n.precision()},c.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),c.translate(n.translate())):n.scale()},c.translate=function(f){if(!arguments.length)return n.translate();var h=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(u),o=i.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+Qe,g+.12*h+Qe],[p-.214*h-Qe,g+.234*h-Qe]]).stream(u),s=a.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+Qe,g+.166*h+Qe],[p-.115*h-Qe,g+.234*h-Qe]]).stream(u),d()},c.fitExtent=function(f,h){return Qd(c,f,h)},c.fitSize=function(f,h){return nb(c,f,h)},c.fitWidth=function(f,h){return rb(c,f,h)},c.fitHeight=function(f,h){return ib(c,f,h)};function d(){return e=t=null,c}return c.scale(1070)}function q3(e){return function(t,n){var r=je(t),i=je(n),o=e(r*i);return[o*i*Fe(t),o*Fe(n)]}}function ku(e){return function(t,n){var r=Kt(t*t+n*n),i=e(r),o=Fe(i),a=je(i);return[In(t*o,r*a),Fn(r&&n*o/r)]}}var sb=q3(function(e){return Kt(2/(1+e))});sb.invert=ku(function(e){return 2*Fn(e/2)});function Hj(){return Jr(sb).scale(124.75).clipAngle(180-.001)}var lb=q3(function(e){return(e=d3(e))&&e/Fe(e)});lb.invert=ku(function(e){return e});function Uj(){return Jr(lb).scale(79.4188).clipAngle(180-.001)}function Mu(e,t){return[e,Tf(Jv((jt+t)/2))]}Mu.invert=function(e,t){return[e,2*xs(f3(t))-jt]};function jj(){return Y3(Mu).scale(961/zn)}function Y3(e){var t=Jr(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,u;t.scale=function(d){return arguments.length?(r(d),c()):r()},t.translate=function(d){return arguments.length?(i(d),c()):i()},t.center=function(d){return arguments.length?(n(d),c()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=s=l=u=null:(a=+d[0][0],s=+d[0][1],l=+d[1][0],u=+d[1][1]),c()):a==null?null:[[a,s],[l,u]]};function c(){var d=ct*r(),f=t(C3(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===Mu?[[Math.max(f[0]-d,a),s],[Math.min(f[0]+d,l),u]]:[[a,Math.max(f[1]-d,s)],[l,Math.min(f[1]+d,u)]])}return c()}function xc(e){return Jv((jt+e)/2)}function G3(e,t){var n=je(e),r=e===t?Fe(e):Tf(n/je(t))/Tf(xc(t)/xc(e)),i=n*$p(xc(e),r)/r;if(!r)return Mu;function o(a,s){i>0?s<-jt+Qe&&(s=-jt+Qe):s>jt-Qe&&(s=jt-Qe);var l=i/$p(xc(s),r);return[l*Fe(r*a),i-l*je(r*a)]}return o.invert=function(a,s){var l=i-s,u=ur(r)*Kt(a*a+l*l),c=In(a,bt(l))*ur(l);return l*r<0&&(c-=ct*ur(a)*ur(l)),[c/r,2*xs($p(i/u,1/r))-jt]},o}function Wj(){return ab(G3).scale(109.5).parallels([30,30])}function ou(e,t){return[e,t]}ou.invert=ou;function Vj(){return Jr(ou).scale(152.63)}function X3(e,t){var n=je(e),r=e===t?Fe(e):(n-je(t))/(t-e),i=n/r+e;if(bt(r)<Qe)return ou;function o(a,s){var l=i-s,u=r*a;return[l*Fe(u),i-l*je(u)]}return o.invert=function(a,s){var l=i-s,u=In(a,bt(l))*ur(l);return l*r<0&&(u-=ct*ur(a)*ur(l)),[u/r,i-ur(r)*Kt(a*a+l*l)]},o}function qj(){return ab(X3).scale(131.154).center([0,13.9389])}var Sl=1.340264,$l=-.081106,kl=893e-6,Ml=.003796,Xf=Kt(3)/2,Yj=12;function ub(e,t){var n=Fn(Xf*Fe(t)),r=n*n,i=r*r*r;return[e*je(n)/(Xf*(Sl+3*$l*r+i*(7*kl+9*Ml*r))),n*(Sl+$l*r+i*(kl+Ml*r))]}ub.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,a,s,l;o<Yj&&(s=n*(Sl+$l*r+i*(kl+Ml*r))-t,l=Sl+3*$l*r+i*(7*kl+9*Ml*r),n-=a=s/l,r=n*n,i=r*r*r,!(bt(a)<kf));++o);return[Xf*e*(Sl+3*$l*r+i*(7*kl+9*Ml*r))/je(n),Fn(Fe(n)/Xf)]};function Gj(){return Jr(ub).scale(177.158)}function cb(e,t){var n=je(t),r=je(e)*n;return[n*Fe(e)/r,Fe(t)/r]}cb.invert=ku(xs);function Xj(){return Jr(cb).scale(144.049).clipAngle(60)}function Kj(){var e=1,t=0,n=0,r=1,i=1,o=0,a,s,l=null,u,c,d,f=1,h=1,p=$u({point:function(x,S){var $=y([x,S]);this.stream.point($[0],$[1])}}),g=nu,b,v;function _(){return f=e*r,h=e*i,b=v=null,y}function y(x){var S=x[0]*f,$=x[1]*h;if(o){var w=$*a-S*s;S=S*a+$*s,$=w}return[S+t,$+n]}return y.invert=function(x){var S=x[0]-t,$=x[1]-n;if(o){var w=$*a+S*s;S=S*a-$*s,$=w}return[S/f,$/h]},y.stream=function(x){return b&&v===x?b:b=p(g(v=x))},y.postclip=function(x){return arguments.length?(g=x,l=u=c=d=null,_()):g},y.clipExtent=function(x){return arguments.length?(g=x==null?(l=u=c=d=null,nu):Jd(l=+x[0][0],u=+x[0][1],c=+x[1][0],d=+x[1][1]),_()):l==null?null:[[l,u],[c,d]]},y.scale=function(x){return arguments.length?(e=+x,_()):e},y.translate=function(x){return arguments.length?(t=+x[0],n=+x[1],_()):[t,n]},y.angle=function(x){return arguments.length?(o=x%360*Ze,s=Fe(o),a=je(o),_()):o*Et},y.reflectX=function(x){return arguments.length?(r=x?-1:1,_()):r<0},y.reflectY=function(x){return arguments.length?(i=x?-1:1,_()):i<0},y.fitExtent=function(x,S){return Qd(y,x,S)},y.fitSize=function(x,S){return nb(y,x,S)},y.fitWidth=function(x,S){return rb(y,x,S)},y.fitHeight=function(x,S){return ib(y,x,S)},y}function fb(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}fb.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(bt(i)>Qe&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function Zj(){return Jr(fb).scale(175.295)}function db(e,t){return[je(t)*Fe(e),Fe(t)]}db.invert=ku(Fn);function Jj(){return Jr(db).scale(249.5).clipAngle(90+Qe)}function hb(e,t){var n=je(t),r=1+je(e)*n;return[n*Fe(e)/r,Fe(t)/r]}hb.invert=ku(function(e){return 2*xs(e)});function Qj(){return Jr(hb).scale(250).clipAngle(142)}function pb(e,t){return[Tf(Jv((jt+t)/2)),-e]}pb.invert=function(e,t){return[-t,2*xs(f3(e))-jt]};function eW(){var e=Y3(pb),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function tW(e,t){return e.parent===t.parent?1:2}function nW(e){return e.reduce(rW,0)/e.length}function rW(e,t){return e+t.x}function iW(e){return 1+e.reduce(oW,0)}function oW(e,t){return Math.max(e,t.y)}function aW(e){for(var t;t=e.children;)e=t[0];return e}function sW(e){for(var t;t=e.children;)e=t[t.length-1];return e}function lW(){var e=tW,t=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var h=f.children;h?(f.x=nW(h),f.y=iW(h)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=aW(o),u=sW(o),c=l.x-e(l,u)/2,d=u.x+e(u,l)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-c)/(d-c)*t,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function uW(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function cW(){return this.eachAfter(uW)}function fW(e){var t=this,n,r=[t],i,o,a;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);while(r.length);return this}function dW(e){for(var t=this,n=[t],r,i;t=n.pop();)if(e(t),r=t.children,r)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function hW(e){for(var t=this,n=[t],r=[],i,o,a;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this}function pW(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function gW(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function vW(e){for(var t=this,n=bW(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function bW(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function mW(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function yW(){var e=[];return this.each(function(t){e.push(t)}),e}function _W(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function xW(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function gb(e,t){var n=new fs(e),r=+e.value&&(n.value=e.value),i,o=[n],a,s,l,u;for(t==null&&(t=CW);i=o.pop();)if(r&&(i.value=+i.data.value),(s=t(i.data))&&(u=s.length))for(i.children=new Array(u),l=u-1;l>=0;--l)o.push(a=i.children[l]=new fs(s[l])),a.parent=i,a.depth=i.depth+1;return n.eachBefore(K3)}function wW(){return gb(this).eachBefore(SW)}function CW(e){return e.children}function SW(e){e.data=e.data.data}function K3(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function fs(e){this.data=e,this.depth=this.height=0,this.parent=null}fs.prototype=gb.prototype={constructor:fs,count:cW,each:fW,eachAfter:hW,eachBefore:dW,sum:pW,sort:gW,path:vW,ancestors:mW,descendants:yW,leaves:_W,links:xW,copy:wW};var $W=Array.prototype.slice;function kW(e){for(var t=e.length,n,r;t;)r=Math.random()*t--|0,n=e[t],e[t]=e[r],e[r]=n;return e}function Z3(e){for(var t=0,n=(e=kW($W.call(e))).length,r=[],i,o;t<n;)i=e[t],o&&J3(o,i)?++t:(o=TW(r=MW(r,i)),t=0);return o}function MW(e,t){var n,r;if(Pp(t,e))return[t];for(n=0;n<e.length;++n)if(wc(t,e[n])&&Pp(nl(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(wc(nl(e[n],e[r]),t)&&wc(nl(e[n],t),e[r])&&wc(nl(e[r],t),e[n])&&Pp(Q3(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function wc(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function J3(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Pp(e,t){for(var n=0;n<t.length;++n)if(!J3(e,t[n]))return!1;return!0}function TW(e){switch(e.length){case 1:return EW(e[0]);case 2:return nl(e[0],e[1]);case 3:return Q3(e[0],e[1],e[2])}}function EW(e){return{x:e.x,y:e.y,r:e.r}}function nl(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-n,u=a-r,c=s-i,d=Math.sqrt(l*l+u*u);return{x:(n+o+l/d*c)/2,y:(r+a+u/d*c)/2,r:(d+i+s)/2}}function Q3(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,u=n.x,c=n.y,d=n.r,f=r-a,h=r-u,p=i-s,g=i-c,b=l-o,v=d-o,_=r*r+i*i-o*o,y=_-a*a-s*s+l*l,x=_-u*u-c*c+d*d,S=h*p-f*g,$=(p*x-g*y)/(S*2)-r,w=(g*b-p*v)/S,T=(h*y-f*x)/(S*2)-i,k=(f*v-h*b)/S,P=w*w+k*k-1,R=2*(o+$*w+T*k),C=$*$+T*T-o*o,E=-(P?(R+Math.sqrt(R*R-4*P*C))/(2*P):C/R);return{x:r+$+w*E,y:i+T+k*E,r:E}}function O_(e,t,n){var r=e.x-t.x,i,o,a=e.y-t.y,s,l,u=r*r+a*a;u?(o=t.r+n.r,o*=o,l=e.r+n.r,l*=l,o>l?(i=(u+l-o)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),n.x=e.x-i*r-s*a,n.y=e.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=t.x+i*r-s*a,n.y=t.y+i*a+s*r)):(n.x=t.x+n.r,n.y=t.y)}function N_(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function L_(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function Cc(e){this._=e,this.next=null,this.previous=null}function eC(e){if(!(i=e.length))return 0;var t,n,r,i,o,a,s,l,u,c,d;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;O_(n,t,r=e[2]),t=new Cc(t),n=new Cc(n),r=new Cc(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s<i;++s){O_(t._,n._,r=e[s]),r=new Cc(r),l=n.next,u=t.previous,c=n._.r,d=t._.r;do if(c<=d){if(N_(l._,r._)){n=l,t.next=n,n.previous=t,--s;continue e}c+=l._.r,l=l.next}else{if(N_(u._,r._)){t=u,t.next=n,n.previous=t,--s;continue e}d+=u._.r,u=u.previous}while(l!==u.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=L_(t);(r=r.next)!==n;)(a=L_(r))<o&&(t=r,o=a);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=Z3(t),s=0;s<i;++s)t=e[s],t.x-=r.x,t.y-=r.y;return r.r}function AW(e){return eC(e),e}function PW(e){return e==null?null:Kf(e)}function Kf(e){if(typeof e!="function")throw new Error;return e}function Po(){return 0}function Ra(e){return function(){return e}}function RW(e){return Math.sqrt(e.value)}function zW(){var e=null,t=1,n=1,r=Po;function i(o){return o.x=t/2,o.y=n/2,e?o.eachBefore(D_(e)).eachAfter(Rp(r,.5)).eachBefore(H_(1)):o.eachBefore(D_(RW)).eachAfter(Rp(Po,1)).eachAfter(Rp(r,o.r/Math.min(t,n))).eachBefore(H_(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=PW(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Ra(+o),i):r},i}function D_(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Rp(e,t){return function(n){if(r=n.children){var r,i,o=r.length,a=e(n)*t||0,s;if(a)for(i=0;i<o;++i)r[i].r+=a;if(s=eC(r),a)for(i=0;i<o;++i)r[i].r-=a;n.r=s+a}}}function H_(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function tC(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Tu(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function IW(){var e=1,t=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),r&&a.eachBefore(tC),a}function o(a,s){return function(l){l.children&&Tu(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var u=l.x0,c=l.y0,d=l.x1-n,f=l.y1-n;d<u&&(u=d=(u+d)/2),f<c&&(c=f=(c+f)/2),l.x0=u,l.y0=c,l.x1=d,l.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var U_="$",FW={depth:-1},j_={};function BW(e){return e.id}function OW(e){return e.parentId}function NW(){var e=BW,t=OW;function n(r){var i,o,a=r.length,s,l,u,c=new Array(a),d,f,h={};for(o=0;o<a;++o)i=r[o],u=c[o]=new fs(i),(d=e(i,o,r))!=null&&(d+="")&&(f=U_+(u.id=d),h[f]=f in h?j_:u);for(o=0;o<a;++o)if(u=c[o],d=t(r[o],o,r),d==null||!(d+="")){if(s)throw new Error("multiple roots");s=u}else{if(l=h[U_+d],!l)throw new Error("missing: "+d);if(l===j_)throw new Error("ambiguous: "+d);l.children?l.children.push(u):l.children=[u],u.parent=l}if(!s)throw new Error("no root");if(s.parent=FW,s.eachBefore(function(p){p.depth=p.parent.depth+1,--a}).eachBefore(K3),s.parent=null,a>0)throw new Error("cycle");return s}return n.id=function(r){return arguments.length?(e=Kf(r),n):e},n.parentId=function(r){return arguments.length?(t=Kf(r),n):t},n}function LW(e,t){return e.parent===t.parent?1:2}function zp(e){var t=e.children;return t?t[0]:e.t}function Ip(e){var t=e.children;return t?t[t.length-1]:e.t}function DW(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function HW(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function UW(e,t,n){return e.a.parent===t.parent?e.a:n}function Wc(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Wc.prototype=Object.create(fs.prototype);function jW(e){for(var t=new Wc(e,0),n,r=[t],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Wc(o[a],a)),i.parent=n;return(t.parent=new Wc(null,0)).children=[t],t}function WW(){var e=LW,t=1,n=1,r=null;function i(u){var c=jW(u);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)u.eachBefore(l);else{var d=u,f=u,h=u;u.eachBefore(function(_){_.x<d.x&&(d=_),_.x>f.x&&(f=_),_.depth>h.depth&&(h=_)});var p=d===f?1:e(d,f)/2,g=p-d.x,b=t/(f.x+p+g),v=n/(h.depth||1);u.eachBefore(function(_){_.x=(_.x+g)*b,_.y=_.depth*v})}return u}function o(u){var c=u.children,d=u.parent.children,f=u.i?d[u.i-1]:null;if(c){HW(u);var h=(c[0].z+c[c.length-1].z)/2;f?(u.z=f.z+e(u._,f._),u.m=u.z-h):u.z=h}else f&&(u.z=f.z+e(u._,f._));u.parent.A=s(u,f,u.parent.A||d[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,d){if(c){for(var f=u,h=u,p=c,g=f.parent.children[0],b=f.m,v=h.m,_=p.m,y=g.m,x;p=Ip(p),f=zp(f),p&&f;)g=zp(g),h=Ip(h),h.a=u,x=p.z+_-f.z-b+e(p._,f._),x>0&&(DW(UW(p,u,d),u,x),b+=x,v+=x),_+=p.m,b+=f.m,y+=g.m,v+=h.m;p&&!Ip(h)&&(h.t=p,h.m+=_-v),f&&!zp(g)&&(g.t=f,g.m+=b-y,d=u)}return d}function l(u){u.x*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}function eh(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var nC=(1+Math.sqrt(5))/2;function rC(e,t,n,r,i,o){for(var a=[],s=t.children,l,u,c=0,d=0,f=s.length,h,p,g=t.value,b,v,_,y,x,S,$;c<f;){h=i-n,p=o-r;do b=s[d++].value;while(!b&&d<f);for(v=_=b,S=Math.max(p/h,h/p)/(g*e),$=b*b*S,x=Math.max(_/$,$/v);d<f;++d){if(b+=u=s[d].value,u<v&&(v=u),u>_&&(_=u),$=b*b*S,y=Math.max(_/$,$/v),y>x){b-=u;break}x=y}a.push(l={value:b,dice:h<p,children:s.slice(c,d)}),l.dice?Tu(l,n,r,i,g?r+=p*b/g:o):eh(l,n,r,g?n+=h*b/g:i,o),g-=b,c=d}return a}const iC=function e(t){function n(r,i,o,a,s){rC(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(nC);function VW(){var e=iC,t=!1,n=1,r=1,i=[0],o=Po,a=Po,s=Po,l=Po,u=Po;function c(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(d),i=[0],t&&f.eachBefore(tC),f}function d(f){var h=i[f.depth],p=f.x0+h,g=f.y0+h,b=f.x1-h,v=f.y1-h;b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),f.x0=p,f.y0=g,f.x1=b,f.y1=v,f.children&&(h=i[f.depth+1]=o(f)/2,p+=u(f)-h,g+=a(f)-h,b-=s(f)-h,v-=l(f)-h,b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),e(f,p,g,b,v))}return c.round=function(f){return arguments.length?(t=!!f,c):t},c.size=function(f){return arguments.length?(n=+f[0],r=+f[1],c):[n,r]},c.tile=function(f){return arguments.length?(e=Kf(f),c):e},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Ra(+f),c):o},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Ra(+f),c):a},c.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Ra(+f),c):s},c.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Ra(+f),c):l},c.paddingLeft=function(f){return arguments.length?(u=typeof f=="function"?f:Ra(+f),c):u},c}function qW(e,t,n,r,i){var o=e.children,a,s=o.length,l,u=new Array(s+1);for(u[0]=l=a=0;a<s;++a)u[a+1]=l+=o[a].value;c(0,s,e.value,t,n,r,i);function c(d,f,h,p,g,b,v){if(d>=f-1){var _=o[d];_.x0=p,_.y0=g,_.x1=b,_.y1=v;return}for(var y=u[d],x=h/2+y,S=d+1,$=f-1;S<$;){var w=S+$>>>1;u[w]<x?S=w+1:$=w}x-u[S-1]<u[S]-x&&d+1<S&&--S;var T=u[S]-y,k=h-T;if(b-p>v-g){var P=(p*k+b*T)/h;c(d,S,T,p,g,P,v),c(S,f,k,P,g,b,v)}else{var R=(g*k+v*T)/h;c(d,S,T,p,g,b,R),c(S,f,k,p,R,b,v)}}}function YW(e,t,n,r,i){(e.depth&1?eh:Tu)(e,t,n,r,i)}const GW=function e(t){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===t)for(var l,u,c,d,f=-1,h,p=l.length,g=r.value;++f<p;){for(u=l[f],c=u.children,d=u.value=0,h=c.length;d<h;++d)u.value+=c[d].value;u.dice?Tu(u,i,o,a,o+=(s-o)*u.value/g):eh(u,i,o,i+=(a-i)*u.value/g,s),g-=u.value}else r._squarify=l=rC(t,r,i,o,a,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(nC);function XW(e){for(var t=-1,n=e.length,r,i=e[n-1],o=0;++t<n;)r=i,i=e[t],o+=r[1]*i[0]-r[0]*i[1];return o/2}function KW(e){for(var t=-1,n=e.length,r=0,i=0,o,a=e[n-1],s,l=0;++t<n;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[r/l,i/l]}function ZW(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function JW(e,t){return e[0]-t[0]||e[1]-t[1]}function W_(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;++i){for(;r>1&&ZW(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function QW(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(JW),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=W_(r),a=W_(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(t=o.length-1;t>=0;--t)u.push(e[r[o[t]][2]]);for(t=+s;t<a.length-l;++t)u.push(e[r[a[t]][2]]);return u}function eV(e,t){for(var n=e.length,r=e[n-1],i=t[0],o=t[1],a=r[0],s=r[1],l,u,c=!1,d=0;d<n;++d)r=e[d],l=r[0],u=r[1],u>o!=s>o&&i<(a-l)*(o-u)/(s-u)+l&&(c=!c),a=l,s=u;return c}function tV(e){for(var t=-1,n=e.length,r=e[n-1],i,o,a=r[0],s=r[1],l=0;++t<n;)i=a,o=s,r=e[t],a=r[0],s=r[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}function ws(){return Math.random()}const nV=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return t()*i+r}}return n.source=e,n}(ws),oC=function e(t){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=e,n}(ws),rV=function e(t){function n(){var r=oC.source(t).apply(this,arguments);return function(){return Math.exp(r())}}return n.source=e,n}(ws),aC=function e(t){function n(r){return function(){for(var i=0,o=0;o<r;++o)i+=t();return i}}return n.source=e,n}(ws),iV=function e(t){function n(r){var i=aC.source(t)(r);return function(){return i()/r}}return n.source=e,n}(ws),oV=function e(t){function n(r){return function(){return-Math.log(1-t())/r}}return n.source=e,n}(ws);function Tr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ci(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e);break}return this}var sC=Array.prototype,Zf=sC.map,Qo=sC.slice,xg={name:"implicit"};function vb(){var e=pi(),t=[],n=[],r=xg;function i(o){var a=o+"",s=e.get(a);if(!s){if(r!==xg)return r;e.set(a,s=t.push(o))}return n[(s-1)%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=pi();for(var a=-1,s=o.length,l,u;++a<s;)e.has(u=(l=o[a])+"")||e.set(u,t.push(l));return i},i.range=function(o){return arguments.length?(n=Qo.call(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return vb(t,n).unknown(r)},Tr.apply(i,arguments),i}function bb(){var e=vb().unknown(void 0),t=e.domain,n=e.range,r=[0,1],i,o,a=!1,s=0,l=0,u=.5;delete e.unknown;function c(){var d=t().length,f=r[1]<r[0],h=r[f-0],p=r[1-f];i=(p-h)/Math.max(1,d-s+l*2),a&&(i=Math.floor(i)),h+=(p-h-i*(d-s))*u,o=i*(1-s),a&&(h=Math.round(h),o=Math.round(o));var g=Jn(d).map(function(b){return h+i*b});return n(f?g.reverse():g)}return e.domain=function(d){return arguments.length?(t(d),c()):t()},e.range=function(d){return arguments.length?(r=[+d[0],+d[1]],c()):r.slice()},e.rangeRound=function(d){return r=[+d[0],+d[1]],a=!0,c()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(a=!!d,c()):a},e.padding=function(d){return arguments.length?(s=Math.min(1,l=+d),c()):s},e.paddingInner=function(d){return arguments.length?(s=Math.min(1,d),c()):s},e.paddingOuter=function(d){return arguments.length?(l=+d,c()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),c()):u},e.copy=function(){return bb(t(),r).round(a).paddingInner(s).paddingOuter(l).align(u)},Tr.apply(c(),arguments)}function lC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return lC(t())},e}function aV(){return lC(bb.apply(null,arguments).paddingInner(1))}function sV(e){return function(){return e}}function wg(e){return+e}var V_=[0,1];function cn(e){return e}function Cg(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sV(isNaN(t)?NaN:.5)}function q_(e){var t=e[0],n=e[e.length-1],r;return t>n&&(r=t,t=n,n=r),function(i){return Math.max(t,Math.min(n,i))}}function lV(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Cg(i,r),o=n(a,o)):(r=Cg(r,i),o=n(o,a)),function(s){return o(r(s))}}function uV(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Cg(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=Ji(e,s,1,r)-1;return o[l](i[l](s))}}function Eu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function th(){var e=V_,t=V_,n=ys,r,i,o,a=cn,s,l,u;function c(){return s=Math.min(e.length,t.length)>2?uV:lV,l=u=null,d}function d(f){return isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((u||(u=s(t,e.map(r),or)))(f)))},d.domain=function(f){return arguments.length?(e=Zf.call(f,wg),a===cn||(a=q_(e)),c()):e.slice()},d.range=function(f){return arguments.length?(t=Qo.call(f),c()):t.slice()},d.rangeRound=function(f){return t=Qo.call(f),n=P8,c()},d.clamp=function(f){return arguments.length?(a=f?q_(e):cn,d):a!==cn},d.interpolate=function(f){return arguments.length?(n=f,c()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,h){return r=f,i=h,c()}}function uC(e,t){return th()(e,t)}function cC(e,t,n,r){var i=Yo(e,t,n),o;switch(r=tu(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=u3(i,a))&&(r.precision=o),Zv(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=c3(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=l3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zd(r)}function ba(e){var t=e.domain;return e.ticks=function(n){var r=t();return Mv(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return cC(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=wl(a,s,n),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=wl(a,s,n)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=wl(a,s,n)),l>0?(r[i]=Math.floor(a/l)*l,r[o]=Math.ceil(s/l)*l,t(r)):l<0&&(r[i]=Math.ceil(a*l)/l,r[o]=Math.floor(s*l)/l,t(r)),e},e}function au(){var e=uC(cn,cn);return e.copy=function(){return Eu(e,au())},Tr.apply(e,arguments),ba(e)}function fC(e){var t;function n(r){return isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Zf.call(r,wg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return fC(e).unknown(t)},e=arguments.length?Zf.call(e,wg):[0,1],ba(n)}function dC(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Y_(e){return Math.log(e)}function G_(e){return Math.exp(e)}function cV(e){return-Math.log(-e)}function fV(e){return-Math.exp(-e)}function dV(e){return isFinite(e)?+("1e"+e):e<0?0:e}function hV(e){return e===10?dV:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function pV(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function X_(e){return function(t){return-e(-t)}}function mb(e){var t=e(Y_,G_),n=t.domain,r=10,i,o;function a(){return i=pV(r),o=hV(r),n()[0]<0?(i=X_(i),o=X_(o),e(cV,fV)):e(Y_,G_),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=function(s){var l=n(),u=l[0],c=l[l.length-1],d;(d=c<u)&&(f=u,u=c,c=f);var f=i(u),h=i(c),p,g,b,v=s==null?10:+s,_=[];if(!(r%1)&&h-f<v){if(f=Math.round(f)-1,h=Math.round(h)+1,u>0){for(;f<h;++f)for(g=1,p=o(f);g<r;++g)if(b=p*g,!(b<u)){if(b>c)break;_.push(b)}}else for(;f<h;++f)for(g=r-1,p=o(f);g>=1;--g)if(b=p*g,!(b<u)){if(b>c)break;_.push(b)}}else _=Mv(f,h,Math.min(h-f,v)).map(o);return d?_.reverse():_},t.tickFormat=function(s,l){if(l==null&&(l=r===10?".0e":","),typeof l!="function"&&(l=Zd(l)),s===1/0)return l;s==null&&(s=10);var u=Math.max(1,r*s/t.ticks().length);return function(c){var d=c/o(Math.round(i(c)));return d*r<r-.5&&(d*=r),d<=u?l(c):""}},t.nice=function(){return n(dC(n(),{floor:function(s){return o(Math.floor(i(s)))},ceil:function(s){return o(Math.ceil(i(s)))}}))},t}function hC(){var e=mb(th()).domain([1,10]);return e.copy=function(){return Eu(e,hC()).base(e.base())},Tr.apply(e,arguments),e}function K_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Z_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yb(e){var t=1,n=e(K_(t),Z_(t));return n.constant=function(r){return arguments.length?e(K_(t=+r),Z_(t)):t},ba(n)}function pC(){var e=yb(th());return e.copy=function(){return Eu(e,pC()).constant(e.constant())},Tr.apply(e,arguments)}function J_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function gV(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function vV(e){return e<0?-e*e:e*e}function _b(e){var t=e(cn,cn),n=1;function r(){return n===1?e(cn,cn):n===.5?e(gV,vV):e(J_(n),J_(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ba(t)}function xb(){var e=_b(th());return e.copy=function(){return Eu(e,xb()).exponent(e.exponent())},Tr.apply(e,arguments),e}function bV(){return xb.apply(null,arguments).exponent(.5)}function gC(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=Vl(e,a/s);return o}function o(a){return isNaN(a=+a)?r:t[Ji(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(var s=0,l=a.length,u;s<l;++s)u=a[s],u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Sr),i()},o.range=function(a){return arguments.length?(t=Qo.call(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return gC().domain(e).range(t).unknown(r)},Tr.apply(o,arguments)}function vC(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l<=l?i[Ji(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?(e=+l[0],t=+l[1],s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Qo.call(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return vC().domain([e,t]).range(i).unknown(o)},Tr.apply(ba(a),arguments)}function bC(){var e=[.5],t=[0,1],n,r=1;function i(o){return o<=o?t[Ji(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Qo.call(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Qo.call(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return bC().domain(e).range(t).unknown(n)},Tr.apply(i,arguments)}var Fp=new Date,Bp=new Date;function Qt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],u;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(u=new Date(+o)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=function(o){return Qt(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return Fp.setTime(+o),Bp.setTime(+a),e(Fp),e(Bp),Math.floor(n(Fp,Bp))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var ea=Qt(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});ea.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Qt(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):ea};var Q_=ea.range,Jf=1e3,ta=6e4,Qf=36e5,mC=864e5,yC=6048e5,su=Qt(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Jf)},function(e,t){return(t-e)/Jf},function(e){return e.getUTCSeconds()}),ex=su.range,wb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jf)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getMinutes()}),mV=wb.range,Cb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jf-e.getMinutes()*ta)},function(e,t){e.setTime(+e+t*Qf)},function(e,t){return(t-e)/Qf},function(e){return e.getHours()}),yV=Cb.range,Au=Qt(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ta)/mC},function(e){return e.getDate()-1}),_V=Au.range;function ma(e){return Qt(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ta)/yC})}var lu=ma(0),uu=ma(1),_C=ma(2),xC=ma(3),na=ma(4),wC=ma(5),CC=ma(6),tx=lu.range,xV=uu.range,wV=_C.range,CV=xC.range,SV=na.range,$V=wC.range,kV=CC.range,Sb=Qt(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),MV=Sb.range,vi=Qt(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});vi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};var TV=vi.range,$b=Qt(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getUTCMinutes()}),EV=$b.range,kb=Qt(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Qf)},function(e,t){return(t-e)/Qf},function(e){return e.getUTCHours()}),AV=kb.range,Pu=Qt(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/mC},function(e){return e.getUTCDate()-1}),PV=Pu.range;function ya(e){return Qt(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/yC})}var cu=ya(0),fu=ya(1),SC=ya(2),$C=ya(3),ra=ya(4),kC=ya(5),MC=ya(6),nx=cu.range,RV=fu.range,zV=SC.range,IV=$C.range,FV=ra.range,BV=kC.range,OV=MC.range,Mb=Qt(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),NV=Mb.range,bi=Qt(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});bi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};var LV=bi.range;function Op(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Np(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Os(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function TC(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ns(i),c=Ls(i),d=Ns(o),f=Ls(o),h=Ns(a),p=Ls(a),g=Ns(s),b=Ls(s),v=Ns(l),_=Ls(l),y={a:Z,A:J,b:ie,B:he,c:null,d:lx,e:lx,f:lq,g:mq,G:_q,H:oq,I:aq,j:sq,L:EC,m:uq,M:cq,p:_e,q:oe,Q:fx,s:dx,S:fq,u:dq,U:hq,V:pq,w:gq,W:vq,x:null,X:null,y:bq,Y:yq,Z:xq,"%":cx},x={a:ve,A:we,b:Oe,B:xe,c:null,d:ux,e:ux,f:$q,g:Fq,G:Oq,H:wq,I:Cq,j:Sq,L:PC,m:kq,M:Mq,p:Xe,q:Ve,Q:fx,s:dx,S:Tq,u:Eq,U:Aq,V:Pq,w:Rq,W:zq,x:null,X:null,y:Iq,Y:Bq,Z:Nq,"%":cx},S={a:P,A:R,b:C,B:E,c:I,d:ax,e:ax,f:tq,g:ox,G:ix,H:sx,I:sx,j:ZV,L:eq,m:KV,M:JV,p:k,q:XV,Q:rq,s:iq,S:QV,u:WV,U:VV,V:qV,w:jV,W:YV,x:z,X:j,y:ox,Y:ix,Z:GV,"%":nq};y.x=$(n,y),y.X=$(r,y),y.c=$(t,y),x.x=$(n,x),x.X=$(r,x),x.c=$(t,x);function $(fe,Ee){return function(Pe){var A=[],H=-1,G=0,de=fe.length,le,q,N;for(Pe instanceof Date||(Pe=new Date(+Pe));++H<de;)fe.charCodeAt(H)===37&&(A.push(fe.slice(G,H)),(q=rx[le=fe.charAt(++H)])!=null?le=fe.charAt(++H):q=le==="e"?" ":"0",(N=Ee[le])&&(le=N(Pe,q)),A.push(le),G=H+1);return A.push(fe.slice(G,H)),A.join("")}}function w(fe,Ee){return function(Pe){var A=Os(1900,void 0,1),H=T(A,fe,Pe+="",0),G,de;if(H!=Pe.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(Ee&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(G=Np(Os(A.y,0,1)),de=G.getUTCDay(),G=de>4||de===0?fu.ceil(G):fu(G),G=Pu.offset(G,(A.V-1)*7),A.y=G.getUTCFullYear(),A.m=G.getUTCMonth(),A.d=G.getUTCDate()+(A.w+6)%7):(G=Op(Os(A.y,0,1)),de=G.getDay(),G=de>4||de===0?uu.ceil(G):uu(G),G=Au.offset(G,(A.V-1)*7),A.y=G.getFullYear(),A.m=G.getMonth(),A.d=G.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),de="Z"in A?Np(Os(A.y,0,1)).getUTCDay():Op(Os(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(de+5)%7:A.w+A.U*7-(de+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,Np(A)):Op(A)}}function T(fe,Ee,Pe,A){for(var H=0,G=Ee.length,de=Pe.length,le,q;H<G;){if(A>=de)return-1;if(le=Ee.charCodeAt(H++),le===37){if(le=Ee.charAt(H++),q=S[le in rx?Ee.charAt(H++):le],!q||(A=q(fe,Pe,A))<0)return-1}else if(le!=Pe.charCodeAt(A++))return-1}return A}function k(fe,Ee,Pe){var A=u.exec(Ee.slice(Pe));return A?(fe.p=c[A[0].toLowerCase()],Pe+A[0].length):-1}function P(fe,Ee,Pe){var A=h.exec(Ee.slice(Pe));return A?(fe.w=p[A[0].toLowerCase()],Pe+A[0].length):-1}function R(fe,Ee,Pe){var A=d.exec(Ee.slice(Pe));return A?(fe.w=f[A[0].toLowerCase()],Pe+A[0].length):-1}function C(fe,Ee,Pe){var A=v.exec(Ee.slice(Pe));return A?(fe.m=_[A[0].toLowerCase()],Pe+A[0].length):-1}function E(fe,Ee,Pe){var A=g.exec(Ee.slice(Pe));return A?(fe.m=b[A[0].toLowerCase()],Pe+A[0].length):-1}function I(fe,Ee,Pe){return T(fe,t,Ee,Pe)}function z(fe,Ee,Pe){return T(fe,n,Ee,Pe)}function j(fe,Ee,Pe){return T(fe,r,Ee,Pe)}function Z(fe){return a[fe.getDay()]}function J(fe){return o[fe.getDay()]}function ie(fe){return l[fe.getMonth()]}function he(fe){return s[fe.getMonth()]}function _e(fe){return i[+(fe.getHours()>=12)]}function oe(fe){return 1+~~(fe.getMonth()/3)}function ve(fe){return a[fe.getUTCDay()]}function we(fe){return o[fe.getUTCDay()]}function Oe(fe){return l[fe.getUTCMonth()]}function xe(fe){return s[fe.getUTCMonth()]}function Xe(fe){return i[+(fe.getUTCHours()>=12)]}function Ve(fe){return 1+~~(fe.getUTCMonth()/3)}return{format:function(fe){var Ee=$(fe+="",y);return Ee.toString=function(){return fe},Ee},parse:function(fe){var Ee=w(fe+="",!1);return Ee.toString=function(){return fe},Ee},utcFormat:function(fe){var Ee=$(fe+="",x);return Ee.toString=function(){return fe},Ee},utcParse:function(fe){var Ee=w(fe+="",!0);return Ee.toString=function(){return fe},Ee}}}var rx={"-":"",_:" ",0:"0"},on=/^\s*\d+/,DV=/^%/,HV=/[\\^$*+?|[\]().{}]/g;function Ct(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function UV(e){return e.replace(HV,"\\$&")}function Ns(e){return new RegExp("^(?:"+e.map(UV).join("|")+")","i")}function Ls(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function jV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function WV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function VV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function qV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function YV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ix(e,t,n){var r=on.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ox(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function GV(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function XV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function KV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ax(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ZV(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sx(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function JV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function QV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function eq(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function tq(e,t,n){var r=on.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nq(e,t,n){var r=DV.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function rq(e,t,n){var r=on.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function iq(e,t,n){var r=on.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lx(e,t){return Ct(e.getDate(),t,2)}function oq(e,t){return Ct(e.getHours(),t,2)}function aq(e,t){return Ct(e.getHours()%12||12,t,2)}function sq(e,t){return Ct(1+Au.count(vi(e),e),t,3)}function EC(e,t){return Ct(e.getMilliseconds(),t,3)}function lq(e,t){return EC(e,t)+"000"}function uq(e,t){return Ct(e.getMonth()+1,t,2)}function cq(e,t){return Ct(e.getMinutes(),t,2)}function fq(e,t){return Ct(e.getSeconds(),t,2)}function dq(e){var t=e.getDay();return t===0?7:t}function hq(e,t){return Ct(lu.count(vi(e)-1,e),t,2)}function AC(e){var t=e.getDay();return t>=4||t===0?na(e):na.ceil(e)}function pq(e,t){return e=AC(e),Ct(na.count(vi(e),e)+(vi(e).getDay()===4),t,2)}function gq(e){return e.getDay()}function vq(e,t){return Ct(uu.count(vi(e)-1,e),t,2)}function bq(e,t){return Ct(e.getFullYear()%100,t,2)}function mq(e,t){return e=AC(e),Ct(e.getFullYear()%100,t,2)}function yq(e,t){return Ct(e.getFullYear()%1e4,t,4)}function _q(e,t){var n=e.getDay();return e=n>=4||n===0?na(e):na.ceil(e),Ct(e.getFullYear()%1e4,t,4)}function xq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ct(t/60|0,"0",2)+Ct(t%60,"0",2)}function ux(e,t){return Ct(e.getUTCDate(),t,2)}function wq(e,t){return Ct(e.getUTCHours(),t,2)}function Cq(e,t){return Ct(e.getUTCHours()%12||12,t,2)}function Sq(e,t){return Ct(1+Pu.count(bi(e),e),t,3)}function PC(e,t){return Ct(e.getUTCMilliseconds(),t,3)}function $q(e,t){return PC(e,t)+"000"}function kq(e,t){return Ct(e.getUTCMonth()+1,t,2)}function Mq(e,t){return Ct(e.getUTCMinutes(),t,2)}function Tq(e,t){return Ct(e.getUTCSeconds(),t,2)}function Eq(e){var t=e.getUTCDay();return t===0?7:t}function Aq(e,t){return Ct(cu.count(bi(e)-1,e),t,2)}function RC(e){var t=e.getUTCDay();return t>=4||t===0?ra(e):ra.ceil(e)}function Pq(e,t){return e=RC(e),Ct(ra.count(bi(e),e)+(bi(e).getUTCDay()===4),t,2)}function Rq(e){return e.getUTCDay()}function zq(e,t){return Ct(fu.count(bi(e)-1,e),t,2)}function Iq(e,t){return Ct(e.getUTCFullYear()%100,t,2)}function Fq(e,t){return e=RC(e),Ct(e.getUTCFullYear()%100,t,2)}function Bq(e,t){return Ct(e.getUTCFullYear()%1e4,t,4)}function Oq(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ra(e):ra.ceil(e),Ct(e.getUTCFullYear()%1e4,t,4)}function Nq(){return"+0000"}function cx(){return"%"}function fx(e){return+e}function dx(e){return Math.floor(+e/1e3)}var Pa,Tb,zC,nh,Eb;IC({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function IC(e){return Pa=TC(e),Tb=Pa.format,zC=Pa.parse,nh=Pa.utcFormat,Eb=Pa.utcParse,Pa}var FC="%Y-%m-%dT%H:%M:%S.%LZ";function Lq(e){return e.toISOString()}var Dq=Date.prototype.toISOString?Lq:nh(FC);function Hq(e){var t=new Date(e);return isNaN(t)?null:t}var Uq=+new Date("2000-01-01T00:00:00.000Z")?Hq:Eb(FC),rl=1e3,il=rl*60,ol=il*60,du=ol*24,jq=du*7,hx=du*30,Lp=du*365;function Wq(e){return new Date(e)}function Vq(e){return e instanceof Date?+e:+new Date(+e)}function Ab(e,t,n,r,i,o,a,s,l){var u=uC(cn,cn),c=u.invert,d=u.domain,f=l(".%L"),h=l(":%S"),p=l("%I:%M"),g=l("%I %p"),b=l("%a %d"),v=l("%b %d"),_=l("%B"),y=l("%Y"),x=[[a,1,rl],[a,5,5*rl],[a,15,15*rl],[a,30,30*rl],[o,1,il],[o,5,5*il],[o,15,15*il],[o,30,30*il],[i,1,ol],[i,3,3*ol],[i,6,6*ol],[i,12,12*ol],[r,1,du],[r,2,2*du],[n,1,jq],[t,1,hx],[t,3,3*hx],[e,1,Lp]];function S(w){return(a(w)<w?f:o(w)<w?h:i(w)<w?p:r(w)<w?g:t(w)<w?n(w)<w?b:v:e(w)<w?_:y)(w)}function $(w,T,k,P){if(w==null&&(w=10),typeof w=="number"){var R=Math.abs(k-T)/w,C=kv(function(E){return E[2]}).right(x,R);C===x.length?(P=Yo(T/Lp,k/Lp,w),w=e):C?(C=x[R/x[C-1][2]<x[C][2]/R?C-1:C],P=C[1],w=C[0]):(P=Math.max(Yo(T,k,w),1),w=s)}return P==null?w:w.every(P)}return u.invert=function(w){return new Date(c(w))},u.domain=function(w){return arguments.length?d(Zf.call(w,Vq)):d().map(Wq)},u.ticks=function(w,T){var k=d(),P=k[0],R=k[k.length-1],C=R<P,E;return C&&(E=P,P=R,R=E),E=$(w,P,R,T),E=E?E.range(P,R+1):[],C?E.reverse():E},u.tickFormat=function(w,T){return T==null?S:l(T)},u.nice=function(w,T){var k=d();return(w=$(w,k[0],k[k.length-1],T))?d(dC(k,w)):u},u.copy=function(){return Eu(u,Ab(e,t,n,r,i,o,a,s,l))},u}function qq(){return Tr.apply(Ab(vi,Sb,lu,Au,Cb,wb,su,ea,Tb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Yq(){return Tr.apply(Ab(bi,Mb,cu,Pu,kb,$b,su,ea,nh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function rh(){var e=0,t=1,n,r,i,o,a=cn,s=!1,l;function u(c){return isNaN(c=+c)?l:a(i===0?.5:(c=(o(c)-n)*i,s?Math.max(0,Math.min(1,c)):c))}return u.domain=function(c){return arguments.length?(n=o(e=+c[0]),r=o(t=+c[1]),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(c){return arguments.length?(s=!!c,u):s},u.interpolator=function(c){return arguments.length?(a=c,u):a},u.unknown=function(c){return arguments.length?(l=c,u):l},function(c){return o=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),u}}function go(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function BC(){var e=ba(rh()(cn));return e.copy=function(){return go(e,BC())},Ci.apply(e,arguments)}function OC(){var e=mb(rh()).domain([1,10]);return e.copy=function(){return go(e,OC()).base(e.base())},Ci.apply(e,arguments)}function NC(){var e=yb(rh());return e.copy=function(){return go(e,NC()).constant(e.constant())},Ci.apply(e,arguments)}function Pb(){var e=_b(rh());return e.copy=function(){return go(e,Pb()).exponent(e.exponent())},Ci.apply(e,arguments)}function Gq(){return Pb.apply(null,arguments).exponent(.5)}function LC(){var e=[],t=cn;function n(r){if(!isNaN(r=+r))return t((Ji(e,r)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(var i=0,o=r.length,a;i<o;++i)a=r[i],a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Sr),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return LC(t).domain(e)},Ci.apply(n,arguments)}function ih(){var e=0,t=.5,n=1,r,i,o,a,s,l=cn,u,c=!1,d;function f(h){return isNaN(h=+h)?d:(h=.5+((h=+u(h))-i)*(h<i?a:s),l(c?Math.max(0,Math.min(1,h)):h))}return f.domain=function(h){return arguments.length?(r=u(e=+h[0]),i=u(t=+h[1]),o=u(n=+h[2]),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),f):[e,t,n]},f.clamp=function(h){return arguments.length?(c=!!h,f):c},f.interpolator=function(h){return arguments.length?(l=h,f):l},f.unknown=function(h){return arguments.length?(d=h,f):d},function(h){return u=h,r=h(e),i=h(t),o=h(n),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),f}}function DC(){var e=ba(ih()(cn));return e.copy=function(){return go(e,DC())},Ci.apply(e,arguments)}function HC(){var e=mb(ih()).domain([.1,1,10]);return e.copy=function(){return go(e,HC()).base(e.base())},Ci.apply(e,arguments)}function UC(){var e=yb(ih());return e.copy=function(){return go(e,UC()).constant(e.constant())},Ci.apply(e,arguments)}function Rb(){var e=_b(ih());return e.copy=function(){return go(e,Rb()).exponent(e.exponent())},Ci.apply(e,arguments)}function Xq(){return Rb.apply(null,arguments).exponent(.5)}function st(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const Kq=st("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Zq=st("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Jq=st("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Qq=st("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),eY=st("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),tY=st("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),nY=st("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),rY=st("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),iY=st("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),oY=st("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function At(e){return k8(e[e.length-1])}var jC=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(st);const aY=At(jC);var WC=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(st);const sY=At(WC);var VC=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(st);const lY=At(VC);var qC=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(st);const uY=At(qC);var YC=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(st);const cY=At(YC);var GC=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(st);const fY=At(GC);var XC=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(st);const dY=At(XC);var KC=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(st);const hY=At(KC);var ZC=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(st);const pY=At(ZC);var JC=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(st);const gY=At(JC);var QC=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(st);const vY=At(QC);var e6=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(st);const bY=At(e6);var t6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(st);const mY=At(t6);var n6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(st);const yY=At(n6);var r6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(st);const _Y=At(r6);var i6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(st);const xY=At(i6);var o6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(st);const wY=At(o6);var a6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(st);const CY=At(a6);var s6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(st);const SY=At(s6);var l6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(st);const $Y=At(l6);var u6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(st);const kY=At(u6);var c6=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(st);const MY=At(c6);var f6=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(st);const TY=At(f6);var d6=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(st);const EY=At(d6);var h6=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(st);const AY=At(h6);var p6=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(st);const PY=At(p6);var g6=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(st);const RY=At(g6);function zY(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const IY=jd($r(300,.5,0),$r(-240,.5,1));var FY=jd($r(-100,.75,.35),$r(80,1.5,.8)),BY=jd($r(260,.75,.35),$r(80,1.5,.8)),Sc=$r();function OY(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Sc.h=360*e-100,Sc.s=1.5-1.5*t,Sc.l=.8-.9*t,Sc+""}var $c=is(),NY=Math.PI/3,LY=Math.PI*2/3;function DY(e){var t;return e=(.5-e)*Math.PI,$c.r=255*(t=Math.sin(e))*t,$c.g=255*(t=Math.sin(e+NY))*t,$c.b=255*(t=Math.sin(e+LY))*t,$c+""}function HY(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function oh(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const UY=oh(st("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var jY=oh(st("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),WY=oh(st("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),VY=oh(st("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function dt(e){return function(){return e}}var px=Math.abs,vn=Math.atan2,$o=Math.cos,qY=Math.max,Dp=Math.min,Rr=Math.sin,Fa=Math.sqrt,bn=1e-12,no=Math.PI,ed=no/2,Vi=2*no;function YY(e){return e>1?0:e<-1?no:Math.acos(e)}function gx(e){return e>=1?ed:e<=-1?-ed:Math.asin(e)}function GY(e){return e.innerRadius}function XY(e){return e.outerRadius}function KY(e){return e.startAngle}function ZY(e){return e.endAngle}function JY(e){return e&&e.padAngle}function QY(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,f=d*l-c*u;if(!(f*f<bn))return f=(c*(t-o)-d*(e-i))/f,[e+f*l,t+f*u]}function kc(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Fa(s*s+l*l),c=u*l,d=-u*s,f=e+c,h=t+d,p=n+c,g=r+d,b=(f+p)/2,v=(h+g)/2,_=p-f,y=g-h,x=_*_+y*y,S=i-o,$=f*g-p*h,w=(y<0?-1:1)*Fa(qY(0,S*S*x-$*$)),T=($*y-_*w)/x,k=(-$*_-y*w)/x,P=($*y+_*w)/x,R=(-$*_+y*w)/x,C=T-b,E=k-v,I=P-b,z=R-v;return C*C+E*E>I*I+z*z&&(T=P,k=R),{cx:T,cy:k,x01:-c,y01:-d,x11:T*(i/S-1),y11:k*(i/S-1)}}function eG(){var e=GY,t=XY,n=dt(0),r=null,i=KY,o=ZY,a=JY,s=null;function l(){var u,c,d=+e.apply(this,arguments),f=+t.apply(this,arguments),h=i.apply(this,arguments)-ed,p=o.apply(this,arguments)-ed,g=px(p-h),b=p>h;if(s||(s=u=ho()),f<d&&(c=f,f=d,d=c),!(f>bn))s.moveTo(0,0);else if(g>Vi-bn)s.moveTo(f*$o(h),f*Rr(h)),s.arc(0,0,f,h,p,!b),d>bn&&(s.moveTo(d*$o(p),d*Rr(p)),s.arc(0,0,d,p,h,b));else{var v=h,_=p,y=h,x=p,S=g,$=g,w=a.apply(this,arguments)/2,T=w>bn&&(r?+r.apply(this,arguments):Fa(d*d+f*f)),k=Dp(px(f-d)/2,+n.apply(this,arguments)),P=k,R=k,C,E;if(T>bn){var I=gx(T/d*Rr(w)),z=gx(T/f*Rr(w));(S-=I*2)>bn?(I*=b?1:-1,y+=I,x-=I):(S=0,y=x=(h+p)/2),($-=z*2)>bn?(z*=b?1:-1,v+=z,_-=z):($=0,v=_=(h+p)/2)}var j=f*$o(v),Z=f*Rr(v),J=d*$o(x),ie=d*Rr(x);if(k>bn){var he=f*$o(_),_e=f*Rr(_),oe=d*$o(y),ve=d*Rr(y),we;if(g<no&&(we=QY(j,Z,oe,ve,he,_e,J,ie))){var Oe=j-we[0],xe=Z-we[1],Xe=he-we[0],Ve=_e-we[1],fe=1/Rr(YY((Oe*Xe+xe*Ve)/(Fa(Oe*Oe+xe*xe)*Fa(Xe*Xe+Ve*Ve)))/2),Ee=Fa(we[0]*we[0]+we[1]*we[1]);P=Dp(k,(d-Ee)/(fe-1)),R=Dp(k,(f-Ee)/(fe+1))}}$>bn?R>bn?(C=kc(oe,ve,j,Z,f,R,b),E=kc(he,_e,J,ie,f,R,b),s.moveTo(C.cx+C.x01,C.cy+C.y01),R<k?s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,f,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),!b),s.arc(E.cx,E.cy,R,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):(s.moveTo(j,Z),s.arc(0,0,f,v,_,!b)):s.moveTo(j,Z),!(d>bn)||!(S>bn)?s.lineTo(J,ie):P>bn?(C=kc(J,ie,he,_e,d,-P,b),E=kc(j,Z,oe,ve,d,-P,b),s.lineTo(C.cx+C.x01,C.cy+C.y01),P<k?s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,d,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),b),s.arc(E.cx,E.cy,P,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):s.arc(0,0,d,x,y,b)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-no/2;return[$o(c)*u,Rr(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:dt(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:dt(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:dt(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:dt(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:dt(+u),l):i},l.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:dt(+u),l):o},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:dt(+u),l):a},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function v6(e){this._context=e}v6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ah(e){return new v6(e)}function zb(e){return e[0]}function Ib(e){return e[1]}function Cs(){var e=zb,t=Ib,n=dt(!0),r=null,i=ah,o=null;function a(s){var l,u=s.length,c,d=!1,f;for(r==null&&(o=i(f=ho())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(c,l,s),+t(c,l,s));if(f)return o=null,f+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:dt(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:dt(+s),a):t},a.defined=function(s){return arguments.length?(n=typeof s=="function"?s:dt(!!s),a):n},a.curve=function(s){return arguments.length?(i=s,r!=null&&(o=i(r)),a):i},a.context=function(s){return arguments.length?(s==null?r=o=null:o=i(r=s),a):r},a}function Fb(){var e=zb,t=null,n=dt(0),r=Ib,i=dt(!0),o=null,a=ah,s=null;function l(c){var d,f,h,p=c.length,g,b=!1,v,_=new Array(p),y=new Array(p);for(o==null&&(s=a(v=ho())),d=0;d<=p;++d){if(!(d<p&&i(g=c[d],d,c))===b)if(b=!b)f=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=d-1;h>=f;--h)s.point(_[h],y[h]);s.lineEnd(),s.areaEnd()}b&&(_[d]=+e(g,d,c),y[d]=+n(g,d,c),s.point(t?+t(g,d,c):_[d],r?+r(g,d,c):y[d]))}if(v)return s=null,v+""||null}function u(){return Cs().defined(i).curve(a).context(o)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:dt(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:dt(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:dt(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:dt(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:dt(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:dt(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(i=typeof c=="function"?c:dt(!!c),l):i},l.curve=function(c){return arguments.length?(a=c,o!=null&&(s=a(o)),l):a},l.context=function(c){return arguments.length?(c==null?o=s=null:s=a(o=c),l):o},l}function tG(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function nG(e){return e}function rG(){var e=nG,t=tG,n=null,r=dt(0),i=dt(Vi),o=dt(0);function a(s){var l,u=s.length,c,d,f=0,h=new Array(u),p=new Array(u),g=+r.apply(this,arguments),b=Math.min(Vi,Math.max(-Vi,i.apply(this,arguments)-g)),v,_=Math.min(Math.abs(b)/u,o.apply(this,arguments)),y=_*(b<0?-1:1),x;for(l=0;l<u;++l)(x=p[h[l]=l]=+e(s[l],l,s))>0&&(f+=x);for(t!=null?h.sort(function(S,$){return t(p[S],p[$])}):n!=null&&h.sort(function(S,$){return n(s[S],s[$])}),l=0,d=f?(b-u*y)/f:0;l<u;++l,g=v)c=h[l],x=p[c],v=g+(x>0?x*d:0)+y,p[c]={data:s[c],index:l,value:x,startAngle:g,endAngle:v,padAngle:_};return p}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:dt(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:dt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:dt(+s),a):o},a}var b6=Bb(ah);function m6(e){this._curve=e}m6.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Bb(e){function t(n){return new m6(e(n))}return t._curve=e,t}function al(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Bb(n)):t()._curve},e}function vx(){return al(Cs().curve(b6))}function bx(){var e=Fb().curve(b6),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return al(n())},delete e.lineX0,e.lineEndAngle=function(){return al(r())},delete e.lineX1,e.lineInnerRadius=function(){return al(i())},delete e.lineY0,e.lineOuterRadius=function(){return al(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Bb(a)):t()._curve},e}function sl(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Sg=Array.prototype.slice;function iG(e){return e.source}function oG(e){return e.target}function Ob(e){var t=iG,n=oG,r=zb,i=Ib,o=null;function a(){var s,l=Sg.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(o||(o=s=ho()),e(o,+r.apply(this,(l[0]=u,l)),+i.apply(this,l),+r.apply(this,(l[0]=c,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(n=s,a):n},a.x=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),a):r},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:dt(+s),a):i},a.context=function(s){return arguments.length?(o=s??null,a):o},a}function aG(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function sG(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function lG(e,t,n,r,i){var o=sl(t,n),a=sl(t,n=(n+i)/2),s=sl(r,n),l=sl(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function uG(){return Ob(aG)}function cG(){return Ob(sG)}function fG(){var e=Ob(lG);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Nb={draw:function(e,t){var n=Math.sqrt(t/no);e.moveTo(n,0),e.arc(0,0,n,0,Vi)}},y6={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var _6=Math.sqrt(1/3),dG=_6*2;const x6={draw:function(e,t){var n=Math.sqrt(t/dG),r=n*_6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var hG=.8908130915292852,w6=Math.sin(no/10)/Math.sin(7*no/10),pG=Math.sin(Vi/10)*w6,gG=-Math.cos(Vi/10)*w6;const C6={draw:function(e,t){var n=Math.sqrt(t*hG),r=pG*n,i=gG*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=Vi*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},S6={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Hp=Math.sqrt(3);const $6={draw:function(e,t){var n=-Math.sqrt(t/(Hp*3));e.moveTo(0,n*2),e.lineTo(-Hp*n,-n),e.lineTo(Hp*n,-n),e.closePath()}};var tr=-.5,nr=Math.sqrt(3)/2,$g=1/Math.sqrt(12),vG=($g/2+1)*3;const k6={draw:function(e,t){var n=Math.sqrt(t/vG),r=n/2,i=n*$g,o=r,a=n*$g+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(tr*r-nr*i,nr*r+tr*i),e.lineTo(tr*o-nr*a,nr*o+tr*a),e.lineTo(tr*s-nr*l,nr*s+tr*l),e.lineTo(tr*r+nr*i,tr*i-nr*r),e.lineTo(tr*o+nr*a,tr*a-nr*o),e.lineTo(tr*s+nr*l,tr*l-nr*s),e.closePath()}};var bG=[Nb,y6,x6,S6,C6,$6,k6];function Lb(){var e=dt(Nb),t=dt(64),n=null;function r(){var i;if(n||(n=i=ho()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:dt(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:dt(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function ro(){}function td(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function sh(e){this._context=e}sh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:td(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mG(e){return new sh(e)}function M6(e){this._context=e}M6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yG(e){return new M6(e)}function T6(e){this._context=e}T6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _G(e){return new T6(e)}function E6(e,t){this._basis=new sh(e),this._beta=t}E6.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const xG=function e(t){function n(r){return t===1?new sh(r):new E6(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function nd(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Db(e,t){this._context=e,this._k=(1-t)/6}Db.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:nd(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:nd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wG=function e(t){function n(r){return new Db(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Hb(e,t){this._context=e,this._k=(1-t)/6}Hb.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:nd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CG=function e(t){function n(r){return new Hb(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ub(e,t){this._context=e,this._k=(1-t)/6}Ub.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:nd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const SG=function e(t){function n(r){return new Ub(r,t)}return n.tension=function(r){return e(+r)},n}(0);function jb(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>bn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bn){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function A6(e,t){this._context=e,this._alpha=t}A6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:jb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $G=function e(t){function n(r){return t?new A6(r,t):new Db(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function P6(e,t){this._context=e,this._alpha=t}P6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:jb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const kG=function e(t){function n(r){return t?new P6(r,t):new Hb(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function R6(e,t){this._context=e,this._alpha=t}R6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:jb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const MG=function e(t){function n(r){return t?new R6(r,t):new Ub(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function z6(e){this._context=e}z6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function TG(e){return new z6(e)}function mx(e){return e<0?-1:1}function yx(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(mx(o)+mx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function _x(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Up(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function rd(e){this._context=e}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Up(this,this._t0,_x(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Up(this,_x(this,n=yx(this,e,t)),n);break;default:Up(this,this._t0,n=yx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function I6(e){this._context=new F6(e)}(I6.prototype=Object.create(rd.prototype)).point=function(e,t){rd.prototype.point.call(this,t,e)};function F6(e){this._context=e}F6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function EG(e){return new rd(e)}function AG(e){return new I6(e)}function B6(e){this._context=e}B6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=xx(e),i=xx(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function xx(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function O6(e){return new B6(e)}function lh(e,t){this._context=e,this._t=t}lh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function PG(e){return new lh(e,.5)}function RG(e){return new lh(e,0)}function zG(e){return new lh(e,1)}function ds(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function hs(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function IG(e,t){return e[t]}function FG(){var e=dt([]),t=hs,n=ds,r=IG;function i(o){var a=e.apply(this,arguments),s,l=o.length,u=a.length,c=new Array(u),d;for(s=0;s<u;++s){for(var f=a[s],h=c[s]=new Array(l),p=0,g;p<l;++p)h[p]=g=[0,+r(o[p],f,p,o)],g.data=o[p];h.key=f}for(s=0,d=t(c);s<u;++s)c[d[s]].index=s;return n(c,d),c}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:dt(Sg.call(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:dt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?hs:typeof o=="function"?o:dt(Sg.call(o)),i):t},i.offset=function(o){return arguments.length?(n=o??ds,i):n},i}function BG(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}ds(e,t)}}function OG(e,t){if((l=e.length)>0)for(var n,r=0,i,o,a,s,l,u=e[t[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function NG(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ds(e,t)}}function LG(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=e[t[s]],d=c[r][1]||0,f=c[r-1][1]||0,h=(d-f)/2,p=0;p<s;++p){var g=e[t[p]],b=g[r][1]||0,v=g[r-1][1]||0;h+=b-v}l+=d,u+=h*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,ds(e,t)}}function N6(e){var t=e.map(DG);return hs(e).sort(function(n,r){return t[n]-t[r]})}function DG(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function L6(e){var t=e.map(D6);return hs(e).sort(function(n,r){return t[n]-t[r]})}function D6(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function HG(e){return L6(e).reverse()}function UG(e){var t=e.length,n,r,i=e.map(D6),o=N6(e),a=0,s=0,l=[],u=[];for(n=0;n<t;++n)r=o[n],a<s?(a+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)}function jG(e){return hs(e).reverse()}function wx(e){return function(){return e}}function WG(e){return e[0]}function VG(e){return e[1]}function id(){this._=null}function uh(e){e.U=e.C=e.L=e.R=e.P=e.N=null}id.prototype={constructor:id,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=Cx(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Ds(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Hs(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Hs(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Ds(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,n,r=e.L,i=e.R,o,a;if(r?i?o=Cx(i):o=r:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,r&&i?(a=o.C,o.C=e.C,o.L=r,r.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(n=t.R,n.C&&(n.C=!1,t.C=!0,Ds(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,Hs(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Ds(this,t),e=this._;break}}else if(n=t.L,n.C&&(n.C=!1,t.C=!0,Hs(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Ds(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,Hs(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function Ds(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Hs(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Cx(e){for(;e.L;)e=e.L;return e}function ll(e,t,n,r){var i=[null,null],o=mn.push(i)-1;return i.left=e,i.right=t,n&&od(i,e,t,n),r&&od(i,t,e,r),Yn[e.index].halfedges.push(o),Yn[t.index].halfedges.push(o),i}function Us(e,t,n){var r=[t,n];return r.left=e,r}function od(e,t,n,r){!e[0]&&!e[1]?(e[0]=r,e.left=t,e.right=n):e.left===n?e[1]=r:e[0]=r}function qG(e,t,n,r,i){var o=e[0],a=e[1],s=o[0],l=o[1],u=a[0],c=a[1],d=0,f=1,h=u-s,p=c-l,g;if(g=t-s,!(!h&&g>0)){if(g/=h,h<0){if(g<d)return;g<f&&(f=g)}else if(h>0){if(g>f)return;g>d&&(d=g)}if(g=r-s,!(!h&&g<0)){if(g/=h,h<0){if(g>f)return;g>d&&(d=g)}else if(h>0){if(g<d)return;g<f&&(f=g)}if(g=n-l,!(!p&&g>0)){if(g/=p,p<0){if(g<d)return;g<f&&(f=g)}else if(p>0){if(g>f)return;g>d&&(d=g)}if(g=i-l,!(!p&&g<0)){if(g/=p,p<0){if(g>f)return;g>d&&(d=g)}else if(p>0){if(g<d)return;g<f&&(f=g)}return!(d>0)&&!(f<1)||(d>0&&(e[0]=[s+d*h,l+d*p]),f<1&&(e[1]=[s+f*h,l+f*p])),!0}}}}}function YG(e,t,n,r,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,u=s[0],c=s[1],d=l[0],f=l[1],h=(u+d)/2,p=(c+f)/2,g,b;if(f===c){if(h<t||h>=r)return;if(u>d){if(!a)a=[h,n];else if(a[1]>=i)return;o=[h,i]}else{if(!a)a=[h,i];else if(a[1]<n)return;o=[h,n]}}else if(g=(u-d)/(f-c),b=p-g*h,g<-1||g>1)if(u>d){if(!a)a=[(n-b)/g,n];else if(a[1]>=i)return;o=[(i-b)/g,i]}else{if(!a)a=[(i-b)/g,i];else if(a[1]<n)return;o=[(n-b)/g,n]}else if(c<f){if(!a)a=[t,g*t+b];else if(a[0]>=r)return;o=[r,g*r+b]}else{if(!a)a=[r,g*r+b];else if(a[0]<t)return;o=[t,g*t+b]}return e[0]=a,e[1]=o,!0}function GG(e,t,n,r){for(var i=mn.length,o;i--;)(!YG(o=mn[i],e,t,n,r)||!qG(o,e,t,n,r)||!(Math.abs(o[0][0]-o[1][0])>Pt||Math.abs(o[0][1]-o[1][1])>Pt))&&delete mn[i]}function XG(e){return Yn[e.index]={site:e,halfedges:[]}}function KG(e,t){var n=e.site,r=t.left,i=t.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=t[1],i=t[0]):(r=t[0],i=t[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function H6(e,t){return t[+(t.left!==e.site)]}function ZG(e,t){return t[+(t.left===e.site)]}function JG(){for(var e=0,t=Yn.length,n,r,i,o;e<t;++e)if((n=Yn[e])&&(o=(r=n.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=KG(n,mn[r[i]]);for(a.sort(function(l,u){return s[u]-s[l]}),i=0;i<o;++i)s[i]=r[a[i]];for(i=0;i<o;++i)r[i]=s[i]}}function QG(e,t,n,r){var i=Yn.length,o,a,s,l,u,c,d,f,h,p,g,b,v=!0;for(o=0;o<i;++o)if(a=Yn[o]){for(s=a.site,u=a.halfedges,l=u.length;l--;)mn[u[l]]||u.splice(l,1);for(l=0,c=u.length;l<c;)p=ZG(a,mn[u[l]]),g=p[0],b=p[1],d=H6(a,mn[u[++l%c]]),f=d[0],h=d[1],(Math.abs(g-f)>Pt||Math.abs(b-h)>Pt)&&(u.splice(l,0,mn.push(Us(s,p,Math.abs(g-e)<Pt&&r-b>Pt?[e,Math.abs(f-e)<Pt?h:r]:Math.abs(b-r)<Pt&&n-g>Pt?[Math.abs(h-r)<Pt?f:n,r]:Math.abs(g-n)<Pt&&b-t>Pt?[n,Math.abs(f-n)<Pt?h:t]:Math.abs(b-t)<Pt&&g-e>Pt?[Math.abs(h-t)<Pt?f:e,t]:null))-1),++c);c&&(v=!1)}if(v){var _,y,x,S=1/0;for(o=0,v=null;o<i;++o)(a=Yn[o])&&(s=a.site,_=s[0]-e,y=s[1]-t,x=_*_+y*y,x<S&&(S=x,v=a));if(v){var $=[e,t],w=[e,r],T=[n,r],k=[n,t];v.halfedges.push(mn.push(Us(s=v.site,$,w))-1,mn.push(Us(s,w,T))-1,mn.push(Us(s,T,k))-1,mn.push(Us(s,k,$))-1)}}for(o=0;o<i;++o)(a=Yn[o])&&(a.halfedges.length||delete Yn[o])}var U6=[],Wb;function eX(){uh(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ba(e){var t=e.P,n=e.N;if(!(!t||!n)){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i[0],s=i[1],l=r[0]-a,u=r[1]-s,c=o[0]-a,d=o[1]-s,f=2*(l*d-u*c);if(!(f>=-1e-12)){var h=l*l+u*u,p=c*c+d*d,g=(d*h-u*p)/f,b=(l*p-c*h)/f,v=U6.pop()||new eX;v.arc=e,v.site=i,v.x=g+a,v.y=(v.cy=b+s)+Math.sqrt(g*g+b*b),e.circle=v;for(var _=null,y=hu._;y;)if(v.y<y.y||v.y===y.y&&v.x<=y.x)if(y.L)y=y.L;else{_=y.P;break}else if(y.R)y=y.R;else{_=y;break}hu.insert(_,v),_||(Wb=v)}}}}function Ga(e){var t=e.circle;t&&(t.P||(Wb=t.N),hu.remove(t),U6.push(t),uh(t),e.circle=null)}var j6=[];function tX(){uh(this),this.edge=this.site=this.circle=null}function Sx(e){var t=j6.pop()||new tX;return t.site=e,t}function jp(e){Ga(e),Xa.remove(e),j6.push(e),uh(e)}function nX(e){var t=e.circle,n=t.x,r=t.cy,i=[n,r],o=e.P,a=e.N,s=[e];jp(e);for(var l=o;l.circle&&Math.abs(n-l.circle.x)<Pt&&Math.abs(r-l.circle.cy)<Pt;)o=l.P,s.unshift(l),jp(l),l=o;s.unshift(l),Ga(l);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<Pt&&Math.abs(r-u.circle.cy)<Pt;)a=u.N,s.push(u),jp(u),u=a;s.push(u),Ga(u);var c=s.length,d;for(d=1;d<c;++d)u=s[d],l=s[d-1],od(u.edge,l.site,u.site,i);l=s[0],u=s[c-1],u.edge=ll(l.site,u.site,null,i),Ba(l),Ba(u)}function rX(e){for(var t=e[0],n=e[1],r,i,o,a,s=Xa._;s;)if(o=W6(s,n)-t,o>Pt)s=s.L;else if(a=t-iX(s,n),a>Pt){if(!s.R){r=s;break}s=s.R}else{o>-1e-6?(r=s.P,i=s):a>-1e-6?(r=s,i=s.N):r=i=s;break}XG(e);var l=Sx(e);if(Xa.insert(r,l),!(!r&&!i)){if(r===i){Ga(r),i=Sx(r.site),Xa.insert(l,i),l.edge=i.edge=ll(r.site,l.site),Ba(r),Ba(i);return}if(!i){l.edge=ll(r.site,l.site);return}Ga(r),Ga(i);var u=r.site,c=u[0],d=u[1],f=e[0]-c,h=e[1]-d,p=i.site,g=p[0]-c,b=p[1]-d,v=2*(f*b-h*g),_=f*f+h*h,y=g*g+b*b,x=[(b*_-h*y)/v+c,(f*y-g*_)/v+d];od(i.edge,u,p,x),l.edge=ll(u,e,null,x),i.edge=ll(e,p,null,x),Ba(r),Ba(i)}}function W6(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;n=a.site;var s=n[0],l=n[1],u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,f=c/u;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function iX(e,t){var n=e.N;if(n)return W6(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var Pt=1e-6,Xa,Yn,hu,mn;function oX(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function aX(e,t){return t[1]-e[1]||t[0]-e[0]}function kg(e,t){var n=e.sort(aX).pop(),r,i,o;for(mn=[],Yn=new Array(e.length),Xa=new id,hu=new id;;)if(o=Wb,n&&(!o||n[1]<o.y||n[1]===o.y&&n[0]<o.x))(n[0]!==r||n[1]!==i)&&(rX(n),r=n[0],i=n[1]),n=e.pop();else if(o)nX(o.arc);else break;if(JG(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],u=+t[1][1];GG(a,s,l,u),QG(a,s,l,u)}this.edges=mn,this.cells=Yn,Xa=hu=mn=Yn=null}kg.prototype={constructor:kg,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(r){return H6(t,e[r])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,r){if(s=(o=n.halfedges).length)for(var i=n.site,o,a=-1,s,l,u=t[o[s-1]],c=u.left===i?u.right:u.left;++a<s;)l=c,u=t[o[a]],c=u.left===i?u.right:u.left,l&&c&&r<l.index&&r<c.index&&oX(i,l,c)<0&&e.push([i.data,l.data,c.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,n){for(var r=this,i,o=r._found||0,a=r.cells.length,s;!(s=r.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],u=t-s.site[1],c=l*l+u*u;do s=r.cells[i=o],o=null,s.halfedges.forEach(function(d){var f=r.edges[d],h=f.left;if(!((h===s.site||!h)&&!(h=f.right))){var p=e-h[0],g=t-h[1],b=p*p+g*g;b<c&&(c=b,o=h.index)}});while(o!==null);return r._found=i,n==null||c<=n*n?s.site:null}};function sX(){var e=WG,t=VG,n=null;function r(i){return new kg(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Pt)*Pt,Math.round(t(o,a,i)/Pt)*Pt];return s.index=a,s.data=o,s}),n)}return r.polygons=function(i){return r(i).polygons()},r.links=function(i){return r(i).links()},r.triangles=function(i){return r(i).triangles()},r.x=function(i){return arguments.length?(e=typeof i=="function"?i:wx(+i),r):e},r.y=function(i){return arguments.length?(t=typeof i=="function"?i:wx(+i),r):t},r.extent=function(i){return arguments.length?(n=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(i){return arguments.length?(n=i==null?null:[[0,0],[+i[0],+i[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function Mc(e){return function(){return e}}function lX(e,t,n){this.target=e,this.type=t,this.transform=n}function ci(e,t,n){this.k=e,this.x=t,this.y=n}ci.prototype={constructor:ci,scale:function(e){return e===1?this:new ci(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ci(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ch=new ci(1,0,0);V6.prototype=ci.prototype;function V6(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ch;return e.__zoom}function Wp(){Ce.stopImmediatePropagation()}function js(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function uX(){return!Ce.ctrlKey&&!Ce.button}function cX(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function $x(){return this.__zoom||ch}function fX(){return-Ce.deltaY*(Ce.deltaMode===1?.05:Ce.deltaMode?1:.002)}function dX(){return navigator.maxTouchPoints||"ontouchstart"in this}function hX(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function pX(){var e=uX,t=cX,n=hX,r=fX,i=dX,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=B8,u=ha("start","zoom","end"),c,d,f=500,h=150,p=0;function g(C){C.property("__zoom",$x).on("wheel.zoom",$).on("mousedown.zoom",w).on("dblclick.zoom",T).filter(i).on("touchstart.zoom",k).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(C,E,I){var z=C.selection?C.selection():C;z.property("__zoom",$x),C!==z?y(C,E,I):z.interrupt().each(function(){x(this,arguments).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},g.scaleBy=function(C,E,I){g.scaleTo(C,function(){var z=this.__zoom.k,j=typeof E=="function"?E.apply(this,arguments):E;return z*j},I)},g.scaleTo=function(C,E,I){g.transform(C,function(){var z=t.apply(this,arguments),j=this.__zoom,Z=I==null?_(z):typeof I=="function"?I.apply(this,arguments):I,J=j.invert(Z),ie=typeof E=="function"?E.apply(this,arguments):E;return n(v(b(j,ie),Z,J),z,a)},I)},g.translateBy=function(C,E,I){g.transform(C,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),a)})},g.translateTo=function(C,E,I,z){g.transform(C,function(){var j=t.apply(this,arguments),Z=this.__zoom,J=z==null?_(j):typeof z=="function"?z.apply(this,arguments):z;return n(ch.translate(J[0],J[1]).scale(Z.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof I=="function"?-I.apply(this,arguments):-I),j,a)},z)};function b(C,E){return E=Math.max(o[0],Math.min(o[1],E)),E===C.k?C:new ci(E,C.x,C.y)}function v(C,E,I){var z=E[0]-I[0]*C.k,j=E[1]-I[1]*C.k;return z===C.x&&j===C.y?C:new ci(C.k,z,j)}function _(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function y(C,E,I){C.on("start.zoom",function(){x(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).end()}).tween("zoom",function(){var z=this,j=arguments,Z=x(z,j),J=t.apply(z,j),ie=I==null?_(J):typeof I=="function"?I.apply(z,j):I,he=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),_e=z.__zoom,oe=typeof E=="function"?E.apply(z,j):E,ve=l(_e.invert(ie).concat(he/_e.k),oe.invert(ie).concat(he/oe.k));return function(we){if(we===1)we=oe;else{var Oe=ve(we),xe=he/Oe[2];we=new ci(xe,ie[0]-Oe[0]*xe,ie[1]-Oe[1]*xe)}Z.zoom(null,we)}})}function x(C,E,I){return!I&&C.__zooming||new S(C,E)}function S(C,E){this.that=C,this.args=E,this.active=0,this.extent=t.apply(C,E),this.taps=0}S.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,E){return this.mouse&&C!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){ql(new lX(g,C,this.that.__zoom),u.apply,u,[C,this.that,this.args])}};function $(){if(!e.apply(this,arguments))return;var C=x(this,arguments),E=this.__zoom,I=Math.max(o[0],Math.min(o[1],E.k*Math.pow(2,r.apply(this,arguments)))),z=lr(this);if(C.wheel)(C.mouse[0][0]!==z[0]||C.mouse[0][1]!==z[1])&&(C.mouse[1]=E.invert(C.mouse[0]=z)),clearTimeout(C.wheel);else{if(E.k===I)return;C.mouse=[z,E.invert(z)],Uo(this),C.start()}js(),C.wheel=setTimeout(j,h),C.zoom("mouse",n(v(b(E,I),C.mouse[0],C.mouse[1]),C.extent,a));function j(){C.wheel=null,C.end()}}function w(){if(d||!e.apply(this,arguments))return;var C=x(this,arguments,!0),E=Ue(Ce.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",J,!0),I=lr(this),z=Ce.clientX,j=Ce.clientY;Nd(Ce.view),Wp(),C.mouse=[I,this.__zoom.invert(I)],Uo(this),C.start();function Z(){if(js(),!C.moved){var ie=Ce.clientX-z,he=Ce.clientY-j;C.moved=ie*ie+he*he>p}C.zoom("mouse",n(v(C.that.__zoom,C.mouse[0]=lr(C.that),C.mouse[1]),C.extent,a))}function J(){E.on("mousemove.zoom mouseup.zoom",null),Ld(Ce.view,C.moved),js(),C.end()}}function T(){if(e.apply(this,arguments)){var C=this.__zoom,E=lr(this),I=C.invert(E),z=C.k*(Ce.shiftKey?.5:2),j=n(v(b(C,z),E,I),t.apply(this,arguments),a);js(),s>0?Ue(this).transition().duration(s).call(y,j,E):Ue(this).call(g.transform,j)}}function k(){if(e.apply(this,arguments)){var C=Ce.touches,E=C.length,I=x(this,arguments,Ce.changedTouches.length===E),z,j,Z,J;for(Wp(),j=0;j<E;++j)Z=C[j],J=Yl(this,C,Z.identifier),J=[J,this.__zoom.invert(J),Z.identifier],I.touch0?!I.touch1&&I.touch0[2]!==J[2]&&(I.touch1=J,I.taps=0):(I.touch0=J,z=!0,I.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(I.taps<2&&(c=setTimeout(function(){c=null},f)),Uo(this),I.start())}}function P(){if(this.__zooming){var C=x(this,arguments),E=Ce.changedTouches,I=E.length,z,j,Z,J;for(js(),c&&(c=clearTimeout(c)),C.taps=0,z=0;z<I;++z)j=E[z],Z=Yl(this,E,j.identifier),C.touch0&&C.touch0[2]===j.identifier?C.touch0[0]=Z:C.touch1&&C.touch1[2]===j.identifier&&(C.touch1[0]=Z);if(j=C.that.__zoom,C.touch1){var ie=C.touch0[0],he=C.touch0[1],_e=C.touch1[0],oe=C.touch1[1],ve=(ve=_e[0]-ie[0])*ve+(ve=_e[1]-ie[1])*ve,we=(we=oe[0]-he[0])*we+(we=oe[1]-he[1])*we;j=b(j,Math.sqrt(ve/we)),Z=[(ie[0]+_e[0])/2,(ie[1]+_e[1])/2],J=[(he[0]+oe[0])/2,(he[1]+oe[1])/2]}else if(C.touch0)Z=C.touch0[0],J=C.touch0[1];else return;C.zoom("touch",n(v(j,Z,J),C.extent,a))}}function R(){if(this.__zooming){var C=x(this,arguments),E=Ce.changedTouches,I=E.length,z,j;for(Wp(),d&&clearTimeout(d),d=setTimeout(function(){d=null},f),z=0;z<I;++z)j=E[z],C.touch0&&C.touch0[2]===j.identifier?delete C.touch0:C.touch1&&C.touch1[2]===j.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2){var Z=Ue(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return g.wheelDelta=function(C){return arguments.length?(r=typeof C=="function"?C:Mc(+C),g):r},g.filter=function(C){return arguments.length?(e=typeof C=="function"?C:Mc(!!C),g):e},g.touchable=function(C){return arguments.length?(i=typeof C=="function"?C:Mc(!!C),g):i},g.extent=function(C){return arguments.length?(t=typeof C=="function"?C:Mc([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),g):t},g.scaleExtent=function(C){return arguments.length?(o[0]=+C[0],o[1]=+C[1],g):[o[0],o[1]]},g.translateExtent=function(C){return arguments.length?(a[0][0]=+C[0][0],a[1][0]=+C[1][0],a[0][1]=+C[0][1],a[1][1]=+C[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(C){return arguments.length?(n=C,g):n},g.duration=function(C){return arguments.length?(s=+C,g):s},g.interpolate=function(C){return arguments.length?(l=C,g):l},g.on=function(){var C=u.on.apply(u,arguments);return C===u?g:C},g.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,g):Math.sqrt(p)},g}const q6=Object.freeze(Object.defineProperty({__proto__:null,FormatSpecifier:Kd,active:DD,arc:eG,area:Fb,areaRadial:bx,ascending:Sr,autoType:WH,axisBottom:Z5,axisLeft:J5,axisRight:Av,axisTop:K5,bisect:Ji,bisectLeft:MB,bisectRight:Ji,bisector:kv,blob:YH,brush:QD,brushSelection:KD,brushX:ZD,brushY:JD,buffer:XH,chord:tH,clientPoint:Od,cluster:lW,color:eo,contourDensity:TH,contours:Q8,create:yN,creator:Fd,cross:EB,csv:JH,csvFormat:zH,csvFormatBody:IH,csvFormatRow:BH,csvFormatRows:FH,csvFormatValue:OH,csvParse:t3,csvParseRows:RH,cubehelix:$r,curveBasis:mG,curveBasisClosed:yG,curveBasisOpen:_G,curveBundle:xG,curveCardinal:wG,curveCardinalClosed:CG,curveCardinalOpen:SG,curveCatmullRom:$G,curveCatmullRomClosed:kG,curveCatmullRomOpen:MG,curveLinear:ah,curveLinearClosed:TG,curveMonotoneX:EG,curveMonotoneY:AG,curveNatural:O6,curveStep:PG,curveStepAfter:zG,curveStepBefore:RG,customEvent:ql,descending:AB,deviation:V5,dispatch:ha,drag:O0,dragDisable:Nd,dragEnable:Ld,dsv:ZH,dsvFormat:Yd,easeBack:Hy,easeBackIn:zD,easeBackInOut:Hy,easeBackOut:ID,easeBounce:Ql,easeBounceIn:PD,easeBounceInOut:RD,easeBounceOut:Ql,easeCircle:Dy,easeCircleIn:xD,easeCircleInOut:Dy,easeCircleOut:wD,easeCubic:V0,easeCubicIn:hD,easeCubicInOut:V0,easeCubicOut:pD,easeElastic:Uy,easeElasticIn:FD,easeElasticInOut:BD,easeElasticOut:Uy,easeExp:Ly,easeExpIn:yD,easeExpInOut:Ly,easeExpOut:_D,easeLinear:cD,easePoly:Oy,easePolyIn:gD,easePolyInOut:Oy,easePolyOut:vD,easeQuad:By,easeQuadIn:fD,easeQuadInOut:By,easeQuadOut:dD,easeSin:Ny,easeSinIn:bD,easeSinInOut:Ny,easeSinOut:mD,entries:gH,get event(){return Ce},extent:qo,forceCenter:aU,forceCollide:$U,forceLink:MU,forceManyBody:zU,forceRadial:IU,forceSimulation:RU,forceX:FU,forceY:BU,get format(){return Zd},formatDefaultLocale:s3,formatLocale:a3,get formatPrefix(){return Zv},formatSpecifier:tu,geoAlbers:V3,geoAlbersUsa:Dj,geoArea:qU,geoAzimuthalEqualArea:Hj,geoAzimuthalEqualAreaRaw:sb,geoAzimuthalEquidistant:Uj,geoAzimuthalEquidistantRaw:lb,geoBounds:KU,geoCentroid:nj,geoCircle:rj,geoClipAntimeridian:lg,geoClipCircle:E3,geoClipExtent:cj,geoClipRectangle:Jd,geoConicConformal:Wj,geoConicConformalRaw:G3,geoConicEqualArea:Gf,geoConicEqualAreaRaw:W3,geoConicEquidistant:qj,geoConicEquidistantRaw:X3,geoContains:bj,geoDistance:Hf,geoEqualEarth:Gj,geoEqualEarthRaw:ub,geoEquirectangular:Vj,geoEquirectangularRaw:ou,geoGnomonic:Xj,geoGnomonicRaw:cb,geoGraticule:R3,geoGraticule10:mj,geoIdentity:Kj,geoInterpolate:yj,geoLength:A3,geoMercator:jj,geoMercatorRaw:Mu,geoNaturalEarth1:Zj,geoNaturalEarth1Raw:fb,geoOrthographic:Jj,geoOrthographicRaw:db,geoPath:Aj,geoProjection:Jr,geoProjectionMutator:ob,geoRotation:C3,geoStereographic:Qj,geoStereographicRaw:hb,geoStream:br,geoTransform:Pj,geoTransverseMercator:eW,geoTransverseMercatorRaw:pb,gray:FN,hcl:yf,hierarchy:gb,histogram:IB,hsl:vf,html:iU,image:eU,interpolate:ys,interpolateArray:HN,interpolateBasis:w8,interpolateBasisClosed:C8,interpolateBlues:MY,interpolateBrBG:aY,interpolateBuGn:gY,interpolateBuPu:vY,interpolateCividis:zY,interpolateCool:BY,interpolateCubehelix:nL,interpolateCubehelixDefault:IY,interpolateCubehelixLong:jd,interpolateDate:E8,interpolateDiscrete:WN,interpolateGnBu:bY,interpolateGreens:TY,interpolateGreys:EY,interpolateHcl:eL,interpolateHclLong:tL,interpolateHsl:ZN,interpolateHslLong:JN,interpolateHue:VN,interpolateInferno:WY,interpolateLab:QN,interpolateMagma:jY,interpolateNumber:or,interpolateNumberArray:Dv,interpolateObject:A8,interpolateOrRd:mY,interpolateOranges:RY,interpolatePRGn:sY,interpolatePiYG:lY,interpolatePlasma:VY,interpolatePuBu:_Y,interpolatePuBuGn:yY,interpolatePuOr:uY,interpolatePuRd:xY,interpolatePurples:AY,interpolateRainbow:OY,interpolateRdBu:cY,interpolateRdGy:fY,interpolateRdPu:wY,interpolateRdYlBu:dY,interpolateRdYlGn:hY,interpolateReds:PY,interpolateRgb:Kl,interpolateRgbBasis:k8,interpolateRgbBasisClosed:DN,interpolateRound:P8,interpolateSinebow:DY,interpolateSpectral:pY,interpolateString:Hv,interpolateTransformCss:I8,interpolateTransformSvg:F8,interpolateTurbo:HY,interpolateViridis:UY,interpolateWarm:FY,interpolateYlGn:SY,interpolateYlGnBu:CY,interpolateYlOrBr:$Y,interpolateYlOrRd:kY,interpolateZoom:B8,interrupt:Uo,interval:lL,isoFormat:Dq,isoParse:Uq,json:nU,keys:hH,lab:mf,lch:BN,line:Cs,lineRadial:vx,linkHorizontal:uG,linkRadial:fG,linkVertical:cG,local:s8,map:pi,matcher:Rv,max:Y5,mean:OB,median:NB,merge:Ev,min:G5,mouse:lr,namespace:wu,namespaces:I0,nest:cH,now:_s,pack:zW,packEnclose:Z3,packSiblings:AW,pairs:TB,partition:IW,path:ho,permute:LB,pie:rG,piecewise:rL,pointRadial:sl,polygonArea:XW,polygonCentroid:KW,polygonContains:eV,polygonHull:QW,polygonLength:tV,precisionFixed:l3,precisionPrefix:u3,precisionRound:c3,quadtree:Xd,quantile:Vl,quantize:iL,radialArea:bx,radialLine:vx,randomBates:iV,randomExponential:oV,randomIrwinHall:aC,randomLogNormal:rV,randomNormal:oC,randomUniform:nV,range:Jn,rgb:is,ribbon:uH,scaleBand:bb,scaleDiverging:DC,scaleDivergingLog:HC,scaleDivergingPow:Rb,scaleDivergingSqrt:Xq,scaleDivergingSymlog:UC,scaleIdentity:fC,scaleImplicit:xg,scaleLinear:au,scaleLog:hC,scaleOrdinal:vb,scalePoint:aV,scalePow:xb,scaleQuantile:gC,scaleQuantize:vC,scaleSequential:BC,scaleSequentialLog:OC,scaleSequentialPow:Pb,scaleSequentialQuantile:LC,scaleSequentialSqrt:Gq,scaleSequentialSymlog:NC,scaleSqrt:bV,scaleSymlog:pC,scaleThreshold:bC,scaleTime:qq,scaleUtc:Yq,scan:DB,schemeAccent:Zq,schemeBlues:c6,schemeBrBG:jC,schemeBuGn:JC,schemeBuPu:QC,schemeCategory10:Kq,schemeDark2:Jq,schemeGnBu:e6,schemeGreens:f6,schemeGreys:d6,schemeOrRd:t6,schemeOranges:g6,schemePRGn:WC,schemePaired:Qq,schemePastel1:eY,schemePastel2:tY,schemePiYG:VC,schemePuBu:r6,schemePuBuGn:n6,schemePuOr:qC,schemePuRd:i6,schemePurples:h6,schemeRdBu:YC,schemeRdGy:GC,schemeRdPu:o6,schemeRdYlBu:XC,schemeRdYlGn:KC,schemeReds:p6,schemeSet1:nY,schemeSet2:rY,schemeSet3:iY,schemeSpectral:ZC,schemeTableau10:oY,schemeYlGn:s6,schemeYlGnBu:a6,schemeYlOrBr:l6,schemeYlOrRd:u6,select:Ue,selectAll:l8,selection:pa,selector:Bd,selectorAll:Pv,set:Z8,shuffle:HB,stack:FG,stackOffsetDiverging:OG,stackOffsetExpand:BG,stackOffsetNone:ds,stackOffsetSilhouette:NG,stackOffsetWiggle:LG,stackOrderAppearance:N6,stackOrderAscending:L6,stackOrderDescending:HG,stackOrderInsideOut:UG,stackOrderNone:hs,stackOrderReverse:jG,stratify:NW,style:Go,sum:UB,svg:oU,symbol:Lb,symbolCircle:Nb,symbolCross:y6,symbolDiamond:x6,symbolSquare:S6,symbolStar:C6,symbolTriangle:$6,symbolWye:k6,symbols:bG,text:Gd,thresholdFreedmanDiaconis:FB,thresholdScott:BB,thresholdSturges:Tv,tickFormat:cC,tickIncrement:wl,tickStep:Yo,ticks:Mv,timeDay:Au,timeDays:_V,get timeFormat(){return Tb},timeFormatDefaultLocale:IC,timeFormatLocale:TC,timeFriday:wC,timeFridays:$V,timeHour:Cb,timeHours:yV,timeInterval:Qt,timeMillisecond:ea,timeMilliseconds:Q_,timeMinute:wb,timeMinutes:mV,timeMonday:uu,timeMondays:xV,timeMonth:Sb,timeMonths:MV,get timeParse(){return zC},timeSaturday:CC,timeSaturdays:kV,timeSecond:su,timeSeconds:ex,timeSunday:lu,timeSundays:tx,timeThursday:na,timeThursdays:SV,timeTuesday:_C,timeTuesdays:wV,timeWednesday:xC,timeWednesdays:CV,timeWeek:lu,timeWeeks:tx,timeYear:vi,timeYears:TV,timeout:H0,timer:Vd,timerFlush:U8,touch:Yl,touches:xN,transition:q8,transpose:X5,tree:WW,treemap:VW,treemapBinary:qW,treemapDice:Tu,treemapResquarify:GW,treemapSlice:eh,treemapSliceDice:YW,treemapSquarify:iC,tsv:QH,tsvFormat:LH,tsvFormatBody:DH,tsvFormatRow:UH,tsvFormatRows:HH,tsvFormatValue:jH,tsvParse:n3,tsvParseRows:NH,utcDay:Pu,utcDays:PV,get utcFormat(){return nh},utcFriday:kC,utcFridays:BV,utcHour:kb,utcHours:AV,utcMillisecond:ea,utcMilliseconds:Q_,utcMinute:$b,utcMinutes:EV,utcMonday:fu,utcMondays:RV,utcMonth:Mb,utcMonths:NV,get utcParse(){return Eb},utcSaturday:MC,utcSaturdays:OV,utcSecond:su,utcSeconds:ex,utcSunday:cu,utcSundays:nx,utcThursday:ra,utcThursdays:FV,utcTuesday:SC,utcTuesdays:zV,utcWednesday:$C,utcWednesdays:IV,utcWeek:cu,utcWeeks:nx,utcYear:bi,utcYears:LV,values:pH,variance:W5,version:$B,voronoi:sX,window:zv,xml:rU,zip:WB,zoom:pX,zoomIdentity:ch,zoomTransform:V6},Symbol.toStringTag,{value:"Module"})),qi={verbs:["highlight","select","fade","hide"],adjectives:["highlighted","selected","faded","hidden"]};function gX(e){return isNaN(e)||e<=0?null:Math.log(e)/Math.LN10}function vX(e){return isNaN(e)||e<=0?null:-Math.log(e)/Math.LN10}function bX(e){if(isNaN(e))return"NaN";if(e===0)return"1";const t=Math.ceil(e),n=t-e,r=Math.pow(10,n);return t===1?(r/10).toFixed(4):t===2?(r/100).toFixed(3):`${r.toFixed(2)} × 10^-${t}`}function mX(e){if(isNaN(e))return"NaN";if(e===0)return"0";const t=Math.abs(e);let n;return t>1?n=Math.ceil(Math.log(t)/Math.LN10):n=Math.floor(Math.log(t)/Math.LN10),Math.abs(n)<=3?e.toFixed(3):e.toExponential(2).replace("+","").replace("e"," × 10^")}function yX(e){return e?(e=`${e}`,e.replace(/['"<>&`]/g,function(t){switch(t){case"'":return"'";case'"':return""";case"<":return"<";case">":return">";case"&":return"&";case"`":return"`"}})):""}function _X(e){return typeof e=="number"}function xX(e){return encodeURIComponent(e)}const wX=Object.freeze(Object.defineProperty({__proto__:null,htmlescape:yX,is_numeric:_X,log10:gX,logtoscinotation:bX,neglog10:vX,scinotation:mX,urlencode:xX},Symbol.toStringTag,{value:"Module"}));class CX extends Zi{_collectTransforms(t){const n=t.match(/\|([^|]+)/g).map(r=>super.get(r.substring(1)));return r=>n.reduce((i,o)=>o(i),r)}get(t){return t?t.substring(0,1)==="|"?this._collectTransforms(t):super.get(t):null}}const Vb=new CX;for(let[e,t]of Object.entries(wX))Vb.add(e,t);class za{constructor(t){if(!/^(?:\w+:\w+|^\w+)(?:\|\w+)*$/.test(t))throw new Error(`Invalid field specifier: '${t}'`);const[r,...i]=t.split("|");this.full_name=t,this.field_name=r,this.transformations=i.map(o=>Vb.get(o))}_applyTransformations(t){return this.transformations.forEach(function(n){t=n(t)}),t}resolve(t,n){if(typeof t[this.full_name]>"u"){let r=null;t[this.field_name]!==void 0?r=t[this.field_name]:n&&n[this.field_name]!==void 0&&(r=n[this.field_name]),t[this.full_name]=this._applyTransformations(r)}return t[this.full_name]}}const kx=/^(\*|[\w]+)/,SX=/^\[\?\(@((?:\.[\w]+)+) *===? *([0-9.eE-]+|"[^"]*"|'[^']*')\)\]/;function $X(e){if(e.substr(0,2)===".."){if(e[2]==="[")return{text:"..",attr:"*",depth:".."};const t=kx.exec(e.substr(2));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dotdot_attr.`;return{text:`..${t[0]}`,attr:t[1],depth:".."}}else if(e[0]==="."){const t=kx.exec(e.substr(1));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dot_attr.`;return{text:`.${t[0]}`,attr:t[1],depth:"."}}else if(e[0]==="["){const t=SX.exec(e);if(!t)throw`Cannot parse ${JSON.stringify(e)} as expr.`;let n;try{n=JSON.parse(t[2])}catch{n=JSON.parse(t[2].replace(/^'|'$/g,'"'))}return{text:t[0],attrs:t[1].substr(1).split("."),value:n}}else throw`The query ${JSON.stringify(e)} doesn't look valid.`}function kX(e){return e?(["$","["].includes(e[0])||(e=`$.${e}`),e[0]==="$"&&(e=e.substr(1)),e):""}function MX(e){e=kX(e);let t=[];for(;e.length;){const n=$X(e);e=e.substr(n.text.length),t.push(n)}return t}function Y6(e,t){let n;for(let r of t)n=e,e=e[r];return[n,t[t.length-1],e]}function To(e,t){if(!t.length)return[[]];const n=t[0],r=t.slice(1);let i=[];if(n.attr&&n.depth==="."&&n.attr!=="*"){const a=e[n.attr];t.length===1?a!==void 0&&i.push([n.attr]):i.push(...To(a,r).map(s=>[n.attr].concat(s)))}else if(n.attr&&n.depth==="."&&n.attr==="*")for(let[a,s]of Object.entries(e))i.push(...To(s,r).map(l=>[a].concat(l)));else if(n.attr&&n.depth===".."){if(typeof e=="object"&&e!==null){n.attr!=="*"&&n.attr in e&&i.push(...To(e[n.attr],r).map(a=>[n.attr].concat(a)));for(let[a,s]of Object.entries(e))i.push(...To(s,t).map(l=>[a].concat(l))),n.attr==="*"&&i.push(...To(s,r).map(l=>[a].concat(l)))}}else if(n.attrs)for(let[a,s]of Object.entries(e)){const[l,u,c]=Y6(s,n.attrs);c===n.value&&i.push(...To(s,r).map(d=>[a].concat(d)))}const o=TX(i,JSON.stringify);return o.sort((a,s)=>s.length-a.length||JSON.stringify(a).localeCompare(JSON.stringify(s))),o}function TX(e,t){return[...new Map(e.map(n=>[t(n),n])).values()]}function EX(e,t){let n=[];for(let r of To(e,t))n.push(Y6(e,r));return n}function G6(e,t){const n=MX(t),r=EX(e,n);return r.length||console.warn(`No items matched the specified query: '${t}'`),r}function AX(e,t){return G6(e,t).map(n=>n[2])}function PX(e,t,n){return G6(e,t).map(([i,o,a])=>{const s=typeof n=="function"?n(a):n;return i[o]=s,s})}const Vp=Math.sqrt(3),RX={draw(e,t){const n=-Math.sqrt(t/(Vp*3));e.moveTo(0,-n*2),e.lineTo(-Vp*n,n),e.lineTo(Vp*n,n),e.closePath()}};function X6(e,t){if(t=t||{},!e||typeof e!="object"||typeof t!="object")throw new Error("Layout and shared namespaces must be provided as objects");for(let[n,r]of Object.entries(e))n==="namespace"?Object.keys(r).forEach(i=>{const o=t[i];o&&(r[i]=o)}):r!==null&&typeof r=="object"&&(e[n]=X6(r,t));return e}function qt(e,t){if(typeof e!="object"||typeof t!="object")throw new Error(`LocusZoom.Layouts.merge only accepts two layout objects; ${typeof e}, ${typeof t} given`);for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=e[n]===null?"undefined":typeof e[n],i=typeof t[n];if(r==="object"&&Array.isArray(e[n])&&(r="array"),i==="object"&&Array.isArray(t[n])&&(i="array"),r==="function"||i==="function")throw new Error("LocusZoom.Layouts.merge encountered an unsupported property type");if(r==="undefined"){e[n]=at(t[n]);continue}if(r==="object"&&i==="object"){e[n]=qt(e[n],t[n]);continue}}return e}function at(e){return JSON.parse(JSON.stringify(e))}function K6(e){if(!e)return null;if(e==="triangledown")return RX;const t=`symbol${e.charAt(0).toUpperCase()+e.slice(1)}`;return q6[t]||null}function qb(e,t,n=null){const r=new Set;if(!n){if(!t.length)return r;const i=t.join("|");n=new RegExp(`(?:{{)?(?:#if *)?((?:${i}):\\w+)`,"g")}for(const i of Object.values(e)){const o=typeof i;let a=[];if(o==="string"){let s;for(;(s=n.exec(i))!==null;)a.push(s[1])}else if(i!==null&&o==="object")a=qb(i,t,n);else continue;for(let s of a)r.add(s)}return r}function Mg(e,t,n,r=!0){const i=typeof e;if(Array.isArray(e))return e.map(o=>Mg(o,t,n,r));if(i==="object"&&e!==null)return Object.keys(e).reduce((o,a)=>(o[a]=Mg(e[a],t,n,r),o),{});if(i!=="string")return e;{const o=t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(r){const s=new RegExp(`${o}\\|\\w+`,"g");(e.match(s)||[]).forEach(u=>console.warn(`renameFields is renaming a field that uses transform functions: was '${u}' . Verify that these transforms are still appropriate.`))}const a=new RegExp(`${o}(?!\\w+)`,"g");return e.replace(a,n)}}function zX(e,t,n){return PX(e,t,n)}function IX(e,t){return AX(e,t)}class FX{constructor(t,n,r){this._callable=_a.get(t),this._initiator=n,this._params=r||[]}getData(t,...n){const r={plot_state:t,data_layer:this._initiator};return Promise.resolve(this._callable(r,n,...this._params))}}class BX{constructor(t){this._sources=t}config_to_sources(t={},n=[],r){const i=new Map,o=Object.keys(t);let a=n.find(u=>u.type==="fetch");a||(a={type:"fetch",from:o},n.unshift(a));const s=/^\w+$/;for(let[u,c]of Object.entries(t)){if(!s.test(u))throw new Error(`Invalid namespace name: '${u}'. Must contain only alphanumeric characters`);const d=this._sources.get(c);if(!d)throw new Error(`A data layer has requested an item not found in DataSources: data type '${u}' from ${c}`);i.set(u,d),a.from.find(f=>f.split("(")[0]===u)||a.from.push(u)}let l=Array.from(a.from);for(let u of n){let{type:c,name:d,requires:f,params:h}=u;if(c!=="fetch"){let p=0;if(d||(d=u.name=`join${p}`,p+=1),i.has(d))throw new Error(`Configuration error: within a layer, join name '${d}' must be unique`);f.forEach(b=>{if(!i.has(b))throw new Error(`Data operation cannot operate on unknown provider '${b}'`)});const g=new FX(c,r,h);i.set(d,g),l.push(`${d}(${f.join(", ")})`)}}return[i,l]}getData(t,n,r){return r.length?hB(t,n,r,!0):Promise.resolve([])}}function Z6(){return{showing:!1,selector:null,content_selector:null,hide_delay:null,show:(e,t)=>(this.curtain.showing||(this.curtain.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-curtain").attr("id",`${this.id}.curtain`),this.curtain.content_selector=this.curtain.selector.append("div").attr("class","lz-curtain-content"),this.curtain.selector.append("div").attr("class","lz-curtain-dismiss").html("Dismiss").on("click",()=>this.curtain.hide()),this.curtain.showing=!0),this.curtain.update(e,t)),update:(e,t)=>{if(!this.curtain.showing)return this.curtain;clearTimeout(this.curtain.hide_delay),typeof t=="object"&&xn(this.curtain.selector,t);const n=this._getPageOrigin(),r=this.layout.height||this._total_height;return this.curtain.selector.style("top",`${n.y}px`).style("left",`${n.x}px`).style("width",`${this.parent_plot.layout.width}px`).style("height",`${r}px`),this.curtain.content_selector.style("max-width",`${this.parent_plot.layout.width-40}px`).style("max-height",`${r-40}px`),typeof e=="string"&&this.curtain.content_selector.html(e),this.curtain},hide:e=>this.curtain.showing?typeof e=="number"?(clearTimeout(this.curtain.hide_delay),this.curtain.hide_delay=setTimeout(this.curtain.hide,e),this.curtain):(this.curtain.selector.remove(),this.curtain.selector=null,this.curtain.content_selector=null,this.curtain.showing=!1,this.curtain):this.curtain}}function J6(){return{showing:!1,selector:null,content_selector:null,progress_selector:null,cancel_selector:null,show:e=>(this.loader.showing||(this.loader.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-loader").attr("id",`${this.id}.loader`),this.loader.content_selector=this.loader.selector.append("div").attr("class","lz-loader-content"),this.loader.progress_selector=this.loader.selector.append("div").attr("class","lz-loader-progress-container").append("div").attr("class","lz-loader-progress"),this.loader.showing=!0,typeof e>"u"&&(e="Loading...")),this.loader.update(e)),update:(e,t)=>{if(!this.loader.showing)return this.loader;clearTimeout(this.loader.hide_delay),typeof e=="string"&&this.loader.content_selector.html(e);const n=6,r=this._getPageOrigin(),i=this.loader.selector.node().getBoundingClientRect();return this.loader.selector.style("top",`${r.y+this.layout.height-i.height-n}px`).style("left",`${r.x+n}px`),typeof t=="number"&&this.loader.progress_selector.style("width",`${Math.min(Math.max(t,1),100)}%`),this.loader},animate:()=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!0),this.loader),setPercentCompleted:e=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!1),this.loader.update(null,e)),hide:e=>this.loader.showing?typeof e=="number"?(clearTimeout(this.loader.hide_delay),this.loader.hide_delay=setTimeout(this.loader.hide,e),this.loader):(this.loader.selector.remove(),this.loader.selector=null,this.loader.content_selector=null,this.loader.progress_selector=null,this.loader.cancel_selector=null,this.loader.showing=!1,this.loader):this.loader}}function xn(e,t){t=t||{};for(let[n,r]of Object.entries(t))e.style(n,r)}function OX(e,t=500){let n;return()=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,arguments),t)}}class Sn{constructor(t,n){this.layout=t||{},this.layout.color||(this.layout.color="gray"),this.parent=n||null,this.parent_panel=null,this.parent_plot=null,this.parent_svg=null,this.parent&&(this.parent.type==="panel"?(this.parent_panel=this.parent.parent,this.parent_plot=this.parent.parent.parent,this.parent_svg=this.parent_panel):(this.parent_plot=this.parent.parent,this.parent_svg=this.parent_plot)),this.selector=null,this.button=null,this.persist=!1,this.layout.position||(this.layout.position="left")}show(){if(!(!this.parent||!this.parent.selector)){if(!this.selector){const t=["start","middle","end"].includes(this.layout.group_position)?` lz-toolbar-group-${this.layout.group_position}`:"";this.selector=this.parent.selector.append("div").attr("class",`lz-toolbar-${this.layout.position}${t}`),this.layout.style&&xn(this.selector,this.layout.style),typeof this.initialize=="function"&&this.initialize()}return this.button&&this.button.status==="highlighted"&&this.button.menu.show(),this.selector.style("visibility","visible"),this.update(),this.position()}}update(){}position(){return this.button&&this.button.menu.position(),this}shouldPersist(){return this.persist?!0:!!(this.button&&this.button.persist)}hide(){return!this.selector||this.shouldPersist()?this:(this.button&&this.button.menu.hide(),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.button&&this.button.menu&&this.button.menu.destroy(),this.selector.remove(),this.selector=null,this.button=null,this):this}}class gr{constructor(t){if(!(t instanceof Sn))throw new Error("Unable to create toolbar widget button, invalid parent");this.parent=t,this.parent_panel=this.parent.parent_panel,this.parent_plot=this.parent.parent_plot,this.parent_svg=this.parent.parent_svg,this.parent_toolbar=this.parent.parent,this.selector=null,this.tag="a",this.html="",this.title="",this.color="gray",this.style={},this.persist=!1,this.permanent=!1,this.status="",this.menu={outer_selector:null,inner_selector:null,scroll_position:0,hidden:!0,show:()=>(this.menu.outer_selector||(this.menu.outer_selector=Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class",`lz-toolbar-menu lz-toolbar-menu-${this.color}`).attr("id",`${this.parent_svg.getBaseId()}.toolbar.menu`),this.menu.inner_selector=this.menu.outer_selector.append("div").attr("class","lz-toolbar-menu-content"),this.menu.inner_selector.on("scroll",()=>{this.menu.scroll_position=this.menu.inner_selector.node().scrollTop})),this.menu.outer_selector.style("visibility","visible"),this.menu.hidden=!1,this.menu.update()),update:()=>this.menu.outer_selector?(this.menu.populate(),this.menu.inner_selector&&(this.menu.inner_selector.node().scrollTop=this.menu.scroll_position),this.menu.position()):this.menu,position:()=>{if(!this.menu.outer_selector)return this.menu;this.menu.outer_selector.style("height",null);const n=3,r=20,i=14,o=this.parent_svg._getPageOrigin(),a=document.documentElement.scrollTop||document.body.scrollTop,s=this.parent_plot.getContainerOffset(),l=this.parent_toolbar.selector.node().getBoundingClientRect(),u=this.selector.node().getBoundingClientRect(),c=this.menu.outer_selector.node().getBoundingClientRect(),d=this.menu.inner_selector.node().scrollHeight;let f,h;this.parent_toolbar.type==="panel"?(f=o.y+l.height+2*n,h=Math.max(o.x+this.parent_plot.layout.width-c.width-n,o.x+n)):(f=u.bottom+a+n-s.top,h=Math.max(u.left+u.width-c.width-s.left,o.x+n));const p=Math.max(this.parent_plot.layout.width-2*n-r,r),g=p,b=p-4*n,v=Math.max(this.parent_svg.layout.height-10*n-i,i),_=Math.min(d+i,v);return this.menu.outer_selector.style("top",`${f}px`).style("left",`${h}px`).style("max-width",`${g}px`).style("max-height",`${v}px`).style("height",`${_}px`),this.menu.inner_selector.style("max-width",`${b}px`),this.menu.inner_selector.node().scrollTop=this.menu.scroll_position,this.menu},hide:()=>this.menu.outer_selector?(this.menu.outer_selector.style("visibility","hidden"),this.menu.hidden=!0,this.menu):this.menu,destroy:()=>this.menu.outer_selector?(this.menu.inner_selector.remove(),this.menu.outer_selector.remove(),this.menu.inner_selector=null,this.menu.outer_selector=null,this.menu):this.menu,populate:()=>{throw new Error("Method must be implemented")},setPopulate:n=>(typeof n=="function"?(this.menu.populate=n,this.setOnclick(()=>{this.menu.hidden?(this.menu.show(),this.highlight().update(),this.persist=!0):(this.menu.hide(),this.highlight(!1).update(),this.permanent||(this.persist=!1))})):this.setOnclick(),this)}}setColor(t){return typeof t<"u"&&(["gray","red","orange","yellow","green","blue","purple"].includes(t)?this.color=t:this.color="gray"),this}setPermanent(t){return typeof t>"u"?t=!0:t=!!t,this.permanent=t,this.permanent&&(this.persist=!0),this}shouldPersist(){return this.permanent||this.persist}setStyle(t){return typeof t<"u"&&(this.style=t),this}getClass(){const t=["start","middle","end"].includes(this.parent.layout.group_position)?` lz-toolbar-button-group-${this.parent.layout.group_position}`:"";return`lz-toolbar-button lz-toolbar-button-${this.color}${this.status?`-${this.status}`:""}${t}`}setStatus(t){return typeof t<"u"&&["","highlighted","disabled"].includes(t)&&(this.status=t),this.update()}highlight(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("highlighted"):this.status==="highlighted"?this.setStatus(""):this}disable(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("disabled"):this.status==="disabled"?this.setStatus(""):this}onmouseover(){}setOnMouseover(t){return typeof t=="function"?this.onmouseover=t:this.onmouseover=function(){},this}onmouseout(){}setOnMouseout(t){return typeof t=="function"?this.onmouseout=t:this.onmouseout=function(){},this}onclick(){}setOnclick(t){return typeof t=="function"?this.onclick=t:this.onclick=function(){},this}setTitle(t){return typeof t<"u"&&(this.title=t.toString()),this}setHtml(t){return typeof t<"u"&&(this.html=t.toString()),this}show(){if(this.parent)return this.selector||(this.selector=this.parent.selector.append(this.tag).attr("class",this.getClass())),this.update()}preUpdate(){return this}update(){return this.selector?(this.preUpdate(),this.selector.attr("class",this.getClass()).attr("title",this.title).on("mouseover",this.status==="disabled"?null:this.onmouseover).on("mouseout",this.status==="disabled"?null:this.onmouseout).on("click",this.status==="disabled"?null:this.onclick).html(this.html).call(xn,this.style),this.menu.update(),this.postUpdate(),this):this}postUpdate(){return this}hide(){return this.selector&&!this.shouldPersist()&&(this.selector.remove(),this.selector=null),this}}class NX extends Sn{show(){return this.div_selector||(this.div_selector=this.parent.selector.append("div").attr("class",`lz-toolbar-title lz-toolbar-${this.layout.position}`),this.title_selector=this.div_selector.append("h3")),this.update()}update(){let t=this.layout.title.toString();return this.layout.subtitle&&(t+=` <small>${this.layout.subtitle}</small>`),this.title_selector.html(t),this}}class LX extends Sn{update(){return!isNaN(this.parent_plot.state.start)&&!isNaN(this.parent_plot.state.end)&&this.parent_plot.state.start!==null&&this.parent_plot.state.end!==null?(this.selector.style("display",null),this.selector.html(Gb(this.parent_plot.state.end-this.parent_plot.state.start,null,!0))):this.selector.style("display","none"),this.layout.class&&this.selector.attr("class",this.layout.class),this.layout.style&&xn(this.selector,this.layout.style),this}}class DX extends Sn{constructor(t,n){if(super(t,n),!this.parent_panel)throw new Error("Filter widget can only be used in panel toolbars");if(this._data_layer=this.parent_panel.data_layers[t.layer_name],!this._data_layer)throw new Error(`Filter widget could not locate the specified layer_name: '${t.layer_name}'`);if(this._event_name=t.custom_event_name||"widget_filter_field_action",this._field=t.field,this._field_display_html=t.field_display_html,this._operator=t.operator,this._filter_id=null,this._data_type=t.data_type||"number",!["number","string"].includes(this._data_type))throw new Error("Filter must be either string or number");this._value_selector=null}_getTarget(){this._data_layer.layout.filters||(this._data_layer.layout.filters=[]);let t=this._data_layer.layout.filters.find(n=>n.field===this._field&&n.operator===this._operator&&(!this._filter_id||n.id===this._filter_id));return t||(t={field:this._field,operator:this._operator,value:null},this._filter_id&&(t.id=this._filter_id),this._data_layer.layout.filters.push(t)),t}_clearFilter(){if(this._data_layer.layout.filters){const t=this._data_layer.layout.filters.indexOf(this._getTarget());this._data_layer.layout.filters.splice(t,1)}}_setFilter(t){if(t===null)this._value_selector.style("border","1px solid red").style("color","red"),this._clearFilter();else{const n=this._getTarget();n.value=t}this.parent_svg.emit(this._event_name,{field:this._field,operator:this._operator,value:t,filter_id:this._filter_id},!0)}_getValue(){let t=this._value_selector.property("value");return t===null||t===""||this._data_type==="number"&&(t=+t,Number.isNaN(t))?null:t}update(){this._value_selector||(this.selector.style("padding","0 6px"),this.selector.append("span").html(this._field_display_html).style("background","#fff").style("padding-left","3px"),this.selector.append("span").text(this._operator).style("padding","0 3px").style("background","#fff"),this._value_selector=this.selector.append("input").attr("size",this.layout.input_size||4).on("input",OX(()=>{this._value_selector.style("border",null).style("color",null);const t=this._getValue();this._setFilter(t),this.parent_panel.render()},750)))}}class Q6 extends Sn{constructor(t,n){super(t,n),this._filename=this.layout.filename||"locuszoom.svg",this._button_html=this.layout.button_html||"Save SVG",this._button_title=this.layout.button_title||"Download hi-res image",this._event_name=t.custom_event_name||"widget_save_svg"}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this._button_html).setTitle(this._button_title).setOnMouseover(()=>{this.button.selector.classed("lz-toolbar-button-gray-disabled",!0).html("Preparing Image"),this._getBlobUrl().then(t=>{const n=this.button.selector.attr("href");n&&URL.revokeObjectURL(n),this.button.selector.attr("href",t).classed("lz-toolbar-button-gray-disabled",!1).classed("lz-toolbar-button-gray-highlighted",!0).html(this._button_html)})}).setOnMouseout(()=>{this.button.selector.classed("lz-toolbar-button-gray-highlighted",!1)}),this.button.show(),this.button.selector.attr("href-lang","image/svg+xml").attr("download",this._filename).on("click",()=>this.parent_svg.emit(this._event_name,{filename:this._filename},!0)),this)}_getCSS(t){const n=/^svg\.lz-locuszoom\s*/;let r="";for(let i=0;i<document.styleSheets.length;i++){const o=document.styleSheets[i];try{if(!o.cssRules)continue}catch(s){if(s.name!=="SecurityError")throw s;continue}let a=o.cssRules;for(let s=0;s<a.length;s++){const l=a[s];l.selectorText&&l.selectorText.match(n)&&(r+=l.cssText)}}return r}_appendCSS(t,n){var r=document.createElement("style");r.setAttribute("type","text/css"),r.innerHTML=t;var i=n.hasChildNodes()?n.children[0]:null;n.insertBefore(r,i)}_getDimensions(){let{width:t,height:n}=this.parent_plot.svg.node().getBoundingClientRect();const i=2400/t;return[i*t,i*n]}_generateSVG(){return new Promise(t=>{let n=this.parent_plot.svg.node().cloneNode(!0);n.setAttribute("xlink","http://www.w3.org/1999/xlink"),n=Ue(n),n.selectAll("g.lz-curtain").remove(),n.selectAll("g.lz-mouse_guide").remove(),n.selectAll("g.tick text").each(function(){const s=+Ue(this).attr("dy").substring(-2).slice(0,-2)*10;Ue(this).attr("dy",s)});const r=new XMLSerializer;n=n.node();const[i,o]=this._getDimensions();n.setAttribute("width",i),n.setAttribute("height",o),this._appendCSS(this._getCSS(n),n);let a=r.serializeToString(n);t(a)})}_getBlobUrl(){return this._generateSVG().then(t=>{const n=new Blob([t],{type:"image/svg+xml"});return URL.createObjectURL(n)})}}class HX extends Q6{constructor(t,n){super(...arguments),this._filename=this.layout.filename||"locuszoom.png",this._button_html=this.layout.button_html||"Save PNG",this._button_title=this.layout.button_title||"Download image",this._event_name=t.custom_event_name||"widget_save_png"}_getBlobUrl(){return super._getBlobUrl().then(t=>{const n=document.createElement("canvas"),r=n.getContext("2d"),[i,o]=this._getDimensions();return n.width=i,n.height=o,new Promise((a,s)=>{const l=new Image;l.onload=()=>{r.drawImage(l,0,0,i,o),URL.revokeObjectURL(t),n.toBlob(u=>{a(URL.createObjectURL(u))})},l.src=t})})}}class UX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml("×").setTitle("Remove panel").setOnclick(()=>{if(!this.layout.suppress_confirm&&!confirm("Are you sure you want to remove this panel? This cannot be undone."))return!1;const t=this.parent_panel;return t.toolbar.hide(!0),Ue(t.parent.svg.node().parentNode).on(`mouseover.${t.getBaseId()}.toolbar`,null),Ue(t.parent.svg.node().parentNode).on(`mouseout.${t.getBaseId()}.toolbar`,null),t.parent.removePanel(t.id)}),this.button.show(),this)}}class jX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===0;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▴").setTitle("Move panel up").setOnclick(()=>{this.parent_panel.moveUp(),this.update()}),this.button.show(),this.update()}}class WX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===this.parent_plot._panel_ids_by_y_index.length-1;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▾").setTitle("Move panel down").setOnclick(()=>{this.parent_panel.moveDown(),this.update()}),this.button.show(),this.update()}}class VX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=5e4),typeof t.button_html!="string"&&(t.button_html=t.step>0?">":"<"),typeof t.button_title!="string"&&(t.button_title=`Shift region by ${t.step>0?"+":"-"}${Gb(Math.abs(t.step),null,!0)}`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add shift_region toolbar widget: plot state does not have region bounds")}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start+this.layout.step,1),end:this.parent_plot.state.end+this.layout.step})}),this.button.show(),this)}}class qX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=.2),typeof t.button_html!="string"&&(t.button_html=t.step>0?"z–":"z+"),typeof t.button_title!="string"&&(t.button_title=`Zoom region ${t.step>0?"out":"in"} by ${(Math.abs(t.step)*100).toFixed(1)}%`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add zoom_region toolbar widget: plot state does not have region bounds")}update(){if(this.button){let t=!0;const n=this.parent_plot.state.end-this.parent_plot.state.start;return this.layout.step>0&&!isNaN(this.parent_plot.layout.max_region_scale)&&n>=this.parent_plot.layout.max_region_scale&&(t=!1),this.layout.step<0&&!isNaN(this.parent_plot.layout.min_region_scale)&&n<=this.parent_plot.layout.min_region_scale&&(t=!1),this.button.disable(!t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{const t=this.parent_plot.state.end-this.parent_plot.state.start,n=1+this.layout.step;let r=t*n;isNaN(this.parent_plot.layout.max_region_scale)||(r=Math.min(r,this.parent_plot.layout.max_region_scale)),isNaN(this.parent_plot.layout.min_region_scale)||(r=Math.max(r,this.parent_plot.layout.min_region_scale));const i=Math.floor((r-t)/2);this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start-i,1),end:this.parent_plot.state.end+i})}),this.button.show(),this}}class YX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title),this.button.menu.setPopulate(()=>{this.button.menu.inner_selector.html(this.layout.menu_html)}),this.button.show(),this)}}class GX extends Sn{constructor(t){super(...arguments)}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html||"Resize to Data").setTitle(this.layout.button_title||"Automatically resize this panel to show all data available").setOnclick(()=>{this.parent_panel.scaleHeightToData(),this.update()}),this.button.show(),this)}}class XX extends Sn{update(){const t=this.parent_panel.legend.layout.hidden?"Show Legend":"Hide Legend";return this.button?(this.button.setHtml(t).show(),this.parent.position(),this):(this.button=new gr(this).setColor(this.layout.color).setTitle("Show or hide the legend for this panel").setOnclick(()=>{this.parent_panel.legend.layout.hidden=!this.parent_panel.legend.layout.hidden,this.parent_panel.legend.render(),this.update()}),this.update())}}class KX extends Sn{constructor(t,n){typeof t.button_html!="string"&&(t.button_html="Display options..."),typeof t.button_title!="string"&&(t.button_title="Control how plot items are displayed"),super(...arguments),this._event_name=t.custom_event_name||"widget_display_options_choice";const r=t.fields_whitelist||["color","fill_opacity","filters","label","legend","point_shape","point_size","tooltip","tooltip_positioning"],i=this.parent_panel.data_layers[t.layer_name];if(!i)throw new Error(`Display options could not locate the specified layer_name: '${t.layer_name}'`);const o=i.layout,a={};r.forEach(s=>{const l=o[s];l!==void 0&&(a[s]=at(l))}),this._selected_item="default",this.button=new gr(this).setColor(t.color).setHtml(t.button_html).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const s=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const l=this.button.menu.inner_selector.append("table"),u=this.layout,c=(f,h,p)=>{const g=l.append("tr"),b=`${s}${p}`;g.append("td").append("input").attr("id",b).attr("type","radio").attr("name",`display-option-${s}`).attr("value",p).style("margin",0).property("checked",p===this._selected_item).on("click",()=>{r.forEach(_=>{const y=typeof h[_]<"u";i.layout[_]=y?h[_]:a[_]}),this.parent_svg.emit(this._event_name,{choice:f},!0),this._selected_item=p,this.parent_panel.render();const v=this.parent_panel.legend;v&&v.render()}),g.append("td").append("label").style("font-weight","normal").attr("for",b).text(f)},d=u.default_config_display_name||"Default style";return c(d,a,"default"),u.options.forEach((f,h)=>c(f.display_name,f.display,h)),this})}update(){return this.button.show(),this}}class ZX extends Sn{constructor(t,n){if(typeof t.button_html!="string"&&(t.button_html="Set option..."),typeof t.button_title!="string"&&(t.button_title="Choose an option to customize the plot"),super(t,n),this.parent_panel)throw new Error("This widget is designed to set global options, so it can only be used at the top (plot) level");if(!t.state_field)throw new Error("Must specify the `state_field` that this widget controls");if(this._event_name=t.custom_event_name||"widget_set_state_choice",this._selected_item=this.parent_plot.state[t.state_field]||t.options[0].value,!t.options.find(r=>r.value===this._selected_item))throw new Error("There is an existing state value that does not match the known values in this widget");this.button=new gr(this).setColor(t.color).setHtml(t.button_html+(t.show_selected?this._selected_item:"")).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const r=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const i=this.button.menu.inner_selector.append("table"),o=(a,s,l)=>{const u=i.append("tr"),c=`${r}${l}`;u.append("td").append("input").attr("id",c).attr("type","radio").attr("name",`set-state-${r}`).attr("value",l).style("margin",0).property("checked",s===this._selected_item).on("click",()=>{const d={};d[t.state_field]=s,this._selected_item=s,this.parent_plot.applyState(d),this.button.setHtml(t.button_html+(t.show_selected?this._selected_item:"")),this.parent_svg.emit(this._event_name,{choice_name:a,choice_value:s,state_field:t.state_field},!0)}),u.append("td").append("label").style("font-weight","normal").attr("for",c).text(a)};return t.options.forEach((a,s)=>o(a.display_name,a.value,s)),this})}update(){return this.button.show(),this}}const JX=Object.freeze(Object.defineProperty({__proto__:null,BaseWidget:Sn,_Button:gr,display_options:KX,download:Q6,download_png:HX,filter_field:DX,menu:YX,move_panel_down:WX,move_panel_up:jX,region_scale:LX,remove_panel:UX,resize_to_data:GX,set_state:ZX,shift_region:VX,title:NX,toggle_legend:XX,zoom_region:qX},Symbol.toStringTag,{value:"Module"})),Yb=new Sv;for(let[e,t]of Object.entries(JX))Yb.add(e,t);class e4{constructor(t){this.parent=t,this.id=`${this.parent.getBaseId()}.toolbar`,this.type=this.parent.parent?"panel":"plot",this.parent_plot=this.parent.parent_plot,this.selector=null,this.widgets=[],this.hide_timeout=null,this.persist=!1,this.initialize()}initialize(){const t=this.parent.layout.toolbar.widgets;return Array.isArray(t)&&t.forEach(n=>{this.addWidget(n)}),this.type==="panel"&&Ue(this.parent.parent.svg.node().parentNode).on(`mouseover.${this.id}`,()=>{clearTimeout(this.hide_timeout),(!this.selector||this.selector.style("visibility")==="hidden")&&this.show()}).on(`mouseout.${this.id}`,()=>{clearTimeout(this.hide_timeout),this.hide_timeout=setTimeout(()=>{this.hide()},300)}),this}addWidget(t){try{const n=Yb.create(t.type,t,this);return this.widgets.push(n),n}catch(n){console.warn("Failed to create widget"),console.error(n)}}shouldPersist(){if(this.persist)return!0;let t=!1;return this.widgets.forEach(n=>{t=t||n.shouldPersist()}),t=t||this.parent_plot._panel_boundaries.dragging||this.parent_plot._interaction.dragging,!!t}show(){if(!this.selector){switch(this.type){case"plot":this.selector=Ue(this.parent.svg.node().parentNode).insert("div",":first-child");break;case"panel":this.selector=Ue(this.parent.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip, .lz-toolbar-menu, .lz-curtain").classed("lz-panel-toolbar",!0);break;default:throw new Error(`Toolbar cannot be a child of ${this.type}`)}this.selector.classed("lz-toolbar",!0).classed(`lz-${this.type}-toolbar`,!0).attr("id",this.id)}return this.widgets.forEach(t=>t.show()),this.selector.style("visibility","visible"),this.update()}update(){return this.selector?(this.widgets.forEach(t=>t.update()),this.position()):this}position(){if(!this.selector)return this;if(this.type==="panel"){const t=this.parent._getPageOrigin(),n=`${(t.y+3.5).toString()}px`,r=`${t.x.toString()}px`,i=`${(this.parent_plot.layout.width-4).toString()}px`;this.selector.style("position","absolute").style("top",n).style("left",r).style("width",i)}return this.widgets.forEach(t=>t.position()),this}hide(){return!this.selector||this.shouldPersist()?this:(this.widgets.forEach(t=>t.hide()),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.widgets.forEach(n=>n.destroy(!0)),this.widgets=[],this.selector.remove(),this.selector=null,this):this}}const QX={orientation:"vertical",origin:{x:0,y:0},width:10,height:10,padding:5,label_size:14,hidden:!1};class eK{constructor(t){return this.parent=t,this.id=`${this.parent.getBaseId()}.legend`,this.parent.layout.legend=qt(this.parent.layout.legend||{},QX),this.layout=this.parent.layout.legend,this.selector=null,this.background_rect=null,this.elements=[],this.elements_group=null,this.hidden=!1,this.render()}render(){this.selector||(this.selector=this.parent.svg.group.append("g").attr("id",`${this.parent.getBaseId()}.legend`).attr("class","lz-legend")),this.background_rect||(this.background_rect=this.selector.append("rect").attr("width",100).attr("height",100).attr("class","lz-legend-background")),this.elements_group||(this.elements_group=this.selector.append("g")),this.elements.forEach(a=>a.remove()),this.elements=[];const t=+this.layout.padding||1;let n=t,r=t,i=0;this.parent._data_layer_ids_by_z_index.slice().reverse().forEach(a=>{const s=this.parent.data_layers[a].layout.legend;Array.isArray(s)&&s.forEach(l=>{const u=this.elements_group.append("g").attr("transform",`translate(${n}, ${r})`),c=+l.label_size||+this.layout.label_size;let d=0,f=c/2+t/2;i=Math.max(i,c+t);const h=l.shape||"",p=K6(h);if(h==="line"){const b=+l.length||16,v=c/4+t/2;u.append("path").attr("class",l.class||"").attr("d",`M0,${v}L${b},${v}`).call(xn,l.style||{}),d=b+t}else if(h==="rect"){const b=+l.width||16,v=+l.height||b;u.append("rect").attr("class",l.class||"").attr("width",b).attr("height",v).attr("fill",l.color||{}).call(xn,l.style||{}),d=b+t,i=Math.max(i,v+t)}else if(h==="ribbon"){const b=+l.width||25,v=+l.height||b,_=(l.orientation||"vertical")==="horizontal";let y=l.color_stops;const x=u.append("g"),S=x.append("g"),$=x.append("g");let w=0;if(l.tick_labels){let T;_?T=[0,b*y.length-1]:T=[v*y.length-1,0];const k=au().domain(qo(l.tick_labels)).range(T),P=(_?K5:Av)(k).tickSize(3).tickValues(l.tick_labels).tickFormat(C=>C);$.call(P).attr("class","lz-axis"),w=$.node().getBoundingClientRect().height}_?($.attr("transform",`translate(0, ${w})`),S.attr("transform",`translate(0, ${w})`)):(x.attr("transform","translate(5, 0)"),$.attr("transform",`translate(${b}, 0)`)),_||(y=y.slice(),y.reverse());for(let T=0;T<y.length;T++){const k=y[T],P=_?`translate(${b*T}, 0)`:`translate(0, ${v*T})`;S.append("rect").attr("class",l.class||"").attr("stroke","black").attr("transform",P).attr("stroke-width",.5).attr("width",b).attr("height",v).attr("fill",k).call(xn,l.style||{})}if(!_&&l.label)throw new Error("Legend labels not supported for vertical ribbons (use a separate legend item as text instead)");d=b*y.length+t,f+=w}else if(p){const b=+l.size||40,v=Math.ceil(Math.sqrt(b/Math.PI));u.append("path").attr("class",l.class||"").attr("d",Lb().size(b).type(p)).attr("transform",`translate(${v}, ${v+t/2})`).attr("fill",l.color||{}).call(xn,l.style||{}),d=2*v+t,f=Math.max(2*v+t/2,f),i=Math.max(i,2*v+t)}u.append("text").attr("text-anchor","left").attr("class","lz-label").attr("x",d).attr("y",f).style("font-size",c).text(l.label);const g=u.node().getBoundingClientRect();if(this.layout.orientation==="vertical")r+=g.height+t,i=0;else{const b=this.layout.origin.x+n+g.width;n>t&&b>this.parent.parent.layout.width&&(r+=i,n=t,u.attr("transform",`translate(${n}, ${r})`)),n+=g.width+3*t}this.elements.push(u)})});const o=this.elements_group.node().getBoundingClientRect();return this.layout.width=o.width+2*this.layout.padding,this.layout.height=o.height+2*this.layout.padding,this.background_rect.attr("width",this.layout.width).attr("height",this.layout.height),this.selector.style("visibility",this.layout.hidden?"hidden":"visible"),this.position()}position(){if(!this.selector)return this;const t=this.selector.node().getBoundingClientRect();isNaN(+this.layout.pad_from_bottom)||(this.layout.origin.y=this.parent.layout.height-t.height-+this.layout.pad_from_bottom),isNaN(+this.layout.pad_from_right)||(this.layout.origin.x=this.parent.parent.layout.width-t.width-+this.layout.pad_from_right),this.selector.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`)}hide(){this.layout.hidden=!0,this.render()}show(){this.layout.hidden=!1,this.render()}}const tK={id:"",tag:"custom_data_type",title:{text:"",style:{},x:10,y:22},y_index:null,min_height:1,height:1,origin:{x:0,y:null},margin:{top:0,right:0,bottom:0,left:0},background_click:"clear_selections",toolbar:{widgets:[]},cliparea:{height:0,width:0,origin:{x:0,y:0}},axes:{x:{},y1:{},y2:{}},legend:null,interaction:{drag_background_to_pan:!1,drag_x_ticks_to_scale:!1,drag_y1_ticks_to_scale:!1,drag_y2_ticks_to_scale:!1,scroll_to_zoom:!1,x_linked:!1,y1_linked:!1,y2_linked:!1},show_loading_indicator:!0,data_layers:[]};class ad{constructor(t,n){if(typeof t!="object")throw new Error("Unable to create panel, invalid layout");if(this.parent=n||null,this.parent_plot=n,typeof t.id!="string"||!t.id)throw new Error('Panel layouts must specify "id"');if(this.parent&&typeof this.parent.panels[t.id]<"u")throw new Error(`Cannot create panel with id [${t.id}]; panel with that id already exists`);this.id=t.id,this._initialized=!1,this._layout_idx=null,this.svg={},this.layout=qt(t||{},tK),this.parent?(this.state=this.parent.state,this._state_id=this.id,this.state[this._state_id]=this.state[this._state_id]||{}):(this.state=null,this._state_id=null),this.data_layers={},this._data_layer_ids_by_z_index=[],this._data_promises=[],this.x_scale=null,this.y1_scale=null,this.y2_scale=null,this.x_extent=null,this.y1_extent=null,this.y2_extent=null,this.x_ticks=[],this.y1_ticks=[],this.y2_ticks=[],this._zoom_timeout=null,this._event_hooks={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n,r){if(r=r||!1,typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);typeof n=="boolean"&&arguments.length===2&&(r=n,n=null);const o={sourceID:this.getBaseId(),target:this,data:n||null};return this._event_hooks[t]&&this._event_hooks[t].forEach(a=>{a.call(this,o)}),r&&this.parent&&this.parent.emit(t,o),this}setTitle(t){if(typeof this.layout.title=="string"){const n=this.layout.title;this.layout.title={text:n,x:0,y:0,style:{}}}return typeof t=="string"?this.layout.title.text=t:typeof t=="object"&&t!==null&&(this.layout.title=qt(t,this.layout.title)),this.layout.title.text.length?this.title.attr("display",null).attr("x",parseFloat(this.layout.title.x)).attr("y",parseFloat(this.layout.title.y)).text(this.layout.title.text).call(xn,this.layout.title.style):this.title.attr("display","none"),this}addDataLayer(t){if(typeof t!="object"||typeof t.id!="string"||!t.id.length)throw new Error("Invalid data layer layout");if(typeof this.data_layers[t.id]<"u")throw new Error(`Cannot create data_layer with id '${t.id}'; data layer with that id already exists in the panel`);if(typeof t.type!="string")throw new Error("Invalid data layer type");typeof t.y_axis=="object"&&(typeof t.y_axis.axis>"u"||![1,2].includes(t.y_axis.axis))&&(t.y_axis.axis=1);const n=Xb.create(t.type,t,this);if(this.data_layers[n.id]=n,n.layout.z_index!==null&&!isNaN(n.layout.z_index)&&this._data_layer_ids_by_z_index.length>0)n.layout.z_index<0&&(n.layout.z_index=Math.max(this._data_layer_ids_by_z_index.length+n.layout.z_index,0)),this._data_layer_ids_by_z_index.splice(n.layout.z_index,0,n.id),this._data_layer_ids_by_z_index.forEach((i,o)=>{this.data_layers[i].layout.z_index=o});else{const i=this._data_layer_ids_by_z_index.push(n.id);this.data_layers[n.id].layout.z_index=i-1}let r=null;return this.layout.data_layers.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.data_layers.push(this.data_layers[n.id].layout)-1),this.data_layers[n.id]._layout_idx=r,this.data_layers[n.id]}removeDataLayer(t){const n=this.data_layers[t];if(!n)throw new Error(`Unable to remove data layer, ID not found: ${t}`);return n.destroyAllTooltips(),n.svg.container&&n.svg.container.remove(),this.layout.data_layers.splice(n._layout_idx,1),delete this.state[n._state_id],delete this.data_layers[t],this._data_layer_ids_by_z_index.splice(this._data_layer_ids_by_z_index.indexOf(t),1),this.applyDataLayerZIndexesToDataLayerLayouts(),this.layout.data_layers.forEach((r,i)=>{this.data_layers[r.id]._layout_idx=i}),this}clearSelections(){return this._data_layer_ids_by_z_index.forEach(t=>{this.data_layers[t].setAllElementStatus("selected",!1)}),this}render(){this.svg.container.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`),this.svg.clipRect.attr("width",this.parent_plot.layout.width).attr("height",this.layout.height);const{cliparea:t}=this.layout,{margin:n}=this.layout;this.inner_border.attr("x",n.left).attr("y",n.top).attr("width",this.parent_plot.layout.width-(n.left+n.right)).attr("height",this.layout.height-(n.top+n.bottom)),this.layout.inner_border&&this.inner_border.style("stroke-width",1).style("stroke",this.layout.inner_border),this.setTitle(),this.generateExtents();const r=function(l,u){const c=Math.pow(-10,u),d=Math.pow(-10,-3),f=Math.pow(10,-3),h=Math.pow(10,u);return l===1/0&&(l=h),l===-1/0&&(l=c),l===0&&(l=f),l>0&&(l=Math.max(Math.min(l,h),f)),l<0&&(l=Math.max(Math.min(l,d),c)),l},i={},o=this.layout.axes;if(this.x_extent){const l={start:0,end:this.layout.cliparea.width};o.x.range&&(l.start=o.x.range.start||l.start,l.end=o.x.range.end||l.end),i.x=[l.start,l.end],i.x_shifted=[l.start,l.end]}if(this.y1_extent){const l={start:t.height,end:0};o.y1.range&&(l.start=o.y1.range.start||l.start,l.end=o.y1.range.end||l.end),i.y1=[l.start,l.end],i.y1_shifted=[l.start,l.end]}if(this.y2_extent){const l={start:t.height,end:0};o.y2.range&&(l.start=o.y2.range.start||l.start,l.end=o.y2.range.end||l.end),i.y2=[l.start,l.end],i.y2_shifted=[l.start,l.end]}let{_interaction:a}=this.parent;const s=a.dragging;if(a.panel_id&&(a.panel_id===this.id||a.linked_panel_ids.includes(this.id))){let l,u=null;if(a.zooming&&typeof this.x_scale=="function"){const c=Math.abs(this.x_extent[1]-this.x_extent[0]),d=Math.round(this.x_scale.invert(i.x_shifted[1]))-Math.round(this.x_scale.invert(i.x_shifted[0]));let f=a.zooming.scale;const h=Math.floor(d*(1/f));f<1&&!isNaN(this.parent.layout.max_region_scale)?f=1/(Math.min(h,this.parent.layout.max_region_scale)/d):f>1&&!isNaN(this.parent.layout.min_region_scale)&&(f=1/(Math.max(h,this.parent.layout.min_region_scale)/d));const p=Math.floor(c*f);l=a.zooming.center-n.left-this.layout.origin.x;const g=l/t.width,b=Math.max(Math.floor(this.x_scale.invert(i.x_shifted[0])-(p-d)*g),1);i.x_shifted=[this.x_scale(b),this.x_scale(b+p)]}else if(s)switch(s.method){case"background":i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x;break;case"x_tick":Ce&&Ce.shiftKey?(i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x):(l=s.start_x-n.left-this.layout.origin.x,u=r(l/(l+s.dragged_x),3),i.x_shifted[0]=0,i.x_shifted[1]=Math.max(t.width*(1/u),1));break;case"y1_tick":case"y2_tick":{const c=`y${s.method[1]}_shifted`;Ce&&Ce.shiftKey?(i[c][0]=t.height+s.dragged_y,i[c][1]=+s.dragged_y):(l=t.height-(s.start_y-n.top-this.layout.origin.y),u=r(l/(l-s.dragged_y),3),i[c][0]=t.height,i[c][1]=t.height-t.height*(1/u))}}}if(["x","y1","y2"].forEach(l=>{this[`${l}_extent`]&&(this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[`${l}_shifted`]),this[`${l}_extent`]=[this[`${l}_scale`].invert(i[l][0]),this[`${l}_scale`].invert(i[l][1])],this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[l]),this.renderAxis(l))}),this.layout.interaction.scroll_to_zoom){const l=()=>{if(!(Ce.shiftKey||Ce.altKey)){this.parent._canInteract(this.id)&&this.loader.show("Press <tt>[SHIFT]</tt> or <tt>[ALT]</tt> while scrolling to zoom").hide(1e3);return}if(Ce.preventDefault(),!this.parent._canInteract(this.id))return;const u=lr(this.svg.container.node()),c=Math.max(-1,Math.min(1,Ce.wheelDelta||-Ce.detail||-Ce.deltaY));c!==0&&(this.parent._interaction={panel_id:this.id,linked_panel_ids:this.getLinkedPanelIds("x"),zooming:{scale:c<1?.9:1.1,center:u[0]}},this.render(),a=this.parent._interaction,a.linked_panel_ids.forEach(d=>{this.parent.panels[d].render()}),this._zoom_timeout!==null&&clearTimeout(this._zoom_timeout),this._zoom_timeout=setTimeout(()=>{this.parent._interaction={},this.parent.applyState({start:this.x_extent[0],end:this.x_extent[1]})},500))};this.svg.container.on("wheel.zoom",l).on("mousewheel.zoom",l).on("DOMMouseScroll.zoom",l)}return this._data_layer_ids_by_z_index.forEach(l=>{this.data_layers[l].draw().render()}),this.legend&&this.legend.render(),this}addBasicLoader(t=!0){return this.layout.show_loading_indicator&&this._initialized?this:(t&&this.loader.show("Loading...").animate(),this.on("data_requested",()=>{this.loader.show("Loading...").animate()}),this.on("data_rendered",()=>{this.loader.hide()}),this.layout.show_loading_indicator=!0,this)}applyDataLayerZIndexesToDataLayerLayouts(){this._data_layer_ids_by_z_index.forEach((t,n)=>{this.data_layers[t].layout.z_index=n})}getBaseId(){return`${this.parent.id}.${this.id}`}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.layout.origin.x,y:t.y+this.layout.origin.y}}initializeLayout(){return this.setDimensions(),this.setOrigin(),this.setMargin(),this.x_range=[0,this.layout.cliparea.width],this.y1_range=[this.layout.cliparea.height,0],this.y2_range=[this.layout.cliparea.height,0],["x","y1","y2"].forEach(t=>{const n=this.layout.axes[t];!Object.keys(n).length||n.render===!1?n.render=!1:(n.render=!0,n.label=n.label||null)}),this.layout.data_layers.forEach(t=>{this.addDataLayer(t)}),this}setDimensions(t,n){const r=this.layout;return typeof t<"u"&&typeof n<"u"&&!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0&&(this.parent.layout.width=Math.round(+t),r.height=Math.max(Math.round(+n),r.min_height)),r.cliparea.width=Math.max(this.parent_plot.layout.width-(r.margin.left+r.margin.right),0),r.cliparea.height=Math.max(r.height-(r.margin.top+r.margin.bottom),0),this.svg.clipRect&&this.svg.clipRect.attr("width",this.parent.layout.width).attr("height",r.height),this._initialized&&(this.render(),this.curtain.update(),this.loader.update(),this.toolbar.update(),this.legend&&this.legend.position()),this}setOrigin(t,n){return!isNaN(t)&&t>=0&&(this.layout.origin.x=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(this.layout.origin.y=Math.max(Math.round(+n),0)),this._initialized&&this.render(),this}setMargin(t,n,r,i){let o;const{cliparea:a,margin:s}=this.layout;return!isNaN(t)&&t>=0&&(s.top=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(s.right=Math.max(Math.round(+n),0)),!isNaN(r)&&r>=0&&(s.bottom=Math.max(Math.round(+r),0)),!isNaN(i)&&i>=0&&(s.left=Math.max(Math.round(+i),0)),s.top+s.bottom>this.layout.height&&(o=Math.floor((s.top+s.bottom-this.layout.height)/2),s.top-=o,s.bottom-=o),s.left+s.right>this.parent_plot.layout.width&&(o=Math.floor((s.left+s.right-this.parent_plot.layout.width)/2),s.left-=o,s.right-=o),["top","right","bottom","left"].forEach(l=>{s[l]=Math.max(s[l],0)}),a.width=Math.max(this.parent_plot.layout.width-(s.left+s.right),0),a.height=Math.max(this.layout.height-(s.top+s.bottom),0),a.origin.x=s.left,a.origin.y=s.top,this._initialized&&this.render(),this}initialize(){const t=this.getBaseId();this.svg.container=this.parent.svg.append("g").attr("id",`${t}.panel_container`).attr("transform",`translate(${this.layout.origin.x||0}, ${this.layout.origin.y||0})`);const n=this.svg.container.append("clipPath").attr("id",`${t}.clip`);if(this.svg.clipRect=n.append("rect").attr("width",this.parent_plot.layout.width).attr("height",this.layout.height),this.svg.group=this.svg.container.append("g").attr("id",`${t}.panel`).attr("clip-path",`url(#${t}.clip)`),this.curtain=Z6.call(this),this.loader=J6.call(this),this.layout.show_loading_indicator&&this.addBasicLoader(!1),this.toolbar=new e4(this),this.inner_border=this.svg.group.append("rect").attr("class","lz-panel-background").on("click",()=>{this.layout.background_click==="clear_selections"&&this.clearSelections()}),this.title=this.svg.group.append("text").attr("class","lz-panel-title"),typeof this.layout.title<"u"&&this.setTitle(),this.svg.x_axis=this.svg.group.append("g").attr("id",`${t}.x_axis`).attr("class","lz-x lz-axis"),this.layout.axes.x.render&&(this.svg.x_axis_label=this.svg.x_axis.append("text").attr("class","lz-x lz-axis lz-label").attr("text-anchor","middle")),this.svg.y1_axis=this.svg.group.append("g").attr("id",`${t}.y1_axis`).attr("class","lz-y lz-y1 lz-axis"),this.layout.axes.y1.render&&(this.svg.y1_axis_label=this.svg.y1_axis.append("text").attr("class","lz-y1 lz-axis lz-label").attr("text-anchor","middle")),this.svg.y2_axis=this.svg.group.append("g").attr("id",`${t}.y2_axis`).attr("class","lz-y lz-y2 lz-axis"),this.layout.axes.y2.render&&(this.svg.y2_axis_label=this.svg.y2_axis.append("text").attr("class","lz-y2 lz-axis lz-label").attr("text-anchor","middle")),this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].initialize()}),this.legend=null,this.layout.legend&&(this.legend=new eK(this)),this.layout.interaction.drag_background_to_pan){const r=`.${this.parent.id}.${this.id}.interaction.drag`,i=()=>this.parent.startDrag(this,"background");this.svg.container.select(".lz-panel-background").on(`mousedown${r}.background`,i).on(`touchstart${r}.background`,i)}return this}resortDataLayers(){const t=[];this._data_layer_ids_by_z_index.forEach(n=>{t.push(this.data_layers[n].layout.z_index)}),this.svg.group.selectAll("g.lz-data_layer-container").data(t).sort(Sr),this.applyDataLayerZIndexesToDataLayerLayouts()}getLinkedPanelIds(t){t=t||null;const n=[];return!["x","y1","y2"].includes(t)||!this.layout.interaction[`${t}_linked`]||this.parent._panel_ids_by_y_index.forEach(r=>{r!==this.id&&this.parent.panels[r].layout.interaction[`${t}_linked`]&&n.push(r)}),n}moveUp(){const{parent:t}=this,n=this.layout.y_index;return t._panel_ids_by_y_index[n-1]&&(t._panel_ids_by_y_index[n]=t._panel_ids_by_y_index[n-1],t._panel_ids_by_y_index[n-1]=this.id,t.applyPanelYIndexesToPanelLayouts(),t.positionPanels()),this}moveDown(){const{_panel_ids_by_y_index:t}=this.parent;return t[this.layout.y_index+1]&&(t[this.layout.y_index]=t[this.layout.y_index+1],t[this.layout.y_index+1]=this.id,this.parent.applyPanelYIndexesToPanelLayouts(),this.parent.positionPanels()),this}reMap(){this.emit("data_requested"),this._data_promises=[],this.curtain.hide();for(let t in this.data_layers)try{this._data_promises.push(this.data_layers[t].reMap())}catch(n){console.error(n),this.curtain.show(n.message||n)}return Promise.all(this._data_promises).then(()=>{this._initialized=!0,this.render(),this.emit("layout_changed",!0),this.emit("data_rendered")}).catch(t=>{console.error(t),this.curtain.show(t.message||t)})}generateExtents(){["x","y1","y2"].forEach(t=>{this[`${t}_extent`]=null});for(let t in this.data_layers){const n=this.data_layers[t];if(n.layout.x_axis&&!n.layout.x_axis.decoupled&&(this.x_extent=qo((this.x_extent||[]).concat(n.getAxisExtent("x")))),n.layout.y_axis&&!n.layout.y_axis.decoupled){const r=`y${n.layout.y_axis.axis}`;this[`${r}_extent`]=qo((this[`${r}_extent`]||[]).concat(n.getAxisExtent("y")))}}return this.layout.axes.x&&this.layout.axes.x.extent==="state"&&(this.x_extent=[this.state.start,this.state.end]),this}generateTicks(t){if(this.layout.axes[t].ticks){const r=this.layout.axes[t].ticks;if(Array.isArray(r))return r;if(typeof r=="object"){const i=this,o={position:r.position};return this._data_layer_ids_by_z_index.reduce((s,l)=>{const u=i.data_layers[l];return s.concat(u.getTicks(t,o))},[]).map(s=>{let l={};return l=qt(l,r),qt(l,s)})}}return this[`${t}_extent`]?oK(this[`${t}_extent`],"both"):[]}renderAxis(t){if(!["x","y1","y2"].includes(t))throw new Error(`Unable to render axis; invalid axis identifier: ${t}`);const n=this.layout.axes[t].render&&typeof this[`${t}_scale`]=="function"&&!isNaN(this[`${t}_scale`](0));if(this[`${t}_axis`]&&this.svg.container.select(`g.lz-axis.lz-${t}`).style("display",n?null:"none"),!n)return this;const r={x:{position:`translate(${this.layout.margin.left}, ${this.layout.height-this.layout.margin.bottom})`,orientation:"bottom",label_x:this.layout.cliparea.width/2,label_y:this.layout.axes[t].label_offset||0,label_rotate:null},y1:{position:`translate(${this.layout.margin.left}, ${this.layout.margin.top})`,orientation:"left",label_x:-1*(this.layout.axes[t].label_offset||0),label_y:this.layout.cliparea.height/2,label_rotate:-90},y2:{position:`translate(${this.parent_plot.layout.width-this.layout.margin.right}, ${this.layout.margin.top})`,orientation:"right",label_x:this.layout.axes[t].label_offset||0,label_y:this.layout.cliparea.height/2,label_rotate:-90}};this[`${t}_ticks`]=this.generateTicks(t);const i=(s=>{for(let l=0;l<s.length;l++)if(isNaN(s[l]))return!1;return!0})(this[`${t}_ticks`]);let o;switch(r[t].orientation){case"right":o=Av;break;case"left":o=J5;break;case"bottom":o=Z5;break;default:throw new Error("Unrecognized axis orientation")}if(this[`${t}_axis`]=o(this[`${t}_scale`]).tickPadding(3),i)this[`${t}_axis`].tickValues(this[`${t}_ticks`]),this.layout.axes[t].tick_format==="region"&&this[`${t}_axis`].tickFormat(s=>Gb(s,6));else{let s=this[`${t}_ticks`].map(l=>l[t.substr(0,1)]);this[`${t}_axis`].tickValues(s).tickFormat((l,u)=>this[`${t}_ticks`][u].text)}if(this.svg[`${t}_axis`].attr("transform",r[t].position).call(this[`${t}_axis`]),!i){const s=l8(`g#${this.getBaseId().replace(".","\\.")}\\.${t}_axis g.tick`),l=this;s.each(function(u,c){const d=Ue(this).select("text");l[`${t}_ticks`][c].style&&xn(d,l[`${t}_ticks`][c].style),l[`${t}_ticks`][c].transform&&d.attr("transform",l[`${t}_ticks`][c].transform)})}const a=this.layout.axes[t].label||null;return a!==null&&(this.svg[`${t}_axis_label`].attr("x",r[t].label_x).attr("y",r[t].label_y).text(Tl(a,this.state)).attr("fill","currentColor"),r[t].label_rotate!==null&&this.svg[`${t}_axis_label`].attr("transform",`rotate(${r[t].label_rotate} ${r[t].label_x}, ${r[t].label_y})`)),["x","y1","y2"].forEach(s=>{if(this.layout.interaction[`drag_${s}_ticks_to_scale`]){const l=`.${this.parent.id}.${this.id}.interaction.drag`,u=function(){typeof Ue(this).node().focus=="function"&&Ue(this).node().focus();let c=s==="x"?"ew-resize":"ns-resize";Ce&&Ce.shiftKey&&(c="move"),Ue(this).style("font-weight","bold").style("cursor",c).on(`keydown${l}`,u).on(`keyup${l}`,u)};this.svg.container.selectAll(`.lz-axis.lz-${s} .tick text`).attr("tabindex",0).on(`mouseover${l}`,u).on(`mouseout${l}`,function(){Ue(this).style("font-weight","normal").on(`keydown${l}`,null).on(`keyup${l}`,null)}).on(`mousedown${l}`,()=>{this.parent.startDrag(this,`${s}_tick`)})}}),this}scaleHeightToData(t){t=+t||null,t===null&&this._data_layer_ids_by_z_index.forEach(n=>{const r=this.data_layers[n].getAbsoluteDataHeight();+r&&(t===null?t=+r:t=Math.max(t,+r))}),+t&&(t+=+this.layout.margin.top+ +this.layout.margin.bottom,this.setDimensions(this.parent_plot.layout.width,t),this.parent.setDimensions(),this.parent.positionPanels())}setAllElementStatus(t,n){this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].setAllElementStatus(t,n)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;ad.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},ad.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const nK={state:{},width:800,min_width:400,min_region_scale:null,max_region_scale:null,responsive_resize:!1,panels:[],toolbar:{widgets:[]},panel_boundaries:!0,mouse_guide:!0};function rK(e,t){e=e||{},t=t||{};let n=!1,r=null,i;if(typeof e.chr<"u"&&typeof e.start<"u"&&typeof e.end<"u"){if(e.start=Math.max(parseInt(e.start),1),e.end=Math.max(parseInt(e.end),1),isNaN(e.start)&&isNaN(e.end))e.start=1,e.end=1,r=.5,i=0;else if(isNaN(e.start)||isNaN(e.end))r=e.start||e.end,i=0,e.start=isNaN(e.start)?e.end:e.start,e.end=isNaN(e.end)?e.start:e.end;else{if(r=Math.round((e.start+e.end)/2),i=e.end-e.start,i<0){const o=e.start;e.end=e.start,e.start=o,i=e.end-e.start}r<0&&(e.start=1,e.end=1,i=0)}n=!0}return t.min_region_scale&&n&&i<t.min_region_scale&&(e.start=Math.max(r-Math.floor(t.min_region_scale/2),1),e.end=e.start+t.min_region_scale),t.max_region_scale&&n&&i>t.max_region_scale&&(e.start=Math.max(r-Math.floor(t.max_region_scale/2),1),e.end=e.start+t.max_region_scale),e}class iK{constructor(t,n,r){this._initialized=!1,this.parent_plot=this,this.id=t,this.container=null,this.svg=null,this.panels={},this._panel_ids_by_y_index=[],this._remap_promises=[],this.layout=r,qt(this.layout,nK),this._base_layout=at(this.layout),this.state=this.layout.state,this.lzd=new BX(n),this._external_listeners=new Map,this._event_hooks={},this._interaction={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n){const r=this._event_hooks[t];if(typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);if(!r&&!this._event_hooks.any_lz_event)return this;const i=this.getBaseId();let o;if(n&&n.sourceID?o=n:o={sourceID:i,target:this,data:n||null},r&&r.forEach(a=>{a.call(this,o)}),t!=="any_lz_event"){const a=Object.assign({event_name:t},o);this.emit("any_lz_event",a)}return this}addPanel(t){if(typeof t!="object")throw new Error("Invalid panel layout");const n=new ad(t,this);if(this.panels[n.id]=n,n.layout.y_index!==null&&!isNaN(n.layout.y_index)&&this._panel_ids_by_y_index.length>0)n.layout.y_index<0&&(n.layout.y_index=Math.max(this._panel_ids_by_y_index.length+n.layout.y_index,0)),this._panel_ids_by_y_index.splice(n.layout.y_index,0,n.id),this.applyPanelYIndexesToPanelLayouts();else{const i=this._panel_ids_by_y_index.push(n.id);this.panels[n.id].layout.y_index=i-1}let r=null;return this.layout.panels.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.panels.push(this.panels[n.id].layout)-1),this.panels[n.id]._layout_idx=r,this._initialized&&(this.positionPanels(),this.panels[n.id].initialize(),this.panels[n.id].reMap(),this.setDimensions(this.layout.width,this._total_height)),this.panels[n.id]}clearPanelData(t,n){n=n||"wipe";let r;return t?r=[t]:r=Object.keys(this.panels),r.forEach(i=>{this.panels[i]._data_layer_ids_by_z_index.forEach(o=>{const a=this.panels[i].data_layers[o];a.destroyAllTooltips(),delete a._layer_state,delete this.layout.state[a._state_id],n==="reset"&&a._setDefaultState()})}),this}removePanel(t){const n=this.panels[t];if(!n)throw new Error(`Unable to remove panel, ID not found: ${t}`);return this._panel_boundaries.hide(),this.clearPanelData(t),n.loader.hide(),n.toolbar.destroy(!0),n.curtain.hide(),n.svg.container&&n.svg.container.remove(),this.layout.panels.splice(n._layout_idx,1),delete this.panels[t],delete this.layout.state[t],this.layout.panels.forEach((r,i)=>{this.panels[r.id]._layout_idx=i}),this._panel_ids_by_y_index.splice(this._panel_ids_by_y_index.indexOf(t),1),this.applyPanelYIndexesToPanelLayouts(),this._initialized&&(this.positionPanels(),this.setDimensions(this.layout.width,this._total_height)),this.emit("panel_removed",t),this}refresh(){return this.applyState()}subscribeToData(t,n){const{from_layer:r,namespace:i,data_operations:o,onerror:a}=t,s=a||function(d){console.error("An error occurred while acting on an external callback",d)};if(r){const d=`${this.getBaseId()}.`,f=r.startsWith(d)?r:`${d}${r}`;let h=!1;for(let g of Object.values(this.panels))if(h=Object.values(g.data_layers).some(b=>b.getBaseId()===f),h)break;if(!h)throw new Error(`Could not subscribe to unknown data layer ${f}`);const p=g=>{if(g.data.layer===f)try{n(g.data.content,this)}catch(b){s(b)}};return this.on("data_from_layer",p),p}if(!i)throw new Error("subscribeToData must specify the desired data: either 'from_layer' or 'namespace' option");const[l,u]=this.lzd.config_to_sources(i,o),c=()=>{try{this.lzd.getData(this.state,l,u).then(d=>n(d,this)).catch(s)}catch(d){s(d)}};return this.on("data_rendered",c),c}applyState(t){if(t=t||{},typeof t!="object")throw new Error(`applyState only accepts an object; ${typeof t} given`);let n={chr:this.state.chr,start:this.state.start,end:this.state.end};for(let r in t)n[r]=t[r];n=rK(n,this.layout);for(let r in n)this.state[r]=n[r];this.emit("data_requested"),this._remap_promises=[],this.loading_data=!0;for(let r in this.panels)this._remap_promises.push(this.panels[r].reMap());return Promise.all(this._remap_promises).catch(r=>{console.error(r),this.curtain.show(r.message||r),this.loading_data=!1}).then(()=>{this.toolbar.update(),this._panel_ids_by_y_index.forEach(s=>{const l=this.panels[s];l.toolbar.update(),l._data_layer_ids_by_z_index.forEach(u=>{l.data_layers[u].applyAllElementStatus()})}),this.emit("layout_changed"),this.emit("data_rendered"),this.emit("state_changed",t);const{chr:r,start:i,end:o}=this.state;Object.keys(t).some(s=>["chr","start","end"].includes(s))&&this.emit("region_changed",{chr:r,start:i,end:o}),this.loading_data=!1})}trackExternalListener(t,n,r){this._external_listeners.has(t)||this._external_listeners.set(t,new Map);const i=this._external_listeners.get(t),o=i.get(n)||[];o.includes(r)||o.push(r),i.set(n,o)}destroy(){for(let[n,r]of this._external_listeners.entries())for(let[i,o]of r)for(let a of o)n.removeEventListener(i,a);const t=this.svg.node().parentNode;if(!t)throw new Error("Plot has already been removed");for(;t.lastElementChild;)t.removeChild(t.lastElementChild);t.outerHTML=t.outerHTML,this._initialized=!1,this.svg=null,this.panels=null}mutateLayout(){Object.values(this.panels).forEach(t=>{Object.values(t.data_layers).forEach(n=>n.mutateLayout())})}_canInteract(t){t=t||null;const{_interaction:n}=this;return t?(typeof n.panel_id>"u"||n.panel_id===t)&&!this.loading_data:!(n.dragging||n.zooming||this.loading_data)}_getPageOrigin(){const t=this.svg.node().getBoundingClientRect();let n=document.documentElement.scrollLeft||document.body.scrollLeft,r=document.documentElement.scrollTop||document.body.scrollTop,i=this.svg.node();for(;i.parentNode!==null;)if(i=i.parentNode,i!==document&&Ue(i).style("position")!=="static"){n=-1*i.getBoundingClientRect().left,r=-1*i.getBoundingClientRect().top;break}return{x:n+t.left,y:r+t.top,width:t.width,height:t.height}}getContainerOffset(){const t={top:0,left:0};let n=this.container.offsetParent||null;for(;n!==null;)t.top+=n.offsetTop,t.left+=n.offsetLeft,n=n.offsetParent||null;return t}applyPanelYIndexesToPanelLayouts(){this._panel_ids_by_y_index.forEach((t,n)=>{this.panels[t].layout.y_index=n})}getBaseId(){return this.id}rescaleSVG(){const t=this.svg.node().getBoundingClientRect();return this.setDimensions(t.width,t.height),this}initializeLayout(){if(isNaN(this.layout.width)||this.layout.width<=0)throw new Error("Plot layout parameter `width` must be a positive number");return this.layout.responsive_resize=!!this.layout.responsive_resize,this.layout.panels.forEach(t=>{this.addPanel(t)}),this}setDimensions(t,n){if(!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0){const i=n/this._total_height;this.layout.width=Math.max(Math.round(+t),this.layout.min_width),this.layout.responsive_resize&&this.svg&&(this.layout.width=Math.max(this.svg.node().parentNode.getBoundingClientRect().width,this.layout.min_width));let o=0;this._panel_ids_by_y_index.forEach(a=>{const s=this.panels[a],l=this.layout.width,u=s.layout.height*i;s.setDimensions(l,u),s.setOrigin(0,o),o+=u,s.toolbar.update()})}const r=this._total_height;return this.svg!==null&&(this.svg.attr("viewBox",`0 0 ${this.layout.width} ${r}`),this.svg.attr("width",this.layout.width).attr("height",r)),this._initialized&&(this._panel_boundaries.position(),this.toolbar.update(),this.curtain.update(),this.loader.update()),this.emit("layout_changed")}positionPanels(){const t={left:0,right:0};for(let r of Object.values(this.panels))r.layout.interaction.x_linked&&(t.left=Math.max(t.left,r.layout.margin.left),t.right=Math.max(t.right,r.layout.margin.right));let n=0;return this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r],o=i.layout;if(i.setOrigin(0,n),n+=this.panels[r].layout.height,o.interaction.x_linked){const a=Math.max(t.left-o.margin.left,0)+Math.max(t.right-o.margin.right,0);o.width+=a,o.margin.left=t.left,o.margin.right=t.right,o.cliparea.origin.x=t.left}}),this.setDimensions(),this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r];i.setDimensions(this.layout.width,i.layout.height)}),this}initialize(){if(this.layout.responsive_resize){Ue(this.container).classed("lz-container-responsive",!0);const u=()=>window.requestAnimationFrame(()=>this.rescaleSVG());if(window.addEventListener("resize",u),this.trackExternalListener(window,"resize",u),typeof IntersectionObserver<"u"){const d={root:document.documentElement,threshold:.9};new IntersectionObserver((h,p)=>{h.some(g=>g.intersectionRatio>0)&&this.rescaleSVG()},d).observe(this.container)}const c=()=>this.setDimensions();window.addEventListener("load",c),this.trackExternalListener(window,"load",c)}if(this.layout.mouse_guide){const u=this.svg.append("g").attr("class","lz-mouse_guide").attr("id",`${this.id}.mouse_guide`),c=u.append("rect").attr("class","lz-mouse_guide-vertical").attr("x",-1),d=u.append("rect").attr("class","lz-mouse_guide-horizontal").attr("y",-1);this._mouse_guide={svg:u,vertical:c,horizontal:d}}this.curtain=Z6.call(this),this.loader=J6.call(this),this._panel_boundaries={parent:this,hide_timeout:null,showing:!1,dragging:!1,selectors:[],corner_selector:null,show:function(){if(!this.showing&&!this.parent.curtain.showing){this.showing=!0,this.parent._panel_ids_by_y_index.forEach((d,f)=>{const h=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-boundary").attr("title","Resize panel");h.append("span");const p=O0();p.on("start",()=>{this.dragging=!0}),p.on("end",()=>{this.dragging=!1}),p.on("drag",()=>{const g=this.parent.panels[this.parent._panel_ids_by_y_index[f]],b=g.layout.height;g.setDimensions(this.parent.layout.width,g.layout.height+Ce.dy);const v=g.layout.height-b;this.parent._panel_ids_by_y_index.forEach((_,y)=>{const x=this.parent.panels[this.parent._panel_ids_by_y_index[y]];y>f&&(x.setOrigin(x.layout.origin.x,x.layout.origin.y+v),x.toolbar.position())}),this.parent.positionPanels(),this.position()}),h.call(p),this.parent._panel_boundaries.selectors.push(h)});const u=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-corner-boundary").attr("title","Resize plot");u.append("span").attr("class","lz-panel-corner-boundary-outer"),u.append("span").attr("class","lz-panel-corner-boundary-inner");const c=O0();c.on("start",()=>{this.dragging=!0}),c.on("end",()=>{this.dragging=!1}),c.on("drag",()=>{this.parent.setDimensions(this.parent.layout.width+Ce.dx,this.parent._total_height+Ce.dy)}),u.call(c),this.parent._panel_boundaries.corner_selector=u}return this.position()},position:function(){if(!this.showing)return this;const u=this.parent._getPageOrigin();this.selectors.forEach((f,h)=>{const p=this.parent.panels[this.parent._panel_ids_by_y_index[h]],g=p._getPageOrigin(),b=u.x,v=g.y+p.layout.height-12,_=this.parent.layout.width-1;f.style("top",`${v}px`).style("left",`${b}px`).style("width",`${_}px`),f.select("span").style("width",`${_}px`)});const c=10,d=16;return this.corner_selector.style("top",`${u.y+this.parent._total_height-c-d}px`).style("left",`${u.x+this.parent.layout.width-c-d}px`),this},hide:function(){return this.showing?(this.showing=!1,this.selectors.forEach(u=>{u.remove()}),this.selectors=[],this.corner_selector.remove(),this.corner_selector=null,this):this}},this.layout.panel_boundaries&&Ue(this.svg.node().parentNode).on(`mouseover.${this.id}.panel_boundaries`,()=>{clearTimeout(this._panel_boundaries.hide_timeout),this._panel_boundaries.show()}).on(`mouseout.${this.id}.panel_boundaries`,()=>{this._panel_boundaries.hide_timeout=setTimeout(()=>{this._panel_boundaries.hide()},300)}),this.toolbar=new e4(this).show();for(let u in this.panels)this.panels[u].initialize();const t=`.${this.id}`;if(this.layout.mouse_guide){const u=()=>{this._mouse_guide.vertical.attr("x",-1),this._mouse_guide.horizontal.attr("y",-1)},c=()=>{const d=lr(this.svg.node());this._mouse_guide.vertical.attr("x",d[0]),this._mouse_guide.horizontal.attr("y",d[1])};this.svg.on(`mouseout${t}-mouse_guide`,u).on(`touchleave${t}-mouse_guide`,u).on(`mousemove${t}-mouse_guide`,c)}const n=()=>{this.stopDrag()},r=()=>{const{_interaction:u}=this;if(u.dragging){const c=lr(this.svg.node());Ce&&Ce.preventDefault(),u.dragging.dragged_x=c[0]-u.dragging.start_x,u.dragging.dragged_y=c[1]-u.dragging.start_y,this.panels[u.panel_id].render(),u.linked_panel_ids.forEach(d=>{this.panels[d].render()})}};this.svg.on(`mouseup${t}`,n).on(`touchend${t}`,n).on(`mousemove${t}`,r).on(`touchmove${t}`,r);const o=Ue("body").node();o&&(o.addEventListener("mouseup",n),o.addEventListener("touchend",n),this.trackExternalListener(o,"mouseup",n),this.trackExternalListener(o,"touchend",n)),this.on("match_requested",u=>{const c=u.data,d=c.active?c.value:null,f=u.target.id;Object.values(this.panels).forEach(h=>{h.id!==f&&Object.values(h.data_layers).forEach(p=>p.destroyAllTooltips(!1))}),this.applyState({lz_match_value:d})}),this._initialized=!0;const a=this.svg.node().getBoundingClientRect(),s=a.width?a.width:this.layout.width,l=a.height?a.height:this._total_height;return this.setDimensions(s,l),this}startDrag(t,n){t=t||null,n=n||null;let r=null;switch(n){case"background":case"x_tick":r="x";break;case"y1_tick":r="y1";break;case"y2_tick":r="y2";break}if(!(t instanceof ad)||!r||!this._canInteract())return this.stopDrag();const i=lr(this.svg.node());return this._interaction={panel_id:t.id,linked_panel_ids:t.getLinkedPanelIds(r),dragging:{method:n,start_x:i[0],start_y:i[1],dragged_x:0,dragged_y:0,axis:r}},this.svg.style("cursor","all-scroll"),this}stopDrag(){const{_interaction:t}=this;if(!t.dragging)return this;if(typeof this.panels[t.panel_id]!="object")return this._interaction={},this;const n=this.panels[t.panel_id],r=(i,o,a)=>{n._data_layer_ids_by_z_index.forEach(s=>{const l=n.data_layers[s].layout[`${i}_axis`];l.axis===o&&(l.floor=a[0],l.ceiling=a[1],delete l.lower_buffer,delete l.upper_buffer,delete l.min_extent,delete l.ticks)})};switch(t.dragging.method){case"background":case"x_tick":t.dragging.dragged_x!==0&&(r("x",1,n.x_extent),this.applyState({start:n.x_extent[0],end:n.x_extent[1]}));break;case"y1_tick":case"y2_tick":if(t.dragging.dragged_y!==0){const i=parseInt(t.dragging.method[1]);r("y",i,n[`y${i}_extent`])}break}return this._interaction={},this.svg.style("cursor",null),this}get _total_height(){return this.layout.panels.reduce((t,n)=>n.height+t,0)}}function Gb(e,t,n){const r={0:"",3:"K",6:"M",9:"G"};if(n=n||!1,isNaN(t)||t===null){const l=Math.log(e)/Math.LN10;t=Math.min(Math.max(l-l%3,0),9)}const i=t-Math.floor((Math.log(e)/Math.LN10).toFixed(t+3)),o=Math.min(Math.max(t,0),2),a=Math.min(Math.max(i,o),12);let s=`${(e/Math.pow(10,t)).toFixed(a)}`;return n&&typeof r[t]<"u"&&(s+=` ${r[t]}b`),s}function Ws(e){let t=e.toUpperCase();t=t.replace(/,/g,"");const n=/([KMG])[B]*$/,r=n.exec(t);let i=1;return r&&(r[1]==="M"?i=1e6:r[1]==="G"?i=1e9:i=1e3,t=t.replace(n,"")),t=Number(t)*i,t}function oK(e,t,n){(typeof n>"u"||isNaN(parseInt(n)))&&(n=5),n=+n;const r=n/3,i=.75,o=1.5,a=.5+1.5*o,s=Math.abs(e[0]-e[1]);let l=s/n;Math.log(s)/Math.LN10<-2&&(l=Math.max(Math.abs(s))*i/r);const u=Math.pow(10,Math.floor(Math.log(l)/Math.LN10));let c=0;u<1&&u!==0&&(c=Math.abs(Math.round(Math.log(u)/Math.LN10)));let d=u;2*u-l<o*(l-d)&&(d=2*u,5*u-l<a*(l-d)&&(d=5*u,10*u-l<o*(l-d)&&(d=10*u)));let f=[],h=parseFloat((Math.floor(e[0]/d)*d).toFixed(c));for(;h<e[1];)f.push(h),h+=d,c>0&&(h=parseFloat(h.toFixed(c)));return f.push(h),(typeof t>"u"||["low","high","both","neither"].indexOf(t)===-1)&&(t="neither"),(t==="low"||t==="both")&&f[0]<e[0]&&(f=f.slice(1)),(t==="high"||t==="both")&&f[f.length-1]>e[1]&&f.pop(),f}function Tl(e,t,n){if(typeof t!="object")throw new Error("invalid arguments: data is not an object");if(typeof e!="string")throw new Error("invalid arguments: html is not a string");const r=[],i=/{{(?:(#if )?([\w+_:|]+)|(#else)|(\/if))}}/;for(;e.length>0;){const u=i.exec(e);u?u.index!==0?(r.push({text:e.slice(0,u.index)}),e=e.slice(u.index)):u[1]==="#if "?(r.push({condition:u[2]}),e=e.slice(u[0].length)):u[2]?(r.push({variable:u[2]}),e=e.slice(u[0].length)):u[3]==="#else"?(r.push({branch:"else"}),e=e.slice(u[0].length)):u[4]==="/if"?(r.push({close:"if"}),e=e.slice(u[0].length)):(console.error(`Error tokenizing tooltip when remaining template is ${JSON.stringify(e)} and previous tokens are ${JSON.stringify(r)} and current regex match is ${JSON.stringify([u[1],u[2],u[3]])}`),e=e.slice(u[0].length)):(r.push({text:e}),e="")}const o=function(){const u=r.shift();if(typeof u.text<"u"||u.variable)return u;if(u.condition){let c=u.then=[];for(u.else=[];r.length>0;){if(r[0].close==="if"){r.shift();break}r[0].branch==="else"&&(r.shift(),c=u.else),c.push(o())}return u}else return console.error(`Error making tooltip AST due to unknown token ${JSON.stringify(u)}`),{text:""}},a=[];for(;r.length>0;)a.push(o());const s=function(u){return Object.prototype.hasOwnProperty.call(s.cache,u)||(s.cache[u]=new za(u).resolve(t,n)),s.cache[u]};s.cache={};const l=function(u){if(typeof u.text<"u")return u.text;if(u.variable){try{const c=s(u.variable);if(["string","number","boolean"].indexOf(typeof c)!==-1)return c;if(c===null)return""}catch{console.error(`Error while processing variable ${JSON.stringify(u.variable)}`)}return`{{${u.variable}}}`}else if(u.condition){try{if(s(u.condition))return u.then.map(l).join("");if(u.else)return u.else.map(l).join("")}catch{console.error(`Error while processing condition ${JSON.stringify(u.variable)}`)}return""}else console.error(`Error rendering tooltip due to unknown AST node ${JSON.stringify(u)}`)};return a.map(l).join("")}function aK(e,t,n){if(typeof e>"u")throw new Error("LocusZoom.populate selector not defined");Ue(e).html("");let r;return Ue(e).call(function(i){if(typeof i.node().id>"u"){let o=0;for(;!Ue(`#lz-${o}`).empty();)o++;i.attr("id",`#lz-${o}`)}if(r=new iK(i.node().id,t,n),r.container=i.node(),typeof i.node().dataset<"u"&&typeof i.node().dataset.region<"u"){const o=sK(i.node().dataset.region);Object.keys(o).forEach(function(a){r.state[a]=o[a]})}r.svg=Ue(`div#${r.id}`).append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("id",`${r.id}_svg`).attr("class","lz-locuszoom").call(xn,r.layout.style),r.setDimensions(),r.positionPanels(),r.initialize(),t&&r.refresh()}),r}function sK(e){const t=/^(\w+):([\d,.]+[kmgbKMGB]*)([-+])([\d,.]+[kmgbKMGB]*)$/,n=/^(\w+):([\d,.]+[kmgbKMGB]*)$/;let r=t.exec(e);if(r)if(r[3]==="+"){const i=Ws(r[2]),o=Ws(r[4]);return{chr:r[1],start:i-o,end:i+o}}else return{chr:r[1],start:Ws(r[2]),end:Ws(r[4])};return r=n.exec(e),r?{chr:r[1],position:Ws(r[2])}:null}const pr=new Zi;pr.add("=",(e,t)=>e===t);pr.add("!=",(e,t)=>e!=t);pr.add("<",(e,t)=>e<t);pr.add("<=",(e,t)=>e<=t);pr.add(">",(e,t)=>e>t);pr.add(">=",(e,t)=>e>=t);pr.add("%",(e,t)=>e%t);pr.add("in",(e,t)=>t&&t.includes(e));pr.add("match",(e,t)=>e&&e.includes(t));const t4=(e,t)=>typeof t>"u"||e.field_value!==t?typeof e.else<"u"?e.else:null:e.then,lK=(e,t)=>{const n=e.breaks||[],r=e.values||[];if(typeof t>"u"||t===null||isNaN(+t))return e.null_value?e.null_value:null;const i=n.reduce(function(o,a){return+t<o||+t>=o&&+t<a?o:a});return r[n.indexOf(i)]},uK=(e,t)=>typeof t>"u"||!e.categories.includes(t)?e.null_value?e.null_value:null:e.values[e.categories.indexOf(t)],cK=(e,t,n)=>{const r=e.values;return r[n%r.length]};let fK=(e,t,n)=>{const r=e._cache=e._cache||new Map,i=e.max_cache_size||500;if(r.size>=i&&r.clear(),r.has(t))return r.get(t);let o=0;t=String(t);for(let l=0;l<t.length;l++){let u=t.charCodeAt(l);o=(o<<5)-o+u,o|=0}const a=e.values,s=a[Math.abs(o)%a.length];return r.set(t,s),s};const dK=(e,t)=>{var n=e.breaks||[],r=e.values||[],i=e.null_value?e.null_value:null;if(n.length<2||n.length!==r.length||typeof t>"u"||t===null||isNaN(+t))return i;if(+t<=e.breaks[0])return r[0];if(+t>=e.breaks[e.breaks.length-1])return r[n.length-1];{var o=null;if(n.forEach(function(s,l){l&&n[l-1]<=+t&&n[l]>=+t&&(o=l)}),o===null)return i;const a=(+t-n[o-1])/(n[o]-n[o-1]);return isFinite(a)?ys(r[o-1],r[o])(a):i}};function hK(e,t){if(t===void 0)return null;const{beta_field:n,stderr_beta_field:r,"+":i=null,"-":o=null}=e;if(!n||!r)throw new Error("effect_direction must specify how to find required 'beta' and 'stderr_beta' fields");const a=t[n],s=t[r];if(a!==void 0)if(s!==void 0){if(a-1.96*s>0)return i;if(a+1.96*s<0)return o||null}else{if(a>0)return i;if(a<0)return o}return null}const pK=Object.freeze(Object.defineProperty({__proto__:null,categorical_bin:uK,effect_direction:hK,if_value:t4,interpolate:dK,numerical_bin:lK,ordinal_cycle:cK,stable_choice:fK},Symbol.toStringTag,{value:"Module"})),fh=new Zi;for(let[e,t]of Object.entries(pK))fh.add(e,t);fh.add("if",t4);const gK={id:"",type:"",tag:"custom_data_type",namespace:{},data_operations:[],id_field:"id",filters:null,match:{},x_axis:{},y_axis:{},legend:null,tooltip:{},tooltip_positioning:"horizontal",behaviors:{}};class cr{constructor(t,n){this._initialized=!1,this._layout_idx=null,this.id=null,this._base_id=null,this.parent=n||null,this.svg={},this.parent_plot=null,n&&(this.parent_plot=n.parent),this.layout=qt(t||{},gK),this.layout.id&&(this.id=this.layout.id),this._filter_func=null,this.layout.x_axis!=={}&&typeof this.layout.x_axis.axis!="number"&&(this.layout.x_axis.axis=1),this.layout.y_axis!=={}&&typeof this.layout.y_axis.axis!="number"&&(this.layout.y_axis.axis=1),this._base_layout=at(this.layout),this.state={},this._state_id=null,this._layer_state=null,this._setDefaultState(),this.data=[],this.layout.tooltip&&(this._tooltips={}),this._global_statuses={highlighted:!1,selected:!1,faded:!1,hidden:!1},this._data_contract=new Set,this._entities=new Map,this._dependencies=[],this.mutateLayout()}render(){throw new Error("Method must be implemented")}moveForward(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n+1]&&(t[n]=t[n+1],t[n+1]=this.id,this.parent.resortDataLayers()),this}moveBack(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n-1]&&(t[n]=t[n-1],t[n-1]=this.id,this.parent.resortDataLayers()),this}setElementAnnotation(t,n,r){const i=this.getElementId(t);return this._layer_state.extra_fields[i]||(this._layer_state.extra_fields[i]={}),this._layer_state.extra_fields[i][n]=r,this}setFilter(t){console.warn("The setFilter method is deprecated and will be removed in the future; please use the layout API with a custom filter function instead"),this._filter_func=t}mutateLayout(){if(this.parent_plot){const{namespace:t,data_operations:n}=this.layout;this._data_contract=qb(this.layout,Object.keys(t));const[r,i]=this.parent_plot.lzd.config_to_sources(t,n,this);this._entities=r,this._dependencies=i}}_getDataExtent(t,n){return t=t||this.data,qo(t,r=>+new za(n.field).resolve(r))}getElementId(t){const n=Symbol.for("lzID");if(t[n])return t[n];const r=this.layout.id_field;let i=t[r];if(typeof i>"u"&&/{{[^{}]*}}/.test(r)&&(i=Tl(r,t,{})),i==null)throw new Error("Unable to generate element ID");const o=i.toString().replace(/\W/g,""),a=`${this.getBaseId()}-${o}`.replace(/([:.[\],])/g,"_");return t[n]=a,a}getElementStatusNodeId(t){return null}getElementById(t){const n=Ue(`#${t.replace(/([:.[\],])/g,"\\$1")}`);return!n.empty()&&n.data()&&n.data().length?n.data()[0]:null}applyDataMethods(){const t=this.layout.match&&this.layout.match.receive,n=pr.get(this.layout.match&&this.layout.match.operator||"="),r=this.parent_plot.state.lz_match_value,i=t?new za(t):null;if(this.data.length&&this._data_contract.size){const o=new Set(this._data_contract);for(let a of this.data)if(Object.keys(a).forEach(s=>o.delete(s)),!o.size)break;o.size&&console.debug(`Data layer '${this.getBaseId()}' did not receive all expected fields from retrieved data. Missing fields are: ${[...o]}
|
|
2001
2001
|
Common reasons for this error include API payloads with missing fields, or data layer layouts that use two kinds of data and need join logic in "data_operations"
|
|
2002
2002
|
If this field is optional, you can safely ignore this message. Examples include {{#if value}} tags or conditional color rules.
|
|
2003
|
-
`)}return this.data.forEach((o,a)=>{t&&r!==null&&r!==void 0&&(o.lz_is_match=n(i.resolve(o),r)),o.getDataLayer=()=>this,o.getPanel=()=>this.parent||null,o.getPlot=()=>{const s=this.parent;return s?s.parent:null}}),this.applyCustomDataMethods(),this}applyCustomDataMethods(){return this}resolveScalableParameter(t,n,r){let i=null;if(Array.isArray(t)){let o=0;for(;i===null&&o<t.length;)i=this.resolveScalableParameter(t[o],n,r),o++}else switch(typeof t){case"number":case"string":i=t;break;case"object":if(t.scale_function){const o=fh.get(t.scale_function);if(t.field){const a=new za(t.field);let s;try{s=this.getElementAnnotation(n)}catch{s=null}i=o(t.parameters||{},a.resolve(n,s),r)}else i=o(t.parameters||{},n,r)}break}return i}getAxisExtent(t){if(!["x","y"].includes(t))throw new Error("Invalid dimension identifier");const n=`${t}_axis`,r=this.layout[n];if(!isNaN(r.floor)&&!isNaN(r.ceiling))return[+r.floor,+r.ceiling];let i=[];if(r.field&&this.data)if(this.data.length){i=this._getDataExtent(this.data,r);const o=i[1]-i[0];if(isNaN(r.lower_buffer)||(i[0]-=o*r.lower_buffer),isNaN(r.upper_buffer)||(i[1]+=o*r.upper_buffer),typeof r.min_extent=="object"){const a=r.min_extent[0],s=r.min_extent[1];!isNaN(a)&&!isNaN(s)&&(i[0]=Math.min(i[0],a)),isNaN(s)||(i[1]=Math.max(i[1],s))}return[isNaN(r.floor)?i[0]:r.floor,isNaN(r.ceiling)?i[1]:r.ceiling]}else return i=r.min_extent||[],i;return t==="x"&&!isNaN(this.state.start)&&!isNaN(this.state.end)?[this.state.start,this.state.end]:[]}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error(`Invalid dimension identifier ${t}`);return[]}_getTooltipPosition(t){const n=this.parent,r=n[`y${this.layout.y_axis.axis}_scale`],i=n[`y${this.layout.y_axis.axis}_extent`],o=n.x_scale(n.x_extent[0]),a=r(i[0]);return{x_min:o,x_max:o,y_min:a,y_max:a}}_drawTooltip(t,n,r,i,o,a){const s=this.parent.layout,l=this.parent_plot.layout,u=this.layout,c=7,d=1,f=c+d,h=6,p=this._getPageOrigin(),g=t.selector.node().getBoundingClientRect(),b=s.height-(s.margin.top+s.margin.bottom),v=l.width-(s.margin.left+s.margin.right);r=Math.max(r,0),i=Math.min(i,v),o=Math.max(o,0),a=Math.min(a,b);const x=(r+i)/2,y=(o+a)/2;let _=i-x,S=a-y,$=u.tooltip_positioning,w,T,M,P,R;if($==="vertical"?(_=0,g.height+f>b-(y+S)?$="top":$="bottom"):$==="horizontal"&&(S=0,x<=l.width/2?$="left":$="right"),$==="top"||$==="bottom"){const C=Math.max(g.width/2-x,0),E=Math.max(g.width/2+x-v,0);T=p.x+x-g.width/2-E+C,R=p.x+x-T-c,$==="top"?(w=p.y+y-(S+g.height+f),M="down",P=g.height-d):(w=p.y+y+S+f,M="up",P=0-f)}else if($==="left"||$==="right")$==="left"?(T=p.x+x+_+f,M="left",R=-1*(c+d)):(T=p.x+x-g.width-_-f,M="right",R=g.width-d),y-g.height/2<=0?(w=p.y+y-1.5*c-h,P=h):y+g.height/2>=b?(w=p.y+y+c+h-g.height,P=g.height-2*c-h):(w=p.y+y-g.height/2,P=g.height/2-c);else throw new Error("Unrecognized placement value");return t.selector.style("left",`${T}px`).style("top",`${w}px`),t.arrow||(t.arrow=t.selector.append("div").style("position","absolute")),t.arrow.attr("class",`lz-data_layer-tooltip-arrow_${M}`).style("left",`${R}px`).style("top",`${P}px`),this}filter(t,n,r,i){let o=!0;return t.forEach(a=>{const{field:s,operator:l,value:u}=a,c=pr.get(l),d=this.getElementAnnotation(n),f=s?new za(s).resolve(n,d):n;c(f,u)||(o=!1)}),o}getElementAnnotation(t,n){const r=this.getElementId(t),i=this._layer_state.extra_fields[r];return n?i&&i[n]:i}_applyFilters(t){return t=t||this.data,this._filter_func?t=t.filter(this._filter_func):this.layout.filters&&(t=t.filter(this.filter.bind(this,this.layout.filters))),t}_setDefaultState(){const t={status_flags:{},extra_fields:{}},n=t.status_flags;qi.adjectives.forEach(r=>{n[r]=n[r]||new Set}),n.has_tooltip=n.has_tooltip||new Set,this.parent&&(this._state_id=`${this.parent.id}.${this.id}`,this.state=this.parent.state,this.state[this._state_id]=t),this._layer_state=t}getBaseId(){return this._base_id?this._base_id:this.parent?`${this.parent_plot.id}.${this.parent.id}.${this.id}`:(this.id||"").toString()}getAbsoluteDataHeight(){return this.svg.group.node().getBoundingClientRect().height}initialize(){this._base_id=this.getBaseId();const t=this.getBaseId();return this.svg.container=this.parent.svg.group.append("g").attr("class","lz-data_layer-container").attr("id",`${t}.data_layer_container`),this.svg.clipRect=this.svg.container.append("clipPath").attr("id",`${t}.clip`).append("rect"),this.svg.group=this.svg.container.append("g").attr("id",`${t}.data_layer`).attr("clip-path",`url(#${t}.clip)`),this}createTooltip(t){if(typeof this.layout.tooltip!="object")throw new Error(`DataLayer [${this.id}] layout does not define a tooltip`);const n=this.getElementId(t);if(this._tooltips[n]){this.positionTooltip(n);return}return this._tooltips[n]={data:t,arrow:null,selector:Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class","lz-data_layer-tooltip").attr("id",`${n}-tooltip`)},this._layer_state.status_flags.has_tooltip.add(n),this.updateTooltip(t),this}updateTooltip(t,n){return typeof n>"u"&&(n=this.getElementId(t)),this._tooltips[n].selector.html(""),this._tooltips[n].arrow=null,this.layout.tooltip.html&&this._tooltips[n].selector.html(Tl(this.layout.tooltip.html,t,this.getElementAnnotation(t))),this.layout.tooltip.closable&&this._tooltips[n].selector.insert("button",":first-child").attr("class","lz-tooltip-close-button").attr("title","Close").text("×").on("click",()=>{this.destroyTooltip(n)}),this._tooltips[n].selector.data([t]),this.positionTooltip(n),this}destroyTooltip(t,n){let r;return typeof t=="string"?r=t:r=this.getElementId(t),this._tooltips[r]&&(typeof this._tooltips[r].selector=="object"&&this._tooltips[r].selector.remove(),delete this._tooltips[r]),n||this._layer_state.status_flags.has_tooltip.delete(r),this}destroyAllTooltips(t=!0){for(let n in this._tooltips)this.destroyTooltip(n,t);return this}positionTooltip(t){if(typeof t!="string")throw new Error("Unable to position tooltip: id is not a string");if(!this._tooltips[t])throw new Error("Unable to position tooltip: id does not point to a valid tooltip");const n=this._tooltips[t],r=this._getTooltipPosition(n);if(!r)return null;this._drawTooltip(n,this.layout.tooltip_positioning,r.x_min,r.x_max,r.y_min,r.y_max)}positionAllTooltips(){for(let t in this._tooltips)this.positionTooltip(t);return this}showOrHideTooltip(t,n){const r=this.layout.tooltip;if(typeof r!="object")return this;const i=this.getElementId(t),o=(p,g,b)=>{let v=null;if(typeof p!="object"||p===null)return null;if(Array.isArray(g))b=b||"and",g.length===1?v=p[g[0]]:v=g.reduce((x,y)=>b==="and"?p[x]&&p[y]:b==="or"?p[x]||p[y]:null);else if(typeof g=="object"){let x;for(let y in g)x=o(p,g[y],y),v===null?v=x:b==="and"?v=v&&x:b==="or"&&(v=v||x)}else return!1;return v};let a={};typeof r.show=="string"?a={and:[r.show]}:typeof r.show=="object"&&(a=r.show);let s={};typeof r.hide=="string"?s={and:[r.hide]}:typeof r.hide=="object"&&(s=r.hide);const l=this._layer_state;var u={};qi.adjectives.forEach(p=>{const g=`un${p}`;u[p]=l.status_flags[p].has(i),u[g]=!u[p]});const c=o(u,a),d=o(u,s),f=l.status_flags.has_tooltip.has(i);return c&&!(n?!1:!f)&&!d?this.createTooltip(t):this.destroyTooltip(t),this}setElementStatus(t,n,r,i){if(t==="has_tooltip")return this;typeof r>"u"&&(r=!0);let o;try{o=this.getElementId(n)}catch{return this}i&&this.setAllElementStatus(t,!r),Ue(`#${o}`).classed(`lz-data_layer-${this.layout.type}-${t}`,r);const a=this.getElementStatusNodeId(n);a!==null&&Ue(`#${a}`).classed(`lz-data_layer-${this.layout.type}-statusnode-${t}`,r);const s=!this._layer_state.status_flags[t].has(o);r&&s&&this._layer_state.status_flags[t].add(o),!r&&!s&&this._layer_state.status_flags[t].delete(o),this.showOrHideTooltip(n,s),s&&this.parent.emit("layout_changed",!0);const l=t==="selected";l&&(s||!r)&&this.parent.emit("element_selection",{element:n,active:r},!0);const u=this.layout.match&&this.layout.match.send;return l&&typeof u<"u"&&(s||!r)&&this.parent.emit("match_requested",{value:new za(u).resolve(n),active:r},!0),this}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");return typeof this._layer_state.status_flags[t]>"u"?this:(typeof n>"u"&&(n=!0),n?this.data.forEach(r=>this.setElementStatus(t,r,!0)):(new Set(this._layer_state.status_flags[t]).forEach(i=>{const o=this.getElementById(i);typeof o=="object"&&o!==null&&this.setElementStatus(t,o,!1)}),this._layer_state.status_flags[t]=new Set),this._global_statuses[t]=n,this)}applyBehaviors(t){typeof this.layout.behaviors=="object"&&Object.keys(this.layout.behaviors).forEach(n=>{const r=/(click|mouseover|mouseout)/.exec(n);r&&t.on(`${r[0]}.${n}`,this.executeBehaviors(n,this.layout.behaviors[n]))})}executeBehaviors(t,n){const r={ctrl:t.includes("ctrl"),shift:t.includes("shift")},i=this;return function(o){o=o||Ue(Ce.target).datum(),!(r.ctrl!==!!Ce.ctrlKey||r.shift!==!!Ce.shiftKey)&&n.forEach(a=>{if(!(typeof a!="object"||a===null))switch(a.action){case"set":i.setElementStatus(a.status,o,!0,a.exclusive);break;case"unset":i.setElementStatus(a.status,o,!1,a.exclusive);break;case"toggle":var s=i._layer_state.status_flags[a.status].has(i.getElementId(o)),l=a.exclusive&&!s;i.setElementStatus(a.status,o,!s,l);break;case"link":if(typeof a.href=="string"){const u=Tl(a.href,o,i.getElementAnnotation(o));typeof a.target=="string"?window.open(u,a.target):window.location.href=u}break}})}}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.parent.layout.margin.left,y:t.y+this.parent.layout.margin.top}}applyAllElementStatus(){const t=this._layer_state.status_flags,n=this;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].forEach(i=>{try{this.setElementStatus(r,this.getElementById(i),!0)}catch(o){console.warn(`Unable to apply state: ${n._state_id}, ${r}`),console.error(o)}})}draw(){return this.svg.container.attr("transform",`translate(${this.parent.layout.cliparea.origin.x}, ${this.parent.layout.cliparea.origin.y})`),this.svg.clipRect.attr("width",this.parent.layout.cliparea.width).attr("height",this.parent.layout.cliparea.height),this.positionAllTooltips(),this}reMap(){return this.destroyAllTooltips(),this.parent_plot.lzd.getData(this.state,this._entities,this._dependencies).then(t=>{this.data=t,this.applyDataMethods(),this._initialized=!0,this.parent.emit("data_from_layer",{layer:this.getBaseId(),content:at(t)},!0)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;cr.prototype[`${e}Element`]=function(i,o=!1){return o=!!o,this.setElementStatus(n,i,!0,o),this},cr.prototype[`${r}Element`]=function(i,o){return typeof o>"u"?o=!1:o=!!o,this.setElementStatus(n,i,!1,o),this},cr.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},cr.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const vK={color:"#000000",filters:null,tooltip_positioning:"vertical",hitarea_width:8};class bK extends cr{constructor(t){if(!Array.isArray(t.filters))throw new Error("Annotation track must specify array of filters for selecting points to annotate");qt(t,vK),super(...arguments)}initialize(){super.initialize(),this._hitareas_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-hit_areas`),this._visible_lines_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-visible_lines`)}render(){const t=this._applyFilters(),n=this._hitareas_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]),r=(a,s)=>{const l=this.parent.x_scale(a[this.layout.x_axis.field]);let u=l-this.layout.hitarea_width/2;if(s>=1){const c=t[s-1],d=this.parent.x_scale(c[this.layout.x_axis.field]);u=Math.max(u,(l+d)/2)}return[u,l]};n.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(n).attr("id",a=>this.getElementId(a)).attr("height",this.parent.layout.height).attr("opacity",0).attr("x",(a,s)=>r(a,s)[0]).attr("width",(a,s)=>{const l=r(a,s);return l[1]-l[0]+this.layout.hitarea_width/2});const i=1,o=this._visible_lines_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]);o.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(o).attr("id",a=>this.getElementId(a)).attr("x",a=>this.parent.x_scale(a[this.layout.x_axis.field])-i/2).attr("width",i).attr("height",this.parent.layout.height).attr("fill",(a,s)=>this.resolveScalableParameter(this.layout.color,a,s)),o.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),n.exit().remove()}_getTooltipPosition(t){const n=this.parent,r=n.layout.height-(n.layout.margin.top+n.layout.margin.bottom),i=1,o=n.x_scale(t.data[this.layout.x_axis.field]),a=r/2;return{x_min:o-i,x_max:o+i,y_min:a-n.layout.margin.top,y_max:a+n.layout.margin.bottom}}}const mK={color:"#CCCCCC",fill_opacity:.5,filters:null,regions:[],id_field:"id",start_field:"start",end_field:"end",merge_field:null};class yK extends cr{constructor(t){if(qt(t,mK),t.interaction||t.behaviors)throw new Error("highlight_regions layer does not support mouse events");if(t.regions.length&&t.namespace&&Object.keys(t.namespace).length)throw new Error('highlight_regions layer can specify "regions" in layout, OR external data "fields", but not both');super(...arguments)}_mergeNodes(t){const{end_field:n,merge_field:r,start_field:i}=this.layout;if(!r)return t;t.sort((a,s)=>Sr(a[r],s[r])||Sr(a[i],s[i]));let o=[];return t.forEach(function(a,s){const l=o[o.length-1]||a;if(a[r]===l[r]&&a[i]<=l[n]){const u=Math.min(l[i],a[i]),c=Math.max(l[n],a[n]);a=Object.assign({},l,a,{[i]:u,[n]:c}),o.pop()}o.push(a)}),o}render(){const{x_scale:t}=this.parent;let n=this.layout.regions.length?this.layout.regions:this.data;n.forEach((i,o)=>i.id||(i.id=o)),n=this._applyFilters(n),n=this._mergeNodes(n);const r=this.svg.group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(n);r.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(r).attr("id",i=>this.getElementId(i)).attr("x",i=>t(i[this.layout.start_field])).attr("width",i=>t(i[this.layout.end_field])-t(i[this.layout.start_field])).attr("height",this.parent.layout.height).attr("fill",(i,o)=>this.resolveScalableParameter(this.layout.color,i,o)).attr("fill-opacity",(i,o)=>this.resolveScalableParameter(this.layout.fill_opacity,i,o)),r.exit().remove(),this.svg.group.style("pointer-events","none")}_getTooltipPosition(t){throw new Error("This layer does not support tooltips")}}const _K={color:"seagreen",hitarea_width:"10px",style:{fill:"none","stroke-width":"1px","stroke-opacity":"100%"},tooltip_positioning:"top"};class xK extends cr{constructor(t){t=qt(t,_K),super(...arguments)}render(){const t=this,n=t.layout,r=t.parent.x_scale,i=t.parent[`y${n.y_axis.axis}_scale`],o=this._applyFilters();function a(u){const c=u[n.x_axis.field1],d=u[n.x_axis.field2],f=(c+d)/2,h=[[r(c),i(0)],[r(f),i(u[n.y_axis.field])],[r(d),i(0)]];return Cs().x(g=>g[0]).y(g=>g[1]).curve(B6)(h)}const s=this.svg.group.selectAll("path.lz-data_layer-arcs-hitarea").data(o,u=>this.getElementId(u)),l=this.svg.group.selectAll("path.lz-data_layer-arcs").data(o,u=>this.getElementId(u));return this.svg.group.call(xn,n.style),s.enter().append("path").attr("class","lz-data_layer-arcs-hitarea").merge(s).attr("id",u=>this.getElementId(u)).style("fill","none").style("stroke-width",n.hitarea_width).style("stroke-opacity",0).style("stroke","transparent").attr("d",u=>a(u)),l.enter().append("path").attr("class","lz-data_layer-arcs").merge(l).attr("id",u=>this.getElementId(u)).attr("stroke",(u,c)=>this.resolveScalableParameter(this.layout.color,u,c)).attr("d",(u,c)=>a(u)),l.exit().remove(),s.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),this}_getTooltipPosition(t){const n=this.parent,r=this.layout,i=t.data[r.x_axis.field1],o=t.data[r.x_axis.field2],a=n[`y${r.y_axis.axis}_scale`];return{x_min:n.x_scale(Math.min(i,o)),x_max:n.x_scale(Math.max(i,o)),y_min:a(t.data[r.y_axis.field]),y_max:a(0)}}}const wK={stroke:"rgb(54, 54, 150)",color:"#363696",label_font_size:15,label_exon_spacing:3,exon_height:10,bounding_box_padding:3,track_vertical_spacing:5,tooltip_positioning:"top"};class CK extends cr{constructor(t){t=qt(t,wK),super(...arguments),this.transcript_idx=0,this.tracks=1,this.gene_track_index={1:[]}}getElementStatusNodeId(t){return`${this.getElementId(t)}-statusnode`}getTrackHeight(){return 2*this.layout.bounding_box_padding+this.layout.label_font_size+this.layout.label_exon_spacing+this.layout.exon_height+this.layout.track_vertical_spacing}assignTracks(t){const n=(r,i)=>{try{const o=this.svg.group.append("text").attr("x",0).attr("y",0).attr("class","lz-data_layer-genes lz-label").style("font-size",i).text(`${r}→`),a=o.node().getBBox().width;return o.remove(),a}catch{return 0}};return this.tracks=1,this.gene_track_index={1:[]},t.filter(r=>!(r.end<this.state.start)&&!(r.start>this.state.end)).map(r=>{if(r.gene_id&&r.gene_id.indexOf(".")){const o=r.gene_id.split(".");r.gene_id=o[0],r.gene_version=o[1]}if(r.transcript_id=r.transcripts[this.transcript_idx].transcript_id,r.display_range={start:this.parent.x_scale(Math.max(r.start,this.state.start)),end:this.parent.x_scale(Math.min(r.end,this.state.end))},r.display_range.label_width=n(r.gene_name,this.layout.label_font_size),r.display_range.width=r.display_range.end-r.display_range.start,r.display_range.text_anchor="middle",r.display_range.width<r.display_range.label_width){if(r.start<this.state.start)r.display_range.end=r.display_range.start+r.display_range.label_width+this.layout.label_font_size,r.display_range.text_anchor="start";else if(r.end>this.state.end)r.display_range.start=r.display_range.end-r.display_range.label_width-this.layout.label_font_size,r.display_range.text_anchor="end";else{const o=(r.display_range.label_width-r.display_range.width)/2+this.layout.label_font_size;r.display_range.start-o<this.parent.x_scale(this.state.start)?(r.display_range.start=this.parent.x_scale(this.state.start),r.display_range.end=r.display_range.start+r.display_range.label_width,r.display_range.text_anchor="start"):r.display_range.end+o>this.parent.x_scale(this.state.end)?(r.display_range.end=this.parent.x_scale(this.state.end),r.display_range.start=r.display_range.end-r.display_range.label_width,r.display_range.text_anchor="end"):(r.display_range.start-=o,r.display_range.end+=o)}r.display_range.width=r.display_range.end-r.display_range.start}r.display_range.start-=this.layout.bounding_box_padding,r.display_range.end+=this.layout.bounding_box_padding,r.display_range.width+=2*this.layout.bounding_box_padding,r.display_domain={start:this.parent.x_scale.invert(r.display_range.start),end:this.parent.x_scale.invert(r.display_range.end)},r.display_domain.width=r.display_domain.end-r.display_domain.start,r.track=null;let i=1;for(;r.track===null;){let o=!1;this.gene_track_index[i].map(a=>{if(!o){const s=Math.min(a.display_range.start,r.display_range.start);Math.max(a.display_range.end,r.display_range.end)-s<a.display_range.width+r.display_range.width&&(o=!0)}}),o?(i++,i>this.tracks&&(this.tracks=i,this.gene_track_index[i]=[])):(r.track=i,this.gene_track_index[i].push(r))}return r.parent=this,r.transcripts.map((o,a)=>{r.transcripts[a].parent=r,r.transcripts[a].exons.map((s,l)=>r.transcripts[a].exons[l].parent=r.transcripts[a])}),r})}render(){const t=this;let n=this._applyFilters();n=this.assignTracks(n);let r;const i=this.svg.group.selectAll("g.lz-data_layer-genes").data(n,o=>o.gene_name);i.enter().append("g").attr("class","lz-data_layer-genes").merge(i).attr("id",o=>this.getElementId(o)).each(function(o){const a=o.parent,s=Ue(this).selectAll("rect.lz-data_layer-genes.lz-data_layer-genes-statusnode").data([o],f=>a.getElementStatusNodeId(f));r=a.getTrackHeight()-a.layout.track_vertical_spacing,s.enter().append("rect").attr("class","lz-data_layer-genes lz-data_layer-genes-statusnode").merge(s).attr("id",f=>a.getElementStatusNodeId(f)).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",f=>f.display_range.width).attr("height",r).attr("x",f=>f.display_range.start).attr("y",f=>(f.track-1)*a.getTrackHeight()),s.exit().remove();const l=Ue(this).selectAll("rect.lz-data_layer-genes.lz-boundary").data([o],f=>`${f.gene_name}_boundary`);r=1,l.enter().append("rect").attr("class","lz-data_layer-genes lz-boundary").merge(l).attr("width",f=>a.parent.x_scale(f.end)-a.parent.x_scale(f.start)).attr("height",r).attr("x",f=>a.parent.x_scale(f.start)).attr("y",f=>(f.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing+Math.max(a.layout.exon_height,3)/2).style("fill",(f,h)=>t.resolveScalableParameter(t.layout.color,f,h)).style("stroke",(f,h)=>t.resolveScalableParameter(t.layout.stroke,f,h)),l.exit().remove();const u=Ue(this).selectAll("text.lz-data_layer-genes.lz-label").data([o],f=>`${f.gene_name}_label`);u.enter().append("text").attr("class","lz-data_layer-genes lz-label").merge(u).attr("text-anchor",f=>f.display_range.text_anchor).text(f=>f.strand==="+"?`${f.gene_name}→`:`←${f.gene_name}`).style("font-size",o.parent.layout.label_font_size).attr("x",f=>{if(f.display_range.text_anchor==="middle")return f.display_range.start+f.display_range.width/2;if(f.display_range.text_anchor==="start")return f.display_range.start+a.layout.bounding_box_padding;if(f.display_range.text_anchor==="end")return f.display_range.end-a.layout.bounding_box_padding}).attr("y",f=>(f.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size),u.exit().remove();const c=Ue(this).selectAll("rect.lz-data_layer-genes.lz-exon").data(o.transcripts[o.parent.transcript_idx].exons,f=>f.exon_id);r=a.layout.exon_height,c.enter().append("rect").attr("class","lz-data_layer-genes lz-exon").merge(c).style("fill",(f,h)=>t.resolveScalableParameter(t.layout.color,f.parent.parent,h)).style("stroke",(f,h)=>t.resolveScalableParameter(t.layout.stroke,f.parent.parent,h)).attr("width",f=>a.parent.x_scale(f.end)-a.parent.x_scale(f.start)).attr("height",r).attr("x",f=>a.parent.x_scale(f.start)).attr("y",()=>(o.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing),c.exit().remove();const d=Ue(this).selectAll("rect.lz-data_layer-genes.lz-clickarea").data([o],f=>`${f.gene_name}_clickarea`);r=a.getTrackHeight()-a.layout.track_vertical_spacing,d.enter().append("rect").attr("class","lz-data_layer-genes lz-clickarea").merge(d).attr("id",f=>`${a.getElementId(f)}_clickarea`).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",f=>f.display_range.width).attr("height",r).attr("x",f=>f.display_range.start).attr("y",f=>(f.track-1)*a.getTrackHeight()),d.exit().remove()}),i.exit().remove(),this.svg.group.on("click.event_emitter",o=>this.parent.emit("element_clicked",o,!0)).call(this.applyBehaviors.bind(this))}_getTooltipPosition(t){const n=this.getElementStatusNodeId(t.data),r=Ue(`#${n}`).node().getBBox();return{x_min:this.parent.x_scale(t.data.start),x_max:this.parent.x_scale(t.data.end),y_min:r.y,y_max:r.y+r.height}}}const SK={style:{fill:"none","stroke-width":"2px"},interpolate:"curveLinear",x_axis:{field:"x"},y_axis:{field:"y",axis:1},hitarea_width:5,tooltip:null};class $K extends cr{constructor(t){if(t=qt(t,SK),t.tooltip)throw new Error("The line / filled curve layer does not support tooltips");super(...arguments)}render(){const t=this.parent,n=this.layout.x_axis.field,r=this.layout.y_axis.field,i=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]);this.path=i.enter().append("path").attr("class","lz-data_layer-line");let o;const a=t.x_scale,s=t[`y${this.layout.y_axis.axis}_scale`];this.layout.style.fill&&this.layout.style.fill!=="none"?o=Fb().x(l=>+a(l[n])).y0(+s(0)).y1(l=>+s(l[r])):o=Cs().x(l=>+a(l[n])).y(l=>+s(l[r])).curve(V6[this.layout.interpolate]),i.merge(this.path).attr("d",o).call(xn,this.layout.style),i.exit().remove()}setElementStatus(t,n,r){return this.setAllElementStatus(t,r)}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");if(typeof this._layer_state.status_flags[t]>"u")return this;typeof n>"u"&&(n=!0),this._global_statuses[t]=n;let r="lz-data_layer-line";return Object.keys(this._global_statuses).forEach(i=>{this._global_statuses[i]&&(r+=` lz-data_layer-line-${i}`)}),this.path.attr("class",r),this.parent.emit("layout_changed",!0),this}}const kK={style:{stroke:"#D3D3D3","stroke-width":"3px","stroke-dasharray":"10px 10px"},orientation:"horizontal",x_axis:{axis:1,decoupled:!0},y_axis:{axis:1,decoupled:!0},tooltip_positioning:"vertical",offset:0};class MK extends cr{constructor(t){t=qt(t,kK),["horizontal","vertical"].includes(t.orientation)||(t.orientation="horizontal"),super(...arguments)}getElementId(t){return this.getBaseId()}render(){const t=this.parent,n="x_scale",r=`y${this.layout.y_axis.axis}_scale`,i="x_extent",o=`y${this.layout.y_axis.axis}_extent`,a="x_range";if(this.layout.orientation==="horizontal")this.data=[{x:t[i][0],y:this.layout.offset},{x:t[i][1],y:this.layout.offset}];else if(this.layout.orientation==="vertical")this.data=[{x:this.layout.offset,y:t[o][0]},{x:this.layout.offset,y:t[o][1]}];else throw new Error('Unrecognized vertical line type. Must be "vertical" or "horizontal"');const s=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]),l=[t.layout.cliparea.height,0],u=Cs().x((c,d)=>{const f=+t[n](c.x);return isNaN(f)?t[a][d]:f}).y((c,d)=>{const f=+t[r](c.y);return isNaN(f)?l[d]:f});this.path=s.enter().append("path").attr("class","lz-data_layer-line").merge(s).attr("d",u).call(xn,this.layout.style).call(this.applyBehaviors.bind(this)),s.exit().remove()}_getTooltipPosition(t){try{const n=lr(this.svg.container.node()),r=n[0],i=n[1];return{x_min:r-1,x_max:r+1,y_min:i-1,y_max:i+1}}catch{return null}}}function TK(e,t,n,r,i,o,a){let s=[];const l=Symbol.for("lzX"),u=Symbol.for("lzY");let c=null,d=null,f=[];function h(){if(f.length){const g=f[Math.floor((f.length-1)/2)];s.push(g)}c=d=null,f=[]}function p(g,b,v){c=g,d=b,f.push(v)}return e.forEach(g=>{const b=g[l],v=g[u],x=b>=t&&b<=n&&v>=i&&v<=o;g.lz_is_match||!x?(h(),s.push(g)):c===null?p(b,v,g):Math.abs(b-c)<=r&&Math.abs(v-d)<=a?f.push(g):(h(),p(b,v,g))}),h(),s}const EK={point_size:40,point_shape:"circle",tooltip_positioning:"horizontal",color:"#888888",coalesce:{active:!1,max_points:800,x_min:"-Infinity",x_max:"Infinity",y_min:0,y_max:3,x_gap:7,y_gap:7},fill_opacity:1,y_axis:{axis:1},id_field:"id"};class t4 extends cr{constructor(t){t=qt(t,EK),t.label&&isNaN(t.label.spacing)&&(t.label.spacing=4),super(...arguments)}_getTooltipPosition(t){const n=this.parent.x_scale(t.data[this.layout.x_axis.field]),r=`y${this.layout.y_axis.axis}_scale`,i=this.parent[r](t.data[this.layout.y_axis.field]),o=this.resolveScalableParameter(this.layout.point_size,t.data),a=Math.sqrt(o/Math.PI);return{x_min:n-a,x_max:n+a,y_min:i-a,y_max:i+a}}flip_labels(){const t=this,n=t.resolveScalableParameter(t.layout.point_size,{}),r=t.layout.label.spacing,i=!!t.layout.label.lines,o=2*r,a=this.parent_plot.layout.width-this.parent.layout.margin.left-this.parent.layout.margin.right-2*r,s=(l,u)=>{const c=+l.attr("x"),d=2*r+2*Math.sqrt(n);let f,h;i&&(f=+u.attr("x2"),h=r+2*Math.sqrt(n)),l.style("text-anchor")==="start"?(l.style("text-anchor","end"),l.attr("x",c-d),i&&u.attr("x2",f-h)):(l.style("text-anchor","start"),l.attr("x",c+d),i&&u.attr("x2",f+h))};t._label_texts.each(function(l,u){const d=Ue(this),f=+d.attr("x"),h=d.node().getBoundingClientRect();if(f+h.width+r>a){const p=i?Ue(t._label_lines.nodes()[u]):null;s(d,p)}}),t._label_texts.each(function(l,u){const d=Ue(this);if(d.style("text-anchor")==="end")return;let f=+d.attr("x");const h=d.node().getBoundingClientRect(),p=i?Ue(t._label_lines.nodes()[u]):null;t._label_texts.each(function(){const v=Ue(this).node().getBoundingClientRect();h.left<v.left+v.width+2*r&&h.left+h.width+2*r>v.left&&h.top<v.top+v.height+2*r&&h.height+h.top+2*r>v.top&&(s(d,p),f=+d.attr("x"),f-h.width-r<o&&s(d,p))})})}separate_labels(){this._label_iterations++;const t=this,n=.5;if(!this.layout.label)return;const r=this.layout.label.spacing;let i=!1;if(t._label_texts.each(function(){const o=this,a=Ue(o),s=a.attr("y");t._label_texts.each(function(){const l=this;if(o===l)return;const u=Ue(l);if(a.attr("text-anchor")!==u.attr("text-anchor"))return;const c=a.node().getBoundingClientRect(),d=u.node().getBoundingClientRect();if(!(c.left<d.left+d.width+2*r&&c.left+c.width+2*r>d.left&&c.top<d.top+d.height+2*r&&c.height+c.top+2*r>d.top))return;i=!0;const h=u.attr("y"),g=(c.top<d.top?1:-1)*n;let b=+s-g,v=+h+g;const x=2*r,y=t.parent.layout.height-t.parent.layout.margin.top-t.parent.layout.margin.bottom-2*r;let _;b-c.height/2<x?(_=+s-b,b=+s,v+=_):v-d.height/2<x&&(_=+h-v,v=+h,b+=_),b+c.height/2>y?(_=b-+s,b=+s,v-=_):v+d.height/2>y&&(_=v-+h,v=+h,b-=_),a.attr("y",b),u.attr("y",v)})}),i){if(t.layout.label.lines){const o=t._label_texts.nodes();t._label_lines.attr("y2",(a,s)=>Ue(o[s]).attr("y"))}this._label_iterations<150&&setTimeout(()=>{this.separate_labels()},1)}}render(){const t=this,n=this.parent.x_scale,r=this.parent[`y${this.layout.y_axis.axis}_scale`],i=Symbol.for("lzX"),o=Symbol.for("lzY");let a=this._applyFilters();if(a.forEach(d=>{let f=n(d[this.layout.x_axis.field]),h=r(d[this.layout.y_axis.field]);isNaN(f)&&(f=-1e3),isNaN(h)&&(h=-1e3),d[i]=f,d[o]=h}),this.layout.coalesce.active&&a.length>this.layout.coalesce.max_points){let{x_min:d,x_max:f,y_min:h,y_max:p,x_gap:g,y_gap:b}=this.layout.coalesce;const v=isFinite(d)?n(+d):-1/0,x=isFinite(f)?n(+f):1/0,y=isFinite(p)?r(+p):-1/0,_=isFinite(h)?r(+h):1/0;a=TK(a,v,x,g,y,_,b)}if(this.layout.label){let d;const f=t.layout.label.filters||[];if(!f.length)d=a;else{const g=this.filter.bind(this,f);d=a.filter(g)}this._label_groups=this.svg.group.selectAll(`g.lz-data_layer-${this.layout.type}-label`).data(d,g=>`${g[this.layout.id_field]}_label`);const h=`lz-data_layer-${this.layout.type}-label`,p=this._label_groups.enter().append("g").attr("class",h);this._label_texts&&this._label_texts.remove(),this._label_texts=this._label_groups.merge(p).append("text").text(g=>Tl(t.layout.label.text||"",g,this.getElementAnnotation(g))).attr("x",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing).attr("y",g=>g[o]).attr("text-anchor","start").call(xn,t.layout.label.style||{}),t.layout.label.lines&&(this._label_lines&&this._label_lines.remove(),this._label_lines=this._label_groups.merge(p).append("line").attr("x1",g=>g[i]).attr("y1",g=>g[o]).attr("x2",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing/2).attr("y2",g=>g[o]).call(xn,t.layout.label.lines.style||{})),this._label_groups.exit().remove()}else this._label_texts&&this._label_texts.remove(),this._label_lines&&this._label_lines.remove(),this._label_groups&&this._label_groups.remove();const s=this.svg.group.selectAll(`path.lz-data_layer-${this.layout.type}`).data(a,d=>d[this.layout.id_field]),l=d=>`translate(${d[i]}, ${d[o]})`,u=Lb().size((d,f)=>this.resolveScalableParameter(this.layout.point_size,d,f)).type((d,f)=>X6(this.resolveScalableParameter(this.layout.point_shape,d,f))),c=`lz-data_layer-${this.layout.type}`;s.enter().append("path").attr("class",c).attr("id",d=>this.getElementId(d)).merge(s).attr("transform",l).attr("fill",(d,f)=>this.resolveScalableParameter(this.layout.color,d,f)).attr("fill-opacity",(d,f)=>this.resolveScalableParameter(this.layout.fill_opacity,d,f)).attr("d",u),s.exit().remove(),this.layout.label&&(this.flip_labels(),this._label_iterations=0,this.separate_labels()),this.svg.group.on("click.event_emitter",()=>{const d=Ue(Ce.target).datum();this.parent.emit("element_clicked",d,!0)}).call(this.applyBehaviors.bind(this))}makeLDReference(t){let n=null;if(typeof t>"u")throw new Error("makeLDReference requires one argument of any type");return typeof t=="object"?this.layout.id_field&&typeof t[this.layout.id_field]<"u"?n=t[this.layout.id_field].toString():typeof t.id<"u"?n=t.id.toString():n=t.toString():n=t.toString(),this.parent.emit("set_ldrefvar",{ldrefvar:n},!0),this.parent_plot.applyState({ldrefvar:n})}}class AK extends t4{constructor(t){super(...arguments),this._categories={}}_prepareData(){const t=this.layout.x_axis.field||"x",n=this.layout.x_axis.category_field;if(!n)throw new Error(`Layout for ${this.layout.id} must specify category_field`);const r=this.data.sort((i,o)=>{const a=i[n],s=o[n],l=typeof a=="string"?a.toLowerCase():a,u=typeof s=="string"?s.toLowerCase():s;return l===u?0:l<u?-1:1});return r.forEach((i,o)=>{i[t]=i[t]||o}),r}_generateCategoryBounds(){const t=this.layout.x_axis.category_field,n=this.layout.x_axis.field||"x",r={};this.data.forEach(o=>{const a=o[t],s=o[n],l=r[a]||[s,s];r[a]=[Math.min(l[0],s),Math.max(l[1],s)]});const i=Object.keys(r);return this._setDynamicColorScheme(i),r}_getColorScale(t){t=t||this.layout;let n=t.color||[];if(Array.isArray(n)&&(n=n.find(r=>r.scale_function==="categorical_bin")),!n||n.scale_function!=="categorical_bin")throw new Error("This layer requires that color options be provided as a `categorical_bin`");return n}_setDynamicColorScheme(t){const n=this._getColorScale(this.layout).parameters,r=this._getColorScale(this._base_layout).parameters;if(r.categories.length&&r.values.length){const o={};r.categories.forEach(a=>{o[a]=1}),t.every(a=>Object.prototype.hasOwnProperty.call(o,a))?n.categories=r.categories:n.categories=t}else n.categories=t;let i;for(r.values.length?i=r.values:i=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];i.length<t.length;)i=i.concat(i);i=i.slice(0,t.length),n.values=i}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error("Invalid dimension identifier");const r=n.position||"left";if(!["left","center","right"].includes(r))throw new Error("Invalid tick position");const i=this._categories;if(!i||!Object.keys(i).length)return[];if(t==="y")return[];if(t==="x"){const o=this._getColorScale(this.layout),a=o.parameters.categories||[],s=o.parameters.values||[];return Object.keys(i).map((l,u)=>{const c=i[l];let d;switch(r){case"left":d=c[0];break;case"center":const f=c[1]-c[0];d=c[0]+(f!==0?f:c[0])/2;break;case"right":d=c[1];break}return{x:d,text:l,style:{fill:s[a.indexOf(l)]||"#000000"}}})}}applyCustomDataMethods(){return this.data=this._prepareData(),this._categories=this._generateCategoryBounds(),this}}const PK=Object.freeze(Object.defineProperty({__proto__:null,BaseDataLayer:cr,annotation_track:bK,arcs:xK,category_scatter:AK,genes:CK,highlight_regions:yK,line:$K,orthogonal_line:MK,scatter:t4},Symbol.toStringTag,{value:"Module"})),Xb=new Sv;for(let[e,t]of Object.entries(PK))Xb.add(e,t);const Kb=7.301,Zb={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2003
|
+
`)}return this.data.forEach((o,a)=>{t&&r!==null&&r!==void 0&&(o.lz_is_match=n(i.resolve(o),r)),o.getDataLayer=()=>this,o.getPanel=()=>this.parent||null,o.getPlot=()=>{const s=this.parent;return s?s.parent:null}}),this.applyCustomDataMethods(),this}applyCustomDataMethods(){return this}resolveScalableParameter(t,n,r){let i=null;if(Array.isArray(t)){let o=0;for(;i===null&&o<t.length;)i=this.resolveScalableParameter(t[o],n,r),o++}else switch(typeof t){case"number":case"string":i=t;break;case"object":if(t.scale_function){const o=fh.get(t.scale_function);if(t.field){const a=new za(t.field);let s;try{s=this.getElementAnnotation(n)}catch{s=null}i=o(t.parameters||{},a.resolve(n,s),r)}else i=o(t.parameters||{},n,r)}break}return i}getAxisExtent(t){if(!["x","y"].includes(t))throw new Error("Invalid dimension identifier");const n=`${t}_axis`,r=this.layout[n];if(!isNaN(r.floor)&&!isNaN(r.ceiling))return[+r.floor,+r.ceiling];let i=[];if(r.field&&this.data)if(this.data.length){i=this._getDataExtent(this.data,r);const o=i[1]-i[0];if(isNaN(r.lower_buffer)||(i[0]-=o*r.lower_buffer),isNaN(r.upper_buffer)||(i[1]+=o*r.upper_buffer),typeof r.min_extent=="object"){const a=r.min_extent[0],s=r.min_extent[1];!isNaN(a)&&!isNaN(s)&&(i[0]=Math.min(i[0],a)),isNaN(s)||(i[1]=Math.max(i[1],s))}return[isNaN(r.floor)?i[0]:r.floor,isNaN(r.ceiling)?i[1]:r.ceiling]}else return i=r.min_extent||[],i;return t==="x"&&!isNaN(this.state.start)&&!isNaN(this.state.end)?[this.state.start,this.state.end]:[]}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error(`Invalid dimension identifier ${t}`);return[]}_getTooltipPosition(t){const n=this.parent,r=n[`y${this.layout.y_axis.axis}_scale`],i=n[`y${this.layout.y_axis.axis}_extent`],o=n.x_scale(n.x_extent[0]),a=r(i[0]);return{x_min:o,x_max:o,y_min:a,y_max:a}}_drawTooltip(t,n,r,i,o,a){const s=this.parent.layout,l=this.parent_plot.layout,u=this.layout,c=7,d=1,f=c+d,h=6,p=this._getPageOrigin(),g=t.selector.node().getBoundingClientRect(),b=s.height-(s.margin.top+s.margin.bottom),v=l.width-(s.margin.left+s.margin.right);r=Math.max(r,0),i=Math.min(i,v),o=Math.max(o,0),a=Math.min(a,b);const _=(r+i)/2,y=(o+a)/2;let x=i-_,S=a-y,$=u.tooltip_positioning,w,T,k,P,R;if($==="vertical"?(x=0,g.height+f>b-(y+S)?$="top":$="bottom"):$==="horizontal"&&(S=0,_<=l.width/2?$="left":$="right"),$==="top"||$==="bottom"){const C=Math.max(g.width/2-_,0),E=Math.max(g.width/2+_-v,0);T=p.x+_-g.width/2-E+C,R=p.x+_-T-c,$==="top"?(w=p.y+y-(S+g.height+f),k="down",P=g.height-d):(w=p.y+y+S+f,k="up",P=0-f)}else if($==="left"||$==="right")$==="left"?(T=p.x+_+x+f,k="left",R=-1*(c+d)):(T=p.x+_-g.width-x-f,k="right",R=g.width-d),y-g.height/2<=0?(w=p.y+y-1.5*c-h,P=h):y+g.height/2>=b?(w=p.y+y+c+h-g.height,P=g.height-2*c-h):(w=p.y+y-g.height/2,P=g.height/2-c);else throw new Error("Unrecognized placement value");return t.selector.style("left",`${T}px`).style("top",`${w}px`),t.arrow||(t.arrow=t.selector.append("div").style("position","absolute")),t.arrow.attr("class",`lz-data_layer-tooltip-arrow_${k}`).style("left",`${R}px`).style("top",`${P}px`),this}filter(t,n,r,i){let o=!0;return t.forEach(a=>{const{field:s,operator:l,value:u}=a,c=pr.get(l),d=this.getElementAnnotation(n),f=s?new za(s).resolve(n,d):n;c(f,u)||(o=!1)}),o}getElementAnnotation(t,n){const r=this.getElementId(t),i=this._layer_state.extra_fields[r];return n?i&&i[n]:i}_applyFilters(t){return t=t||this.data,this._filter_func?t=t.filter(this._filter_func):this.layout.filters&&(t=t.filter(this.filter.bind(this,this.layout.filters))),t}_setDefaultState(){const t={status_flags:{},extra_fields:{}},n=t.status_flags;qi.adjectives.forEach(r=>{n[r]=n[r]||new Set}),n.has_tooltip=n.has_tooltip||new Set,this.parent&&(this._state_id=`${this.parent.id}.${this.id}`,this.state=this.parent.state,this.state[this._state_id]=t),this._layer_state=t}getBaseId(){return this._base_id?this._base_id:this.parent?`${this.parent_plot.id}.${this.parent.id}.${this.id}`:(this.id||"").toString()}getAbsoluteDataHeight(){return this.svg.group.node().getBoundingClientRect().height}initialize(){this._base_id=this.getBaseId();const t=this.getBaseId();return this.svg.container=this.parent.svg.group.append("g").attr("class","lz-data_layer-container").attr("id",`${t}.data_layer_container`),this.svg.clipRect=this.svg.container.append("clipPath").attr("id",`${t}.clip`).append("rect"),this.svg.group=this.svg.container.append("g").attr("id",`${t}.data_layer`).attr("clip-path",`url(#${t}.clip)`),this}createTooltip(t){if(typeof this.layout.tooltip!="object")throw new Error(`DataLayer [${this.id}] layout does not define a tooltip`);const n=this.getElementId(t);if(this._tooltips[n]){this.positionTooltip(n);return}return this._tooltips[n]={data:t,arrow:null,selector:Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class","lz-data_layer-tooltip").attr("id",`${n}-tooltip`)},this._layer_state.status_flags.has_tooltip.add(n),this.updateTooltip(t),this}updateTooltip(t,n){return typeof n>"u"&&(n=this.getElementId(t)),this._tooltips[n].selector.html(""),this._tooltips[n].arrow=null,this.layout.tooltip.html&&this._tooltips[n].selector.html(Tl(this.layout.tooltip.html,t,this.getElementAnnotation(t))),this.layout.tooltip.closable&&this._tooltips[n].selector.insert("button",":first-child").attr("class","lz-tooltip-close-button").attr("title","Close").text("×").on("click",()=>{this.destroyTooltip(n)}),this._tooltips[n].selector.data([t]),this.positionTooltip(n),this}destroyTooltip(t,n){let r;return typeof t=="string"?r=t:r=this.getElementId(t),this._tooltips[r]&&(typeof this._tooltips[r].selector=="object"&&this._tooltips[r].selector.remove(),delete this._tooltips[r]),n||this._layer_state.status_flags.has_tooltip.delete(r),this}destroyAllTooltips(t=!0){for(let n in this._tooltips)this.destroyTooltip(n,t);return this}positionTooltip(t){if(typeof t!="string")throw new Error("Unable to position tooltip: id is not a string");if(!this._tooltips[t])throw new Error("Unable to position tooltip: id does not point to a valid tooltip");const n=this._tooltips[t],r=this._getTooltipPosition(n);if(!r)return null;this._drawTooltip(n,this.layout.tooltip_positioning,r.x_min,r.x_max,r.y_min,r.y_max)}positionAllTooltips(){for(let t in this._tooltips)this.positionTooltip(t);return this}showOrHideTooltip(t,n){const r=this.layout.tooltip;if(typeof r!="object")return this;const i=this.getElementId(t),o=(p,g,b)=>{let v=null;if(typeof p!="object"||p===null)return null;if(Array.isArray(g))b=b||"and",g.length===1?v=p[g[0]]:v=g.reduce((_,y)=>b==="and"?p[_]&&p[y]:b==="or"?p[_]||p[y]:null);else if(typeof g=="object"){let _;for(let y in g)_=o(p,g[y],y),v===null?v=_:b==="and"?v=v&&_:b==="or"&&(v=v||_)}else return!1;return v};let a={};typeof r.show=="string"?a={and:[r.show]}:typeof r.show=="object"&&(a=r.show);let s={};typeof r.hide=="string"?s={and:[r.hide]}:typeof r.hide=="object"&&(s=r.hide);const l=this._layer_state;var u={};qi.adjectives.forEach(p=>{const g=`un${p}`;u[p]=l.status_flags[p].has(i),u[g]=!u[p]});const c=o(u,a),d=o(u,s),f=l.status_flags.has_tooltip.has(i);return c&&!(n?!1:!f)&&!d?this.createTooltip(t):this.destroyTooltip(t),this}setElementStatus(t,n,r,i){if(t==="has_tooltip")return this;typeof r>"u"&&(r=!0);let o;try{o=this.getElementId(n)}catch{return this}i&&this.setAllElementStatus(t,!r),Ue(`#${o}`).classed(`lz-data_layer-${this.layout.type}-${t}`,r);const a=this.getElementStatusNodeId(n);a!==null&&Ue(`#${a}`).classed(`lz-data_layer-${this.layout.type}-statusnode-${t}`,r);const s=!this._layer_state.status_flags[t].has(o);r&&s&&this._layer_state.status_flags[t].add(o),!r&&!s&&this._layer_state.status_flags[t].delete(o),this.showOrHideTooltip(n,s),s&&this.parent.emit("layout_changed",!0);const l=t==="selected";l&&(s||!r)&&this.parent.emit("element_selection",{element:n,active:r},!0);const u=this.layout.match&&this.layout.match.send;return l&&typeof u<"u"&&(s||!r)&&this.parent.emit("match_requested",{value:new za(u).resolve(n),active:r},!0),this}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");return typeof this._layer_state.status_flags[t]>"u"?this:(typeof n>"u"&&(n=!0),n?this.data.forEach(r=>this.setElementStatus(t,r,!0)):(new Set(this._layer_state.status_flags[t]).forEach(i=>{const o=this.getElementById(i);typeof o=="object"&&o!==null&&this.setElementStatus(t,o,!1)}),this._layer_state.status_flags[t]=new Set),this._global_statuses[t]=n,this)}applyBehaviors(t){typeof this.layout.behaviors=="object"&&Object.keys(this.layout.behaviors).forEach(n=>{const r=/(click|mouseover|mouseout)/.exec(n);r&&t.on(`${r[0]}.${n}`,this.executeBehaviors(n,this.layout.behaviors[n]))})}executeBehaviors(t,n){const r={ctrl:t.includes("ctrl"),shift:t.includes("shift")},i=this;return function(o){o=o||Ue(Ce.target).datum(),!(r.ctrl!==!!Ce.ctrlKey||r.shift!==!!Ce.shiftKey)&&n.forEach(a=>{if(!(typeof a!="object"||a===null))switch(a.action){case"set":i.setElementStatus(a.status,o,!0,a.exclusive);break;case"unset":i.setElementStatus(a.status,o,!1,a.exclusive);break;case"toggle":var s=i._layer_state.status_flags[a.status].has(i.getElementId(o)),l=a.exclusive&&!s;i.setElementStatus(a.status,o,!s,l);break;case"link":if(typeof a.href=="string"){const u=Tl(a.href,o,i.getElementAnnotation(o));typeof a.target=="string"?window.open(u,a.target):window.location.href=u}break}})}}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.parent.layout.margin.left,y:t.y+this.parent.layout.margin.top}}applyAllElementStatus(){const t=this._layer_state.status_flags,n=this;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].forEach(i=>{try{this.setElementStatus(r,this.getElementById(i),!0)}catch(o){console.warn(`Unable to apply state: ${n._state_id}, ${r}`),console.error(o)}})}draw(){return this.svg.container.attr("transform",`translate(${this.parent.layout.cliparea.origin.x}, ${this.parent.layout.cliparea.origin.y})`),this.svg.clipRect.attr("width",this.parent.layout.cliparea.width).attr("height",this.parent.layout.cliparea.height),this.positionAllTooltips(),this}reMap(){return this.destroyAllTooltips(),this.parent_plot.lzd.getData(this.state,this._entities,this._dependencies).then(t=>{this.data=t,this.applyDataMethods(),this._initialized=!0,this.parent.emit("data_from_layer",{layer:this.getBaseId(),content:at(t)},!0)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;cr.prototype[`${e}Element`]=function(i,o=!1){return o=!!o,this.setElementStatus(n,i,!0,o),this},cr.prototype[`${r}Element`]=function(i,o){return typeof o>"u"?o=!1:o=!!o,this.setElementStatus(n,i,!1,o),this},cr.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},cr.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const vK={color:"#000000",filters:null,tooltip_positioning:"vertical",hitarea_width:8};class bK extends cr{constructor(t){if(!Array.isArray(t.filters))throw new Error("Annotation track must specify array of filters for selecting points to annotate");qt(t,vK),super(...arguments)}initialize(){super.initialize(),this._hitareas_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-hit_areas`),this._visible_lines_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-visible_lines`)}render(){const t=this._applyFilters(),n=this._hitareas_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]),r=(a,s)=>{const l=this.parent.x_scale(a[this.layout.x_axis.field]);let u=l-this.layout.hitarea_width/2;if(s>=1){const c=t[s-1],d=this.parent.x_scale(c[this.layout.x_axis.field]);u=Math.max(u,(l+d)/2)}return[u,l]};n.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(n).attr("id",a=>this.getElementId(a)).attr("height",this.parent.layout.height).attr("opacity",0).attr("x",(a,s)=>r(a,s)[0]).attr("width",(a,s)=>{const l=r(a,s);return l[1]-l[0]+this.layout.hitarea_width/2});const i=1,o=this._visible_lines_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]);o.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(o).attr("id",a=>this.getElementId(a)).attr("x",a=>this.parent.x_scale(a[this.layout.x_axis.field])-i/2).attr("width",i).attr("height",this.parent.layout.height).attr("fill",(a,s)=>this.resolveScalableParameter(this.layout.color,a,s)),o.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),n.exit().remove()}_getTooltipPosition(t){const n=this.parent,r=n.layout.height-(n.layout.margin.top+n.layout.margin.bottom),i=1,o=n.x_scale(t.data[this.layout.x_axis.field]),a=r/2;return{x_min:o-i,x_max:o+i,y_min:a-n.layout.margin.top,y_max:a+n.layout.margin.bottom}}}const mK={color:"#CCCCCC",fill_opacity:.5,filters:null,regions:[],id_field:"id",start_field:"start",end_field:"end",merge_field:null};class yK extends cr{constructor(t){if(qt(t,mK),t.interaction||t.behaviors)throw new Error("highlight_regions layer does not support mouse events");if(t.regions.length&&t.namespace&&Object.keys(t.namespace).length)throw new Error('highlight_regions layer can specify "regions" in layout, OR external data "fields", but not both');super(...arguments)}_mergeNodes(t){const{end_field:n,merge_field:r,start_field:i}=this.layout;if(!r)return t;t.sort((a,s)=>Sr(a[r],s[r])||Sr(a[i],s[i]));let o=[];return t.forEach(function(a,s){const l=o[o.length-1]||a;if(a[r]===l[r]&&a[i]<=l[n]){const u=Math.min(l[i],a[i]),c=Math.max(l[n],a[n]);a=Object.assign({},l,a,{[i]:u,[n]:c}),o.pop()}o.push(a)}),o}render(){const{x_scale:t}=this.parent;let n=this.layout.regions.length?this.layout.regions:this.data;n.forEach((i,o)=>i.id||(i.id=o)),n=this._applyFilters(n),n=this._mergeNodes(n);const r=this.svg.group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(n);r.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(r).attr("id",i=>this.getElementId(i)).attr("x",i=>t(i[this.layout.start_field])).attr("width",i=>t(i[this.layout.end_field])-t(i[this.layout.start_field])).attr("height",this.parent.layout.height).attr("fill",(i,o)=>this.resolveScalableParameter(this.layout.color,i,o)).attr("fill-opacity",(i,o)=>this.resolveScalableParameter(this.layout.fill_opacity,i,o)),r.exit().remove(),this.svg.group.style("pointer-events","none")}_getTooltipPosition(t){throw new Error("This layer does not support tooltips")}}const _K={color:"seagreen",hitarea_width:"10px",style:{fill:"none","stroke-width":"1px","stroke-opacity":"100%"},tooltip_positioning:"top"};class xK extends cr{constructor(t){t=qt(t,_K),super(...arguments)}render(){const t=this,n=t.layout,r=t.parent.x_scale,i=t.parent[`y${n.y_axis.axis}_scale`],o=this._applyFilters();function a(u){const c=u[n.x_axis.field1],d=u[n.x_axis.field2],f=(c+d)/2,h=[[r(c),i(0)],[r(f),i(u[n.y_axis.field])],[r(d),i(0)]];return Cs().x(g=>g[0]).y(g=>g[1]).curve(O6)(h)}const s=this.svg.group.selectAll("path.lz-data_layer-arcs-hitarea").data(o,u=>this.getElementId(u)),l=this.svg.group.selectAll("path.lz-data_layer-arcs").data(o,u=>this.getElementId(u));return this.svg.group.call(xn,n.style),s.enter().append("path").attr("class","lz-data_layer-arcs-hitarea").merge(s).attr("id",u=>this.getElementId(u)).style("fill","none").style("stroke-width",n.hitarea_width).style("stroke-opacity",0).style("stroke","transparent").attr("d",u=>a(u)),l.enter().append("path").attr("class","lz-data_layer-arcs").merge(l).attr("id",u=>this.getElementId(u)).attr("stroke",(u,c)=>this.resolveScalableParameter(this.layout.color,u,c)).attr("d",(u,c)=>a(u)),l.exit().remove(),s.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),this}_getTooltipPosition(t){const n=this.parent,r=this.layout,i=t.data[r.x_axis.field1],o=t.data[r.x_axis.field2],a=n[`y${r.y_axis.axis}_scale`];return{x_min:n.x_scale(Math.min(i,o)),x_max:n.x_scale(Math.max(i,o)),y_min:a(t.data[r.y_axis.field]),y_max:a(0)}}}const wK={stroke:"rgb(54, 54, 150)",color:"#363696",label_font_size:15,label_exon_spacing:3,exon_height:10,bounding_box_padding:3,track_vertical_spacing:5,tooltip_positioning:"top"};class CK extends cr{constructor(t){t=qt(t,wK),super(...arguments),this.transcript_idx=0,this.tracks=1,this.gene_track_index={1:[]}}getElementStatusNodeId(t){return`${this.getElementId(t)}-statusnode`}getTrackHeight(){return 2*this.layout.bounding_box_padding+this.layout.label_font_size+this.layout.label_exon_spacing+this.layout.exon_height+this.layout.track_vertical_spacing}assignTracks(t){const n=(r,i)=>{try{const o=this.svg.group.append("text").attr("x",0).attr("y",0).attr("class","lz-data_layer-genes lz-label").style("font-size",i).text(`${r}→`),a=o.node().getBBox().width;return o.remove(),a}catch{return 0}};return this.tracks=1,this.gene_track_index={1:[]},t.filter(r=>!(r.end<this.state.start)&&!(r.start>this.state.end)).map(r=>{if(r.gene_id&&r.gene_id.indexOf(".")){const o=r.gene_id.split(".");r.gene_id=o[0],r.gene_version=o[1]}if(r.transcript_id=r.transcripts[this.transcript_idx].transcript_id,r.display_range={start:this.parent.x_scale(Math.max(r.start,this.state.start)),end:this.parent.x_scale(Math.min(r.end,this.state.end))},r.display_range.label_width=n(r.gene_name,this.layout.label_font_size),r.display_range.width=r.display_range.end-r.display_range.start,r.display_range.text_anchor="middle",r.display_range.width<r.display_range.label_width){if(r.start<this.state.start)r.display_range.end=r.display_range.start+r.display_range.label_width+this.layout.label_font_size,r.display_range.text_anchor="start";else if(r.end>this.state.end)r.display_range.start=r.display_range.end-r.display_range.label_width-this.layout.label_font_size,r.display_range.text_anchor="end";else{const o=(r.display_range.label_width-r.display_range.width)/2+this.layout.label_font_size;r.display_range.start-o<this.parent.x_scale(this.state.start)?(r.display_range.start=this.parent.x_scale(this.state.start),r.display_range.end=r.display_range.start+r.display_range.label_width,r.display_range.text_anchor="start"):r.display_range.end+o>this.parent.x_scale(this.state.end)?(r.display_range.end=this.parent.x_scale(this.state.end),r.display_range.start=r.display_range.end-r.display_range.label_width,r.display_range.text_anchor="end"):(r.display_range.start-=o,r.display_range.end+=o)}r.display_range.width=r.display_range.end-r.display_range.start}r.display_range.start-=this.layout.bounding_box_padding,r.display_range.end+=this.layout.bounding_box_padding,r.display_range.width+=2*this.layout.bounding_box_padding,r.display_domain={start:this.parent.x_scale.invert(r.display_range.start),end:this.parent.x_scale.invert(r.display_range.end)},r.display_domain.width=r.display_domain.end-r.display_domain.start,r.track=null;let i=1;for(;r.track===null;){let o=!1;this.gene_track_index[i].map(a=>{if(!o){const s=Math.min(a.display_range.start,r.display_range.start);Math.max(a.display_range.end,r.display_range.end)-s<a.display_range.width+r.display_range.width&&(o=!0)}}),o?(i++,i>this.tracks&&(this.tracks=i,this.gene_track_index[i]=[])):(r.track=i,this.gene_track_index[i].push(r))}return r.parent=this,r.transcripts.map((o,a)=>{r.transcripts[a].parent=r,r.transcripts[a].exons.map((s,l)=>r.transcripts[a].exons[l].parent=r.transcripts[a])}),r})}render(){const t=this;let n=this._applyFilters();n=this.assignTracks(n);let r;const i=this.svg.group.selectAll("g.lz-data_layer-genes").data(n,o=>o.gene_name);i.enter().append("g").attr("class","lz-data_layer-genes").merge(i).attr("id",o=>this.getElementId(o)).each(function(o){const a=o.parent,s=Ue(this).selectAll("rect.lz-data_layer-genes.lz-data_layer-genes-statusnode").data([o],f=>a.getElementStatusNodeId(f));r=a.getTrackHeight()-a.layout.track_vertical_spacing,s.enter().append("rect").attr("class","lz-data_layer-genes lz-data_layer-genes-statusnode").merge(s).attr("id",f=>a.getElementStatusNodeId(f)).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",f=>f.display_range.width).attr("height",r).attr("x",f=>f.display_range.start).attr("y",f=>(f.track-1)*a.getTrackHeight()),s.exit().remove();const l=Ue(this).selectAll("rect.lz-data_layer-genes.lz-boundary").data([o],f=>`${f.gene_name}_boundary`);r=1,l.enter().append("rect").attr("class","lz-data_layer-genes lz-boundary").merge(l).attr("width",f=>a.parent.x_scale(f.end)-a.parent.x_scale(f.start)).attr("height",r).attr("x",f=>a.parent.x_scale(f.start)).attr("y",f=>(f.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing+Math.max(a.layout.exon_height,3)/2).style("fill",(f,h)=>t.resolveScalableParameter(t.layout.color,f,h)).style("stroke",(f,h)=>t.resolveScalableParameter(t.layout.stroke,f,h)),l.exit().remove();const u=Ue(this).selectAll("text.lz-data_layer-genes.lz-label").data([o],f=>`${f.gene_name}_label`);u.enter().append("text").attr("class","lz-data_layer-genes lz-label").merge(u).attr("text-anchor",f=>f.display_range.text_anchor).text(f=>f.strand==="+"?`${f.gene_name}→`:`←${f.gene_name}`).style("font-size",o.parent.layout.label_font_size).attr("x",f=>{if(f.display_range.text_anchor==="middle")return f.display_range.start+f.display_range.width/2;if(f.display_range.text_anchor==="start")return f.display_range.start+a.layout.bounding_box_padding;if(f.display_range.text_anchor==="end")return f.display_range.end-a.layout.bounding_box_padding}).attr("y",f=>(f.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size),u.exit().remove();const c=Ue(this).selectAll("rect.lz-data_layer-genes.lz-exon").data(o.transcripts[o.parent.transcript_idx].exons,f=>f.exon_id);r=a.layout.exon_height,c.enter().append("rect").attr("class","lz-data_layer-genes lz-exon").merge(c).style("fill",(f,h)=>t.resolveScalableParameter(t.layout.color,f.parent.parent,h)).style("stroke",(f,h)=>t.resolveScalableParameter(t.layout.stroke,f.parent.parent,h)).attr("width",f=>a.parent.x_scale(f.end)-a.parent.x_scale(f.start)).attr("height",r).attr("x",f=>a.parent.x_scale(f.start)).attr("y",()=>(o.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing),c.exit().remove();const d=Ue(this).selectAll("rect.lz-data_layer-genes.lz-clickarea").data([o],f=>`${f.gene_name}_clickarea`);r=a.getTrackHeight()-a.layout.track_vertical_spacing,d.enter().append("rect").attr("class","lz-data_layer-genes lz-clickarea").merge(d).attr("id",f=>`${a.getElementId(f)}_clickarea`).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",f=>f.display_range.width).attr("height",r).attr("x",f=>f.display_range.start).attr("y",f=>(f.track-1)*a.getTrackHeight()),d.exit().remove()}),i.exit().remove(),this.svg.group.on("click.event_emitter",o=>this.parent.emit("element_clicked",o,!0)).call(this.applyBehaviors.bind(this))}_getTooltipPosition(t){const n=this.getElementStatusNodeId(t.data),r=Ue(`#${n}`).node().getBBox();return{x_min:this.parent.x_scale(t.data.start),x_max:this.parent.x_scale(t.data.end),y_min:r.y,y_max:r.y+r.height}}}const SK={style:{fill:"none","stroke-width":"2px"},interpolate:"curveLinear",x_axis:{field:"x"},y_axis:{field:"y",axis:1},hitarea_width:5,tooltip:null};class $K extends cr{constructor(t){if(t=qt(t,SK),t.tooltip)throw new Error("The line / filled curve layer does not support tooltips");super(...arguments)}render(){const t=this.parent,n=this.layout.x_axis.field,r=this.layout.y_axis.field,i=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]);this.path=i.enter().append("path").attr("class","lz-data_layer-line");let o;const a=t.x_scale,s=t[`y${this.layout.y_axis.axis}_scale`];this.layout.style.fill&&this.layout.style.fill!=="none"?o=Fb().x(l=>+a(l[n])).y0(+s(0)).y1(l=>+s(l[r])):o=Cs().x(l=>+a(l[n])).y(l=>+s(l[r])).curve(q6[this.layout.interpolate]),i.merge(this.path).attr("d",o).call(xn,this.layout.style),i.exit().remove()}setElementStatus(t,n,r){return this.setAllElementStatus(t,r)}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");if(typeof this._layer_state.status_flags[t]>"u")return this;typeof n>"u"&&(n=!0),this._global_statuses[t]=n;let r="lz-data_layer-line";return Object.keys(this._global_statuses).forEach(i=>{this._global_statuses[i]&&(r+=` lz-data_layer-line-${i}`)}),this.path.attr("class",r),this.parent.emit("layout_changed",!0),this}}const kK={style:{stroke:"#D3D3D3","stroke-width":"3px","stroke-dasharray":"10px 10px"},orientation:"horizontal",x_axis:{axis:1,decoupled:!0},y_axis:{axis:1,decoupled:!0},tooltip_positioning:"vertical",offset:0};class MK extends cr{constructor(t){t=qt(t,kK),["horizontal","vertical"].includes(t.orientation)||(t.orientation="horizontal"),super(...arguments)}getElementId(t){return this.getBaseId()}render(){const t=this.parent,n="x_scale",r=`y${this.layout.y_axis.axis}_scale`,i="x_extent",o=`y${this.layout.y_axis.axis}_extent`,a="x_range";if(this.layout.orientation==="horizontal")this.data=[{x:t[i][0],y:this.layout.offset},{x:t[i][1],y:this.layout.offset}];else if(this.layout.orientation==="vertical")this.data=[{x:this.layout.offset,y:t[o][0]},{x:this.layout.offset,y:t[o][1]}];else throw new Error('Unrecognized vertical line type. Must be "vertical" or "horizontal"');const s=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]),l=[t.layout.cliparea.height,0],u=Cs().x((c,d)=>{const f=+t[n](c.x);return isNaN(f)?t[a][d]:f}).y((c,d)=>{const f=+t[r](c.y);return isNaN(f)?l[d]:f});this.path=s.enter().append("path").attr("class","lz-data_layer-line").merge(s).attr("d",u).call(xn,this.layout.style).call(this.applyBehaviors.bind(this)),s.exit().remove()}_getTooltipPosition(t){try{const n=lr(this.svg.container.node()),r=n[0],i=n[1];return{x_min:r-1,x_max:r+1,y_min:i-1,y_max:i+1}}catch{return null}}}function TK(e,t,n,r,i,o,a){let s=[];const l=Symbol.for("lzX"),u=Symbol.for("lzY");let c=null,d=null,f=[];function h(){if(f.length){const g=f[Math.floor((f.length-1)/2)];s.push(g)}c=d=null,f=[]}function p(g,b,v){c=g,d=b,f.push(v)}return e.forEach(g=>{const b=g[l],v=g[u],_=b>=t&&b<=n&&v>=i&&v<=o;g.lz_is_match||!_?(h(),s.push(g)):c===null?p(b,v,g):Math.abs(b-c)<=r&&Math.abs(v-d)<=a?f.push(g):(h(),p(b,v,g))}),h(),s}const EK={point_size:40,point_shape:"circle",tooltip_positioning:"horizontal",color:"#888888",coalesce:{active:!1,max_points:800,x_min:"-Infinity",x_max:"Infinity",y_min:0,y_max:3,x_gap:7,y_gap:7},fill_opacity:1,y_axis:{axis:1},id_field:"id"};class n4 extends cr{constructor(t){t=qt(t,EK),t.label&&isNaN(t.label.spacing)&&(t.label.spacing=4),super(...arguments)}_getTooltipPosition(t){const n=this.parent.x_scale(t.data[this.layout.x_axis.field]),r=`y${this.layout.y_axis.axis}_scale`,i=this.parent[r](t.data[this.layout.y_axis.field]),o=this.resolveScalableParameter(this.layout.point_size,t.data),a=Math.sqrt(o/Math.PI);return{x_min:n-a,x_max:n+a,y_min:i-a,y_max:i+a}}flip_labels(){const t=this,n=t.resolveScalableParameter(t.layout.point_size,{}),r=t.layout.label.spacing,i=!!t.layout.label.lines,o=2*r,a=this.parent_plot.layout.width-this.parent.layout.margin.left-this.parent.layout.margin.right-2*r,s=(l,u)=>{const c=+l.attr("x"),d=2*r+2*Math.sqrt(n);let f,h;i&&(f=+u.attr("x2"),h=r+2*Math.sqrt(n)),l.style("text-anchor")==="start"?(l.style("text-anchor","end"),l.attr("x",c-d),i&&u.attr("x2",f-h)):(l.style("text-anchor","start"),l.attr("x",c+d),i&&u.attr("x2",f+h))};t._label_texts.each(function(l,u){const d=Ue(this),f=+d.attr("x"),h=d.node().getBoundingClientRect();if(f+h.width+r>a){const p=i?Ue(t._label_lines.nodes()[u]):null;s(d,p)}}),t._label_texts.each(function(l,u){const d=Ue(this);if(d.style("text-anchor")==="end")return;let f=+d.attr("x");const h=d.node().getBoundingClientRect(),p=i?Ue(t._label_lines.nodes()[u]):null;t._label_texts.each(function(){const v=Ue(this).node().getBoundingClientRect();h.left<v.left+v.width+2*r&&h.left+h.width+2*r>v.left&&h.top<v.top+v.height+2*r&&h.height+h.top+2*r>v.top&&(s(d,p),f=+d.attr("x"),f-h.width-r<o&&s(d,p))})})}separate_labels(){this._label_iterations++;const t=this,n=.5;if(!this.layout.label)return;const r=this.layout.label.spacing;let i=!1;if(t._label_texts.each(function(){const o=this,a=Ue(o),s=a.attr("y");t._label_texts.each(function(){const l=this;if(o===l)return;const u=Ue(l);if(a.attr("text-anchor")!==u.attr("text-anchor"))return;const c=a.node().getBoundingClientRect(),d=u.node().getBoundingClientRect();if(!(c.left<d.left+d.width+2*r&&c.left+c.width+2*r>d.left&&c.top<d.top+d.height+2*r&&c.height+c.top+2*r>d.top))return;i=!0;const h=u.attr("y"),g=(c.top<d.top?1:-1)*n;let b=+s-g,v=+h+g;const _=2*r,y=t.parent.layout.height-t.parent.layout.margin.top-t.parent.layout.margin.bottom-2*r;let x;b-c.height/2<_?(x=+s-b,b=+s,v+=x):v-d.height/2<_&&(x=+h-v,v=+h,b+=x),b+c.height/2>y?(x=b-+s,b=+s,v-=x):v+d.height/2>y&&(x=v-+h,v=+h,b-=x),a.attr("y",b),u.attr("y",v)})}),i){if(t.layout.label.lines){const o=t._label_texts.nodes();t._label_lines.attr("y2",(a,s)=>Ue(o[s]).attr("y"))}this._label_iterations<150&&setTimeout(()=>{this.separate_labels()},1)}}render(){const t=this,n=this.parent.x_scale,r=this.parent[`y${this.layout.y_axis.axis}_scale`],i=Symbol.for("lzX"),o=Symbol.for("lzY");let a=this._applyFilters();if(a.forEach(d=>{let f=n(d[this.layout.x_axis.field]),h=r(d[this.layout.y_axis.field]);isNaN(f)&&(f=-1e3),isNaN(h)&&(h=-1e3),d[i]=f,d[o]=h}),this.layout.coalesce.active&&a.length>this.layout.coalesce.max_points){let{x_min:d,x_max:f,y_min:h,y_max:p,x_gap:g,y_gap:b}=this.layout.coalesce;const v=isFinite(d)?n(+d):-1/0,_=isFinite(f)?n(+f):1/0,y=isFinite(p)?r(+p):-1/0,x=isFinite(h)?r(+h):1/0;a=TK(a,v,_,g,y,x,b)}if(this.layout.label){let d;const f=t.layout.label.filters||[];if(!f.length)d=a;else{const g=this.filter.bind(this,f);d=a.filter(g)}this._label_groups=this.svg.group.selectAll(`g.lz-data_layer-${this.layout.type}-label`).data(d,g=>`${g[this.layout.id_field]}_label`);const h=`lz-data_layer-${this.layout.type}-label`,p=this._label_groups.enter().append("g").attr("class",h);this._label_texts&&this._label_texts.remove(),this._label_texts=this._label_groups.merge(p).append("text").text(g=>Tl(t.layout.label.text||"",g,this.getElementAnnotation(g))).attr("x",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing).attr("y",g=>g[o]).attr("text-anchor","start").call(xn,t.layout.label.style||{}),t.layout.label.lines&&(this._label_lines&&this._label_lines.remove(),this._label_lines=this._label_groups.merge(p).append("line").attr("x1",g=>g[i]).attr("y1",g=>g[o]).attr("x2",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing/2).attr("y2",g=>g[o]).call(xn,t.layout.label.lines.style||{})),this._label_groups.exit().remove()}else this._label_texts&&this._label_texts.remove(),this._label_lines&&this._label_lines.remove(),this._label_groups&&this._label_groups.remove();const s=this.svg.group.selectAll(`path.lz-data_layer-${this.layout.type}`).data(a,d=>d[this.layout.id_field]),l=d=>`translate(${d[i]}, ${d[o]})`,u=Lb().size((d,f)=>this.resolveScalableParameter(this.layout.point_size,d,f)).type((d,f)=>K6(this.resolveScalableParameter(this.layout.point_shape,d,f))),c=`lz-data_layer-${this.layout.type}`;s.enter().append("path").attr("class",c).attr("id",d=>this.getElementId(d)).merge(s).attr("transform",l).attr("fill",(d,f)=>this.resolveScalableParameter(this.layout.color,d,f)).attr("fill-opacity",(d,f)=>this.resolveScalableParameter(this.layout.fill_opacity,d,f)).attr("d",u),s.exit().remove(),this.layout.label&&(this.flip_labels(),this._label_iterations=0,this.separate_labels()),this.svg.group.on("click.event_emitter",()=>{const d=Ue(Ce.target).datum();this.parent.emit("element_clicked",d,!0)}).call(this.applyBehaviors.bind(this))}makeLDReference(t){let n=null;if(typeof t>"u")throw new Error("makeLDReference requires one argument of any type");return typeof t=="object"?this.layout.id_field&&typeof t[this.layout.id_field]<"u"?n=t[this.layout.id_field].toString():typeof t.id<"u"?n=t.id.toString():n=t.toString():n=t.toString(),this.parent.emit("set_ldrefvar",{ldrefvar:n},!0),this.parent_plot.applyState({ldrefvar:n})}}class AK extends n4{constructor(t){super(...arguments),this._categories={}}_prepareData(){const t=this.layout.x_axis.field||"x",n=this.layout.x_axis.category_field;if(!n)throw new Error(`Layout for ${this.layout.id} must specify category_field`);const r=this.data.sort((i,o)=>{const a=i[n],s=o[n],l=typeof a=="string"?a.toLowerCase():a,u=typeof s=="string"?s.toLowerCase():s;return l===u?0:l<u?-1:1});return r.forEach((i,o)=>{i[t]=i[t]||o}),r}_generateCategoryBounds(){const t=this.layout.x_axis.category_field,n=this.layout.x_axis.field||"x",r={};this.data.forEach(o=>{const a=o[t],s=o[n],l=r[a]||[s,s];r[a]=[Math.min(l[0],s),Math.max(l[1],s)]});const i=Object.keys(r);return this._setDynamicColorScheme(i),r}_getColorScale(t){t=t||this.layout;let n=t.color||[];if(Array.isArray(n)&&(n=n.find(r=>r.scale_function==="categorical_bin")),!n||n.scale_function!=="categorical_bin")throw new Error("This layer requires that color options be provided as a `categorical_bin`");return n}_setDynamicColorScheme(t){const n=this._getColorScale(this.layout).parameters,r=this._getColorScale(this._base_layout).parameters;if(r.categories.length&&r.values.length){const o={};r.categories.forEach(a=>{o[a]=1}),t.every(a=>Object.prototype.hasOwnProperty.call(o,a))?n.categories=r.categories:n.categories=t}else n.categories=t;let i;for(r.values.length?i=r.values:i=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];i.length<t.length;)i=i.concat(i);i=i.slice(0,t.length),n.values=i}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error("Invalid dimension identifier");const r=n.position||"left";if(!["left","center","right"].includes(r))throw new Error("Invalid tick position");const i=this._categories;if(!i||!Object.keys(i).length)return[];if(t==="y")return[];if(t==="x"){const o=this._getColorScale(this.layout),a=o.parameters.categories||[],s=o.parameters.values||[];return Object.keys(i).map((l,u)=>{const c=i[l];let d;switch(r){case"left":d=c[0];break;case"center":const f=c[1]-c[0];d=c[0]+(f!==0?f:c[0])/2;break;case"right":d=c[1];break}return{x:d,text:l,style:{fill:s[a.indexOf(l)]||"#000000"}}})}}applyCustomDataMethods(){return this.data=this._prepareData(),this._categories=this._generateCategoryBounds(),this}}const PK=Object.freeze(Object.defineProperty({__proto__:null,BaseDataLayer:cr,annotation_track:bK,arcs:xK,category_scatter:AK,genes:CK,highlight_regions:yK,line:$K,orthogonal_line:MK,scatter:n4},Symbol.toStringTag,{value:"Module"})),Xb=new Sv;for(let[e,t]of Object.entries(PK))Xb.add(e,t);const Kb=7.301,Zb={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2004
2004
|
P Value: <strong>{{assoc:log_pvalue|logtoscinotation|htmlescape}}</strong><br>
|
|
2005
2005
|
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>
|
|
2006
2006
|
{{#if lz_is_ld_refvar}}<strong>LD Reference Variant</strong>{{#else}}
|
|
@@ -2011,10 +2011,10 @@ ${t}
|
|
|
2011
2011
|
onclick="var item = this.parentNode.__data__, layer = item.getDataLayer();
|
|
2012
2012
|
var current = layer.getElementAnnotation(item, 'lz_show_label');
|
|
2013
2013
|
layer.setElementAnnotation(item, 'lz_show_label', !current );
|
|
2014
|
-
layer.parent_plot.applyState();">{{#if lz_show_label}}Hide{{#else}}Show{{/if}} label</a>`,e}(),
|
|
2014
|
+
layer.parent_plot.applyState();">{{#if lz_show_label}}Hide{{#else}}Show{{/if}} label</a>`,e}(),r4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:'<h4><strong><i>{{gene_name|htmlescape}}</i></strong></h4>Gene ID: <a href="https://useast.ensembl.org/homo_sapiens/Gene/Summary?g={{gene_id|htmlescape}}&db=core" target="_blank" rel="noopener">{{gene_id|htmlescape}}</a><br>Transcript ID: <strong>{{transcript_id|htmlescape}}</strong><br>{{#if pLI}}<table><tr><th>Constraint</th><th>Expected variants</th><th>Observed variants</th><th>Const. Metric</th></tr><tr><td>Synonymous</td><td>{{exp_syn}}</td><td>{{obs_syn}}</td><td>z = {{syn_z}}<br>o/e = {{oe_syn}} ({{oe_syn_lower}} - {{oe_syn_upper}})</td></tr><tr><td>Missense</td><td>{{exp_mis}}</td><td>{{obs_mis}}</td><td>z = {{mis_z}}<br>o/e = {{oe_mis}} ({{oe_mis_lower}} - {{oe_mis_upper}})</td></tr><tr><td>pLoF</td><td>{{exp_lof}}</td><td>{{obs_lof}}</td><td>pLI = {{pLI}}<br>o/e = {{oe_lof}} ({{oe_lof_lower}} - {{oe_lof_upper}})</td></tr></table><br>{{/if}}<a href="https://gnomad.broadinstitute.org/gene/{{gene_id|htmlescape}}" target="_blank" rel="noopener">More data on gnomAD</a>'},i4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:'<strong>{{catalog:variant|htmlescape}}</strong><br>Catalog entries: <strong>{{n_catalog_matches|htmlescape}}</strong><br>Top Trait: <strong>{{catalog:trait|htmlescape}}</strong><br>Top P Value: <strong>{{catalog:log_pvalue|logtoscinotation}}</strong><br>More: <a href="https://www.ebi.ac.uk/gwas/search?query={{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">GWAS catalog</a> / <a href="https://www.ncbi.nlm.nih.gov/snp/{{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">dbSNP</a>'},o4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:"<strong>Regulatory element</strong><br>{{access:start1|htmlescape}}-{{access:end1|htmlescape}}<br><strong>Promoter</strong><br>{{access:start2|htmlescape}}-{{access:end2|htmlescape}}<br>{{#if access:target}}<strong>Target</strong>: {{access:target|htmlescape}}<br>{{/if}}<strong>Score</strong>: {{access:score|htmlescape}}"},dh={id:"significance",type:"orthogonal_line",tag:"significance",orientation:"horizontal",offset:Kb},Jb={id:"recombrate",namespace:{recomb:"recomb"},data_operations:[{type:"fetch",from:["recomb"]}],type:"line",tag:"recombination",z_index:1,style:{stroke:"#0000FF","stroke-width":"1.5px"},x_axis:{field:"recomb:position"},y_axis:{axis:2,field:"recomb:recomb_rate",floor:0,ceiling:100}},Qb={namespace:{assoc:"assoc",ld:"ld"},data_operations:[{type:"fetch",from:["assoc","ld(assoc)"]},{type:"left_match",name:"assoc_plus_ld",requires:["assoc","ld"],params:["assoc:position","ld:position2"]}],id:"associationpvalues",type:"scatter",tag:"association",id_field:"assoc:variant",coalesce:{active:!0},point_shape:[{scale_function:"if",field:"lz_is_ld_refvar",parameters:{field_value:!0,then:"diamond"}},{scale_function:"effect_direction",parameters:{"+":"triangle","-":"triangledown",beta_field:"assoc:beta",stderr_beta_field:"assoc:se"}},"circle"],point_size:{scale_function:"if",field:"lz_is_ld_refvar",parameters:{field_value:!0,then:80,else:40}},color:[{scale_function:"if",field:"lz_is_ld_refvar",parameters:{field_value:!0,then:"#9632b8"}},{scale_function:"numerical_bin",field:"ld:correlation",parameters:{breaks:[0,.2,.4,.6,.8],values:["rgb(70, 54, 153)","rgb(38, 188, 225)","rgb(110, 254, 104)","rgb(248, 195, 42)","rgb(219, 61, 17)"]}},"#AAAAAA"],legend:[{label:"LD (r²)",label_size:14},{shape:"ribbon",orientation:"vertical",width:10,height:15,color_stops:["rgb(70, 54, 153)","rgb(38, 188, 225)","rgb(110, 254, 104)","rgb(248, 195, 42)","rgb(219, 61, 17)"],tick_labels:[0,.2,.4,.6,.8,1]}],label:null,z_index:2,x_axis:{field:"assoc:position"},y_axis:{axis:1,field:"assoc:log_pvalue",floor:0,upper_buffer:.1,min_extent:[0,10]},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(Zb)},a4={id:"coaccessibility",type:"arcs",tag:"coaccessibility",namespace:{access:"access"},data_operations:[{type:"fetch",from:["access"]}],match:{send:"access:target",receive:"access:target"},id_field:"{{access:start1}}_{{access:end1}}_{{access:start2}}_{{access:end2}}_{{access:score}}_{{access:target}}",filters:[{field:"access:score",operator:"!=",value:null}],color:[{field:"lz_is_match",scale_function:"if",parameters:{field_value:!0,then:"#4285f4"}},{field:"lz_is_match",scale_function:"if",parameters:{field_value:!1,then:"#EAE6E6"}},{scale_function:"ordinal_cycle",parameters:{values:["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"]}}],x_axis:{field1:"access:start1",field2:"access:start2"},y_axis:{axis:1,field:"access:score",upper_buffer:.1,min_extent:[0,1]},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(o4)},s4=function(){let e=at(Qb);return e=qt({id:"associationpvaluescatalog",fill_opacity:.7},e),e.data_operations.push({type:"assoc_to_gwas_catalog",name:"assoc_catalog",requires:["assoc_plus_ld","catalog"],params:["assoc:position","catalog:pos","catalog:log_pvalue"]}),e.tooltip.html+='{{#if catalog:rsid}}<br><a href="https://www.ebi.ac.uk/gwas/search?query={{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">See hits in GWAS catalog</a>{{/if}}',e.namespace.catalog="catalog",e}(),l4={id:"phewaspvalues",type:"category_scatter",tag:"phewas",namespace:{phewas:"phewas"},data_operations:[{type:"fetch",from:["phewas"]}],point_shape:[{scale_function:"effect_direction",parameters:{"+":"triangle","-":"triangledown",beta_field:"phewas:beta",stderr_beta_field:"phewas:se"}},"circle"],point_size:70,tooltip_positioning:"vertical",id_field:"{{phewas:trait_group}}_{{phewas:trait_label}}",x_axis:{field:"lz_auto_x",category_field:"phewas:trait_group",lower_buffer:.025,upper_buffer:.025},y_axis:{axis:1,field:"phewas:log_pvalue",floor:0,upper_buffer:.15},color:[{field:"phewas:trait_group",scale_function:"categorical_bin",parameters:{categories:[],values:[],null_value:"#B8B8B8"}}],fill_opacity:.7,tooltip:{closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>Trait:</strong> {{phewas:trait_label|htmlescape}}<br>
|
|
2015
2015
|
<strong>Trait Category:</strong> {{phewas:trait_group|htmlescape}}<br>
|
|
2016
2016
|
<strong>P-value:</strong> {{phewas:log_pvalue|logtoscinotation|htmlescape}}
|
|
2017
2017
|
{{#if phewas:beta|is_numeric}}<br><strong>β:</strong> {{phewas:beta|scinotation|htmlescape}}<br>{{/if}}
|
|
2018
|
-
{{#if phewas:se|is_numeric}}<strong>SE (β):</strong> {{phewas:se|scinotation|htmlescape}}{{/if}}`},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},label:{text:"{{phewas:trait_label}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"phewas:log_pvalue",operator:">=",value:20}],style:{"font-size":"14px","font-weight":"bold",fill:"#333333"}}},l4={namespace:{gene:"gene",constraint:"constraint"},data_operations:[{type:"fetch",from:["gene","constraint(gene)"]},{name:"gene_constraint",type:"genes_to_gnomad_constraint",requires:["gene","constraint"]}],id:"genes",type:"genes",tag:"genes",id_field:"gene_id",behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(n4)},u4=qt({filters:[{field:"gene_type",operator:"in",value:["protein_coding","IG_C_gene","IG_D_gene","IG_J_gene","IG_V_gene","TR_C_gene","TR_D_gene","TR_J_gene","TR_V_gene","rRNA","Mt_rRNA","Mt_tRNA"]}]},at(l4)),c4={namespace:{assoc:"assoc",catalog:"catalog"},data_operations:[{type:"fetch",from:["assoc","catalog"]},{type:"assoc_to_gwas_catalog",name:"assoc_plus_ld",requires:["assoc","catalog"],params:["assoc:position","catalog:pos","catalog:log_pvalue"]}],id:"annotation_catalog",type:"annotation_track",tag:"gwascatalog",id_field:"assoc:variant",x_axis:{field:"assoc:position"},color:"#0000CC",filters:[{field:"catalog:rsid",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Kb}],behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(r4),tooltip_positioning:"top"},f4={type:"set_state",tag:"ld_population",position:"right",color:"blue",button_html:"LD Population: ",show_selected:!0,button_title:"Select LD Population: ",custom_event_name:"widget_set_ldpop",state_field:"ld_pop",options:[{display_name:"ALL (default)",value:"ALL"},{display_name:"AFR",value:"AFR"},{display_name:"AMR",value:"AMR"},{display_name:"EAS",value:"EAS"},{display_name:"EUR",value:"EUR"},{display_name:"SAS",value:"SAS"}]},d4={type:"display_options",tag:"gene_filter",custom_event_name:"widget_gene_filter_choice",position:"right",color:"blue",button_html:"Filter...",button_title:"Choose which genes to show",layer_name:"genes",default_config_display_name:"Coding genes & rRNA",options:[{display_name:"All features",display:{filters:null}}]},Ru={widgets:[{type:"remove_panel",position:"right",color:"red",group_position:"end"},{type:"move_panel_up",position:"right",group_position:"middle"},{type:"move_panel_down",position:"right",group_position:"start",style:{"margin-left":"0.75em"}}]},zu={widgets:[{type:"title",title:"LocusZoom",subtitle:`<a href="https://statgen.github.io/locuszoom/" target="_blank" rel="noopener">v${F5}</a>`,position:"left"},{type:"download",position:"right",group_position:"end"},{type:"download_png",position:"right",group_position:"start"}]},em=function(){const e=at(zu);return e.widgets.push(at(f4)),e}(),zK=function(){const e=at(zu);return e.widgets.push({type:"shift_region",step:5e5,button_html:">>",position:"right",group_position:"end"},{type:"shift_region",step:5e4,button_html:">",position:"right",group_position:"middle"},{type:"zoom_region",step:.2,position:"right",group_position:"middle"},{type:"zoom_region",step:-.2,position:"right",group_position:"middle"},{type:"shift_region",step:-5e4,button_html:"<",position:"right",group_position:"middle"},{type:"shift_region",step:-5e5,button_html:"<<",position:"right",group_position:"start"}),e}(),tm={id:"association",tag:"association",min_height:200,height:300,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:function(){const e=at(Ru);return e.widgets.push({type:"toggle_legend",position:"right"}),e}(),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"-log10 p-value",label_offset:50},y2:{label:"Recombination Rate (cM/Mb)",label_offset:46}},legend:{orientation:"vertical",origin:{x:75,y:40},hidden:!0},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,drag_y2_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(dh),at(Jb),at(Qb)]},h4={id:"coaccessibility",tag:"coaccessibility",min_height:150,height:180,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"Score",label_offset:40,render:!1}},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(o4)]},p4=function(){let e=at(tm);return e=qt({id:"associationcatalog"},e),e.toolbar.widgets.push({type:"display_options",position:"right",color:"blue",button_html:"Display options...",button_title:"Control how plot items are displayed",layer_name:"associationpvaluescatalog",default_config_display_name:"No catalog labels (default)",options:[{display_name:"Label catalog traits",display:{label:{text:"{{catalog:trait}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"catalog:trait",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Kb},{field:"ld:correlation",operator:">",value:.4}],style:{"font-size":"12px","font-weight":"bold",fill:"#333333"}}}}]}),e.data_layers=[at(dh),at(Jb),at(a4)],e}(),Iu={id:"genes",tag:"genes",min_height:150,height:225,margin:{top:20,right:55,bottom:20,left:70},axes:{},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},toolbar:function(){const e=at(Ru);return e.widgets.push({type:"resize_to_data",position:"right",button_html:"Resize"},at(d4)),e}(),data_layers:[at(u4)]},g4={id:"phewas",tag:"phewas",min_height:300,height:300,margin:{top:20,right:55,bottom:120,left:70},inner_border:"rgb(210, 210, 210)",axes:{x:{ticks:{style:{"font-weight":"bold","font-size":"11px","text-anchor":"start"},transform:"rotate(50)",position:"left"}},y1:{label:"-log10 p-value",label_offset:50}},data_layers:[at(dh),at(s4)]},v4={id:"annotationcatalog",tag:"gwascatalog",min_height:50,height:50,margin:{top:25,right:55,bottom:10,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{extent:"state",render:!1}},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(c4)]},IK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:em,panels:[at(tm),at(Iu)]},FK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:em,panels:[v4,p4,Iu]},BK={width:800,responsive_resize:!0,toolbar:zu,panels:[at(g4),qt({height:300,margin:{bottom:40},axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"}}},at(Iu))],mouse_guide:!1},OK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:at(zu),panels:[at(h4),function(){const e=Object.assign({height:270},at(Iu)),t=e.data_layers[0];t.match={send:"gene_name",receive:"gene_name"};const n=[{field:"lz_is_match",scale_function:"if",parameters:{field_value:!0,then:"#4285f4"}},{field:"lz_is_match",scale_function:"if",parameters:{field_value:!1,then:"#EAE6E6"}},"#363696"];return t.color=n,t.stroke=n,e}()]},NK={standard_association:Zb,standard_association_with_label:RK,standard_genes:n4,catalog_variant:r4,coaccessibility:i4},LK={ldlz2_pop_selector:f4,gene_selector_menu:d4},DK={standard_panel:Ru,standard_plot:zu,standard_association:em,region_nav_plot:zK},HK={significance:dh,recomb_rate:Jb,association_pvalues:Qb,coaccessibility:o4,association_pvalues_catalog:a4,phewas_pvalues:s4,genes:l4,genes_filtered:u4,annotation_catalog:c4},UK={association:tm,coaccessibility:h4,association_catalog:p4,genes:Iu,phewas:g4,annotation_catalog:v4},jK={standard_association:IK,association_catalog:FK,standard_phewas:BK,coaccessibility:OK},WK=Object.freeze(Object.defineProperty({__proto__:null,data_layer:HK,panel:UK,plot:jK,toolbar:DK,toolbar_widgets:LK,tooltip:NK},Symbol.toStringTag,{value:"Module"}));class VK extends Zi{get(t,n,r={}){if(!(t&&n))throw new Error("Must specify both the type and name for the layout desired. See .list() for available options");let i=super.get(t).get(n);const o=r.namespace;i.namespace||delete r.namespace;let a=qt(r,i);return o&&(a=G6(a,o)),at(a)}add(t,n,r,i=!1){if(!(t&&n&&r))throw new Error("To add a layout, type, name, and item must all be specified");if(typeof r!="object")throw new Error("The configuration to be added must be an object");this.has(t)||super.add(t,new Zi);const o=at(r);return t==="data_layer"&&o.namespace&&(o._auto_fields=[...qb(o,Object.keys(o.namespace))].sort()),super.get(t).add(n,o,i)}list(t){if(!t){let n={};for(let[r,i]of this._items)n[r]=i.list();return n}return super.get(t).list()}merge(t,n){return qt(t,n)}renameField(){return Mg(...arguments)}mutate_attrs(){return zX(...arguments)}query_attrs(){return IX(...arguments)}}const b4=new VK;for(let[e,t]of Object.entries(WK))for(let[n,r]of Object.entries(t))b4.add(e,n,r);const _a=new Zi;function Fu(e){return(t,n,...r)=>{if(n.length!==2)throw new Error("Join functions must receive exactly two recordsets");return e(...n,...r)}}function qK(e,t,n,r,i){if(!e.length)return e;const o=T0(t,r),a=[];for(let s of o.values()){let l=0,u;for(let c of s){const d=c[i];d>=l&&(u=c,l=d)}u.n_catalog_matches=s.length,a.push(u)}return B5(e,a,n,r)}function YK(e,t){return e.forEach(function(n){const r=`_${n.gene_name.replace(/[^A-Za-z0-9_]/g,"_")}`,i=t[r]&&t[r].gnomad_constraint;i&&Object.keys(i).forEach(function(o){let a=i[o];typeof n[o]>"u"&&(typeof a=="number"&&a.toString().includes(".")&&(a=parseFloat(a.toFixed(2))),n[o]=a)})}),e}_a.add("left_match",Fu(B5));_a.add("inner_match",Fu(pB));_a.add("full_outer_match",Fu(gB));_a.add("assoc_to_gwas_catalog",Fu(qK));_a.add("genes_to_gnomad_constraint",Fu(YK));class GK extends Zi{constructor(t){super(),this._registry=t||ns}add(t,n,r=!1){if(this._registry.has(t))throw new Error(`The namespace ${t} is already in use by another source`);if(t.match(/[^A-Za-z0-9_]/))throw new Error(`Data source namespace names can only contain alphanumeric characters or underscores. Invalid name: ${t}`);if(Array.isArray(n)){const[i,o]=n;n=this._registry.create(i,o)}return n.source_id=t,super.add(t,n,r),this}}const Ii={version:F5,populate:aK,DataSources:GK,Adapters:ns,DataLayers:Xb,DataFunctions:_a,Layouts:b4,MatchFunctions:pr,ScaleFunctions:fh,TransformationFunctions:Vb,Widgets:Yb,get KnownDataSources(){return console.warn('Deprecation warning: KnownDataSources has been renamed to "Adapters"'),ns}},kx=[];Ii.use=function(e,...t){if(!kx.includes(e)){if(t.unshift(Ii),typeof e.install=="function")e.install.apply(e,t);else if(typeof e=="function")e.apply(null,t);else throw new Error("Plugin must export a function that receives the LocusZoom object as an argument");kx.push(e)}};var XK="";function m4(e){return ZK(KK(JK(e)))}function KK(e){return eZ(tZ(QK(e),e.length*8))}function ZK(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=e.length,i=0;i<r;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<r?e.charCodeAt(i+1)<<8:0)|(i+2<r?e.charCodeAt(i+2):0),a=0;a<4;a++)i*8+a*6>e.length*8?n+=XK:n+=t.charAt(o>>>6*(3-a)&63);return n}function JK(e){for(var t="",n=-1,r,i;++n<e.length;)r=e.charCodeAt(n),i=n+1<e.length?e.charCodeAt(n+1):0,55296<=r&&r<=56319&&56320<=i&&i<=57343&&(r=65536+((r&1023)<<10)+(i&1023),n++),r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(192|r>>>6&31,128|r&63):r<=65535?t+=String.fromCharCode(224|r>>>12&15,128|r>>>6&63,128|r&63):r<=2097151&&(t+=String.fromCharCode(240|r>>>18&7,128|r>>>12&63,128|r>>>6&63,128|r&63));return t}function QK(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(var n=0;n<e.length*8;n+=8)t[n>>5]|=(e.charCodeAt(n/8)&255)<<24-n%32;return t}function eZ(e){for(var t="",n=0;n<e.length*32;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}function tZ(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,s=-1009589776,l=0;l<e.length;l+=16){for(var u=r,c=i,d=o,f=a,h=s,p=0;p<80;p++){p<16?n[p]=e[l+p]:n[p]=qp(n[p-3]^n[p-8]^n[p-14]^n[p-16],1);var g=ri(ri(qp(r,5),nZ(p,i,o,a)),ri(ri(s,n[p]),rZ(p)));s=a,a=o,o=qp(i,30),i=r,r=g}r=ri(r,u),i=ri(i,c),o=ri(o,d),a=ri(a,f),s=ri(s,h)}return Array(r,i,o,a,s)}function nZ(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function rZ(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function ri(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function qp(e,t){return e<<t|e>>>32-t}function iZ(e){var t={};for(var n in e)t[n]=e[n];return t}"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")});function bi(e,t,n,r){r||(typeof t=="object"?(r=t,t=void 0):r={}),this.url=e,this.start=t||0,n&&(this.end=n),this.opts=r}bi.prototype.slice=function(e,t){if(e<0)throw"Bad slice "+e;var n=this.start,r=this.end;return n&&e?n=n+e:n=e||n,t&&n?r=n+t-1:r=r||t-1,new bi(this.url,n,r,this.opts)};var y4=0,_4=typeof navigator<"u"&&navigator.userAgent.indexOf("Safari")>=0&&navigator.userAgent.indexOf("Chrome")<0;bi.prototype.fetchAsText=function(e){var t=this;this.getURL().then(function(n){try{var r=new XMLHttpRequest,i;if((_4||t.opts.salt)&&n.indexOf("?")<0&&(n=n+"?salt="+m4(""+Date.now()+","+ ++y4)),r.open("GET",n,!0),t.end){if(t.end-t.start>1e8)throw"Monster fetch!";r.setRequestHeader("Range","bytes="+t.start+"-"+t.end),i=t.end-t.start+1}r.onreadystatechange=function(){if(r.readyState==4)return r.status==200||r.status==206?e(r.responseText):e(null)},t.opts.credentials&&(r.withCredentials=!0),r.send()}catch{return e(null)}}).catch(function(n){return console.log(n),e(null,n)})};bi.prototype.salted=function(){var e=iZ(this.opts);return e.salt=!0,new bi(this.url,this.start,this.end,e)};bi.prototype.getURL=function(){return this.opts.resolver?this.opts.resolver(this.url).then(function(e){return typeof e=="string"?e:e.url}):Promise.resolve(this.url)};bi.prototype.fetch=function(e,t){var n=this;t=t||{};var r=t.attempt||1,i=t.truncatedLength;if(r>3)return e(null);this.getURL().then(function(o){try{var a;t.timeout&&!n.opts.credentials&&(a=setTimeout(function(){return console.log("timing out "+o),s.abort(),e(null,"Timeout")},t.timeout));var s=new XMLHttpRequest,l;if((_4||n.opts.salt)&&o.indexOf("?")<0&&(o=o+"?salt="+m4(""+Date.now()+","+ ++y4)),s.open("GET",o,!0),s.overrideMimeType("text/plain; charset=x-user-defined"),n.end){if(n.end-n.start>1e8)throw"Monster fetch!";s.setRequestHeader("Range","bytes="+n.start+"-"+n.end),l=n.end-n.start+1}s.responseType="arraybuffer",s.onreadystatechange=function(){if(s.readyState==4)if(a&&clearTimeout(a),s.status==200||s.status==206)if(s.response){var u=s.response.byteLength;return l&&l!=u&&(!i||u!=i)?n.fetch(e,{attempt:r+1,truncatedLength:u}):e(s.response)}else{if(s.mozResponseArrayBuffer)return e(s.mozResponseArrayBuffer);var c=s.responseText;return l&&l!=c.length&&(!i||c.length!=i)?n.fetch(e,{attempt:r+1,truncatedLength:c.length}):e(oZ(s.responseText))}else return n.fetch(e,{attempt:r+1})},n.opts.credentials&&(s.withCredentials=!0),s.send()}catch{return e(null)}}).catch(function(o){return console.log(o),e(null,o)})};function oZ(e){if(!e)return null;for(var t=new Uint8Array(e.length),n=0;n<t.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function an(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}var Yp={exports:{}},Mx;function aZ(){return Mx||(Mx=1,function(e){var t=15,n=t,r=1440,i=15,o=32,a=0,s=4,l=8,u=0,c=1,d=2,f=-2,h=-3,p=-4,g=-5,b=0,v=1,x=2,y=3,_=4,S=5,$=6,w=7,T=8,M=9,P=10,R=11,C=12,E=13,I=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],z=0,j=1,Z=2,J=3,ie=4,he=5,_e=6,oe=7,ve=8,we=9,Oe=9,xe=5,Xe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ve=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],fe=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ee=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Pe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function H(){}H.prototype.inflateInit=function(m,F){return m||(m=n),F&&(F=!1),this.istate=new G,this.istate.inflateInit(this,F?-m:m)},H.prototype.inflate=function(m){return this.istate==null?f:this.istate.inflate(this,m)},H.prototype.inflateEnd=function(){if(this.istate==null)return f;var m=istate.inflateEnd(this);return this.istate=null,m},H.prototype.inflateSync=function(){return istate.inflateSync(this)},H.prototype.inflateSetDictionary=function(m,F){return istate.inflateSetDictionary(this,m,F)};function G(){this.was=[0]}G.prototype.inflateReset=function(m){return m==null||m.istate==null?f:(m.total_in=m.total_out=0,m.msg=null,m.istate.mode=m.istate.nowrap!=0?w:b,m.istate.blocks.reset(m,null),u)},G.prototype.inflateEnd=function(m){return this.blocks!=null&&this.blocks.free(m),this.blocks=null,u},G.prototype.inflateInit=function(m,F){return m.msg=null,this.blocks=null,nowrap=0,F<0&&(F=-F,nowrap=1),F<8||F>15?(this.inflateEnd(m),f):(this.wbits=F,m.istate.blocks=new q(m,m.istate.nowrap!=0?null:this,1<<F),this.inflateReset(m),u)},G.prototype.inflate=function(m,F){var D,te;if(m==null||m.istate==null||m.next_in==null)return f;for(F=F==s?g:u,D=g;;)switch(m.istate.mode){case b:if(m.avail_in==0)return D;if(D=F,m.avail_in--,m.total_in++,((m.istate.method=m.next_in[m.next_in_index++])&15)!=l){m.istate.mode=E,m.msg="unknown compression method",m.istate.marker=5;break}if((m.istate.method>>4)+8>m.istate.wbits){m.istate.mode=E,m.msg="invalid window size",m.istate.marker=5;break}m.istate.mode=v;case v:if(m.avail_in==0)return D;if(D=F,m.avail_in--,m.total_in++,te=m.next_in[m.next_in_index++]&255,((m.istate.method<<8)+te)%31!=0){m.istate.mode=E,m.msg="incorrect header check",m.istate.marker=5;break}if((te&o)==0){m.istate.mode=w;break}m.istate.mode=x;case x:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=y;case y:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=_;case _:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=S;case S:return m.avail_in==0?D:(D=F,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.adler=m.istate.need,m.istate.mode=$,d);case $:return m.istate.mode=E,m.msg="need dictionary",m.istate.marker=0,f;case w:if(D=m.istate.blocks.proc(m,D),D==h){m.istate.mode=E,m.istate.marker=0;break}if(D==u&&(D=F),D!=c)return D;if(D=F,m.istate.blocks.reset(m,m.istate.was),m.istate.nowrap!=0){m.istate.mode=C;break}m.istate.mode=T;case T:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=M;case M:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=P;case P:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=R;case R:if(m.avail_in==0)return D;if(D=F,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.istate.was[0]!=m.istate.need){m.istate.mode=E,m.msg="incorrect data check",m.istate.marker=5;break}m.istate.mode=C;case C:return c;case E:return h;default:return f}},G.prototype.inflateSetDictionary=function(m,F,D){var te=0,K=D;return m==null||m.istate==null||m.istate.mode!=$?f:m._adler.adler32(1,F,0,D)!=m.adler?h:(m.adler=m._adler.adler32(0,null,0,0),K>=1<<m.istate.wbits&&(K=(1<<m.istate.wbits)-1,te=D-K),m.istate.blocks.set_dictionary(F,te,K),m.istate.mode=w,u)};var de=[0,0,255,255];G.prototype.inflateSync=function(m){var F,D,te,K,se;if(m==null||m.istate==null)return f;if(m.istate.mode!=E&&(m.istate.mode=E,m.istate.marker=0),(F=m.avail_in)==0)return g;for(D=m.next_in_index,te=m.istate.marker;F!=0&&te<4;)m.next_in[D]==de[te]?te++:m.next_in[D]!=0?te=0:te=4-te,D++,F--;return m.total_in+=D-m.next_in_index,m.next_in_index=D,m.avail_in=F,m.istate.marker=te,te!=4?h:(K=m.total_in,se=m.total_out,this.inflateReset(m),m.total_in=K,m.total_out=se,m.istate.mode=w,u)},G.prototype.inflateSyncPoint=function(m){return m==null||m.istate==null||m.istate.blocks==null?f:m.istate.blocks.sync_point()};var le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function q(m,F,D){this.hufts=new Int32Array(r*3),this.window=new Uint8Array(D),this.end=D,this.checkfn=F,this.mode=z,this.reset(m,null),this.left=0,this.table=0,this.index=0,this.blens=null,this.bb=new Int32Array(1),this.tb=new Int32Array(1),this.codes=new Re,this.last=0,this.bitk=0,this.bitb=0,this.read=0,this.write=0,this.check=0,this.inftree=new rt}q.prototype.reset=function(m,F){F&&(F[0]=this.check),this.mode==_e&&this.codes.free(m),this.mode=z,this.bitk=0,this.bitb=0,this.read=this.write=0,this.checkfn&&(m.adler=this.check=m._adler.adler32(0,null,0,0))},q.prototype.proc=function(m,F){var D,te,K,se,ue,ae,ke;for(se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae;;)switch(this.mode){case z:for(;K<3;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}switch(D=te&7,this.last=D&1,D>>>1){case 0:te>>>=3,K-=3,D=K&7,te>>>=D,K-=D,this.mode=j;break;case 1:{var Me=new Int32Array(1),$e=new Int32Array(1),ze=[],Je=[];lt(Me,$e,ze,Je),this.codes.init(Me[0],$e[0],ze[0],0,Je[0],0,m)}te>>>=3,K-=3,this.mode=_e;break;case 2:te>>>=3,K-=3,this.mode=J;break;case 3:return te>>>=3,K-=3,this.mode=E,m.msg="invalid block type",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F)}break;case j:for(;K<32;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if((~te>>>16&65535)!=(te&65535))return this.mode=E,m.msg="invalid stored block lengths",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);this.left=te&65535,te=K=0,this.mode=this.left!=0?Z:this.last!=0?oe:z;break;case Z:if(ue==0)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,F);if(ke==0&&(ae==end&&read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0&&(this.write=ae,F=this.inflate_flush(m,F),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,ae==this.end&&this.read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0)))return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);if(F=u,D=this.left,D>ue&&(D=ue),D>ke&&(D=ke),yt(m.next_in,se,this.window,ae,D),se+=D,ue-=D,ae+=D,ke-=D,(this.left-=D)!=0)break;this.mode=this.last!=0?oe:z;break;case J:for(;K<14;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(this.table=D=te&16383,(D&31)>29||(D>>5&31)>29)return this.mode=we,m.msg="too many length or distance symbols",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);if(D=258+(D&31)+(D>>5&31),this.blens==null||this.blens.length<D)this.blens=new Int32Array(D);else for(var Ne=0;Ne<D;Ne++)this.blens[Ne]=0;te>>>=14,K-=14,this.index=0,mode=ie;case ie:for(;this.index<4+(this.table>>>10);){for(;K<3;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}this.blens[le[this.index++]]=te&7,te>>>=3,K-=3}for(;this.index<19;)this.blens[le[this.index++]]=0;if(this.bb[0]=7,D=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,m),D!=u)return F=D,F==h&&(this.blens=null,this.mode=we),this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,F);this.index=0,this.mode=he;case he:for(;D=this.table,this.index<258+(D&31)+(D>>5&31);){var Ne,ht,Le;for(D=this.bb[0];K<D;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(D=this.hufts[(this.tb[0]+(te&I[D]))*3+1],Le=this.hufts[(this.tb[0]+(te&I[D]))*3+2],Le<16)te>>>=D,K-=D,this.blens[this.index++]=Le;else{for(Ne=Le==18?7:Le-14,ht=Le==18?11:3;K<D+Ne;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(te>>>=D,K-=D,ht+=te&I[Ne],te>>>=Ne,K-=Ne,Ne=this.index,D=this.table,Ne+ht>258+(D&31)+(D>>5&31)||Le==16&&Ne<1)return this.blens=null,this.mode=we,m.msg="invalid bit length repeat",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);Le=Le==16?this.blens[Ne-1]:0;do this.blens[Ne++]=Le;while(--ht!=0);this.index=Ne}}this.tb[0]=-1;{var Me=new Int32Array(1),$e=new Int32Array(1),ze=new Int32Array(1),Je=new Int32Array(1);if(Me[0]=9,$e[0]=6,D=this.table,D=this.inftree.inflate_trees_dynamic(257+(D&31),1+(D>>5&31),this.blens,Me,$e,ze,Je,this.hufts,m),D!=u)return D==h&&(this.blens=null,this.mode=E),F=D,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);this.codes.init(Me[0],$e[0],this.hufts,ze[0],this.hufts,Je[0],m)}this.mode=_e;case _e:if(this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,(F=this.codes.proc(this,m,F))!=c)return this.inflate_flush(m,F);if(F=u,this.codes.free(m),se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.last==0){this.mode=z;break}this.mode=oe;case oe:if(this.write=ae,F=this.inflate_flush(m,F),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.read!=this.write)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);mode=C;case ve:return F=c,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);case we:return F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);default:return F=f,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F)}},q.prototype.free=function(m){this.reset(m,null),this.window=null,this.hufts=null},q.prototype.set_dictionary=function(m,F,D){yt(m,F,window,0,D),this.read=this.write=D},q.prototype.sync_point=function(){return this.mode==j},q.prototype.inflate_flush=function(m,F){var D,te,K;return te=m.next_out_index,K=this.read,D=(K<=this.write?this.write:this.end)-K,D>m.avail_out&&(D=m.avail_out),D!=0&&F==g&&(F=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D,K==this.end&&(K=0,this.write==this.end&&(this.write=0),D=this.write-K,D>m.avail_out&&(D=m.avail_out),D!=0&&F==g&&(F=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D),m.next_out_index=te,this.read=K,F};var N=0,re=1,L=2,O=3,ee=4,U=5,B=6,V=7,me=8,Ae=9;function Re(){}Re.prototype.init=function(m,F,D,te,K,se,ue){this.mode=N,this.lbits=m,this.dbits=F,this.ltree=D,this.ltree_index=te,this.dtree=K,this.dtree_index=se,this.tree=null},Re.prototype.proc=function(m,F,D){var te,K,se,ue=0,ae=0,ke=0,Me,$e,ze,Je;for(ke=F.next_in_index,Me=F.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e;;)switch(this.mode){case N:if(ze>=258&&Me>=10&&(m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,D=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,m,F),ke=F.next_in_index,Me=F.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,D!=u)){this.mode=D==c?V:Ae;break}this.need=this.lbits,this.tree=this.ltree,this.tree_index=this.ltree_index,this.mode=re;case re:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&I[te]))*3,ue>>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],se==0){this.lit=this.tree[K+2],this.mode=B;break}if((se&16)!=0){this.get=se&15,this.len=this.tree[K+2],this.mode=L;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}if((se&32)!=0){this.mode=V;break}return this.mode=Ae,F.msg="invalid literal/length code",D=h,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);case L:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}this.len+=ue&I[te],ue>>=te,ae-=te,this.need=this.dbits,this.tree=this.dtree,this.tree_index=this.dtree_index,this.mode=O;case O:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&I[te]))*3,ue>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],(se&16)!=0){this.get=se&15,this.dist=this.tree[K+2],this.mode=ee;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}return this.mode=Ae,F.msg="invalid distance code",D=h,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);case ee:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}this.dist+=ue&I[te],ue>>=te,ae-=te,this.mode=U;case U:for(Je=$e-this.dist;Je<0;)Je+=m.end;for(;this.len!=0;){if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(F,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);m.window[$e++]=m.window[Je++],ze--,Je==m.end&&(Je=0),this.len--}this.mode=N;break;case B:if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(F,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);D=u,m.window[$e++]=this.lit,ze--,this.mode=N;break;case V:if(ae>7&&(ae-=8,Me++,ke--),m.write=$e,D=m.inflate_flush(F,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,m.read!=m.write)return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);this.mode=me;case me:return D=c,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);case Ae:return D=h,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);default:return D=f,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D)}},Re.prototype.free=function(m){},Re.prototype.inflate_fast=function(m,F,D,te,K,se,ue,ae){var ke,Me,$e,ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut;ht=ae.next_in_index,Le=ae.avail_in,Je=ue.bitb,Ne=ue.bitk,Be=ue.write,X=Be<ue.read?ue.read-Be-1:ue.end-Be,be=I[m],He=I[F];do{for(;Ne<20;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(ke=Je&be,Me=D,$e=te,ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;continue}do{if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15,Te=Me[ut+2]+(Je&I[ze]),Je>>=ze,Ne-=ze;Ne<15;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;ke=Je&He,Me=K,$e=se,ut=($e+ke)*3,ze=Me[ut];do if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15;Ne<ze;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(gt=Me[ut+2]+(Je&I[ze]),Je>>=ze,Ne-=ze,X-=Te,Be>=gt)De=Be-gt,Be-De>0&&2>Be-De,ue.window[Be++]=ue.window[De++],ue.window[Be++]=ue.window[De++],Te-=2;else{De=Be-gt;do De+=ue.end;while(De<0);if(ze=ue.end-De,Te>ze){if(Te-=ze,Be-De>0&&ze>Be-De)do ue.window[Be++]=ue.window[De++];while(--ze!=0);else yt(ue.window,De,ue.window,Be,ze),Be+=ze,De+=ze,ze=0;De=0}}do ue.window[Be++]=ue.window[De++];while(--Te!=0);break}else if((ze&64)==0)ke+=Me[ut+2],ke+=Je&I[ze],ut=($e+ke)*3,ze=Me[ut];else return ae.msg="invalid distance code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h;while(!0);break}if((ze&64)==0){if(ke+=Me[ut+2],ke+=Je&I[ze],ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;break}}else return(ze&32)!=0?(Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,c):(ae.msg="invalid literal/length code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h)}while(!0)}while(X>=258&&Le>=10);return Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,u};function rt(){}rt.prototype.huft_build=function(m,F,D,te,K,se,ue,ae,ke,Me,$e){var ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut,pn,Wt;Te=0,Le=D;do this.c[m[F+Te]]++,Te++,Le--;while(Le!=0);if(this.c[0]==D)return ue[0]=-1,ae[0]=0,u;for(be=ae[0],Be=1;Be<=i&&this.c[Be]==0;Be++);for(X=Be,be<Be&&(be=Be),Le=i;Le!=0&&this.c[Le]==0;Le--);for(Ne=Le,be>Le&&(be=Le),ae[0]=be,pn=1<<Be;Be<Le;Be++,pn<<=1)if((pn-=this.c[Be])<0)return h;if((pn-=this.c[Le])<0)return h;for(this.c[Le]+=pn,this.x[1]=Be=0,Te=1,ut=2;--Le!=0;)this.x[ut]=Be+=this.c[Te],ut++,Te++;Le=0,Te=0;do(Be=m[F+Te])!=0&&(this.v[this.x[Be]++]=Le),Te++;while(++Le<D);for(D=this.x[Ne],this.x[0]=Le=0,Te=0,ht=-1,De=-be,this.u[0]=0,gt=0,Wt=0;X<=Ne;X++)for(ze=this.c[X];ze--!=0;){for(;X>De+be;){if(ht++,De+=be,Wt=Ne-De,Wt=Wt>be?be:Wt,(Je=1<<(Be=X-De))>ze+1&&(Je-=ze+1,ut=X,Be<Wt))for(;++Be<Wt&&!((Je<<=1)<=this.c[++ut]);)Je-=this.c[ut];if(Wt=1<<Be,this.hn[0]+Wt>r)return h;this.u[ht]=gt=this.hn[0],this.hn[0]+=Wt,ht!=0?(this.x[ht]=Le,this.r[0]=Be,this.r[1]=be,Be=Le>>>De-be,this.r[2]=gt-this.u[ht-1]-Be,yt(this.r,0,ke,(this.u[ht-1]+Be)*3,3)):ue[0]=gt}for(this.r[1]=X-De,Te>=D?this.r[0]=192:$e[Te]<te?(this.r[0]=this.v[Te]<256?0:96,this.r[2]=this.v[Te++]):(this.r[0]=se[this.v[Te]-te]+16+64,this.r[2]=K[this.v[Te++]-te]),Je=1<<X-De,Be=Le>>>De;Be<Wt;Be+=Je)yt(this.r,0,ke,(gt+Be)*3,3);for(Be=1<<X-1;(Le&Be)!=0;Be>>>=1)Le^=Be;for(Le^=Be,He=(1<<De)-1;(Le&He)!=this.x[ht];)ht--,De-=be,He=(1<<De)-1}return pn!=0&&Ne!=1?g:u},rt.prototype.inflate_trees_bits=function(m,F,D,te,K){var se;return this.initWorkArea(19),this.hn[0]=0,se=this.huft_build(m,0,19,19,null,null,D,F,te,this.hn,this.v),se==h?K.msg="oversubscribed dynamic bit lengths tree":(se==g||F[0]==0)&&(K.msg="incomplete dynamic bit lengths tree",se=h),se},rt.prototype.inflate_trees_dynamic=function(m,F,D,te,K,se,ue,ae,ke){var Me;return this.initWorkArea(288),this.hn[0]=0,Me=this.huft_build(D,0,m,257,fe,Ee,se,te,ae,this.hn,this.v),Me!=u||te[0]==0?(Me==h?ke.msg="oversubscribed literal/length tree":Me!=p&&(ke.msg="incomplete literal/length tree",Me=h),Me):(this.initWorkArea(288),Me=this.huft_build(D,m,F,0,Pe,A,ue,K,ae,this.hn,this.v),Me!=u||K[0]==0&&m>257?(Me==h?ke.msg="oversubscribed distance tree":Me==g?(ke.msg="incomplete distance tree",Me=h):Me!=p&&(ke.msg="empty distance tree with lengths",Me=h),Me):u)};function lt(m,F,D,te,K){return m[0]=Oe,F[0]=xe,D[0]=Xe,te[0]=Ve,u}rt.prototype.initWorkArea=function(m){this.hn==null&&(this.hn=new Int32Array(1),this.v=new Int32Array(m),this.c=new Int32Array(i+1),this.r=new Int32Array(3),this.u=new Int32Array(i),this.x=new Int32Array(i+1)),this.v.length<m&&(this.v=new Int32Array(m));for(var F=0;F<m;F++)this.v[F]=0;for(var F=0;F<i+1;F++)this.c[F]=0;for(var F=0;F<3;F++)this.r[F]=0;yt(this.c,0,this.u,0,i),yt(this.c,0,this.x,0,i+1)};var ft=new Uint8Array(1),zt=typeof ft.subarray=="function";function yt(m,F,D,te,K){if(K!=0){if(m){if(!D)throw"Undef dest"}else throw"Undef src";F==0&&K==m.length?ye(m,D,te):zt?ye(m.subarray(F,F+K),D,te):m.BYTES_PER_ELEMENT==1&&K>100?ye(new Uint8Array(m.buffer,m.byteOffset+F,K),D,te):Lt(m,F,D,te,K)}}function Lt(m,F,D,te,K){for(var se=0;se<K;++se)D[te+se]=m[F+se]}function ye(m,F,D){F.set(m,D)}function Y(m,F,D,te){F?D?m=new Uint8Array(m,F,D):m=new Uint8Array(m,F,m.byteLength-F):m=new Uint8Array(m);var K=new H;K.inflateInit(n,!0),K.next_in=m,K.next_in_index=0,K.avail_in=m.length;for(var se=[],ue=0;;){var ae=new Uint8Array(32e3);K.next_out=ae,K.next_out_index=0,K.avail_out=ae.length;var ke=K.inflate(a);if(ke!=u&&ke!=c&&ke!=g)throw K.msg;if(K.avail_out!=0){var Me=new Uint8Array(ae.length-K.avail_out);yt(ae,0,Me,0,ae.length-K.avail_out),ae=Me}if(se.push(ae),ue+=ae.length,ke==c||ke==g)break}if(te&&(te[0]=(F||0)+K.next_in_index),se.length==1)return se[0].buffer;for(var $e=new Uint8Array(ue),ze=0,Je=0;Je<se.length;++Je){var Ne=se[Je];yt(Ne,0,$e,ze,Ne.length),ze+=Ne.length}return $e.buffer}e.exports={inflateBuffer:Y,arrayCopy:yt}}(Yp)),Yp.exports}var Tx=aZ();function x4(e,t){this.block=e,this.offset=t}x4.prototype.toString=function(){return""+this.block+":"+this.offset};function Vc(e,t,n){var r=(e[t+6]&255)*4294967296+(e[t+5]&255)*16777216+(e[t+4]&255)*65536+(e[t+3]&255)*256+(e[t+2]&255),i=e[t+1]<<8|e[t];return r==0&&i==0&&!n?null:new x4(r,i)}function nm(e,t){t=Math.min(t||1,e.byteLength-50);for(var n=[],r=[0],i=0;r[0]<t;){var o=new Uint8Array(e,r[0],12),a=o[11]<<8|o[10],s=Tx.inflateBuffer(e,12+a+r[0],Math.min(65536,e.byteLength-12-a-r[0]),r);r[0]+=8,i+=s.byteLength,n.push(s)}if(n.length==1)return n[0];for(var l=new Uint8Array(i),u=0,c=0;c<n.length;++c){var d=new Uint8Array(n[c]);Tx.arrayCopy(d,0,l,u,d.length),u+=d.length}return l.buffer}function Ex(e,t){this.minv=e,this.maxv=t}function sZ(e,t){var n,r=[];for(--t,r.push(0),n=1+(e>>26);n<=1+(t>>26);++n)r.push(n);for(n=9+(e>>23);n<=9+(t>>23);++n)r.push(n);for(n=73+(e>>20);n<=73+(t>>20);++n)r.push(n);for(n=585+(e>>17);n<=585+(t>>17);++n)r.push(n);for(n=4681+(e>>14);n<=4681+(t>>14);++n)r.push(n);return r}var lZ=21578324;function Bu(){}function uZ(e,t,n){var r=new Bu;r.data=e,r.tbi=t,r.tbi.fetch(function(i){if(!i)return n(null,"Couldn't access Tabix");var o=nm(i,i.byteLength),a=new Uint8Array(o),s=an(a,0);if(s!=lZ)return n(null,"Not a tabix index");var l=an(a,4);r.format=an(a,8),r.colSeq=an(a,12),r.colStart=an(a,16),r.colEnd=an(a,20),r.meta=an(a,24),r.skip=an(a,28),an(a,32),r.indices=[];var u=36;r.chrToIndex={},r.indexToChr=[];for(var c=0;c<l;++c){for(var d="";;){var f=a[u++];if(f==0)break;d+=String.fromCharCode(f)}r.chrToIndex[d]=c,d.indexOf("chr")==0?r.chrToIndex[d.substring(3)]=c:r.chrToIndex["chr"+d]=c,r.indexToChr.push(d)}for(var h=1e9,p=0;p<l;++p){var g=u,b=an(a,u);u+=4;for(var v=0;v<b;++v){an(a,u);var x=an(a,u+4);u+=8+x*16}var y=an(a,u);u+=4;for(var _=u,c=0;c<y;++c){var S=Vc(a,_);if(_+=8,S){var $=S.block;S.offset>0&&($+=65536),$<h&&(h=$);break}}u+=y*8,b>0&&(r.indices[p]=new Uint8Array(o,g,u-g))}r.headerMax=h,n(r)},{timeout:5e4})}Bu.prototype.blocksForRange=function(e,t,n){var r=this.indices[e];if(!r)return[];for(var i=sZ(t,n),o=[],a=0;a<i.length;++a)o[i[a]]=!0;for(var s=[],l=[],u=an(r,0),c=4,d=0;d<u;++d){var f=an(r,c),h=an(r,c+4);if(c+=8,o[f])for(var p=0;p<h;++p){var g=Vc(r,c,!0),b=Vc(r,c+8,!0);(f<4681?l:s).push(new Ex(g,b)),c+=16}else c+=h*16}for(var v=an(r,c),x=null,y=Math.min(t>>14,v-1),_=Math.min(n>>14,v-1),a=y;a<=_;++a){var S=Vc(r,c+4+a*8);S&&(!x||S.block<x.block||S.offset<x.offset)&&(x=S)}var $=[];if(x!=null)for(var a=0;a<l.length;++a){var w=l[a];w.maxv.block>=x.block&&w.maxv.offset>=x.offset&&$.push(w)}l=$;for(var T=[],a=0;a<l.length;++a)T.push(l[a]);for(var a=0;a<s.length;++a)T.push(s[a]);T.sort(function(C,E){var I=C.minv.block-E.minv.block;return I!=0?I:C.minv.offset-E.minv.offset});var M=[];if(T.length>0){for(var P=T[0],a=1;a<T.length;++a){var R=T[a];R.minv.block==P.maxv.block?P=new Ex(P.minv,R.maxv):(M.push(P),P=R)}M.push(P)}return M};Bu.prototype.fetch=function(e,t,n,r){var i=this,o=this.chrToIndex[e];if(o==null)return r([]);var a=this.indexToChr[o],s;o===void 0?s=[]:(s=this.blocksForRange(o,t,n),s||r(null,"Error in index fetch"));var l=[],u=0,c;function d(){if(u>=s.length)return r(l);if(c){var g=new Uint8Array(c);return i.readRecords(g,s[u].minv.offset,l,t,n,a),c=null,++u,d()}else{var f=s[u],h=f.minv.block,p=f.maxv.block+65536;i.data.slice(h,p-h).fetch(function(b){try{return c=nm(b,f.maxv.block-f.minv.block+1),d()}catch(v){return r(null,v)}})}}try{d()}catch(f){r(null,f)}};Bu.prototype.readRecords=function(e,t,n,r,i,o){e:for(;;){for(var a="";t<e.length;){var s=e[t++];if(s==10){var l=a.split(" ");if(l[this.colSeq-1]==o){var u=parseInt(l[this.colStart-1]),c=u;this.colEnd>0&&(c=parseInt(l[this.colEnd-1])),this.format&65536&&++u,u<=i&&c>=r&&n.push(a)}continue e}else a+=String.fromCharCode(s)}return}};Bu.prototype.fetchHeader=function(e,t){var n={metaOnly:!0,skipped:!1,nLines:0};t=t||n,Object.keys(n).forEach(function(i){t.hasOwnProperty(i)||(t[i]=n[i])});var r=this;r.data.slice(0,r.headerMax).fetch(function(i){if(!i)return e(null,"Fetch failed");for(var o=new Uint8Array(nm(i,i.byteLength)),a=0,s="",l=[];a<o.length;){var u=o[a++];if(u==10)if(t.metaOnly&&s.charCodeAt(0)==r.meta||t.skipped&&l.length<r.skip||t.nLines&&l.length<t.nLines)l.push(s),s="";else return e(l);else s+=String.fromCharCode(u)}e(l)})};function cZ(e,t){return new Promise(function(n,r){uZ(new bi(e),new bi(t),function(i,o){o?r(o):n(i)})})}function w4(e){const t=e.Adapters.get("BaseLZAdapter");class n extends t{constructor(i){if(super(i),!i.parser_func||!(i.url_data||i.reader))throw new Error("Tabix source is missing required configuration options");if(this.parser=i.parser_func,this.url_data=i.url_data,this.url_tbi=i.url_tbi||`${this.url_data}.tbi`,this._overfetch=i.overfetch||0,this._overfetch<0||this._overfetch>1)throw new Error("Overfetch must be specified as a fraction (0-1) of the requested region size");this.url_data?this._reader_promise=cZ(this.url_data,this.url_tbi).catch(function(){throw new Error("Failed to create a tabix reader from the provided URL")}):this._reader_promise=Promise.resolve(i.reader)}_performRequest(i){return new Promise((o,a)=>{const s=i.start,l=i.end,u=this._overfetch*(l-s),c=i.start-u,d=i.end+u;this._reader_promise.then(f=>{f.fetch(i.chr,c,d,function(h,p){p&&a(new Error("Could not read requested region. This may indicate an error with the .tbi index.")),o(h)})})})}_normalizeResponse(i){return i.map(this.parser)}}e.Adapters.add("TabixUrlSource",n)}typeof LocusZoom<"u"&&LocusZoom.use(w4);const Oi=new Set(["",".","NA","N/A","n/a","nan","-nan","NaN","-NaN","null","NULL","None",null]),fZ=/([\d.-]+)([\sxeE]*)([0-9-]*)/;function Gt(e){return Number.isInteger(e)}function dZ(e){return e.replace(/^chr/g,"").toUpperCase()}function hZ(e,t=!1){if(e===null)return e;const n=+e;if(t)return n;if(n<0||n>1)throw new Error("p value is not in the allowed range");if(n===0){if(e==="0")return 1/0;let[,r,,i]=e.match(fZ);return r=+r,i!==""?i=+i:i=0,r===0?1/0:-(Math.log10(+r)+ +i)}return-Math.log10(n)}function pZ({freq:e,allele_count:t,n_samples:n,is_alt_effect:r=!0}){if(e!==void 0&&t!==void 0)throw new Error("Frequency and allele count options are mutually exclusive");let i;if(e===void 0&&(Oi.has(t)||Oi.has(n)))return null;if(e===void 0&&t!==void 0)i=+t/+n/2;else{if(Oi.has(e))return null;i=+e}if(i<0||i>1)throw new Error("Allele frequency is not in the allowed range");return r?i:1-i}function gZ({marker_col:e,chrom_col:t,pos_col:n,ref_col:r,alt_col:i,pvalue_col:o,is_neg_log_pvalue:a=!1,rsid_col:s,beta_col:l,stderr_beta_col:u,allele_freq_col:c,allele_count_col:d,n_samples_col:f,is_alt_effect:h=!0,delimiter:p=" "}){if(Gt(e)&&Gt(t)&&Gt(n))throw new Error("Must specify either marker OR chr + pos");if(!(Gt(e)||Gt(t)&&Gt(n)))throw new Error("Must specify how to locate marker");if(Gt(d)&&Gt(c))throw new Error("Allele count and frequency options are mutually exclusive");if(Gt(d)&&!Gt(f))throw new Error("To calculate allele frequency from counts, you must also provide n_samples");return g=>{const b=g.split(p);let v,x,y,_,S=null,$,w=null,T=null,M=null,P,R;if(Gt(e))[v,x,y,_]=O5(b[e-1],!1);else if(Gt(t)&&Gt(n))v=b[t-1],x=b[n-1];else throw new Error("Must specify all fields required to identify the variant");if(v=dZ(v),v.startsWith("RS"))throw new Error(`Invalid chromosome specified: value "${v}" is an rsID`);Gt(r)&&(y=b[r-1]),Gt(i)&&(_=b[i-1]),Gt(s)&&(S=b[s-1]),Oi.has(y)&&(y=null),Oi.has(_)&&(_=null),Oi.has(S)?S=null:S&&(S=S.toLowerCase(),S.startsWith("rs")||(S=`rs${S}`));const C=hZ(b[o-1],a);y=y||null,_=_||null,Gt(c)&&($=b[c-1]),Gt(d)&&(P=b[d-1],R=b[f-1]),Gt(l)&&(w=b[l-1],w=Oi.has(w)?null:+w),Gt(u)&&(T=b[u-1],T=Oi.has(T)?null:+T),(c||d)&&(M=pZ({freq:$,allele_count:P,n_samples:R,is_alt_effect:h}));const E=y&&_?`_${y}/${_}`:"";return{chromosome:v,position:+x,ref_allele:y?y.toUpperCase():null,alt_allele:_?_.toUpperCase():null,variant:`${v}:${x}${E}`,rsid:S,log_pvalue:C,beta:w,stderr_beta:T,alt_allele_freq:M}}}function vZ(e){if(e.Adapters.has("TabixUrlSource")){const t=e.Adapters.get("TabixUrlSource"),n=e.Adapters.get("LDServer");class r extends t{constructor(o){o.limit_fields||(o.limit_fields=["variant2","position2","correlation"]),super(o)}_buildRequestOptions(o,a){if(!a)throw new Error("LD request must depend on association data");const s=super._buildRequestOptions(...arguments);return a.length?(s.ld_refvar=n.prototype.__find_ld_refvar(o,a),s):(s._skip_request=!0,s)}_performRequest(o){return o._skip_request?Promise.resolve([]):super._performRequest(o)}_annotateRecords(o,a){return o.filter(s=>s.variant1===a.ld_refvar)}}e.Adapters.add("UserTabixLD",r)}}typeof LocusZoom<"u"&&LocusZoom.use(vZ);const bZ={key:0,class:"absolute mt-1 p-3 border bg-red-100 text-red-700 text-sm rounded opacity-95 w-[100%]"},mZ=ot("div",{id:"lz-plot",class:"h-100"},null,-1),Ax="#E30A17",yZ=1e7,Px=40,_Z={__name:"Plugin",props:{datasetId:String,datasetUrl:String,root:String,settings:Object,specs:Object,tracks:Array},setup(e){Ii.use(w4),window.nowrap=!1,window.mode=!1;const t=e,n=ne("");function r(){var S;const i=(S=t.settings.tabix)==null?void 0:S.id,o=t.settings.chromosome,a=t.settings.start,s=t.settings.end,l=t.settings.chrom_col,u=t.settings.pos_col,c=t.settings.ref_col,d=t.settings.alt_col,f=t.settings.pvalue_col,h=t.settings.is_neg_log_pvalue,p=t.settings.beta_col,g=t.settings.stderr_beta_col;if(!i){n.value="Please select a Tabix file.";return}if(s-a>yZ){n.value="We cannot output more than 10Mb at a time!";return}if(s<=a){n.value="Invalid input: End position must be bigger than start position!";return}n.value="";const b=gZ({chrom_col:l,pos_col:u,ref_col:c,alt_col:d,pvalue_col:f,is_neg_log_pvalue:h,beta_col:p,stderr_beta_col:g});let v=new Ii.DataSources().add("assoc",["TabixUrlSource",{url_data:`${t.root}api/datasets/${t.datasetId}/display`,url_tbi:`${t.root}api/datasets/${i}/display`,parser_func:b,overfetch:0}]),x={id:"associationpvalues_",name:"association",point_shape:"circle",point_size:Px,color:Ax,legend:[{shape:"circle",color:Ax,size:Px,label:"phen",class:"lz-data_layer-scatter"}],tooltip:{closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>phen</strong><br><strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2018
|
+
{{#if phewas:se|is_numeric}}<strong>SE (β):</strong> {{phewas:se|scinotation|htmlescape}}{{/if}}`},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},label:{text:"{{phewas:trait_label}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"phewas:log_pvalue",operator:">=",value:20}],style:{"font-size":"14px","font-weight":"bold",fill:"#333333"}}},u4={namespace:{gene:"gene",constraint:"constraint"},data_operations:[{type:"fetch",from:["gene","constraint(gene)"]},{name:"gene_constraint",type:"genes_to_gnomad_constraint",requires:["gene","constraint"]}],id:"genes",type:"genes",tag:"genes",id_field:"gene_id",behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(r4)},c4=qt({filters:[{field:"gene_type",operator:"in",value:["protein_coding","IG_C_gene","IG_D_gene","IG_J_gene","IG_V_gene","TR_C_gene","TR_D_gene","TR_J_gene","TR_V_gene","rRNA","Mt_rRNA","Mt_tRNA"]}]},at(u4)),f4={namespace:{assoc:"assoc",catalog:"catalog"},data_operations:[{type:"fetch",from:["assoc","catalog"]},{type:"assoc_to_gwas_catalog",name:"assoc_plus_ld",requires:["assoc","catalog"],params:["assoc:position","catalog:pos","catalog:log_pvalue"]}],id:"annotation_catalog",type:"annotation_track",tag:"gwascatalog",id_field:"assoc:variant",x_axis:{field:"assoc:position"},color:"#0000CC",filters:[{field:"catalog:rsid",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Kb}],behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(i4),tooltip_positioning:"top"},d4={type:"set_state",tag:"ld_population",position:"right",color:"blue",button_html:"LD Population: ",show_selected:!0,button_title:"Select LD Population: ",custom_event_name:"widget_set_ldpop",state_field:"ld_pop",options:[{display_name:"ALL (default)",value:"ALL"},{display_name:"AFR",value:"AFR"},{display_name:"AMR",value:"AMR"},{display_name:"EAS",value:"EAS"},{display_name:"EUR",value:"EUR"},{display_name:"SAS",value:"SAS"}]},h4={type:"display_options",tag:"gene_filter",custom_event_name:"widget_gene_filter_choice",position:"right",color:"blue",button_html:"Filter...",button_title:"Choose which genes to show",layer_name:"genes",default_config_display_name:"Coding genes & rRNA",options:[{display_name:"All features",display:{filters:null}}]},Ru={widgets:[{type:"remove_panel",position:"right",color:"red",group_position:"end"},{type:"move_panel_up",position:"right",group_position:"middle"},{type:"move_panel_down",position:"right",group_position:"start",style:{"margin-left":"0.75em"}}]},zu={widgets:[{type:"title",title:"LocusZoom",subtitle:`<a href="https://statgen.github.io/locuszoom/" target="_blank" rel="noopener">v${B5}</a>`,position:"left"},{type:"download",position:"right",group_position:"end"},{type:"download_png",position:"right",group_position:"start"}]},em=function(){const e=at(zu);return e.widgets.push(at(d4)),e}(),zK=function(){const e=at(zu);return e.widgets.push({type:"shift_region",step:5e5,button_html:">>",position:"right",group_position:"end"},{type:"shift_region",step:5e4,button_html:">",position:"right",group_position:"middle"},{type:"zoom_region",step:.2,position:"right",group_position:"middle"},{type:"zoom_region",step:-.2,position:"right",group_position:"middle"},{type:"shift_region",step:-5e4,button_html:"<",position:"right",group_position:"middle"},{type:"shift_region",step:-5e5,button_html:"<<",position:"right",group_position:"start"}),e}(),tm={id:"association",tag:"association",min_height:200,height:300,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:function(){const e=at(Ru);return e.widgets.push({type:"toggle_legend",position:"right"}),e}(),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"-log10 p-value",label_offset:50},y2:{label:"Recombination Rate (cM/Mb)",label_offset:46}},legend:{orientation:"vertical",origin:{x:75,y:40},hidden:!0},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,drag_y2_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(dh),at(Jb),at(Qb)]},p4={id:"coaccessibility",tag:"coaccessibility",min_height:150,height:180,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"Score",label_offset:40,render:!1}},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(a4)]},g4=function(){let e=at(tm);return e=qt({id:"associationcatalog"},e),e.toolbar.widgets.push({type:"display_options",position:"right",color:"blue",button_html:"Display options...",button_title:"Control how plot items are displayed",layer_name:"associationpvaluescatalog",default_config_display_name:"No catalog labels (default)",options:[{display_name:"Label catalog traits",display:{label:{text:"{{catalog:trait}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"catalog:trait",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Kb},{field:"ld:correlation",operator:">",value:.4}],style:{"font-size":"12px","font-weight":"bold",fill:"#333333"}}}}]}),e.data_layers=[at(dh),at(Jb),at(s4)],e}(),Iu={id:"genes",tag:"genes",min_height:150,height:225,margin:{top:20,right:55,bottom:20,left:70},axes:{},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},toolbar:function(){const e=at(Ru);return e.widgets.push({type:"resize_to_data",position:"right",button_html:"Resize"},at(h4)),e}(),data_layers:[at(c4)]},v4={id:"phewas",tag:"phewas",min_height:300,height:300,margin:{top:20,right:55,bottom:120,left:70},inner_border:"rgb(210, 210, 210)",axes:{x:{ticks:{style:{"font-weight":"bold","font-size":"11px","text-anchor":"start"},transform:"rotate(50)",position:"left"}},y1:{label:"-log10 p-value",label_offset:50}},data_layers:[at(dh),at(l4)]},b4={id:"annotationcatalog",tag:"gwascatalog",min_height:50,height:50,margin:{top:25,right:55,bottom:10,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{extent:"state",render:!1}},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(f4)]},IK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:em,panels:[at(tm),at(Iu)]},FK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:em,panels:[b4,g4,Iu]},BK={width:800,responsive_resize:!0,toolbar:zu,panels:[at(v4),qt({height:300,margin:{bottom:40},axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"}}},at(Iu))],mouse_guide:!1},OK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:at(zu),panels:[at(p4),function(){const e=Object.assign({height:270},at(Iu)),t=e.data_layers[0];t.match={send:"gene_name",receive:"gene_name"};const n=[{field:"lz_is_match",scale_function:"if",parameters:{field_value:!0,then:"#4285f4"}},{field:"lz_is_match",scale_function:"if",parameters:{field_value:!1,then:"#EAE6E6"}},"#363696"];return t.color=n,t.stroke=n,e}()]},NK={standard_association:Zb,standard_association_with_label:RK,standard_genes:r4,catalog_variant:i4,coaccessibility:o4},LK={ldlz2_pop_selector:d4,gene_selector_menu:h4},DK={standard_panel:Ru,standard_plot:zu,standard_association:em,region_nav_plot:zK},HK={significance:dh,recomb_rate:Jb,association_pvalues:Qb,coaccessibility:a4,association_pvalues_catalog:s4,phewas_pvalues:l4,genes:u4,genes_filtered:c4,annotation_catalog:f4},UK={association:tm,coaccessibility:p4,association_catalog:g4,genes:Iu,phewas:v4,annotation_catalog:b4},jK={standard_association:IK,association_catalog:FK,standard_phewas:BK,coaccessibility:OK},WK=Object.freeze(Object.defineProperty({__proto__:null,data_layer:HK,panel:UK,plot:jK,toolbar:DK,toolbar_widgets:LK,tooltip:NK},Symbol.toStringTag,{value:"Module"}));class VK extends Zi{get(t,n,r={}){if(!(t&&n))throw new Error("Must specify both the type and name for the layout desired. See .list() for available options");let i=super.get(t).get(n);const o=r.namespace;i.namespace||delete r.namespace;let a=qt(r,i);return o&&(a=X6(a,o)),at(a)}add(t,n,r,i=!1){if(!(t&&n&&r))throw new Error("To add a layout, type, name, and item must all be specified");if(typeof r!="object")throw new Error("The configuration to be added must be an object");this.has(t)||super.add(t,new Zi);const o=at(r);return t==="data_layer"&&o.namespace&&(o._auto_fields=[...qb(o,Object.keys(o.namespace))].sort()),super.get(t).add(n,o,i)}list(t){if(!t){let n={};for(let[r,i]of this._items)n[r]=i.list();return n}return super.get(t).list()}merge(t,n){return qt(t,n)}renameField(){return Mg(...arguments)}mutate_attrs(){return zX(...arguments)}query_attrs(){return IX(...arguments)}}const m4=new VK;for(let[e,t]of Object.entries(WK))for(let[n,r]of Object.entries(t))m4.add(e,n,r);const _a=new Zi;function Fu(e){return(t,n,...r)=>{if(n.length!==2)throw new Error("Join functions must receive exactly two recordsets");return e(...n,...r)}}function qK(e,t,n,r,i){if(!e.length)return e;const o=T0(t,r),a=[];for(let s of o.values()){let l=0,u;for(let c of s){const d=c[i];d>=l&&(u=c,l=d)}u.n_catalog_matches=s.length,a.push(u)}return O5(e,a,n,r)}function YK(e,t){return e.forEach(function(n){const r=`_${n.gene_name.replace(/[^A-Za-z0-9_]/g,"_")}`,i=t[r]&&t[r].gnomad_constraint;i&&Object.keys(i).forEach(function(o){let a=i[o];typeof n[o]>"u"&&(typeof a=="number"&&a.toString().includes(".")&&(a=parseFloat(a.toFixed(2))),n[o]=a)})}),e}_a.add("left_match",Fu(O5));_a.add("inner_match",Fu(pB));_a.add("full_outer_match",Fu(gB));_a.add("assoc_to_gwas_catalog",Fu(qK));_a.add("genes_to_gnomad_constraint",Fu(YK));class GK extends Zi{constructor(t){super(),this._registry=t||ns}add(t,n,r=!1){if(this._registry.has(t))throw new Error(`The namespace ${t} is already in use by another source`);if(t.match(/[^A-Za-z0-9_]/))throw new Error(`Data source namespace names can only contain alphanumeric characters or underscores. Invalid name: ${t}`);if(Array.isArray(n)){const[i,o]=n;n=this._registry.create(i,o)}return n.source_id=t,super.add(t,n,r),this}}const ai={version:B5,populate:aK,DataSources:GK,Adapters:ns,DataLayers:Xb,DataFunctions:_a,Layouts:m4,MatchFunctions:pr,ScaleFunctions:fh,TransformationFunctions:Vb,Widgets:Yb,get KnownDataSources(){return console.warn('Deprecation warning: KnownDataSources has been renamed to "Adapters"'),ns}},Mx=[];ai.use=function(e,...t){if(!Mx.includes(e)){if(t.unshift(ai),typeof e.install=="function")e.install.apply(e,t);else if(typeof e=="function")e.apply(null,t);else throw new Error("Plugin must export a function that receives the LocusZoom object as an argument");Mx.push(e)}};var XK="";function y4(e){return ZK(KK(JK(e)))}function KK(e){return eZ(tZ(QK(e),e.length*8))}function ZK(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=e.length,i=0;i<r;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<r?e.charCodeAt(i+1)<<8:0)|(i+2<r?e.charCodeAt(i+2):0),a=0;a<4;a++)i*8+a*6>e.length*8?n+=XK:n+=t.charAt(o>>>6*(3-a)&63);return n}function JK(e){for(var t="",n=-1,r,i;++n<e.length;)r=e.charCodeAt(n),i=n+1<e.length?e.charCodeAt(n+1):0,55296<=r&&r<=56319&&56320<=i&&i<=57343&&(r=65536+((r&1023)<<10)+(i&1023),n++),r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(192|r>>>6&31,128|r&63):r<=65535?t+=String.fromCharCode(224|r>>>12&15,128|r>>>6&63,128|r&63):r<=2097151&&(t+=String.fromCharCode(240|r>>>18&7,128|r>>>12&63,128|r>>>6&63,128|r&63));return t}function QK(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(var n=0;n<e.length*8;n+=8)t[n>>5]|=(e.charCodeAt(n/8)&255)<<24-n%32;return t}function eZ(e){for(var t="",n=0;n<e.length*32;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}function tZ(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,s=-1009589776,l=0;l<e.length;l+=16){for(var u=r,c=i,d=o,f=a,h=s,p=0;p<80;p++){p<16?n[p]=e[l+p]:n[p]=qp(n[p-3]^n[p-8]^n[p-14]^n[p-16],1);var g=ri(ri(qp(r,5),nZ(p,i,o,a)),ri(ri(s,n[p]),rZ(p)));s=a,a=o,o=qp(i,30),i=r,r=g}r=ri(r,u),i=ri(i,c),o=ri(o,d),a=ri(a,f),s=ri(s,h)}return Array(r,i,o,a,s)}function nZ(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function rZ(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function ri(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function qp(e,t){return e<<t|e>>>32-t}function iZ(e){var t={};for(var n in e)t[n]=e[n];return t}"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")});function mi(e,t,n,r){r||(typeof t=="object"?(r=t,t=void 0):r={}),this.url=e,this.start=t||0,n&&(this.end=n),this.opts=r}mi.prototype.slice=function(e,t){if(e<0)throw"Bad slice "+e;var n=this.start,r=this.end;return n&&e?n=n+e:n=e||n,t&&n?r=n+t-1:r=r||t-1,new mi(this.url,n,r,this.opts)};var _4=0,x4=typeof navigator<"u"&&navigator.userAgent.indexOf("Safari")>=0&&navigator.userAgent.indexOf("Chrome")<0;mi.prototype.fetchAsText=function(e){var t=this;this.getURL().then(function(n){try{var r=new XMLHttpRequest,i;if((x4||t.opts.salt)&&n.indexOf("?")<0&&(n=n+"?salt="+y4(""+Date.now()+","+ ++_4)),r.open("GET",n,!0),t.end){if(t.end-t.start>1e8)throw"Monster fetch!";r.setRequestHeader("Range","bytes="+t.start+"-"+t.end),i=t.end-t.start+1}r.onreadystatechange=function(){if(r.readyState==4)return r.status==200||r.status==206?e(r.responseText):e(null)},t.opts.credentials&&(r.withCredentials=!0),r.send()}catch{return e(null)}}).catch(function(n){return console.log(n),e(null,n)})};mi.prototype.salted=function(){var e=iZ(this.opts);return e.salt=!0,new mi(this.url,this.start,this.end,e)};mi.prototype.getURL=function(){return this.opts.resolver?this.opts.resolver(this.url).then(function(e){return typeof e=="string"?e:e.url}):Promise.resolve(this.url)};mi.prototype.fetch=function(e,t){var n=this;t=t||{};var r=t.attempt||1,i=t.truncatedLength;if(r>3)return e(null);this.getURL().then(function(o){try{var a;t.timeout&&!n.opts.credentials&&(a=setTimeout(function(){return console.log("timing out "+o),s.abort(),e(null,"Timeout")},t.timeout));var s=new XMLHttpRequest,l;if((x4||n.opts.salt)&&o.indexOf("?")<0&&(o=o+"?salt="+y4(""+Date.now()+","+ ++_4)),s.open("GET",o,!0),s.overrideMimeType("text/plain; charset=x-user-defined"),n.end){if(n.end-n.start>1e8)throw"Monster fetch!";s.setRequestHeader("Range","bytes="+n.start+"-"+n.end),l=n.end-n.start+1}s.responseType="arraybuffer",s.onreadystatechange=function(){if(s.readyState==4)if(a&&clearTimeout(a),s.status==200||s.status==206)if(s.response){var u=s.response.byteLength;return l&&l!=u&&(!i||u!=i)?n.fetch(e,{attempt:r+1,truncatedLength:u}):e(s.response)}else{if(s.mozResponseArrayBuffer)return e(s.mozResponseArrayBuffer);var c=s.responseText;return l&&l!=c.length&&(!i||c.length!=i)?n.fetch(e,{attempt:r+1,truncatedLength:c.length}):e(oZ(s.responseText))}else return n.fetch(e,{attempt:r+1})},n.opts.credentials&&(s.withCredentials=!0),s.send()}catch{return e(null)}}).catch(function(o){return console.log(o),e(null,o)})};function oZ(e){if(!e)return null;for(var t=new Uint8Array(e.length),n=0;n<t.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function an(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}var Yp={exports:{}},Tx;function aZ(){return Tx||(Tx=1,function(e){var t=15,n=t,r=1440,i=15,o=32,a=0,s=4,l=8,u=0,c=1,d=2,f=-2,h=-3,p=-4,g=-5,b=0,v=1,_=2,y=3,x=4,S=5,$=6,w=7,T=8,k=9,P=10,R=11,C=12,E=13,I=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],z=0,j=1,Z=2,J=3,ie=4,he=5,_e=6,oe=7,ve=8,we=9,Oe=9,xe=5,Xe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ve=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],fe=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ee=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Pe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function H(){}H.prototype.inflateInit=function(m,F){return m||(m=n),F&&(F=!1),this.istate=new G,this.istate.inflateInit(this,F?-m:m)},H.prototype.inflate=function(m){return this.istate==null?f:this.istate.inflate(this,m)},H.prototype.inflateEnd=function(){if(this.istate==null)return f;var m=istate.inflateEnd(this);return this.istate=null,m},H.prototype.inflateSync=function(){return istate.inflateSync(this)},H.prototype.inflateSetDictionary=function(m,F){return istate.inflateSetDictionary(this,m,F)};function G(){this.was=[0]}G.prototype.inflateReset=function(m){return m==null||m.istate==null?f:(m.total_in=m.total_out=0,m.msg=null,m.istate.mode=m.istate.nowrap!=0?w:b,m.istate.blocks.reset(m,null),u)},G.prototype.inflateEnd=function(m){return this.blocks!=null&&this.blocks.free(m),this.blocks=null,u},G.prototype.inflateInit=function(m,F){return m.msg=null,this.blocks=null,nowrap=0,F<0&&(F=-F,nowrap=1),F<8||F>15?(this.inflateEnd(m),f):(this.wbits=F,m.istate.blocks=new q(m,m.istate.nowrap!=0?null:this,1<<F),this.inflateReset(m),u)},G.prototype.inflate=function(m,F){var D,te;if(m==null||m.istate==null||m.next_in==null)return f;for(F=F==s?g:u,D=g;;)switch(m.istate.mode){case b:if(m.avail_in==0)return D;if(D=F,m.avail_in--,m.total_in++,((m.istate.method=m.next_in[m.next_in_index++])&15)!=l){m.istate.mode=E,m.msg="unknown compression method",m.istate.marker=5;break}if((m.istate.method>>4)+8>m.istate.wbits){m.istate.mode=E,m.msg="invalid window size",m.istate.marker=5;break}m.istate.mode=v;case v:if(m.avail_in==0)return D;if(D=F,m.avail_in--,m.total_in++,te=m.next_in[m.next_in_index++]&255,((m.istate.method<<8)+te)%31!=0){m.istate.mode=E,m.msg="incorrect header check",m.istate.marker=5;break}if((te&o)==0){m.istate.mode=w;break}m.istate.mode=_;case _:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=y;case y:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=x;case x:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=S;case S:return m.avail_in==0?D:(D=F,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.adler=m.istate.need,m.istate.mode=$,d);case $:return m.istate.mode=E,m.msg="need dictionary",m.istate.marker=0,f;case w:if(D=m.istate.blocks.proc(m,D),D==h){m.istate.mode=E,m.istate.marker=0;break}if(D==u&&(D=F),D!=c)return D;if(D=F,m.istate.blocks.reset(m,m.istate.was),m.istate.nowrap!=0){m.istate.mode=C;break}m.istate.mode=T;case T:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=k;case k:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=P;case P:if(m.avail_in==0)return D;D=F,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=R;case R:if(m.avail_in==0)return D;if(D=F,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.istate.was[0]!=m.istate.need){m.istate.mode=E,m.msg="incorrect data check",m.istate.marker=5;break}m.istate.mode=C;case C:return c;case E:return h;default:return f}},G.prototype.inflateSetDictionary=function(m,F,D){var te=0,K=D;return m==null||m.istate==null||m.istate.mode!=$?f:m._adler.adler32(1,F,0,D)!=m.adler?h:(m.adler=m._adler.adler32(0,null,0,0),K>=1<<m.istate.wbits&&(K=(1<<m.istate.wbits)-1,te=D-K),m.istate.blocks.set_dictionary(F,te,K),m.istate.mode=w,u)};var de=[0,0,255,255];G.prototype.inflateSync=function(m){var F,D,te,K,se;if(m==null||m.istate==null)return f;if(m.istate.mode!=E&&(m.istate.mode=E,m.istate.marker=0),(F=m.avail_in)==0)return g;for(D=m.next_in_index,te=m.istate.marker;F!=0&&te<4;)m.next_in[D]==de[te]?te++:m.next_in[D]!=0?te=0:te=4-te,D++,F--;return m.total_in+=D-m.next_in_index,m.next_in_index=D,m.avail_in=F,m.istate.marker=te,te!=4?h:(K=m.total_in,se=m.total_out,this.inflateReset(m),m.total_in=K,m.total_out=se,m.istate.mode=w,u)},G.prototype.inflateSyncPoint=function(m){return m==null||m.istate==null||m.istate.blocks==null?f:m.istate.blocks.sync_point()};var le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function q(m,F,D){this.hufts=new Int32Array(r*3),this.window=new Uint8Array(D),this.end=D,this.checkfn=F,this.mode=z,this.reset(m,null),this.left=0,this.table=0,this.index=0,this.blens=null,this.bb=new Int32Array(1),this.tb=new Int32Array(1),this.codes=new Re,this.last=0,this.bitk=0,this.bitb=0,this.read=0,this.write=0,this.check=0,this.inftree=new rt}q.prototype.reset=function(m,F){F&&(F[0]=this.check),this.mode==_e&&this.codes.free(m),this.mode=z,this.bitk=0,this.bitb=0,this.read=this.write=0,this.checkfn&&(m.adler=this.check=m._adler.adler32(0,null,0,0))},q.prototype.proc=function(m,F){var D,te,K,se,ue,ae,ke;for(se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae;;)switch(this.mode){case z:for(;K<3;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}switch(D=te&7,this.last=D&1,D>>>1){case 0:te>>>=3,K-=3,D=K&7,te>>>=D,K-=D,this.mode=j;break;case 1:{var Me=new Int32Array(1),$e=new Int32Array(1),ze=[],Je=[];lt(Me,$e,ze,Je),this.codes.init(Me[0],$e[0],ze[0],0,Je[0],0,m)}te>>>=3,K-=3,this.mode=_e;break;case 2:te>>>=3,K-=3,this.mode=J;break;case 3:return te>>>=3,K-=3,this.mode=E,m.msg="invalid block type",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F)}break;case j:for(;K<32;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if((~te>>>16&65535)!=(te&65535))return this.mode=E,m.msg="invalid stored block lengths",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);this.left=te&65535,te=K=0,this.mode=this.left!=0?Z:this.last!=0?oe:z;break;case Z:if(ue==0)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,F);if(ke==0&&(ae==end&&read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0&&(this.write=ae,F=this.inflate_flush(m,F),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,ae==this.end&&this.read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0)))return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);if(F=u,D=this.left,D>ue&&(D=ue),D>ke&&(D=ke),yt(m.next_in,se,this.window,ae,D),se+=D,ue-=D,ae+=D,ke-=D,(this.left-=D)!=0)break;this.mode=this.last!=0?oe:z;break;case J:for(;K<14;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(this.table=D=te&16383,(D&31)>29||(D>>5&31)>29)return this.mode=we,m.msg="too many length or distance symbols",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);if(D=258+(D&31)+(D>>5&31),this.blens==null||this.blens.length<D)this.blens=new Int32Array(D);else for(var Ne=0;Ne<D;Ne++)this.blens[Ne]=0;te>>>=14,K-=14,this.index=0,mode=ie;case ie:for(;this.index<4+(this.table>>>10);){for(;K<3;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}this.blens[le[this.index++]]=te&7,te>>>=3,K-=3}for(;this.index<19;)this.blens[le[this.index++]]=0;if(this.bb[0]=7,D=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,m),D!=u)return F=D,F==h&&(this.blens=null,this.mode=we),this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,F);this.index=0,this.mode=he;case he:for(;D=this.table,this.index<258+(D&31)+(D>>5&31);){var Ne,ht,Le;for(D=this.bb[0];K<D;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(D=this.hufts[(this.tb[0]+(te&I[D]))*3+1],Le=this.hufts[(this.tb[0]+(te&I[D]))*3+2],Le<16)te>>>=D,K-=D,this.blens[this.index++]=Le;else{for(Ne=Le==18?7:Le-14,ht=Le==18?11:3;K<D+Ne;){if(ue!=0)F=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(te>>>=D,K-=D,ht+=te&I[Ne],te>>>=Ne,K-=Ne,Ne=this.index,D=this.table,Ne+ht>258+(D&31)+(D>>5&31)||Le==16&&Ne<1)return this.blens=null,this.mode=we,m.msg="invalid bit length repeat",F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);Le=Le==16?this.blens[Ne-1]:0;do this.blens[Ne++]=Le;while(--ht!=0);this.index=Ne}}this.tb[0]=-1;{var Me=new Int32Array(1),$e=new Int32Array(1),ze=new Int32Array(1),Je=new Int32Array(1);if(Me[0]=9,$e[0]=6,D=this.table,D=this.inftree.inflate_trees_dynamic(257+(D&31),1+(D>>5&31),this.blens,Me,$e,ze,Je,this.hufts,m),D!=u)return D==h&&(this.blens=null,this.mode=E),F=D,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);this.codes.init(Me[0],$e[0],this.hufts,ze[0],this.hufts,Je[0],m)}this.mode=_e;case _e:if(this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,(F=this.codes.proc(this,m,F))!=c)return this.inflate_flush(m,F);if(F=u,this.codes.free(m),se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.last==0){this.mode=z;break}this.mode=oe;case oe:if(this.write=ae,F=this.inflate_flush(m,F),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.read!=this.write)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);mode=C;case ve:return F=c,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);case we:return F=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F);default:return F=f,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,F)}},q.prototype.free=function(m){this.reset(m,null),this.window=null,this.hufts=null},q.prototype.set_dictionary=function(m,F,D){yt(m,F,window,0,D),this.read=this.write=D},q.prototype.sync_point=function(){return this.mode==j},q.prototype.inflate_flush=function(m,F){var D,te,K;return te=m.next_out_index,K=this.read,D=(K<=this.write?this.write:this.end)-K,D>m.avail_out&&(D=m.avail_out),D!=0&&F==g&&(F=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D,K==this.end&&(K=0,this.write==this.end&&(this.write=0),D=this.write-K,D>m.avail_out&&(D=m.avail_out),D!=0&&F==g&&(F=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D),m.next_out_index=te,this.read=K,F};var N=0,re=1,L=2,O=3,ee=4,U=5,B=6,V=7,me=8,Ae=9;function Re(){}Re.prototype.init=function(m,F,D,te,K,se,ue){this.mode=N,this.lbits=m,this.dbits=F,this.ltree=D,this.ltree_index=te,this.dtree=K,this.dtree_index=se,this.tree=null},Re.prototype.proc=function(m,F,D){var te,K,se,ue=0,ae=0,ke=0,Me,$e,ze,Je;for(ke=F.next_in_index,Me=F.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e;;)switch(this.mode){case N:if(ze>=258&&Me>=10&&(m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,D=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,m,F),ke=F.next_in_index,Me=F.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,D!=u)){this.mode=D==c?V:Ae;break}this.need=this.lbits,this.tree=this.ltree,this.tree_index=this.ltree_index,this.mode=re;case re:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&I[te]))*3,ue>>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],se==0){this.lit=this.tree[K+2],this.mode=B;break}if((se&16)!=0){this.get=se&15,this.len=this.tree[K+2],this.mode=L;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}if((se&32)!=0){this.mode=V;break}return this.mode=Ae,F.msg="invalid literal/length code",D=h,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);case L:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}this.len+=ue&I[te],ue>>=te,ae-=te,this.need=this.dbits,this.tree=this.dtree,this.tree_index=this.dtree_index,this.mode=O;case O:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&I[te]))*3,ue>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],(se&16)!=0){this.get=se&15,this.dist=this.tree[K+2],this.mode=ee;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}return this.mode=Ae,F.msg="invalid distance code",D=h,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);case ee:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);Me--,ue|=(F.next_in[ke++]&255)<<ae,ae+=8}this.dist+=ue&I[te],ue>>=te,ae-=te,this.mode=U;case U:for(Je=$e-this.dist;Je<0;)Je+=m.end;for(;this.len!=0;){if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(F,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);m.window[$e++]=m.window[Je++],ze--,Je==m.end&&(Je=0),this.len--}this.mode=N;break;case B:if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(F,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);D=u,m.window[$e++]=this.lit,ze--,this.mode=N;break;case V:if(ae>7&&(ae-=8,Me++,ke--),m.write=$e,D=m.inflate_flush(F,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,m.read!=m.write)return m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);this.mode=me;case me:return D=c,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);case Ae:return D=h,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D);default:return D=f,m.bitb=ue,m.bitk=ae,F.avail_in=Me,F.total_in+=ke-F.next_in_index,F.next_in_index=ke,m.write=$e,m.inflate_flush(F,D)}},Re.prototype.free=function(m){},Re.prototype.inflate_fast=function(m,F,D,te,K,se,ue,ae){var ke,Me,$e,ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut;ht=ae.next_in_index,Le=ae.avail_in,Je=ue.bitb,Ne=ue.bitk,Be=ue.write,X=Be<ue.read?ue.read-Be-1:ue.end-Be,be=I[m],He=I[F];do{for(;Ne<20;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(ke=Je&be,Me=D,$e=te,ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;continue}do{if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15,Te=Me[ut+2]+(Je&I[ze]),Je>>=ze,Ne-=ze;Ne<15;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;ke=Je&He,Me=K,$e=se,ut=($e+ke)*3,ze=Me[ut];do if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15;Ne<ze;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(gt=Me[ut+2]+(Je&I[ze]),Je>>=ze,Ne-=ze,X-=Te,Be>=gt)De=Be-gt,Be-De>0&&2>Be-De,ue.window[Be++]=ue.window[De++],ue.window[Be++]=ue.window[De++],Te-=2;else{De=Be-gt;do De+=ue.end;while(De<0);if(ze=ue.end-De,Te>ze){if(Te-=ze,Be-De>0&&ze>Be-De)do ue.window[Be++]=ue.window[De++];while(--ze!=0);else yt(ue.window,De,ue.window,Be,ze),Be+=ze,De+=ze,ze=0;De=0}}do ue.window[Be++]=ue.window[De++];while(--Te!=0);break}else if((ze&64)==0)ke+=Me[ut+2],ke+=Je&I[ze],ut=($e+ke)*3,ze=Me[ut];else return ae.msg="invalid distance code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h;while(!0);break}if((ze&64)==0){if(ke+=Me[ut+2],ke+=Je&I[ze],ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;break}}else return(ze&32)!=0?(Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,c):(ae.msg="invalid literal/length code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h)}while(!0)}while(X>=258&&Le>=10);return Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,u};function rt(){}rt.prototype.huft_build=function(m,F,D,te,K,se,ue,ae,ke,Me,$e){var ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut,pn,Wt;Te=0,Le=D;do this.c[m[F+Te]]++,Te++,Le--;while(Le!=0);if(this.c[0]==D)return ue[0]=-1,ae[0]=0,u;for(be=ae[0],Be=1;Be<=i&&this.c[Be]==0;Be++);for(X=Be,be<Be&&(be=Be),Le=i;Le!=0&&this.c[Le]==0;Le--);for(Ne=Le,be>Le&&(be=Le),ae[0]=be,pn=1<<Be;Be<Le;Be++,pn<<=1)if((pn-=this.c[Be])<0)return h;if((pn-=this.c[Le])<0)return h;for(this.c[Le]+=pn,this.x[1]=Be=0,Te=1,ut=2;--Le!=0;)this.x[ut]=Be+=this.c[Te],ut++,Te++;Le=0,Te=0;do(Be=m[F+Te])!=0&&(this.v[this.x[Be]++]=Le),Te++;while(++Le<D);for(D=this.x[Ne],this.x[0]=Le=0,Te=0,ht=-1,De=-be,this.u[0]=0,gt=0,Wt=0;X<=Ne;X++)for(ze=this.c[X];ze--!=0;){for(;X>De+be;){if(ht++,De+=be,Wt=Ne-De,Wt=Wt>be?be:Wt,(Je=1<<(Be=X-De))>ze+1&&(Je-=ze+1,ut=X,Be<Wt))for(;++Be<Wt&&!((Je<<=1)<=this.c[++ut]);)Je-=this.c[ut];if(Wt=1<<Be,this.hn[0]+Wt>r)return h;this.u[ht]=gt=this.hn[0],this.hn[0]+=Wt,ht!=0?(this.x[ht]=Le,this.r[0]=Be,this.r[1]=be,Be=Le>>>De-be,this.r[2]=gt-this.u[ht-1]-Be,yt(this.r,0,ke,(this.u[ht-1]+Be)*3,3)):ue[0]=gt}for(this.r[1]=X-De,Te>=D?this.r[0]=192:$e[Te]<te?(this.r[0]=this.v[Te]<256?0:96,this.r[2]=this.v[Te++]):(this.r[0]=se[this.v[Te]-te]+16+64,this.r[2]=K[this.v[Te++]-te]),Je=1<<X-De,Be=Le>>>De;Be<Wt;Be+=Je)yt(this.r,0,ke,(gt+Be)*3,3);for(Be=1<<X-1;(Le&Be)!=0;Be>>>=1)Le^=Be;for(Le^=Be,He=(1<<De)-1;(Le&He)!=this.x[ht];)ht--,De-=be,He=(1<<De)-1}return pn!=0&&Ne!=1?g:u},rt.prototype.inflate_trees_bits=function(m,F,D,te,K){var se;return this.initWorkArea(19),this.hn[0]=0,se=this.huft_build(m,0,19,19,null,null,D,F,te,this.hn,this.v),se==h?K.msg="oversubscribed dynamic bit lengths tree":(se==g||F[0]==0)&&(K.msg="incomplete dynamic bit lengths tree",se=h),se},rt.prototype.inflate_trees_dynamic=function(m,F,D,te,K,se,ue,ae,ke){var Me;return this.initWorkArea(288),this.hn[0]=0,Me=this.huft_build(D,0,m,257,fe,Ee,se,te,ae,this.hn,this.v),Me!=u||te[0]==0?(Me==h?ke.msg="oversubscribed literal/length tree":Me!=p&&(ke.msg="incomplete literal/length tree",Me=h),Me):(this.initWorkArea(288),Me=this.huft_build(D,m,F,0,Pe,A,ue,K,ae,this.hn,this.v),Me!=u||K[0]==0&&m>257?(Me==h?ke.msg="oversubscribed distance tree":Me==g?(ke.msg="incomplete distance tree",Me=h):Me!=p&&(ke.msg="empty distance tree with lengths",Me=h),Me):u)};function lt(m,F,D,te,K){return m[0]=Oe,F[0]=xe,D[0]=Xe,te[0]=Ve,u}rt.prototype.initWorkArea=function(m){this.hn==null&&(this.hn=new Int32Array(1),this.v=new Int32Array(m),this.c=new Int32Array(i+1),this.r=new Int32Array(3),this.u=new Int32Array(i),this.x=new Int32Array(i+1)),this.v.length<m&&(this.v=new Int32Array(m));for(var F=0;F<m;F++)this.v[F]=0;for(var F=0;F<i+1;F++)this.c[F]=0;for(var F=0;F<3;F++)this.r[F]=0;yt(this.c,0,this.u,0,i),yt(this.c,0,this.x,0,i+1)};var ft=new Uint8Array(1),zt=typeof ft.subarray=="function";function yt(m,F,D,te,K){if(K!=0){if(m){if(!D)throw"Undef dest"}else throw"Undef src";F==0&&K==m.length?ye(m,D,te):zt?ye(m.subarray(F,F+K),D,te):m.BYTES_PER_ELEMENT==1&&K>100?ye(new Uint8Array(m.buffer,m.byteOffset+F,K),D,te):Lt(m,F,D,te,K)}}function Lt(m,F,D,te,K){for(var se=0;se<K;++se)D[te+se]=m[F+se]}function ye(m,F,D){F.set(m,D)}function Y(m,F,D,te){F?D?m=new Uint8Array(m,F,D):m=new Uint8Array(m,F,m.byteLength-F):m=new Uint8Array(m);var K=new H;K.inflateInit(n,!0),K.next_in=m,K.next_in_index=0,K.avail_in=m.length;for(var se=[],ue=0;;){var ae=new Uint8Array(32e3);K.next_out=ae,K.next_out_index=0,K.avail_out=ae.length;var ke=K.inflate(a);if(ke!=u&&ke!=c&&ke!=g)throw K.msg;if(K.avail_out!=0){var Me=new Uint8Array(ae.length-K.avail_out);yt(ae,0,Me,0,ae.length-K.avail_out),ae=Me}if(se.push(ae),ue+=ae.length,ke==c||ke==g)break}if(te&&(te[0]=(F||0)+K.next_in_index),se.length==1)return se[0].buffer;for(var $e=new Uint8Array(ue),ze=0,Je=0;Je<se.length;++Je){var Ne=se[Je];yt(Ne,0,$e,ze,Ne.length),ze+=Ne.length}return $e.buffer}e.exports={inflateBuffer:Y,arrayCopy:yt}}(Yp)),Yp.exports}var Ex=aZ();function w4(e,t){this.block=e,this.offset=t}w4.prototype.toString=function(){return""+this.block+":"+this.offset};function Vc(e,t,n){var r=(e[t+6]&255)*4294967296+(e[t+5]&255)*16777216+(e[t+4]&255)*65536+(e[t+3]&255)*256+(e[t+2]&255),i=e[t+1]<<8|e[t];return r==0&&i==0&&!n?null:new w4(r,i)}function nm(e,t){t=Math.min(t||1,e.byteLength-50);for(var n=[],r=[0],i=0;r[0]<t;){var o=new Uint8Array(e,r[0],12),a=o[11]<<8|o[10],s=Ex.inflateBuffer(e,12+a+r[0],Math.min(65536,e.byteLength-12-a-r[0]),r);r[0]+=8,i+=s.byteLength,n.push(s)}if(n.length==1)return n[0];for(var l=new Uint8Array(i),u=0,c=0;c<n.length;++c){var d=new Uint8Array(n[c]);Ex.arrayCopy(d,0,l,u,d.length),u+=d.length}return l.buffer}function Ax(e,t){this.minv=e,this.maxv=t}function sZ(e,t){var n,r=[];for(--t,r.push(0),n=1+(e>>26);n<=1+(t>>26);++n)r.push(n);for(n=9+(e>>23);n<=9+(t>>23);++n)r.push(n);for(n=73+(e>>20);n<=73+(t>>20);++n)r.push(n);for(n=585+(e>>17);n<=585+(t>>17);++n)r.push(n);for(n=4681+(e>>14);n<=4681+(t>>14);++n)r.push(n);return r}var lZ=21578324;function Bu(){}function uZ(e,t,n){var r=new Bu;r.data=e,r.tbi=t,r.tbi.fetch(function(i){if(!i)return n(null,"Couldn't access Tabix");var o=nm(i,i.byteLength),a=new Uint8Array(o),s=an(a,0);if(s!=lZ)return n(null,"Not a tabix index");var l=an(a,4);r.format=an(a,8),r.colSeq=an(a,12),r.colStart=an(a,16),r.colEnd=an(a,20),r.meta=an(a,24),r.skip=an(a,28),an(a,32),r.indices=[];var u=36;r.chrToIndex={},r.indexToChr=[];for(var c=0;c<l;++c){for(var d="";;){var f=a[u++];if(f==0)break;d+=String.fromCharCode(f)}r.chrToIndex[d]=c,d.indexOf("chr")==0?r.chrToIndex[d.substring(3)]=c:r.chrToIndex["chr"+d]=c,r.indexToChr.push(d)}for(var h=1e9,p=0;p<l;++p){var g=u,b=an(a,u);u+=4;for(var v=0;v<b;++v){an(a,u);var _=an(a,u+4);u+=8+_*16}var y=an(a,u);u+=4;for(var x=u,c=0;c<y;++c){var S=Vc(a,x);if(x+=8,S){var $=S.block;S.offset>0&&($+=65536),$<h&&(h=$);break}}u+=y*8,b>0&&(r.indices[p]=new Uint8Array(o,g,u-g))}r.headerMax=h,n(r)},{timeout:5e4})}Bu.prototype.blocksForRange=function(e,t,n){var r=this.indices[e];if(!r)return[];for(var i=sZ(t,n),o=[],a=0;a<i.length;++a)o[i[a]]=!0;for(var s=[],l=[],u=an(r,0),c=4,d=0;d<u;++d){var f=an(r,c),h=an(r,c+4);if(c+=8,o[f])for(var p=0;p<h;++p){var g=Vc(r,c,!0),b=Vc(r,c+8,!0);(f<4681?l:s).push(new Ax(g,b)),c+=16}else c+=h*16}for(var v=an(r,c),_=null,y=Math.min(t>>14,v-1),x=Math.min(n>>14,v-1),a=y;a<=x;++a){var S=Vc(r,c+4+a*8);S&&(!_||S.block<_.block||S.offset<_.offset)&&(_=S)}var $=[];if(_!=null)for(var a=0;a<l.length;++a){var w=l[a];w.maxv.block>=_.block&&w.maxv.offset>=_.offset&&$.push(w)}l=$;for(var T=[],a=0;a<l.length;++a)T.push(l[a]);for(var a=0;a<s.length;++a)T.push(s[a]);T.sort(function(C,E){var I=C.minv.block-E.minv.block;return I!=0?I:C.minv.offset-E.minv.offset});var k=[];if(T.length>0){for(var P=T[0],a=1;a<T.length;++a){var R=T[a];R.minv.block==P.maxv.block?P=new Ax(P.minv,R.maxv):(k.push(P),P=R)}k.push(P)}return k};Bu.prototype.fetch=function(e,t,n,r){var i=this,o=this.chrToIndex[e];if(o==null)return r([]);var a=this.indexToChr[o],s;o===void 0?s=[]:(s=this.blocksForRange(o,t,n),s||r(null,"Error in index fetch"));var l=[],u=0,c;function d(){if(u>=s.length)return r(l);if(c){var g=new Uint8Array(c);return i.readRecords(g,s[u].minv.offset,l,t,n,a),c=null,++u,d()}else{var f=s[u],h=f.minv.block,p=f.maxv.block+65536;i.data.slice(h,p-h).fetch(function(b){try{return c=nm(b,f.maxv.block-f.minv.block+1),d()}catch(v){return r(null,v)}})}}try{d()}catch(f){r(null,f)}};Bu.prototype.readRecords=function(e,t,n,r,i,o){e:for(;;){for(var a="";t<e.length;){var s=e[t++];if(s==10){var l=a.split(" ");if(l[this.colSeq-1]==o){var u=parseInt(l[this.colStart-1]),c=u;this.colEnd>0&&(c=parseInt(l[this.colEnd-1])),this.format&65536&&++u,u<=i&&c>=r&&n.push(a)}continue e}else a+=String.fromCharCode(s)}return}};Bu.prototype.fetchHeader=function(e,t){var n={metaOnly:!0,skipped:!1,nLines:0};t=t||n,Object.keys(n).forEach(function(i){t.hasOwnProperty(i)||(t[i]=n[i])});var r=this;r.data.slice(0,r.headerMax).fetch(function(i){if(!i)return e(null,"Fetch failed");for(var o=new Uint8Array(nm(i,i.byteLength)),a=0,s="",l=[];a<o.length;){var u=o[a++];if(u==10)if(t.metaOnly&&s.charCodeAt(0)==r.meta||t.skipped&&l.length<r.skip||t.nLines&&l.length<t.nLines)l.push(s),s="";else return e(l);else s+=String.fromCharCode(u)}e(l)})};function cZ(e,t){return new Promise(function(n,r){uZ(new mi(e),new mi(t),function(i,o){o?r(o):n(i)})})}function C4(e){const t=e.Adapters.get("BaseLZAdapter");class n extends t{constructor(i){if(super(i),!i.parser_func||!(i.url_data||i.reader))throw new Error("Tabix source is missing required configuration options");if(this.parser=i.parser_func,this.url_data=i.url_data,this.url_tbi=i.url_tbi||`${this.url_data}.tbi`,this._overfetch=i.overfetch||0,this._overfetch<0||this._overfetch>1)throw new Error("Overfetch must be specified as a fraction (0-1) of the requested region size");this.url_data?this._reader_promise=cZ(this.url_data,this.url_tbi).catch(function(){throw new Error("Failed to create a tabix reader from the provided URL")}):this._reader_promise=Promise.resolve(i.reader)}_performRequest(i){return new Promise((o,a)=>{const s=i.start,l=i.end,u=this._overfetch*(l-s),c=i.start-u,d=i.end+u;this._reader_promise.then(f=>{f.fetch(i.chr,c,d,function(h,p){p&&a(new Error("Could not read requested region. This may indicate an error with the .tbi index.")),o(h)})})})}_normalizeResponse(i){return i.map(this.parser)}}e.Adapters.add("TabixUrlSource",n)}typeof LocusZoom<"u"&&LocusZoom.use(C4);const Oi=new Set(["",".","NA","N/A","n/a","nan","-nan","NaN","-NaN","null","NULL","None",null]),fZ=/([\d.-]+)([\sxeE]*)([0-9-]*)/;function Gt(e){return Number.isInteger(e)}function dZ(e){return e.replace(/^chr/g,"").toUpperCase()}function hZ(e,t=!1){if(e===null)return e;const n=+e;if(t)return n;if(n<0||n>1)throw new Error("p value is not in the allowed range");if(n===0){if(e==="0")return 1/0;let[,r,,i]=e.match(fZ);return r=+r,i!==""?i=+i:i=0,r===0?1/0:-(Math.log10(+r)+ +i)}return-Math.log10(n)}function pZ({freq:e,allele_count:t,n_samples:n,is_alt_effect:r=!0}){if(e!==void 0&&t!==void 0)throw new Error("Frequency and allele count options are mutually exclusive");let i;if(e===void 0&&(Oi.has(t)||Oi.has(n)))return null;if(e===void 0&&t!==void 0)i=+t/+n/2;else{if(Oi.has(e))return null;i=+e}if(i<0||i>1)throw new Error("Allele frequency is not in the allowed range");return r?i:1-i}function gZ({marker_col:e,chrom_col:t,pos_col:n,ref_col:r,alt_col:i,pvalue_col:o,is_neg_log_pvalue:a=!1,rsid_col:s,beta_col:l,stderr_beta_col:u,allele_freq_col:c,allele_count_col:d,n_samples_col:f,is_alt_effect:h=!0,delimiter:p=" "}){if(Gt(e)&&Gt(t)&&Gt(n))throw new Error("Must specify either marker OR chr + pos");if(!(Gt(e)||Gt(t)&&Gt(n)))throw new Error("Must specify how to locate marker");if(Gt(d)&&Gt(c))throw new Error("Allele count and frequency options are mutually exclusive");if(Gt(d)&&!Gt(f))throw new Error("To calculate allele frequency from counts, you must also provide n_samples");return g=>{const b=g.split(p);let v,_,y,x,S=null,$,w=null,T=null,k=null,P,R;if(Gt(e))[v,_,y,x]=N5(b[e-1],!1);else if(Gt(t)&&Gt(n))v=b[t-1],_=b[n-1];else throw new Error("Must specify all fields required to identify the variant");if(v=dZ(v),v.startsWith("RS"))throw new Error(`Invalid chromosome specified: value "${v}" is an rsID`);Gt(r)&&(y=b[r-1]),Gt(i)&&(x=b[i-1]),Gt(s)&&(S=b[s-1]),Oi.has(y)&&(y=null),Oi.has(x)&&(x=null),Oi.has(S)?S=null:S&&(S=S.toLowerCase(),S.startsWith("rs")||(S=`rs${S}`));const C=hZ(b[o-1],a);y=y||null,x=x||null,Gt(c)&&($=b[c-1]),Gt(d)&&(P=b[d-1],R=b[f-1]),Gt(l)&&(w=b[l-1],w=Oi.has(w)?null:+w),Gt(u)&&(T=b[u-1],T=Oi.has(T)?null:+T),(c||d)&&(k=pZ({freq:$,allele_count:P,n_samples:R,is_alt_effect:h}));const E=y&&x?`_${y}/${x}`:"";return{chromosome:v,position:+_,ref_allele:y?y.toUpperCase():null,alt_allele:x?x.toUpperCase():null,variant:`${v}:${_}${E}`,rsid:S,log_pvalue:C,beta:w,stderr_beta:T,alt_allele_freq:k}}}function vZ(e){if(e.Adapters.has("TabixUrlSource")){const t=e.Adapters.get("TabixUrlSource"),n=e.Adapters.get("LDServer");class r extends t{constructor(o){o.limit_fields||(o.limit_fields=["variant2","position2","correlation"]),super(o)}_buildRequestOptions(o,a){if(!a)throw new Error("LD request must depend on association data");const s=super._buildRequestOptions(...arguments);return a.length?(s.ld_refvar=n.prototype.__find_ld_refvar(o,a),s):(s._skip_request=!0,s)}_performRequest(o){return o._skip_request?Promise.resolve([]):super._performRequest(o)}_annotateRecords(o,a){return o.filter(s=>s.variant1===a.ld_refvar)}}e.Adapters.add("UserTabixLD",r)}}typeof LocusZoom<"u"&&LocusZoom.use(vZ);const bZ={key:0,class:"absolute mt-1 p-3 border bg-red-100 text-red-700 text-sm rounded opacity-95 w-[100%]"},mZ=ot("div",{id:"lz-plot",class:"h-100"},null,-1),Px="#E30A17",yZ=1e7,Rx=40,_Z={__name:"Plugin",props:{datasetId:String,datasetUrl:String,root:String,settings:Object,specs:Object,tracks:Array},setup(e){ai.use(C4);const t=ai.Adapters.get("TabixUrlSource");let n=!1;t.prototype._performRequest=function(a){const s=a.start,l=a.end,u=this._overfetch*(l-s),c=a.start-u,d=a.end+u;return new Promise((f,h)=>{this._reader_promise.then(p=>{if(!n&&p.data){const g=Object.getPrototypeOf(p.data);g.fetch,g.fetch=function(b,v){var _=this;v=v||{};var y=v.attempt||1,x=v.truncatedLength;if(y>3)return console.warn("Max fetch attempts reached"),b(null);this.getURL().then(function(S){try{var $;v.timeout&&!_.opts.credentials&&($=setTimeout(function(){return console.log("timing out "+S),w.abort(),b(null,"Timeout")},v.timeout));var w=new XMLHttpRequest,T;if(w.open("GET",S,!0),w.overrideMimeType("text/plain; charset=x-user-defined"),_.end){if(_.end-_.start>1e8)throw"Monster fetch!";w.setRequestHeader("Range","bytes="+_.start+"-"+_.end),T=_.end-_.start+1}w.responseType="arraybuffer",w.onreadystatechange=function(){if(w.readyState==4)if($&&clearTimeout($),w.status==200||w.status==206)if(w.response){var k=w.response.byteLength;return T&&T!=k&&(!x||k!=x)?(console.warn(`Byte length mismatch (expected ${T}, got ${k}), retrying...`),_.fetch(b,{attempt:y+1,truncatedLength:k})):b(w.response)}else{if(w.mozResponseArrayBuffer)return b(w.mozResponseArrayBuffer);var P=w.responseText;return T&&T!=P.length&&(!x||P.length!=x)?(console.warn("Text length mismatch, retrying..."),_.fetch(b,{attempt:y+1,truncatedLength:P.length})):b(bstringToBuffer(w.responseText))}else return console.warn(`HTTP ${w.status} on attempt ${y}, retrying...`),w.status===416&&(console.log("Range not satisfiable, resetting end"),_.end=""),_.fetch(b,{attempt:y+1})},_.opts.credentials&&(w.withCredentials=!0),w.send()}catch(k){return console.error("Fetch error:",k),b(null)}}).catch(function(S){return console.error("getURL error:",S),b(null,S)})},n=!0}p.fetch(a.chr,c,d,(g,b)=>{if(b)return console.warn("Tabix fetch failed:",b),h(new Error(b));f(g)})}).catch(p=>h(p))})},window.nowrap=!1,window.mode=!1;const r=e,i=ne("");function o(){var w;const a=(w=r.settings.tabix)==null?void 0:w.id,s=r.settings.chromosome,l=r.settings.start,u=r.settings.end,c=r.settings.chrom_col,d=r.settings.pos_col,f=r.settings.ref_col,h=r.settings.alt_col,p=r.settings.pvalue_col,g=r.settings.is_neg_log_pvalue,b=r.settings.beta_col,v=r.settings.stderr_beta_col;if(!a){i.value="Please select a Tabix file.";return}if(u-l>yZ){i.value="We cannot output more than 10Mb at a time!";return}if(u<=l){i.value="Invalid input: End position must be bigger than start position!";return}i.value="";const _=gZ({chrom_col:c,pos_col:d,ref_col:f,alt_col:h,pvalue_col:p,is_neg_log_pvalue:g,beta_col:b,stderr_beta_col:v});let y=new ai.DataSources().add("assoc",["TabixUrlSource",{url_data:`${r.root}api/datasets/${r.datasetId}/display`,url_tbi:`${r.root}api/datasets/${a}/display`,parser_func:_,overfetch:0}]),x={id:"associationpvalues_",name:"association",point_shape:"circle",point_size:Rx,color:Px,legend:[{shape:"circle",color:Px,size:Rx,label:"phen",class:"lz-data_layer-scatter"}],tooltip:{closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>phen</strong><br><strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2019
2019
|
P Value: <strong>{{assoc:log_pvalue|logtoscinotation|htmlescape}}</strong><br>
|
|
2020
|
-
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>`}};const
|
|
2020
|
+
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>`}};const S={...ai.Layouts.get("data_layer","association_pvalues",x),namespace:{assoc:"assoc"},data_operations:[]},$=ai.Layouts.get("panel","association",{data_layers:[S]});ai.populate("#lz-plot",y,{state:{chr:s,start:l,end:u},responsive_resize:!0,panels:[$],toolbar:ai.Layouts.get("toolbar","standard_plot")}),document.querySelector("#lz-plot_svg").style.height="calc(100vh - 50px)"}return dn(()=>{o()}),vt(()=>r,()=>{o()},{deep:!0}),(a,s)=>(We(),xt(Tt,null,[i.value?(We(),xt("div",bZ,hi(i.value),1)):Xn("",!0),mZ],64))}},xZ=Ie({__name:"App",props:{container:{},credentials:{},incoming:{}},setup(e){return(t,n)=>(We(),Ft(qe(JF),{container:t.container,credentials:t.credentials,incoming:t.incoming},{default:mt(({datasetId:r,datasetUrl:i,root:o,settings:a,specs:s,tracks:l})=>[Ye(_Z,{"dataset-id":r,"dataset-url":i,root:o,settings:a,specs:s,tracks:l},null,8,["dataset-id","dataset-url","root","settings","specs","tracks"])]),_:1},8,["container","credentials","incoming"]))}});async function wZ(){const t=new URL(import.meta.url).searchParams.get("container")||"app";Tk({render:()=>M(xZ,{container:t,credentials:"include"})}).mount(`#${t}`)}wZ();
|