@moderneinc/react-charts 1.5.2-next.f8b5a8 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.js +2565 -2564
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u=require("@mui/material"),d=require("react");d=l(d,1);let f=require("react/jsx-runtime"),p=require("@mui/icons-material");var m=10.5,h=(0,d.memo)(({ticks:e,plotWidth:t,height:n,colors:r,fontFamily:i})=>(0,f.jsxs)(`g`,{className:`campaign-axis`,children:[(0,f.jsx)(`rect`,{x:0,y:0,width:t,height:n,fill:r.track,stroke:`none`}),(0,f.jsx)(`line`,{x1:0,y1:0,x2:t,y2:0,stroke:r.border,strokeWidth:1}),(0,f.jsx)(`line`,{x1:0,y1:n,x2:t,y2:n,stroke:r.border,strokeWidth:1}),e.map(e=>(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`line`,{x1:e.x,y1:0,x2:e.x,y2:e.showLabel?5:3,stroke:r.muted,strokeWidth:1,strokeOpacity:e.showLabel?1:.5}),e.showLabel?(0,f.jsx)(`text`,{x:e.x,y:n/2+1,textAnchor:`middle`,dominantBaseline:`central`,fill:r.text,fontSize:m,fontWeight:600,fontFamily:i,style:{fontVariantNumeric:`tabular-nums`},children:e.label}):null]},e.timestamp))]}));function g(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function v(e){let t,n,r;e.length===2?(t=e===g||e===_?e:y,n=e,r=e):(t=g,n=(t,n)=>g(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function y(){return 0}function b(e){return e===null?NaN:+e}var x=v(g),S=x.right;x.left,v(b).center;var C=Math.sqrt(50),w=Math.sqrt(10),T=Math.sqrt(2);function E(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=C?10:a>=w?5:a>=T?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?E(e,t,n*2):[s,c,l]}function D(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?E(t,e,n):E(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function O(e,t,n){return t=+t,e=+e,n=+n,E(e,t,n)[2]}function k(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?O(t,e,n):O(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function A(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function j(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function M(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function N(){}var P=.7,F=1/P,I=`\\s*([+-]?\\d+)\\s*`,L=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,R=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,z=/^#([0-9a-f]{3,8})$/,B=RegExp(`^rgb\\(${I},${I},${I}\\)$`),V=RegExp(`^rgb\\(${R},${R},${R}\\)$`),H=RegExp(`^rgba\\(${I},${I},${I},${L}\\)$`),U=RegExp(`^rgba\\(${R},${R},${R},${L}\\)$`),ee=RegExp(`^hsl\\(${L},${R},${R}\\)$`),te=RegExp(`^hsla\\(${L},${R},${R},${L}\\)$`),ne={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};j(N,G,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:re,formatHex:re,formatHex8:W,formatHsl:ie,formatRgb:ae,toString:ae});function re(){return this.rgb().formatHex()}function W(){return this.rgb().formatHex8()}function ie(){return ge(this).formatHsl()}function ae(){return this.rgb().formatRgb()}function G(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=z.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?oe(t):n===3?new K(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?se(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?se(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=B.exec(e))?new K(t[1],t[2],t[3],1):(t=V.exec(e))?new K(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H.exec(e))?se(t[1],t[2],t[3],t[4]):(t=U.exec(e))?se(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ee.exec(e))?he(t[1],t[2]/100,t[3]/100,1):(t=te.exec(e))?he(t[1],t[2]/100,t[3]/100,t[4]):ne.hasOwnProperty(e)?oe(ne[e]):e===`transparent`?new K(NaN,NaN,NaN,0):null}function oe(e){return new K(e>>16&255,e>>8&255,e&255,1)}function se(e,t,n,r){return r<=0&&(e=t=n=NaN),new K(e,t,n,r)}function ce(e){return e instanceof N||(e=G(e)),e?(e=e.rgb(),new K(e.r,e.g,e.b,e.opacity)):new K}function le(e,t,n,r){return arguments.length===1?ce(e):new K(e,t,n,r??1)}function K(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}j(K,le,M(N,{brighter(e){return e=e==null?F:F**+e,new K(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?P:P**+e,new K(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new K(pe(this.r),pe(this.g),pe(this.b),q(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ue,formatHex:ue,formatHex8:de,formatRgb:fe,toString:fe}));function ue(){return`#${me(this.r)}${me(this.g)}${me(this.b)}`}function de(){return`#${me(this.r)}${me(this.g)}${me(this.b)}${me((isNaN(this.opacity)?1:this.opacity)*255)}`}function fe(){let e=q(this.opacity);return`${e===1?`rgb(`:`rgba(`}${pe(this.r)}, ${pe(this.g)}, ${pe(this.b)}${e===1?`)`:`, ${e})`}`}function q(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function me(e){return e=pe(e),(e<16?`0`:``)+e.toString(16)}function he(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ve(e,t,n,r)}function ge(e){if(e instanceof ve)return new ve(e.h,e.s,e.l,e.opacity);if(e instanceof N||(e=G(e)),!e)return new ve;if(e instanceof ve)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new ve(o,s,c,e.opacity)}function _e(e,t,n,r){return arguments.length===1?ge(e):new ve(e,t,n,r??1)}function ve(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}j(ve,_e,M(N,{brighter(e){return e=e==null?F:F**+e,new ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?P:P**+e,new ve(this.h,this.s,this.l*e,this.opacity)},rgb(){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 K(xe(e>=240?e-240:e+120,i,r),xe(e,i,r),xe(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ve(ye(this.h),be(this.s),be(this.l),q(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=q(this.opacity);return`${e===1?`hsl(`:`hsla(`}${ye(this.h)}, ${be(this.s)*100}%, ${be(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function ye(e){return e=(e||0)%360,e<0?e+360:e}function be(e){return Math.max(0,Math.min(1,e||0))}function xe(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 Se=e=>()=>e;function Ce(e,t){return function(n){return e+n*t}}function we(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Te(e){return(e=+e)==1?Ee:function(t,n){return n-t?we(t,n,e):Se(isNaN(t)?n:t)}}function Ee(e,t){var n=t-e;return n?Ce(e,n):Se(isNaN(e)?t:e)}var De=(function e(t){var n=Te(t);function r(e,t){var r=n((e=le(e)).r,(t=le(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Ee(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Oe(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ke(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ae(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=ze(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function je(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Me(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ne(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=ze(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Pe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fe=new RegExp(Pe.source,`g`);function Ie(e){return function(){return e}}function Le(e){return function(t){return e(t)+``}}function Re(e,t){var n=Pe.lastIndex=Fe.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Pe.exec(e))&&(i=Fe.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Me(r,i)})),n=Fe.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Le(c[0].x):Ie(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function ze(e,t){var n=typeof t,r;return t==null||n===`boolean`?Se(t):(n===`number`?Me:n===`string`?(r=G(t))?(t=r,De):Re:t instanceof G?De:t instanceof Date?je:ke(t)?Oe:Array.isArray(t)?Ae:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Ne:Me)(e,t)}function Be(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ve=180/Math.PI,He={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ue(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Ve,skewX:Math.atan(c)*Ve,scaleX:o,scaleY:s}}var We;function Ge(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?He:Ue(t.a,t.b,t.c,t.d,t.e,t.f)}function Ke(e){return e==null||(We||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),We.setAttribute(`transform`,e),!(e=We.transform.baseVal.consolidate()))?He:(e=e.matrix,Ue(e.a,e.b,e.c,e.d,e.e,e.f))}function qe(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Me(e,i)},{i:c-2,x:Me(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Me(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Me(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Me(e,n)},{i:s-2,x:Me(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Je=qe(Ge,`px, `,`px)`,`deg)`),Ye=qe(Ke,`, `,`)`,`)`);function Xe(e){return function(){return e}}function Ze(e){return+e}var Qe=[0,1];function $e(e){return e}function et(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Xe(isNaN(t)?NaN:.5)}function tt(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function nt(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=et(i,r),a=n(o,a)):(r=et(r,i),a=n(a,o)),function(e){return a(r(e))}}function rt(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=et(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=S(e,t,1,r)-1;return a[n](i[n](t))}}function it(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function at(){var e=Qe,t=Qe,n=ze,r,i,a,o=$e,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==$e&&(o=tt(e[0],e[n-1])),s=n>2?rt:nt,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Me))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,Ze),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=Be,u()},d.clamp=function(e){return arguments.length?(o=e?!0:$e,u()):o!==$e},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function ot(){return at()($e,$e)}function st(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function ct(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function lt(e){return e=ct(Math.abs(e)),e?e[1]:NaN}function ut(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function dt(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var ft=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pt(e){if(!(t=ft.exec(e)))throw Error(`invalid format: `+e);var t;return new mt({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]})}pt.prototype=mt.prototype;function mt(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+``}mt.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 ht(e){out: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 out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var gt;function _t(e,t){var n=ct(e,t);if(!n)return gt=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(gt=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+ct(e,Math.max(0,t+a-1))[0]}function vt(e,t){var n=ct(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var yt={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:st,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>vt(e*100,t),r:vt,s:_t,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bt(e){return e}var xt=Array.prototype.map,St=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Ct(e){var t=e.grouping===void 0||e.thousands===void 0?bt:ut(xt.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+``,a=e.numerals===void 0?bt:dt(xt.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=pt(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):yt[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=yt[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=ht(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&>!==void 0?St[8+gt/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(lt(t)/3)))*3,r=10**-n,i=l((e=pt(e),e.type=`f`,e),{suffix:St[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var wt,Tt,Et;Dt({thousands:`,`,grouping:[3],currency:[`$`,``]});function Dt(e){return wt=Ct(e),Tt=wt.format,Et=wt.formatPrefix,wt}function Ot(e){return Math.max(0,-lt(Math.abs(e)))}function kt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lt(t)/3)))*3-lt(Math.abs(e)))}function At(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lt(t)-lt(e))+1}function jt(e,t,n,r){var i=k(e,t,n),a;switch(r=pt(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=kt(i,o))&&(r.precision=a),Et(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=At(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Ot(i))&&(r.precision=a-(r.type===`%`)*2);break}return Tt(r)}function Mt(e){var t=e.domain;return e.ticks=function(e){var n=t();return D(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return jt(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=O(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Nt(){var e=ot();return e.copy=function(){return it(e,Nt())},A.apply(e,arguments),Mt(e)}function Pt(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Ft=new Date,It=new Date;function Lt(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Lt(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Ft.setTime(+t),It.setTime(+r),e(Ft),e(It),Math.floor(n(Ft,It))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Rt=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Rt.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Rt),Rt.range;var zt=1e3,Bt=zt*60,Vt=Bt*60,Ht=Vt*24,Ut=Ht*7,Wt=Ht*30,Gt=Ht*365,Kt=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getUTCSeconds());Kt.range;var qt=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt)},(e,t)=>{e.setTime(+e+t*Bt)},(e,t)=>(t-e)/Bt,e=>e.getMinutes());qt.range;var Jt=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Bt)},(e,t)=>(t-e)/Bt,e=>e.getUTCMinutes());Jt.range;var Yt=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt-e.getMinutes()*Bt)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getHours());Yt.range;var Xt=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getUTCHours());Xt.range;var Zt=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Bt)/Ht,e=>e.getDate()-1);Zt.range;var Qt=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ht,e=>e.getUTCDate()-1);Qt.range;var $t=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ht,e=>Math.floor(e/Ht));$t.range;function en(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Bt)/Ut)}var tn=en(0),nn=en(1),rn=en(2),an=en(3),on=en(4),sn=en(5),cn=en(6);tn.range,nn.range,rn.range,an.range,on.range,sn.range,cn.range;function ln(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ut)}var un=ln(0),dn=ln(1),fn=ln(2),pn=ln(3),mn=ln(4),hn=ln(5),gn=ln(6);un.range,dn.range,fn.range,pn.range,mn.range,hn.range,gn.range;var _n=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());_n.range;var vn=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());vn.range;var yn=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());yn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),yn.range;var bn=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());bn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),bn.range;function xn(e,t,n,r,i,a){let o=[[Kt,1,zt],[Kt,5,5*zt],[Kt,15,15*zt],[Kt,30,30*zt],[a,1,Bt],[a,5,5*Bt],[a,15,15*Bt],[a,30,30*Bt],[i,1,Vt],[i,3,3*Vt],[i,6,6*Vt],[i,12,12*Vt],[r,1,Ht],[r,2,2*Ht],[n,1,Ut],[t,1,Wt],[t,3,3*Wt],[e,1,Gt]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=v(([,,e])=>e).right(o,i);if(a===o.length)return e.every(k(t/Gt,n/Gt,r));if(a===0)return Rt.every(Math.max(k(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[Sn,Cn]=xn(bn,vn,un,$t,Xt,Jt),[wn,Tn]=xn(yn,_n,tn,Zt,Yt,qt);function En(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 Dn(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 On(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kn(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Fn(i),u=In(i),d=Fn(a),f=In(a),p=Fn(o),m=In(o),h=Fn(s),g=In(s),_=Fn(c),v=In(c),y={a:N,A:P,b:F,B:I,c:null,d:rr,e:rr,f:cr,g:yr,G:xr,H:ir,I:ar,j:or,L:sr,m:lr,M:ur,p:L,q:R,Q:Wr,s:Gr,S:dr,u:fr,U:pr,V:hr,w:gr,W:_r,x:null,X:null,y:vr,Y:br,Z:Sr,"%":Ur},b={a:z,A:B,b:V,B:H,c:null,d:Cr,e:Cr,f:Or,g:zr,G:Vr,H:wr,I:Tr,j:Er,L:Dr,m:kr,M:Ar,p:U,q:ee,Q:Wr,s:Gr,S:jr,u:Mr,U:Nr,V:Fr,w:Ir,W:Lr,x:null,X:null,y:Rr,Y:Br,Z:Hr,"%":Ur},x={a:E,A:D,b:O,B:k,c:A,d:qn,e:qn,f:$n,g:Un,G:Hn,H:Yn,I:Yn,j:Jn,L:Qn,m:Kn,M:Xn,p:T,q:Gn,Q:tr,s:nr,S:Zn,u:Rn,U:zn,V:Bn,w:Ln,W:Vn,x:j,X:M,y:Un,Y:Hn,Z:Wn,"%":er};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=An[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=On(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=Dn(On(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?dn.ceil(a):dn(a),a=Qt.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=En(On(r.y,0,1)),o=a.getDay(),a=o>4||o===0?nn.ceil(a):nn(a),a=Zt.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?Dn(On(r.y,0,1)).getUTCDay():En(On(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Dn(r)):En(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in An?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function U(e){return i[+(e.getUTCHours()>=12)]}function ee(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var An={"-":``,_:` `,0:`0`},jn=/^\s*\d+/,Mn=/^%/,Nn=/[\\^$*+?|[\]().{}]/g;function J(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Pn(e){return e.replace(Nn,`\\$&`)}function Fn(e){return RegExp(`^(?:`+e.map(Pn).join(`|`)+`)`,`i`)}function In(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Ln(e,t,n){var r=jn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Rn(e,t,n){var r=jn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function zn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Vn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Hn(e,t,n){var r=jn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Un(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Wn(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 Gn(e,t,n){var r=jn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Kn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function qn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Jn(e,t,n){var r=jn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Yn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Xn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Zn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Qn(e,t,n){var r=jn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function $n(e,t,n){var r=jn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function er(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tr(e,t,n){var r=jn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nr(e,t,n){var r=jn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function rr(e,t){return J(e.getDate(),t,2)}function ir(e,t){return J(e.getHours(),t,2)}function ar(e,t){return J(e.getHours()%12||12,t,2)}function or(e,t){return J(1+Zt.count(yn(e),e),t,3)}function sr(e,t){return J(e.getMilliseconds(),t,3)}function cr(e,t){return sr(e,t)+`000`}function lr(e,t){return J(e.getMonth()+1,t,2)}function ur(e,t){return J(e.getMinutes(),t,2)}function dr(e,t){return J(e.getSeconds(),t,2)}function fr(e){var t=e.getDay();return t===0?7:t}function pr(e,t){return J(tn.count(yn(e)-1,e),t,2)}function mr(e){var t=e.getDay();return t>=4||t===0?on(e):on.ceil(e)}function hr(e,t){return e=mr(e),J(on.count(yn(e),e)+(yn(e).getDay()===4),t,2)}function gr(e){return e.getDay()}function _r(e,t){return J(nn.count(yn(e)-1,e),t,2)}function vr(e,t){return J(e.getFullYear()%100,t,2)}function yr(e,t){return e=mr(e),J(e.getFullYear()%100,t,2)}function br(e,t){return J(e.getFullYear()%1e4,t,4)}function xr(e,t){var n=e.getDay();return e=n>=4||n===0?on(e):on.ceil(e),J(e.getFullYear()%1e4,t,4)}function Sr(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+J(t/60|0,`0`,2)+J(t%60,`0`,2)}function Cr(e,t){return J(e.getUTCDate(),t,2)}function wr(e,t){return J(e.getUTCHours(),t,2)}function Tr(e,t){return J(e.getUTCHours()%12||12,t,2)}function Er(e,t){return J(1+Qt.count(bn(e),e),t,3)}function Dr(e,t){return J(e.getUTCMilliseconds(),t,3)}function Or(e,t){return Dr(e,t)+`000`}function kr(e,t){return J(e.getUTCMonth()+1,t,2)}function Ar(e,t){return J(e.getUTCMinutes(),t,2)}function jr(e,t){return J(e.getUTCSeconds(),t,2)}function Mr(e){var t=e.getUTCDay();return t===0?7:t}function Nr(e,t){return J(un.count(bn(e)-1,e),t,2)}function Pr(e){var t=e.getUTCDay();return t>=4||t===0?mn(e):mn.ceil(e)}function Fr(e,t){return e=Pr(e),J(mn.count(bn(e),e)+(bn(e).getUTCDay()===4),t,2)}function Ir(e){return e.getUTCDay()}function Lr(e,t){return J(dn.count(bn(e)-1,e),t,2)}function Rr(e,t){return J(e.getUTCFullYear()%100,t,2)}function zr(e,t){return e=Pr(e),J(e.getUTCFullYear()%100,t,2)}function Br(e,t){return J(e.getUTCFullYear()%1e4,t,4)}function Vr(e,t){var n=e.getUTCDay();return e=n>=4||n===0?mn(e):mn.ceil(e),J(e.getUTCFullYear()%1e4,t,4)}function Hr(){return`+0000`}function Ur(){return`%`}function Wr(e){return+e}function Gr(e){return Math.floor(e/1e3)}var Kr,qr;Jr({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 Jr(e){return Kr=kn(e),qr=Kr.format,Kr.parse,Kr.utcFormat,Kr.utcParse,Kr}function Yr(e){return new Date(e)}function Xr(e){return e instanceof Date?+e:+new Date(+e)}function Zr(e,t,n,r,i,a,o,s,c,l){var u=ot(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Xr)):f().map(Yr)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Pt(n,e)):u},u.copy=function(){return it(u,Zr(e,t,n,r,i,a,o,s,c,l))},u}function Qr(){return A.apply(Zr(wn,Tn,yn,_n,tn,Zt,Yt,qt,Kt,qr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var $r=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}};function ei(e){return function(){return e}}var ti=Math.PI,ni=2*ti,ri=1e-6,ii=ni-ri;function ai(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function oi(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return ai;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var si=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?ai:oi(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>ri)if(!(Math.abs(u*s-c*l)>ri)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((ti-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>ri&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>ri||Math.abs(this._y1-l)>ri)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%ni+ni),d>ii?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>ri&&this._append`A${n},${n},0,${+(d>=ti)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function ci(){return new si}ci.prototype=si.prototype;function li(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new si(t)}Array.prototype.slice;function ui(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function di(e){this._context=e}di.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 fi(e){return new di(e)}function pi(e){return e[0]}function mi(e){return e[1]}function hi(e,t){var n=ei(!0),r=null,i=fi,a=null,o=li(s);e=typeof e==`function`?e:e===void 0?pi:ei(e),t=typeof t==`function`?t:t===void 0?mi:ei(t);function s(s){var c,l=(s=ui(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:ei(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:ei(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:ei(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function gi(e,t,n){var r=null,i=ei(!0),a=null,o=fi,s=null,c=li(l);e=typeof e==`function`?e:e===void 0?pi:ei(+e),t=typeof t==`function`?t:ei(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?mi:ei(+n);function l(l){var u,d,f,p=(l=ui(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return hi().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:ei(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:ei(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:ei(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:ei(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:ei(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:ei(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:ei(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function _i(e,t){this._context=e,this._t=t}_i.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 vi(e){return new _i(e,1)}function yi(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function bi(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function xi(e,t){return e[t]}function Si(e){let t=[];return t.key=e,t}function Ci(){var e=ei([]),t=bi,n=yi,r=xi;function i(i){var a=Array.from(e.apply(this,arguments),Si),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=ui(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:ei(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:ei(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?bi:typeof e==`function`?e:ei(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??yi,i):n},i}var wi=(e,t)=>t.reduce((t,{key:n})=>t+(e.values[n]??0),0),Ti=(e,t)=>e.map(e=>wi(e,t)),Ei=(e,t)=>Number.isFinite(e.timestamp)&&t.every(({key:t})=>Number.isFinite(e.values[t]??0)),Di=(e,t,n)=>{let r=e.filter(e=>Ei(e,n));return r.length!==e.length&&$r()&&console.warn(`react-charts: CampaignTimeline dropped ${e.length-r.length} burndown point(s) with a non-finite timestamp or value.`),r.filter(e=>e.timestamp<=t).sort((e,t)=>e.timestamp-t.timestamp)},Oi=(e,t,n,r)=>{let i=e.filter(e=>Ei(e,t));if(i.length===0)return{linePath:``,bands:[]};let a=Ci().keys(t.map(({key:e})=>e)).value((e,t)=>e.values[t]??0)(i),o=gi().curve(vi).x(e=>n(e.data.timestamp)).y0(e=>r(e[0])).y1(e=>r(e[1])),s=hi().curve(vi).x((e,t)=>n(i[t]?.timestamp??0)).y(e=>r(e)),c=a.map((e,n)=>{let r=t[n];return{key:r?.key??``,color:r?.color??`currentColor`,d:o(e)??``}});return{linePath:s(Ti(i,t))??``,bands:c}},ki,Ai=()=>{if(ki!==void 0)return ki;try{ki=document.createElement(`canvas`).getContext(`2d`)}catch{ki=null}return ki},ji=.58,Mi=(e,t)=>e.length*t*ji,Ni=new Map,Pi=1e3;typeof document<`u`&&document.fonts?.ready&&document.fonts.ready.then(()=>Ni.clear()).catch(()=>void 0);var Fi=(e,t,n,r=600)=>{if(e.length===0)return 0;let i=`${r} ${t}px ${n}`,a=`${i}|${e}`,o=Ni.get(a);if(o!==void 0)return o;let s=Ai(),c;if(s){s.font=i;let n=s.measureText(e).width;c=n>0?n:Mi(e,t)}else c=Mi(e,t);return Ni.size>=Pi&&Ni.clear(),Ni.set(a,c),c},Ii=14,Li=10,Ri=5,zi=16,Bi=(0,d.memo)(({points:e,series:t,total:n,height:r,plotWidth:i,scaleX:a,now:o,colors:s,formatValue:c,totalLabel:l,remainingLabel:u,fontFamily:d})=>{let p=Di(e,o,t),m=Ti(p,t);$r()&&(!Number.isFinite(n)||n<=0)&&console.warn(`react-charts: CampaignTimeline burndown.total should be a positive number (got ${n}); falling back to the largest observed value.`);let h=Math.max(1,...m),g=Number.isFinite(n)&&n>0?Math.max(n,h):h,_=Nt().domain([0,g]).range([r,Ii]),v=_(g),y=(0,f.jsx)(`line`,{x1:0,y1:v,x2:i,y2:v,stroke:s.grid,strokeWidth:1,strokeDasharray:`3 3`});if(p.length===0)return(0,f.jsx)(`g`,{className:`campaign-burndown`,children:y});let{linePath:b,bands:x}=Oi(p,t,a,_),S=p[p.length-1],C=m[m.length-1]??0,w=S?a(S.timestamp):0,T=_(C),E=`${c(C)} ${u}`,D=Fi(E,Li,d,600)+Ri*2,O=Math.max(0,Math.min(w-D-4,i-D)),k=Math.max(0,Math.min(T-zi-3,r-zi));return(0,f.jsxs)(`g`,{className:`campaign-burndown`,children:[y,x.map(e=>(0,f.jsx)(`path`,{d:e.d,fill:e.color,fillOpacity:.22,stroke:`none`},e.key)),(0,f.jsx)(`path`,{d:b,fill:`none`,stroke:s.accent,strokeWidth:1.75,strokeLinejoin:`miter`}),(0,f.jsx)(`text`,{x:2,y:v-4,fill:s.muted,fontSize:Li,fontFamily:d,style:{fontVariantNumeric:`tabular-nums`},children:`${l} — ${c(n)}`}),(0,f.jsxs)(`g`,{transform:`translate(${O}, ${k})`,children:[(0,f.jsx)(`rect`,{width:D,height:zi,rx:4,fill:s.surface,fillOpacity:.92}),(0,f.jsx)(`text`,{x:Ri,y:zi/2,dominantBaseline:`central`,fill:s.accent,fontSize:Li,fontWeight:600,fontFamily:d,style:{fontVariantNumeric:`tabular-nums`},children:E})]})]})});function Vi(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Hi(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Ui(e,t=0,n=1){return process.env.NODE_ENV!==`production`&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Hi(e,t,n)}function Wi(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),process.env.NODE_ENV!==`production`&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function Gi(e){if(e.type)return e;if(e.charAt(0)===`#`)return Gi(Wi(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(process.env.NODE_ENV===`production`?Vi(9,e):`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`);let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(process.env.NODE_ENV===`production`?Vi(10,i):`MUI: unsupported \`${i}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`)}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}function Ki(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function qi(e){e=Gi(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),Ki({type:s,values:c})}function Ji(e){e=Gi(e);let t=e.type===`hsl`||e.type===`hsla`?Gi(qi(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Yi(e,t){let n=Ji(e),r=Ji(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Xi(e,t){if(e=Gi(e),t=Ui(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Ki(e)}function Zi(e,t){if(e=Gi(e),t=Ui(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Ki(e)}var Qi=4.5,$i=.12,ea=.96,ta=new Set,na=(e,t)=>{!$r()||ta.has(e)||(ta.add(e),console.warn(`react-charts: cannot contrast-correct "${e}" (${t}). It is painted as given and may be illegible. MUI parses #nnn, #nnnnnn, rgb()/rgba() and hsl()/hsla() with COMMA separators only.`))},ra=(e,t,n)=>{let r;try{r=Yi(e,t)}catch{return na(e,`unsupported color format`),e}if(!Number.isFinite(r))return na(e,`parsed to NaN - use comma-separated rgb()/hsl()`),e;if(r>=Qi)return e;let i=e,a=r;for(let r=$i;r<=ea;r+=$i){let o=n?Zi(e,r):Xi(e,r),s=Yi(o,t);if(s>=Qi)return o;s>a&&(i=o,a=s)}return na(e,`best achievable contrast ${a.toFixed(2)}:1 against ${t} is below ${Qi}:1`),i},ia=(e,t=8)=>{let n=[],r=Array(e.length).fill(0),i=e.map((e,t)=>t).sort((t,n)=>{let r=e[t],i=e[n];return!r||!i?0:r.x0-i.x0||r.x1-i.x1});for(let a of i){let i=e[a];if(!i)continue;let o=n.findIndex(e=>e+t<=i.x0);if(o===-1){r[a]=n.length,n.push(i.x1);continue}r[a]=o,n[o]=i.x1}return{rows:r,rowCount:n.length}},aa=2.5,oa=9,sa=16,ca=12,la=24,ua=6,da=6,fa=e=>e.end===null||e.end===void 0,pa=({events:e,xScale:t,plotWidth:n,fontFamily:r,runningLabel:i,gap:a=8})=>{let o=e.map(e=>{let a=fa(e)?`${e.name} · ${i}`:e.name,o=Fi(a,11,r,600),s=t(e.start),c=Math.max(la,sa+o+ca),l=s+aa+c>n,u=l?Math.max(0,Math.min(la,n-s-aa)):c,d=l?o+da*2:0,f=l?Math.max(0,Math.min(s-ua-o-da,n-d)):0,p=l?f+d-da:s+sa,m=s+aa+u;return{event:e,poleX:s,width:u,label:a,labelOutside:l,labelX:p,chipX:f,chipWidth:d,x0:l?Math.min(f,s):s,x1:l?Math.max(m,f+d):m}}),{rows:s,rowCount:c}=ia(o.map(({x0:e,x1:t})=>({x0:e,x1:t})),a);return{flags:o.map((e,t)=>({...e,row:s[t]??0})),rowCount:c}},ma=(e,t,n,r)=>{let i=Math.min(oa,n);return[`M${e} ${t+r/2}`,`L${e+i} ${t}`,`L${e+n} ${t}`,`L${e+n} ${t+r}`,`L${e+i} ${t+r}`,`Z`].join(` `)},ha=(0,d.memo)(({flags:e,rowCount:t,laneHeight:n,plotWidth:r,defaultColor:i,selectedIds:a,colors:o,fontFamily:s,onEventClick:c,onEventHover:l})=>{let u=(0,d.useMemo)(()=>{let t=new Map;for(let n of e){let e=n.event.color??i;t.has(e)||t.set(e,ra(e,o.surfaceValue,o.isDark))}return t},[e,i,o.surfaceValue,o.isDark]),p=a.size>0;return(0,f.jsxs)(`g`,{className:`campaign-lanes`,children:[Array.from({length:Math.max(0,t-1)},(e,t)=>(0,f.jsx)(`line`,{x1:0,y1:(t+1)*n,x2:r,y2:(t+1)*n,stroke:o.grid,strokeWidth:1,strokeDasharray:`3 3`},`divider-${t}`)),e.map(e=>{let{event:t}=e,r=t.color??i,d=u.get(r)??r,m=a.has(t.id),h=e.row*n,g=h+(n-20)/2,_=ma(e.poleX+aa,g,e.width,20);return(0,f.jsxs)(`g`,{"data-campaign-flag":t.id,style:{cursor:c?`pointer`:`default`},opacity:p&&!m?.32:1,onPointerDown:e=>e.stopPropagation(),onClick:()=>c?.(t),onMouseEnter:()=>l?.(t),onMouseLeave:()=>l?.(null),children:[m?(0,f.jsx)(`rect`,{x:e.poleX-4,y:g-2,width:e.width+8,height:24,fill:o.accent,fillOpacity:.2,stroke:o.accent,strokeWidth:1}):null,(0,f.jsx)(`path`,{d:_,fill:o.surface}),(0,f.jsx)(`path`,{d:_,fill:d,fillOpacity:.16}),(0,f.jsx)(`rect`,{x:e.poleX,y:h+1,width:aa,height:n-2,fill:d}),e.labelOutside?(0,f.jsx)(`rect`,{x:e.chipX,y:g+1,width:e.chipWidth,height:18,rx:5,fill:o.surface,stroke:d,strokeOpacity:.5,strokeWidth:1}):null,(0,f.jsx)(`text`,{x:e.labelX,y:g+20/2,textAnchor:e.labelOutside?`end`:`start`,dominantBaseline:`central`,fill:d,fontSize:11,fontWeight:600,fontFamily:s,style:{pointerEvents:`none`},children:e.label}),(0,f.jsx)(`rect`,{x:e.x0,y:h,width:e.x1-e.x0,height:n,fill:`none`,pointerEvents:`all`})]},t.id)})]})}),ga=10,_a=20,va=9,ya=({x:e,totalHeight:t,gripCenterY:n,label:r,color:i,contrastColor:a,fontFamily:o,plotWidth:s})=>{let c=Fi(r,ga,o,700)+va*2,l=Math.max(0,Math.min(e-c/2,s-c));return(0,f.jsxs)(`g`,{className:`campaign-playhead`,style:{pointerEvents:`none`},children:[(0,f.jsx)(`line`,{x1:e,y1:0,x2:e,y2:t,stroke:i,strokeWidth:2}),(0,f.jsxs)(`g`,{transform:`translate(${l}, ${n-_a/2})`,children:[(0,f.jsx)(`rect`,{width:c,height:_a,rx:_a/2,fill:i}),(0,f.jsx)(`text`,{x:c/2,y:_a/2,textAnchor:`middle`,dominantBaseline:`central`,fill:a,fontSize:ga,fontWeight:700,fontFamily:o,style:{fontVariantNumeric:`tabular-nums`},children:r})]})]})},ba=36e5,xa=864e5,Sa=e=>t=>{let n=new Date(t);return e>=xa?n.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):e>=ba?n.toLocaleString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,hour12:!0}):n.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0})},Ca=({events:e,burndown:t,time:n,defaultTime:r,onTimeChange:i,snapToEvents:a,now:o,horizonEnd:s,width:c,fontFamily:l,formatDate:u})=>{let f=(0,d.useRef)(null),[p,h]=(0,d.useState)(null),[g,_]=(0,d.useState)(!1),v=(0,d.useRef)(Date.now());(0,d.useEffect)(()=>{if(c!==void 0)return;let e=f.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let t=e[0];t&&h(t.contentRect.width)});return t.observe(e),()=>t.disconnect()},[c]);let y=c??(p!==null&&p>0?p:900),b=Math.max(1,y-10),[x,S]=(0,d.useMemo)(()=>{let n=1/0,r=-1/0,i=e=>{Number.isFinite(e)&&(e<n&&(n=e),e>r&&(r=e))};for(let t of e)i(t.start),fa(t)||i(t.end);for(let e of t.points)i(e.timestamp);return o!==void 0&&i(o),s!==void 0&&i(s),n===1/0?[v.current-xa,v.current]:n===r?[n-ba,r+ba]:[n,r]},[e,t.points,o,s]),C=(0,d.useMemo)(()=>[x,S],[x,S]),w=(0,d.useMemo)(()=>Qr().domain([x,S]).range([0,b]),[x,S,b]),T=(0,d.useCallback)(e=>w(e),[w]),E=(0,d.useMemo)(()=>{let e=Math.max(2,Math.floor(b/90)),t=w.ticks(e),n=t[0],r=t[1],i=n&&r?r.getTime()-n.getTime():2**53-1,a=u??Sa(i),o=[],s=-1/0,c=null;for(let e of t){let t=e.getTime(),n=a(t),r=Fi(n,m,l,600),i=w(t),u=i-r/2,d=u>=0&&i+r/2<=b&&u>=s+12&&n!==c;d&&(s=i+r/2,c=n),o.push({timestamp:t,x:i,label:n,showLabel:d})}return o},[w,b,u,l]),D=(0,d.useMemo)(()=>{let t=new Set;for(let n of e)t.add(n.start),fa(n)||t.add(n.end);return[...t].sort((e,t)=>e-t)},[e]),[O,k]=(0,d.useState)(()=>r??S),A=n!==void 0,j=Math.min(S,Math.max(x,A?n:O)),M=(0,d.useCallback)(e=>{if(!a||D.length===0)return e;let t=8/b*(S-x),n=e,r=t;for(let i of D){if(i<e-t)continue;if(i>e+t)break;let a=Math.abs(i-e);a<=r&&(n=i,r=a)}return n},[a,D,x,S,b]),N=(0,d.useCallback)((e,t)=>{let n=Math.min(S,Math.max(x,e));A||k(n),i?.(n,t)},[x,S,A,i]),P=(0,d.useCallback)(e=>{let t=f.current;if(!t)return x;let n=t.getBoundingClientRect(),r=Math.min(b,Math.max(0,e-n.left));return M(w.invert(r).getTime())},[x,b,M,w]);return{containerRef:f,width:y,plotWidth:b,domain:C,placedTicks:E,scaleX:T,currentTime:j,isScrubbing:g,handlePointerDown:(0,d.useCallback)(e=>{e.button===0&&(_(!0),e.currentTarget.setPointerCapture(e.pointerId),N(P(e.clientX),`click`))},[N,P]),handlePointerMove:(0,d.useCallback)(e=>{g&&N(P(e.clientX),`drag`)},[N,g,P]),handlePointerUp:(0,d.useCallback)(e=>{g&&(_(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},[g]),handleKeyDown:(0,d.useCallback)(e=>{let{key:t}=e;if(t===`Home`){e.preventDefault(),N(x,`keyboard`);return}if(t===`End`){e.preventDefault(),N(S,`keyboard`);return}if(t!==`ArrowLeft`&&t!==`ArrowRight`)return;e.preventDefault();let n=t===`ArrowRight`,r;if(n)r=D.find(e=>e>j+1);else for(let e=D.length-1;e>=0;e--){let t=D[e];if(t!==void 0&&t<j-1){r=t;break}}N(r??(n?S:x),`keyboard`)},[N,j,x,S,D])}},wa=e=>new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,hour12:!0}),Ta=e=>e.toLocaleString(`en-US`),Ea=({events:e,burndown:t,time:n,defaultTime:r,onTimeChange:i,snapToEvents:a=!0,now:o,horizonEnd:s,selectedEventIds:c,onEventClick:l,onEventHover:p,width:m,burndownHeight:g=132,axisHeight:_=26,laneHeight:v=26,formatDate:y,formatPlayheadLabel:b=wa,formatValue:x=Ta,totalLabel:S=`total`,remainingLabel:C=`in flight`,runningLabel:w=`running`,hatchLabel:T,defaultEventColor:E,playheadAriaLabel:D=`Timeline position`})=>{let O=(0,u.useTheme)(),k=(0,d.useId)(),A=O.typography.fontFamily??`system-ui, sans-serif`,{containerRef:j,width:M,plotWidth:N,domain:P,placedTicks:F,scaleX:I,currentTime:L,isScrubbing:R,handlePointerDown:z,handlePointerMove:B,handlePointerUp:V,handleKeyDown:H}=Ca({events:e,burndown:t,time:n,defaultTime:r,onTimeChange:i,snapToEvents:a,now:o,horizonEnd:s,width:m,fontFamily:A,formatDate:y}),U=(0,d.useMemo)(()=>({surface:`var(--rc-campaign-surface, ${O.palette.background.paper})`,surfaceValue:O.palette.background.paper,isDark:O.palette.mode===`dark`,track:`var(--rc-campaign-track, ${O.palette.action.hover})`,border:`var(--rc-campaign-border, ${O.palette.divider})`,grid:`var(--rc-campaign-grid, ${O.palette.divider})`,muted:`var(--rc-campaign-muted, ${O.palette.text.secondary})`,text:`var(--rc-campaign-text, ${O.palette.text.primary})`,accent:`var(--rc-campaign-accent, ${O.palette.primary.main})`,accentContrast:`var(--rc-campaign-accent-contrast, ${O.palette.primary.contrastText})`}),[O]),ee=E??O.palette.primary.main,te=o??P[1],{flags:ne,rowCount:re}=(0,d.useMemo)(()=>pa({events:e,xScale:I,plotWidth:N,fontFamily:A,runningLabel:w}),[e,I,N,A,w]),W=Math.max(1,re)*v,ie=g,ae=g+_,G=g+_+W,oe=(0,d.useMemo)(()=>new Set(c??[]),[c]),se=I(L),ce=b(L),le=I(te),K=Math.max(0,N-le),ue=(0,d.useMemo)(()=>({position:`relative`,width:m??`100%`,touchAction:`none`,cursor:R?`grabbing`:`ew-resize`,userSelect:`none`,outline:`none`,"&:focus-visible":{boxShadow:`0 0 0 2px ${O.palette.primary.main}40`,borderRadius:1}}),[m,R,O.palette.primary.main]);return(0,f.jsx)(u.Box,{ref:j,role:`slider`,tabIndex:0,"aria-label":D,"aria-valuemin":P[0],"aria-valuemax":P[1],"aria-valuenow":L,"aria-valuetext":ce,onPointerDown:z,onPointerMove:B,onPointerUp:V,onPointerCancel:V,onKeyDown:H,sx:ue,children:(0,f.jsxs)(`svg`,{width:M,height:G,role:`presentation`,style:{display:`block`,overflow:`visible`},children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`pattern`,{id:k,width:7,height:7,patternUnits:`userSpaceOnUse`,patternTransform:`rotate(45)`,children:(0,f.jsx)(`line`,{x1:0,y1:0,x2:0,y2:7,stroke:U.muted,strokeWidth:1,strokeOpacity:.28})})}),F.map(e=>(0,f.jsx)(`line`,{x1:e.x,y1:0,x2:e.x,y2:G,stroke:U.grid,strokeWidth:1,strokeOpacity:e.showLabel?.5:.22},`grid-${e.timestamp}`)),K>0?(0,f.jsxs)(`g`,{className:`campaign-hatch`,children:[(0,f.jsx)(`rect`,{x:le,y:0,width:K,height:G,fill:`url(#${k})`}),(0,f.jsx)(`line`,{x1:le,y1:0,x2:le,y2:G,stroke:U.border,strokeWidth:1}),T&&K>90?(0,f.jsx)(`text`,{x:le+K/2,y:g/2,textAnchor:`middle`,dominantBaseline:`central`,fill:U.muted,fontSize:11,fontWeight:600,fontFamily:A,children:T}):null]}):null,(0,f.jsx)(Bi,{points:t.points,series:t.series,total:t.total,height:g,plotWidth:N,scaleX:I,now:te,colors:U,formatValue:x,totalLabel:S,remainingLabel:C,fontFamily:A}),(0,f.jsx)(`g`,{transform:`translate(0, ${ie})`,children:(0,f.jsx)(h,{ticks:F,plotWidth:N,height:_,colors:U,fontFamily:A})}),(0,f.jsx)(`g`,{transform:`translate(0, ${ae})`,children:(0,f.jsx)(ha,{flags:ne,rowCount:re,laneHeight:v,plotWidth:N,defaultColor:ee,selectedIds:oe,colors:U,fontFamily:A,...l?{onEventClick:l}:{},...p?{onEventHover:p}:{}})}),(0,f.jsx)(ya,{x:se,totalHeight:G,gripCenterY:ie+_/2,label:ce,color:U.accent,contrastColor:U.accentContrast,fontFamily:A,plotWidth:N})]})})},Da={neoGrey:{200:`#EDEFEF`,400:`#ADB5BD`},neoDigitalGreen:{600:`#40c048`}},Oa=[`#30F284`,`#FFD34D`,`#FFA83D`,`#FF8F52`,`#FF6F61`],ka={"#30F284":`#1D5937`,"#FFD34D":`#806A00`,"#FFA83D":`#935B00`,"#FF8F52":`#A34E14`,"#FF6F61":`#A63325`,"#DEDBD0":`#82806F`},Aa=e=>{let t=e.replace(`#`,``);return t.length===3?t.split(``).map(e=>e+e).join(``):t},ja=(e,t)=>{let n=Aa(e),r=Number.parseInt(n,16);if(Number.isNaN(r))return e;let i=1-t,a=e=>Math.max(0,Math.min(255,Math.round((r>>e&255)*i))).toString(16).padStart(2,`0`);return`#${a(16)}${a(8)}${a(0)}`},Ma=e=>ka[e.toUpperCase()]??ja(e,.28),Na={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.5,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:`#f8f8f8`,emptySeatsBorder:`#d8d8d8`,seatBorder:`#fff`},seatBorderDarken:.28,animation:{transitionDuration:`0.2s`,hoverOpacity:{active:`1`,dimmed:`0.2`,empty:`0.3`}},scaling:{enableScaling:!0,scaleThreshold:200}},Pa={COMPLETED:Da.neoDigitalGreen[600],NOT_APPLICABLE:`#DEDBD0`,NO_LST:`#A63325`,DATA_MISSING:`#FFD34D`},Fa=`rgba(166, 51, 37, 0.12)`,Ia=`rgba(166, 51, 37, 0.55)`,La=new Set([Pa.NO_LST]),Ra=.3,za=.24,Ba={dash:.48,gap:.38};function Va(e,t,n){let r=n?.paletteMode??`light`,i=n?.label==null?La.has(e):n.label===Ua,a=r===`dark`&&i,o=a?Fa:e,s=a?Ia:r===`dark`?o:Ma(e);if(t==null)return{fill:o,stroke:s,dashed:a};let c=e.startsWith(`#`);return{fill:o,stroke:s,dashed:a,strokeWidth:a?Math.max(.5,t*za):c?Math.max(.5,t*Ra):.5,dashArray:a?`${(t*Ba.dash).toFixed(2)} ${(t*Ba.gap).toFixed(2)}`:void 0}}var Ha=`N/A`,Ua=`No LST`,Wa=`Data Missing`;function Ga(e){return e}var Ka=1,qa=2,Ja=3,Ya=4,Xa=1e-6;function Za(e){return`translate(`+e+`,0)`}function Qa(e){return`translate(0,`+e+`)`}function $a(e){return t=>+e(t)}function eo(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function to(){return!this.__axis}function no(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===Ka||e===Ya?-1:1,u=e===Ya||e===qa?`x`:`y`,d=e===Ka||e===Ja?Za:Qa;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):Ga),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?eo:$a)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===Ka?`0em`:e===Ja?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,Xa).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,Xa).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===Ya||e===qa?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(to).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===qa?`start`:e===Ya?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function ro(e){return no(Ja,e)}function io(e){return no(Ya,e)}var ao={value:()=>{}};function oo(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new so(n)}function so(e){this._=e}function co(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}so.prototype=oo.prototype={constructor:so,on:function(e,t){var n=this._,r=co(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=lo(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=uo(n[i],e.name,t);else if(t==null)for(i in n)n[i]=uo(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 so(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function lo(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function uo(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ao,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var fo={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function po(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),fo.hasOwnProperty(t)?{space:fo[t],local:e}:e}function mo(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function ho(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function go(e){var t=po(e);return(t.local?ho:mo)(t)}function _o(){}function vo(e){return e==null?_o:function(){return this.querySelector(e)}}function yo(e){typeof e!=`function`&&(e=vo(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new sc(r,this._parents)}function bo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function xo(){return[]}function So(e){return e==null?xo:function(){return this.querySelectorAll(e)}}function Co(e){return function(){return bo(e.apply(this,arguments))}}function wo(e){e=typeof e==`function`?Co(e):So(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new sc(r,i)}function To(e){return function(){return this.matches(e)}}function Eo(e){return function(t){return t.matches(e)}}var Do=Array.prototype.find;function Oo(e){return function(){return Do.call(this.children,e)}}function ko(){return this.firstElementChild}function Ao(e){return this.select(e==null?ko:Oo(typeof e==`function`?e:Eo(e)))}var jo=Array.prototype.filter;function Mo(){return Array.from(this.children)}function No(e){return function(){return jo.call(this.children,e)}}function Po(e){return this.selectAll(e==null?Mo:No(typeof e==`function`?e:Eo(e)))}function Fo(e){typeof e!=`function`&&(e=To(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new sc(r,this._parents)}function Io(e){return Array(e.length)}function Lo(){return new sc(this._enter||this._groups.map(Io),this._parents)}function Ro(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ro.prototype={constructor:Ro,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 zo(e){return function(){return e}}function Bo(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Ro(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Vo(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Ro(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Ho(e){return e.__data__}function Uo(e,t){if(!arguments.length)return Array.from(this,Ho);var n=t?Vo:Bo,r=this._parents,i=this._groups;typeof e!=`function`&&(e=zo(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Wo(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new sc(o,r),o._enter=s,o._exit=c,o}function Wo(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Go(){return new sc(this._exit||this._groups.map(Io),this._parents)}function Ko(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function qo(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new sc(s,this._parents)}function Jo(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Yo(e){e||=Xo;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new sc(i,this._parents).order()}function Xo(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Zo(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Qo(){return Array.from(this)}function $o(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function es(){let e=0;for(let t of this)++e;return e}function ts(){return!this.node()}function ns(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function rs(e){return function(){this.removeAttribute(e)}}function is(e){return function(){this.removeAttributeNS(e.space,e.local)}}function as(e,t){return function(){this.setAttribute(e,t)}}function os(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ss(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function cs(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 ls(e,t){var n=po(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?is:rs:typeof t==`function`?n.local?cs:ss:n.local?os:as)(n,t))}function us(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ds(e){return function(){this.style.removeProperty(e)}}function fs(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ps(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ms(e,t,n){return arguments.length>1?this.each((t==null?ds:typeof t==`function`?ps:fs)(e,t,n??``)):hs(this.node(),e)}function hs(e,t){return e.style.getPropertyValue(t)||us(e).getComputedStyle(e,null).getPropertyValue(t)}function gs(e){return function(){delete this[e]}}function _s(e,t){return function(){this[e]=t}}function vs(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function ys(e,t){return arguments.length>1?this.each((t==null?gs:typeof t==`function`?vs:_s)(e,t)):this.node()[e]}function bs(e){return e.trim().split(/^|\s+/)}function xs(e){return e.classList||new Ss(e)}function Ss(e){this._node=e,this._names=bs(e.getAttribute(`class`)||``)}Ss.prototype={add:function(e){this._names.indexOf(e)<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 Cs(e,t){for(var n=xs(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function ws(e,t){for(var n=xs(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ts(e){return function(){Cs(this,e)}}function Es(e){return function(){ws(this,e)}}function Ds(e,t){return function(){(t.apply(this,arguments)?Cs:ws)(this,e)}}function Os(e,t){var n=bs(e+``);if(arguments.length<2){for(var r=xs(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Ds:t?Ts:Es)(n,t))}function ks(){this.textContent=``}function As(e){return function(){this.textContent=e}}function js(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Ms(e){return arguments.length?this.each(e==null?ks:(typeof e==`function`?js:As)(e)):this.node().textContent}function Ns(){this.innerHTML=``}function Ps(e){return function(){this.innerHTML=e}}function Fs(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Is(e){return arguments.length?this.each(e==null?Ns:(typeof e==`function`?Fs:Ps)(e)):this.node().innerHTML}function Ls(){this.nextSibling&&this.parentNode.appendChild(this)}function Rs(){return this.each(Ls)}function zs(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Bs(){return this.each(zs)}function Vs(e){var t=typeof e==`function`?e:go(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Hs(){return null}function Us(e,t){var n=typeof e==`function`?e:go(e),r=t==null?Hs:typeof t==`function`?t:vo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ws(){var e=this.parentNode;e&&e.removeChild(this)}function Gs(){return this.each(Ws)}function Ks(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qs(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Js(e){return this.select(e?qs:Ks)}function Ys(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Xs(e){return function(t){e.call(this,t,this.__data__)}}function Zs(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Qs(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function $s(e,t,n){return function(){var r=this.__on,i,a=Xs(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function ec(e,t,n){var r=Zs(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?$s:Qs,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function tc(e,t,n){var r=us(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 nc(e,t){return function(){return tc(this,e,t)}}function rc(e,t){return function(){return tc(this,e,t.apply(this,arguments))}}function ic(e,t){return this.each((typeof t==`function`?rc:nc)(e,t))}function*ac(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var oc=[null];function sc(e,t){this._groups=e,this._parents=t}function cc(){return new sc([[document.documentElement]],oc)}function lc(){return this}sc.prototype=cc.prototype={constructor:sc,select:yo,selectAll:wo,selectChild:Ao,selectChildren:Po,filter:Fo,data:Uo,enter:Lo,exit:Go,join:Ko,merge:qo,selection:lc,order:Jo,sort:Yo,call:Zo,nodes:Qo,node:$o,size:es,empty:ts,each:ns,attr:ls,style:ms,property:ys,classed:Os,text:Ms,html:Is,raise:Rs,lower:Bs,append:Vs,insert:Us,remove:Gs,clone:Js,datum:Ys,on:ec,dispatch:ic,[Symbol.iterator]:ac};function Y(e){return typeof e==`string`?new sc([[document.querySelector(e)]],[document.documentElement]):new sc([[e]],oc)}function uc(e){let t;for(;t=e.sourceEvent;)e=t;return e}function dc(e,t){if(e=uc(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var fc={capture:!0,passive:!1};function pc(e){e.preventDefault(),e.stopImmediatePropagation()}function mc(e){var t=e.document.documentElement,n=Y(e).on(`dragstart.drag`,pc,fc);`onselectstart`in t?n.on(`selectstart.drag`,pc,fc):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function hc(e,t){var n=e.document.documentElement,r=Y(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,pc,fc),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var gc=0,_c=0,vc=0,yc=1e3,bc,xc,Sc=0,Cc=0,wc=0,Tc=typeof performance==`object`&&performance.now?performance:Date,Ec=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Dc(){return Cc||=(Ec(Oc),Tc.now()+wc)}function Oc(){Cc=0}function kc(){this._call=this._time=this._next=null}kc.prototype=Ac.prototype={constructor:kc,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Dc():+n)+(t==null?0:+t),!this._next&&xc!==this&&(xc?xc._next=this:bc=this,xc=this),this._call=e,this._time=n,Fc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fc())}};function Ac(e,t,n){var r=new kc;return r.restart(e,t,n),r}function jc(){Dc(),++gc;for(var e=bc,t;e;)(t=Cc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--gc}function Mc(){Cc=(Sc=Tc.now())+wc,gc=_c=0;try{jc()}finally{gc=0,Pc(),Cc=0}}function Nc(){var e=Tc.now(),t=e-Sc;t>yc&&(wc-=t,Sc=e)}function Pc(){for(var e,t=bc,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:bc=n);xc=e,Fc(r)}function Fc(e){gc||(_c&&=clearTimeout(_c),e-Cc>24?(e<1/0&&(_c=setTimeout(Mc,e-Tc.now()-wc)),vc&&=clearInterval(vc)):(vc||=(Sc=Tc.now(),setInterval(Nc,yc)),gc=1,Ec(Mc)))}function Ic(e,t,n){var r=new kc;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Lc=oo(`start`,`end`,`cancel`,`interrupt`),Rc=[];function zc(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Uc(e,n,{name:t,index:r,group:i,on:Lc,tween:Rc,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Bc(e,t){var n=Hc(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Vc(e,t){var n=Hc(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Hc(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Uc(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Ac(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Ic(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Ic(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Wc(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Gc(e){return this.each(function(){Wc(this,e)})}function Kc(e,t){var n,r;return function(){var i=Vc(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function qc(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Vc(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Jc(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Hc(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Kc:qc)(n,e,t))}function Yc(e,t,n){var r=e._id;return e.each(function(){var e=Vc(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Hc(e,r).value[t]}}function Xc(e,t){var n;return(typeof t==`number`?Me:t instanceof G?De:(n=G(t))?(t=n,De):Re)(e,t)}function Zc(e){return function(){this.removeAttribute(e)}}function Qc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $c(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function el(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function tl(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function nl(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function rl(e,t){var n=po(e),r=n===`transform`?Ye:Xc;return this.attrTween(e,typeof t==`function`?(n.local?nl:tl)(n,r,Yc(this,`attr.`+e,t)):t==null?(n.local?Qc:Zc)(n):(n.local?el:$c)(n,r,t))}function il(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function al(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ol(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&al(e,i)),n}return i._value=t,i}function sl(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&il(e,i)),n}return i._value=t,i}function cl(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 Error();var r=po(e);return this.tween(n,(r.local?ol:sl)(r,t))}function ll(e,t){return function(){Bc(this,e).delay=+t.apply(this,arguments)}}function ul(e,t){return t=+t,function(){Bc(this,e).delay=t}}function dl(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ll:ul)(t,e)):Hc(this.node(),t).delay}function fl(e,t){return function(){Vc(this,e).duration=+t.apply(this,arguments)}}function pl(e,t){return t=+t,function(){Vc(this,e).duration=t}}function ml(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?fl:pl)(t,e)):Hc(this.node(),t).duration}function hl(e,t){if(typeof t!=`function`)throw Error();return function(){Vc(this,e).ease=t}}function gl(e){var t=this._id;return arguments.length?this.each(hl(t,e)):Hc(this.node(),t).ease}function _l(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Vc(this,e).ease=n}}function vl(e){if(typeof e!=`function`)throw Error();return this.each(_l(this._id,e))}function yl(e){typeof e!=`function`&&(e=To(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Jl(r,this._parents,this._name,this._id)}function bl(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Jl(o,this._parents,this._name,this._id)}function xl(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Sl(e,t,n){var r,i,a=xl(t)?Bc:Vc;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Cl(e,t){var n=this._id;return arguments.length<2?Hc(this.node(),n).on.on(e):this.each(Sl(n,e,t))}function wl(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Tl(){return this.on(`end.remove`,wl(this._id))}function El(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=vo(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,zc(l[f],t,n,f,l,Hc(u,n)));return new Jl(a,this._parents,t,n)}function Dl(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=So(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Hc(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&zc(p,t,n,h,f,m);a.push(f),o.push(u)}return new Jl(a,o,t,n)}var Ol=cc.prototype.constructor;function kl(){return new Ol(this._groups,this._parents)}function Al(e,t){var n,r,i;return function(){var a=hs(this,e),o=(this.style.removeProperty(e),hs(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function jl(e){return function(){this.style.removeProperty(e)}}function Ml(e,t,n){var r,i=n+``,a;return function(){var o=hs(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Nl(e,t,n){var r,i,a;return function(){var o=hs(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),hs(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Pl(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Vc(this,e),l=c.on,u=c.value[a]==null?s||=jl(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Fl(e,t,n){var r=(e+=``)==`transform`?Je:Xc;return t==null?this.styleTween(e,Al(e,r)).on(`end.style.`+e,jl(e)):typeof t==`function`?this.styleTween(e,Nl(e,r,Yc(this,`style.`+e,t))).each(Pl(this._id,e)):this.styleTween(e,Ml(e,r,t),n).on(`end.style.`+e,null)}function Il(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ll(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Il(e,a,n)),r}return a._value=t,a}function Rl(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 Error();return this.tween(r,Ll(e,t,n??``))}function zl(e){return function(){this.textContent=e}}function Bl(e){return function(){var t=e(this);this.textContent=t??``}}function Vl(e){return this.tween(`text`,typeof e==`function`?Bl(Yc(this,`text`,e)):zl(e==null?``:e+``))}function Hl(e){return function(t){this.textContent=e.call(this,t)}}function Ul(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Hl(r)),t}return r._value=e,r}function Wl(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 Error();return this.tween(t,Ul(e))}function Gl(){for(var e=this._name,t=this._id,n=Xl(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Hc(c,t);zc(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Jl(r,this._parents,e,n)}function Kl(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Vc(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var ql=0;function Jl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Yl(e){return cc().transition(e)}function Xl(){return++ql}var Zl=cc.prototype;Jl.prototype=Yl.prototype={constructor:Jl,select:El,selectAll:Dl,selectChild:Zl.selectChild,selectChildren:Zl.selectChildren,filter:yl,merge:bl,selection:kl,transition:Gl,call:Zl.call,nodes:Zl.nodes,node:Zl.node,size:Zl.size,empty:Zl.empty,each:Zl.each,on:Cl,attr:rl,attrTween:cl,style:Fl,styleTween:Rl,text:Vl,textTween:Wl,remove:Tl,tween:Jc,delay:dl,duration:ml,ease:gl,easeVarying:vl,end:Kl,[Symbol.iterator]:Zl[Symbol.iterator]};function Ql(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $l={time:null,delay:0,duration:250,ease:Ql};function eu(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function tu(e){var t,n;e instanceof Jl?(t=e._id,e=e._name):(t=Xl(),(n=$l).time=Dc(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&zc(c,e,t,l,o,n||eu(c,t));return new Jl(r,this._parents,e,t)}cc.prototype.interrupt=Gc,cc.prototype.transition=tu;var nu=e=>()=>e;function ru(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function iu(e){e.stopImmediatePropagation()}function au(e){e.preventDefault(),e.stopImmediatePropagation()}var ou={name:`drag`},su={name:`space`},cu={name:`handle`},lu={name:`center`},{abs:uu,max:du,min:fu}=Math;function pu(e){return[+e[0],+e[1]]}function mu(e){return[pu(e[0]),pu(e[1])]}var hu={name:`x`,handles:[`w`,`e`].map(Su),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]]}},gu={name:`y`,handles:[`n`,`s`].map(Su),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]]}};[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Su);var _u={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`},vu={e:`w`,w:`e`,nw:`ne`,ne:`nw`,se:`sw`,sw:`se`},yu={n:`s`,s:`n`,nw:`sw`,ne:`se`,se:`ne`,sw:`nw`},bu={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},xu={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Su(e){return{type:e}}function Cu(e){return!e.ctrlKey&&!e.button}function wu(){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 Tu(){return navigator.maxTouchPoints||`ontouchstart`in this}function Eu(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Du(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function Ou(){return ku(hu)}function ku(e){var t=wu,n=Cu,r=Tu,i=!0,a=oo(`start`,`brush`,`end`),o=6,s;function c(t){var n=t.property(`__brush`,h).selectAll(`.overlay`).data([Su(`overlay`)]);n.enter().append(`rect`).attr(`class`,`overlay`).attr(`pointer-events`,`all`).attr(`cursor`,_u.overlay).merge(n).each(function(){var e=Eu(this).extent;Y(this).attr(`x`,e[0][0]).attr(`y`,e[0][1]).attr(`width`,e[1][0]-e[0][0]).attr(`height`,e[1][1]-e[0][1])}),t.selectAll(`.selection`).data([Su(`selection`)]).enter().append(`rect`).attr(`class`,`selection`).attr(`cursor`,_u.selection).attr(`fill`,`#777`).attr(`fill-opacity`,.3).attr(`stroke`,`#fff`).attr(`shape-rendering`,`crispEdges`);var i=t.selectAll(`.handle`).data(e.handles,function(e){return e.type});i.exit().remove(),i.enter().append(`rect`).attr(`class`,function(e){return`handle handle--`+e.type}).attr(`cursor`,function(e){return _u[e.type]}),t.each(l).attr(`fill`,`none`).attr(`pointer-events`,`all`).on(`mousedown.brush`,f).filter(r).on(`touchstart.brush`,f).on(`touchmove.brush`,p).on(`touchend.brush touchcancel.brush`,m).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}c.move=function(t,n,r){t.tween?t.on(`start.brush`,function(e){u(this,arguments).beforestart().start(e)}).on(`interrupt.brush end.brush`,function(e){u(this,arguments).end(e)}).tween(`brush`,function(){var t=this,r=t.__brush,i=u(t,arguments),a=r.selection,o=e.input(typeof n==`function`?n.apply(this,arguments):n,r.extent),s=ze(a,o);function c(e){r.selection=e===1&&o===null?null:s(e),l.call(t),i.brush()}return a!==null&&o!==null?c:c(1)}):t.each(function(){var t=this,i=arguments,a=t.__brush,o=e.input(typeof n==`function`?n.apply(t,i):n,a.extent),s=u(t,i).beforestart();Wc(t),a.selection=o===null?null:o,l.call(t),s.start(r).brush(r).end(r)})},c.clear=function(e,t){c.move(e,null,t)};function l(){var e=Y(this),t=Eu(this).selection;t?(e.selectAll(`.selection`).style(`display`,null).attr(`x`,t[0][0]).attr(`y`,t[0][1]).attr(`width`,t[1][0]-t[0][0]).attr(`height`,t[1][1]-t[0][1]),e.selectAll(`.handle`).style(`display`,null).attr(`x`,function(e){return e.type[e.type.length-1]===`e`?t[1][0]-o/2:t[0][0]-o/2}).attr(`y`,function(e){return e.type[0]===`s`?t[1][1]-o/2:t[0][1]-o/2}).attr(`width`,function(e){return e.type===`n`||e.type===`s`?t[1][0]-t[0][0]+o:o}).attr(`height`,function(e){return e.type===`e`||e.type===`w`?t[1][1]-t[0][1]+o:o})):e.selectAll(`.selection,.handle`).style(`display`,`none`).attr(`x`,null).attr(`y`,null).attr(`width`,null).attr(`height`,null)}function u(e,t,n){var r=e.__brush.emitter;return r&&(!n||!r.clean)?r:new d(e,t,n)}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit(`start`,e,t)):this.emit(`brush`,e),this},brush:function(e,t){return this.emit(`brush`,e,t),this},end:function(e,t){return--this.active===0&&(delete this.state.emitter,this.emit(`end`,e,t)),this},emit:function(t,n,r){var i=Y(this.that).datum();a.call(t,this.that,new ru(t,{sourceEvent:n,target:c,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}};function f(t){if(s&&!t.touches||!n.apply(this,arguments))return;var r=this,a=t.target.__data__.type,o=(i&&t.metaKey?a=`overlay`:a)===`selection`?ou:i&&t.altKey?lu:cu,c=e===gu?null:bu[a],d=e===hu?null:xu[a],f=Eu(r),p=f.extent,m=f.selection,h=p[0][0],g,_,v=p[0][1],y,b,x=p[1][0],S,C,w=p[1][1],T,E,D=0,O=0,k,A=c&&d&&i&&t.shiftKey,j,M,N=Array.from(t.touches||[t],e=>{let t=e.identifier;return e=dc(e,r),e.point0=e.slice(),e.identifier=t,e});Wc(r);var P=u(r,arguments,!0).beforestart();if(a===`overlay`){m&&(k=!0);let n=[N[0],N[1]||N[0]];f.selection=m=[[g=e===gu?h:fu(n[0][0],n[1][0]),y=e===hu?v:fu(n[0][1],n[1][1])],[S=e===gu?x:du(n[0][0],n[1][0]),T=e===hu?w:du(n[0][1],n[1][1])]],N.length>1&&z(t)}else g=m[0][0],y=m[0][1],S=m[1][0],T=m[1][1];_=g,b=y,C=S,E=T;var F=Y(r).attr(`pointer-events`,`none`),I=F.selectAll(`.overlay`).attr(`cursor`,_u[a]);if(t.touches)P.moved=R,P.ended=B;else{var L=Y(t.view).on(`mousemove.brush`,R,!0).on(`mouseup.brush`,B,!0);i&&L.on(`keydown.brush`,V,!0).on(`keyup.brush`,H,!0),mc(t.view)}l.call(r),P.start(t,o.name);function R(e){for(let t of e.changedTouches||[e])for(let e of N)e.identifier===t.identifier&&(e.cur=dc(t,r));if(A&&!j&&!M&&N.length===1){let e=N[0];uu(e.cur[0]-e[0])>uu(e.cur[1]-e[1])?M=!0:j=!0}for(let e of N)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);k=!0,au(e),z(e)}function z(e){let t=N[0],n=t.point0;var i;switch(D=t[0]-n[0],O=t[1]-n[1],o){case su:case ou:c&&(D=du(h-g,fu(x-S,D)),_=g+D,C=S+D),d&&(O=du(v-y,fu(w-T,O)),b=y+O,E=T+O);break;case cu:N[1]?(c&&=(_=du(h,fu(x,N[0][0])),C=du(h,fu(x,N[1][0])),1),d&&=(b=du(v,fu(w,N[0][1])),E=du(v,fu(w,N[1][1])),1)):(c<0?(D=du(h-g,fu(x-g,D)),_=g+D,C=S):c>0&&(D=du(h-S,fu(x-S,D)),_=g,C=S+D),d<0?(O=du(v-y,fu(w-y,O)),b=y+O,E=T):d>0&&(O=du(v-T,fu(w-T,O)),b=y,E=T+O));break;case lu:c&&(_=du(h,fu(x,g-D*c)),C=du(h,fu(x,S+D*c))),d&&(b=du(v,fu(w,y-O*d)),E=du(v,fu(w,T+O*d)));break}C<_&&(c*=-1,i=g,g=S,S=i,i=_,_=C,C=i,a in vu&&I.attr(`cursor`,_u[a=vu[a]])),E<b&&(d*=-1,i=y,y=T,T=i,i=b,b=E,E=i,a in yu&&I.attr(`cursor`,_u[a=yu[a]])),f.selection&&(m=f.selection),j&&(_=m[0][0],C=m[1][0]),M&&(b=m[0][1],E=m[1][1]),(m[0][0]!==_||m[0][1]!==b||m[1][0]!==C||m[1][1]!==E)&&(f.selection=[[_,b],[C,E]],l.call(r),P.brush(e,o.name))}function B(e){if(iu(e),e.touches){if(e.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else hc(e.view,k),L.on(`keydown.brush keyup.brush mousemove.brush mouseup.brush`,null);F.attr(`pointer-events`,`all`),I.attr(`cursor`,_u.overlay),f.selection&&(m=f.selection),Du(m)&&(f.selection=null,l.call(r)),P.end(e,o.name)}function V(e){switch(e.keyCode){case 16:A=c&&d;break;case 18:o===cu&&(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=lu,z(e));break;case 32:(o===cu||o===lu)&&(c<0?S=C-D:c>0&&(g=_-D),d<0?T=E-O:d>0&&(y=b-O),o=su,I.attr(`cursor`,_u.selection),z(e));break;default:return}au(e)}function H(e){switch(e.keyCode){case 16:A&&(j=M=A=!1,z(e));break;case 18:o===lu&&(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=cu,z(e));break;case 32:o===su&&(e.altKey?(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=lu):(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=cu),I.attr(`cursor`,_u[a]),z(e));break;default:return}au(e)}}function p(e){u(this,arguments).moved(e)}function m(e){u(this,arguments).ended(e)}function h(){var n=this.__brush||{selection:null};return n.extent=mu(t.apply(this,arguments)),n.dim=e,n}return c.extent=function(e){return arguments.length?(t=typeof e==`function`?e:nu(mu(e)),c):t},c.filter=function(e){return arguments.length?(n=typeof e==`function`?e:nu(!!e),c):n},c.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:nu(!!e),c):r},c.handleSize=function(e){return arguments.length?(o=+e,c):o},c.keyModifiers=function(e){return arguments.length?(i=!!e,c):i},c.on=function(){var e=a.on.apply(a,arguments);return e===a?c:e},c}function Au(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ju(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Mu={autoSleep:120,force3D:`auto`,nullTargetWarn:1,units:{lineHeight:``}},Nu={duration:.5,overwrite:!1,delay:0},Pu,Fu,Iu,Lu=1e8,Ru=1/Lu,zu=Math.PI*2,Bu=zu/4,Vu=0,Hu=Math.sqrt,Uu=Math.cos,Wu=Math.sin,Gu=function(e){return typeof e==`string`},Ku=function(e){return typeof e==`function`},qu=function(e){return typeof e==`number`},Ju=function(e){return e===void 0},Yu=function(e){return typeof e==`object`},Xu=function(e){return e!==!1},Zu=function(){return typeof window<`u`},Qu=function(e){return Ku(e)||Gu(e)},$u=typeof ArrayBuffer==`function`&&ArrayBuffer.isView||function(){},ed=Array.isArray,td=/random\([^)]+\)/g,nd=/,\s*/g,rd=/(?:-?\.?\d|\.)+/gi,id=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ad=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,od=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,sd=/[+-]=-?[.\d]+/,cd=/[^,'"\[\]\s]+/gi,ld=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ud,dd,fd,pd,md={},hd={},gd,_d=function(e){return(hd=Yd(e,md))&&mm},vd=function(e,t){return console.warn(`Invalid property`,e,`set to`,t,`Missing plugin? gsap.registerPlugin()`)},yd=function(e,t){return!t&&console.warn(e)},bd=function(e,t){return e&&(md[e]=t)&&hd&&(hd[e]=t)||md},xd=function(){return 0},Sd={suppressEvents:!0,isStart:!0,kill:!1},Cd={suppressEvents:!0,kill:!1},wd={suppressEvents:!0},Td={},Ed=[],Dd={},Od,kd={},Ad={},jd=30,Md=[],Nd=``,Pd=function(e){var t=e[0],n,r;if(Yu(t)||Ku(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=Md.length;r--&&!Md[r].targetTest(t););n=Md[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new wp(e[r],n)))||e.splice(r,1);return e},Fd=function(e){return e._gsap||Pd(Nf(e))[0]._gsap},Id=function(e,t,n){return(n=e[t])&&Ku(n)?e[t]():Ju(n)&&e.getAttribute&&e.getAttribute(t)||n},Ld=function(e,t){return(e=e.split(`,`)).forEach(t)||e},Rd=function(e){return Math.round(e*1e5)/1e5||0},zd=function(e){return Math.round(e*1e7)/1e7||0},Bd=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n===`+`?e+r:n===`-`?e-r:n===`*`?e*r:e/r},Vd=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},Hd=function(){var e=Ed.length,t=Ed.slice(0),n,r;for(Dd={},Ed.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},Ud=function(e){return!!(e._initted||e._startAt||e.add)},Wd=function(e,t,n,r){Ed.length&&!Fu&&Hd(),e.render(t,n,r||!!(Fu&&t<0&&Ud(e))),Ed.length&&!Fu&&Hd()},Gd=function(e){var t=parseFloat(e);return(t||t===0)&&(e+``).match(cd).length<2?t:Gu(e)?e.trim():e},Kd=function(e){return e},qd=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Jd=function(e){return function(t,n){for(var r in n)r in t||r===`duration`&&e||r===`ease`||(t[r]=n[r])}},Yd=function(e,t){for(var n in t)e[n]=t[n];return e},Xd=function e(t,n){for(var r in n)r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(t[r]=Yu(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},Zd=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},Qd=function(e){var t=e.parent||ud,n=e.keyframes?Jd(ed(e.keyframes)):qd;if(Xu(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},$d=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},ef=function(e,t,n,r,i){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var a=e[r],o;if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},tf=function(e,t,n,r){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},nf=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},rf=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},af=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},of=function(e,t,n,r){return e._startAt&&(Fu?e._startAt.revert(Cd):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},sf=function e(t){return!t||t._ts&&e(t.parent)},cf=function(e){return e._repeat?lf(e._tTime,e=e.duration()+e._rDelay)*e:0},lf=function(e,t){var n=Math.floor(e=zd(e/t));return e&&n===e?n-1:n},uf=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},df=function(e){return e._end=zd(e._start+(e._tDur/Math.abs(e._ts||e._rts||Ru)||0))},ff=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=zd(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),df(e),n._dirty||rf(n,e)),e},pf=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=uf(e.rawTime(),t),(!t._dur||Df(0,t.totalDuration(),n)-t._tTime>Ru)&&t.render(n,!0)),rf(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-Ru}},mf=function(e,t,n,r){return t.parent&&nf(t),t._start=zd((qu(n)?n:n||e!==ud?wf(e,n,t):e._time)+t._delay),t._end=zd(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),ef(e,t,`_first`,`_last`,e._sort?`_start`:0),vf(t)||(e._recent=t),r||pf(e,t),e._ts<0&&ff(e,e._tTime),e},hf=function(e,t){return(md.ScrollTrigger||vd(`scrollTrigger`,t))&&md.ScrollTrigger.create(t,e)},gf=function(e,t,n,r,i){if(Np(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!Fu&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Od!==dp.frame)return Ed.push(e),e._lazy=[i,r],1},_f=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},vf=function(e){var t=e.data;return t===`isFromStart`||t===`isStart`},yf=function(e,t,n,r){var i=e.ratio,a=t<0||!t&&(!e._start&&_f(e)&&!(!e._initted&&vf(e))||(e._ts<0||e._dp._ts<0)&&!vf(e))?0:1,o=e._rDelay,s=0,c,l,u;if(o&&e._repeat&&(s=Df(0,e._tDur,t),l=lf(s,o),e._yoyo&&l&1&&(a=1-a),l!==lf(e._tTime,o)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||Fu||r||e._zTime===Ru||!t&&e._zTime){if(!e._initted&&gf(e,t,r,n,s))return;for(u=e._zTime,e._zTime=t||(n?Ru:0),n||=t&&!u,e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=s,c=e._pt;c;)c.r(a,c.d),c=c._next;t<0&&of(e,t,n,!0),e._onUpdate&&!n&&Xf(e,`onUpdate`),s&&e._repeat&&!n&&e.parent&&Xf(e,`onRepeat`),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&nf(e,1),!n&&!Fu&&(Xf(e,a?`onComplete`:`onReverseComplete`,!0),e._prom&&e._prom()))}else e._zTime||=t},bf=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data===`isPause`&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data===`isPause`&&r._start<t)return r;r=r._prev}},xf=function(e,t,n,r){var i=e._repeat,a=zd(t)||0,o=e._tTime/e._tDur;return o&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:zd(a*(i+1)+e._rDelay*i):a,o>0&&!r&&ff(e,e._tTime=e._tDur*o),e.parent&&df(e),n||rf(e.parent,e),e},Sf=function(e){return e instanceof Ep?rf(e):xf(e,e._dur)},Cf={_start:0,endTime:xd,totalDuration:xd},wf=function e(t,n,r){var i=t.labels,a=t._recent||Cf,o=t.duration()>=Lu?a.endTime(!1):t._dur,s,c,l;return Gu(n)&&(isNaN(n)||n in i)?(c=n.charAt(0),l=n.substr(-1)===`%`,s=n.indexOf(`=`),c===`<`||c===`>`?(s>=0&&(n=n.replace(/=/,``)),(c===`<`?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(l?(s<0?a:r).totalDuration()/100:1)):s<0?(n in i||(i[n]=o),i[n]):(c=parseFloat(n.charAt(s-1)+n.substr(s+1)),l&&r&&(c=c/100*(ed(r)?r[0]:r).totalDuration()),s>1?e(t,n.substr(0,s-1),r)+c:o+c)):n==null?o:+n},Tf=function(e,t,n){var r=qu(t[1]),i=(r?2:1)+(e<2?0:1),a=t[i],o,s;if(r&&(a.duration=t[1]),a.parent=n,e){for(o=a,s=n;s&&!(`immediateRender`in o);)o=s.vars.defaults||{},s=Xu(s.vars.inherit)&&s.parent;a.immediateRender=Xu(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[i-1]}return new Bp(t[0],a,t[i+1])},Ef=function(e,t){return e||e===0?t(e):t},Df=function(e,t,n){return n<e?e:n>t?t:n},Of=function(e,t){return!Gu(e)||!(t=ld.exec(e))?``:t[1]},kf=function(e,t,n){return Ef(n,function(n){return Df(e,t,n)})},Af=[].slice,jf=function(e,t){return e&&Yu(e)&&`length`in e&&(!t&&!e.length||e.length-1 in e&&Yu(e[0]))&&!e.nodeType&&e!==dd},Mf=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(e){var r;return Gu(e)&&!t||jf(e,1)?(r=n).push.apply(r,Nf(e)):n.push(e)})||n},Nf=function(e,t,n){return Iu&&!t&&Iu.selector?Iu.selector(e):Gu(e)&&!n&&(fd||!fp())?Af.call((t||pd).querySelectorAll(e),0):ed(e)?Mf(e,n):jf(e)?Af.call(e,0):e?[e]:[]},Pf=function(e){return e=Nf(e)[0]||yd(`Invalid scope`)||{},function(t){var n=e.current||e.nativeElement||e;return Nf(t,n.querySelectorAll?n:n===e?yd(`Invalid scope`)||pd.createElement(`div`):e)}},Ff=function(e){return e.sort(function(){return .5-Math.random()})},If=function(e){if(Ku(e))return e;var t=Yu(e)?e:{each:e},n=yp(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,c=t.axis,l=r,u=r;return Gu(r)?l=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(l=r[0],u=r[1]),function(e,o,d){var f=(d||t).length,p=a[f],m,h,g,_,v,y,b,x,S;if(!p){if(S=t.grid===`auto`?0:(t.grid||[1,Lu])[1],!S){for(b=-Lu;b<(b=d[S++].getBoundingClientRect().left)&&S<f;);S<f&&S--}for(p=a[f]=[],m=s?Math.min(S,f)*l-.5:r%S,h=S===Lu?0:s?f*u/S-.5:r/S|0,b=0,x=Lu,y=0;y<f;y++)g=y%S-m,_=h-(y/S|0),p[y]=v=c?Math.abs(c===`y`?_:g):Hu(g*g+_*_),v>b&&(b=v),v<x&&(x=v);r===`random`&&Ff(p),p.max=b-x,p.min=x,p.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(S>f?f-1:c?c===`y`?f/S:S:Math.max(S,f/S))||0)*(r===`edges`?-1:1),p.b=f<0?i-f:i,p.u=Of(t.amount||t.each)||0,n=n&&f<0?vp(n):n}return f=(p[e]-p.min)/p.max||0,zd(p.b+(n?n(f):f)*p.v)+p.u}},Lf=function(e){var t=10**((e+``).split(`.`)[1]||``).length;return function(n){var r=zd(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(qu(n)?0:Of(n))}},Rf=function(e,t){var n=ed(e),r,i;return!n&&Yu(e)&&(r=n=e.radius||Lu,e.values?(e=Nf(e.values),(i=!qu(e[0]))&&(r*=r)):e=Lf(e.increment)),Ef(t,n?Ku(e)?function(t){return i=e(t),Math.abs(i-t)<=r?i:t}:function(t){for(var n=parseFloat(i?t.x:t),a=parseFloat(i?t.y:0),o=Lu,s=0,c=e.length,l,u;c--;)i?(l=e[c].x-n,u=e[c].y-a,l=l*l+u*u):l=Math.abs(e[c]-n),l<o&&(o=l,s=c);return s=!r||o<=r?e[s]:t,i||s===t||qu(t)?s:s+Of(t)}:Lf(e))},zf=function(e,t,n,r){return Ef(ed(e)?!t:n===!0?!!(n=0):!r,function(){return ed(e)?e[~~(Math.random()*e.length)]:(n||=1e-5)&&(r=n<1?10**((n+``).length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},Bf=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce(function(e,t){return t(e)},e)}},Vf=function(e,t){return function(n){return e(parseFloat(n))+(t||Of(n))}},Hf=function(e,t,n){return qf(e,t,0,1,n)},Uf=function(e,t,n){return Ef(n,function(n){return e[~~t(n)]})},Wf=function e(t,n,r){var i=n-t;return ed(t)?Uf(t,e(0,t.length),n):Ef(r,function(e){return(i+(e-t)%i)%i+t})},Gf=function e(t,n,r){var i=n-t,a=i*2;return ed(t)?Uf(t,e(0,t.length-1),n):Ef(r,function(e){return e=(a+(e-t)%a)%a||0,t+(e>i?a-e:e)})},Kf=function(e){return e.replace(td,function(e){var t=e.indexOf(`[`)+1,n=e.substring(t||7,t?e.indexOf(`]`):e.length-1).split(nd);return zf(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)})},qf=function(e,t,n,r,i){var a=t-e,o=r-n;return Ef(i,function(t){return n+((t-e)/a*o||0)})},Jf=function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o=Gu(t),s={},c,l,u,d,f;if(r===!0&&(i=1)&&(r=null),o)t={p:t},n={p:n};else if(ed(t)&&!ed(n)){for(u=[],d=t.length,f=d-2,l=1;l<d;l++)u.push(e(t[l-1],t[l]));d--,a=function(e){e*=d;var t=Math.min(f,~~e);return u[t](e-t)},r=n}else i||(t=Yd(ed(t)?[]:{},t));if(!u){for(c in n)Op.call(s,t,c,`get`,n[c]);a=function(e){return Yp(e,s)||(o?t.p:t)}}}return Ef(r,a)},Yf=function(e,t,n){var r=e.labels,i=Lu,a,o,s;for(a in r)o=r[a]-t,o<0==!!n&&o&&i>(o=Math.abs(o))&&(s=a,i=o);return s},Xf=function(e,t,n){var r=e.vars,i=r[t],a=Iu,o=e._ctx,s,c,l;if(i)return s=r[t+`Params`],c=r.callbackScope||e,n&&Ed.length&&Hd(),o&&(Iu=o),l=s?i.apply(c,s):i.call(c),Iu=a,l},Zf=function(e){return nf(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Fu),e.progress()<1&&Xf(e,`onInterrupt`),e},Qf,$f=[],ep=function(e){if(e)if(e=!e.name&&e.default||e,Zu()||e.headless){var t=e.name,n=Ku(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:xd,render:Yp,add:Op,kill:Zp,modifier:Xp,rawVars:0},a={targetTest:0,get:0,getSetter:Gp,aliases:{},register:0};if(fp(),e!==r){if(kd[t])return;qd(r,qd(Zd(e,i),a)),Yd(r.prototype,Yd(i,Zd(e,a))),kd[r.prop=t]=r,e.targetTest&&(Md.push(r),Td[t]=1),t=(t===`css`?`CSS`:t.charAt(0).toUpperCase()+t.substr(1))+`Plugin`}bd(t,r),e.register&&e.register(mm,r,em)}else $f.push(e)},tp=255,np={aqua:[0,tp,tp],lime:[0,tp,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,tp],navy:[0,0,128],white:[tp,tp,tp],olive:[128,128,0],yellow:[tp,tp,0],orange:[tp,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[tp,0,0],pink:[tp,192,203],cyan:[0,tp,tp],transparent:[tp,tp,tp,0]},rp=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*tp+.5|0},ip=function(e,t,n){var r=e?qu(e)?[e>>16,e>>8&tp,e&tp]:0:np.black,i,a,o,s,c,l,u,d,f,p;if(!r){if(e.substr(-1)===`,`&&(e=e.substr(0,e.length-1)),np[e])r=np[e];else if(e.charAt(0)===`#`){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e=`#`+i+i+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):``)),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&tp,r&tp,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&tp,e&tp]}else if(e.substr(0,3)===`hsl`){if(r=p=e.match(rd),!t)s=r[0]%360/360,c=r[1]/100,l=r[2]/100,a=l<=.5?l*(c+1):l+c-l*c,i=l*2-a,r.length>3&&(r[3]*=1),r[0]=rp(s+1/3,i,a),r[1]=rp(s,i,a),r[2]=rp(s-1/3,i,a);else if(~e.indexOf(`=`))return r=e.match(id),n&&r.length<4&&(r[3]=1),r}else r=e.match(rd)||np.transparent;r=r.map(Number)}return t&&!p&&(i=r[0]/tp,a=r[1]/tp,o=r[2]/tp,u=Math.max(i,a,o),d=Math.min(i,a,o),l=(u+d)/2,u===d?s=c=0:(f=u-d,c=l>.5?f/(2-u-d):f/(u+d),s=u===i?(a-o)/f+(a<o?6:0):u===a?(o-i)/f+2:(i-a)/f+4,s*=60),r[0]=~~(s+.5),r[1]=~~(c*100+.5),r[2]=~~(l*100+.5)),n&&r.length<4&&(r[3]=1),r},ap=function(e){var t=[],n=[],r=-1;return e.split(sp).forEach(function(e){var i=e.match(ad)||[];t.push.apply(t,i),n.push(r+=i.length+1)}),t.c=n,t},op=function(e,t,n){var r=``,i=(e+r).match(sp),a=t?`hsla(`:`rgba(`,o=0,s,c,l,u;if(!i)return e;if(i=i.map(function(e){return(e=ip(e,t,1))&&a+(t?e[0]+`,`+e[1]+`%,`+e[2]+`%,`+e[3]:e.join(`,`))+`)`}),n&&(l=ap(e),s=n.c,s.join(r)!==l.c.join(r)))for(c=e.replace(sp,`1`).split(ad),u=c.length-1;o<u;o++)r+=c[o]+(~s.indexOf(o)?i.shift()||a+`0,0,0,0)`:(l.length?l:i.length?i:n).shift());if(!c)for(c=e.split(sp),u=c.length-1;o<u;o++)r+=c[o]+i[o];return r+c[u]},sp=function(){var e=`(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b`,t;for(t in np)e+=`|`+t+`\\b`;return RegExp(e+`)`,`gi`)}(),cp=/hsl[a]?\(/,lp=function(e){var t=e.join(` `),n;if(sp.lastIndex=0,sp.test(t))return n=cp.test(t),e[1]=op(e[1],n),e[0]=op(e[0],n,ap(e[1])),!0},up,dp=function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,o=a,s=[],c,l,u,d,f,p,m=function u(m){var h=e()-i,g=m===!0,_,v,y,b;if((h>t||h<0)&&(r+=h-n),i+=h,y=i-r,_=y-o,(_>0||g)&&(b=++d.frame,f=y-d.time*1e3,d.time=y/=1e3,o+=_+(_>=a?4:a-_),v=1),g||(c=l(u)),v)for(p=0;p<s.length;p++)s[p](y,f,b,m)};return d={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(e){return f/(1e3/(e||60))},wake:function(){gd&&(!fd&&Zu()&&(dd=fd=window,pd=dd.document||{},md.gsap=mm,(dd.gsapVersions||=[]).push(mm.version),_d(hd||dd.GreenSockGlobals||!dd.gsap&&dd||{}),$f.forEach(ep)),u=typeof requestAnimationFrame<`u`&&requestAnimationFrame,c&&d.sleep(),l=u||function(e){return setTimeout(e,o-d.time*1e3+1|0)},up=1,m(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(c),up=0,l=xd},lagSmoothing:function(e,r){t=e||1/0,n=Math.min(r||33,t)},fps:function(e){a=1e3/(e||240),o=d.time*1e3+a},add:function(e,t,n){var r=t?function(t,n,i,a){e(t,n,i,a),d.remove(r)}:e;return d.remove(e),s[n?`unshift`:`push`](r),fp(),r},remove:function(e,t){~(t=s.indexOf(e))&&s.splice(t,1)&&p>=t&&p--},_listeners:s},d}(),fp=function(){return!up&&dp.wake()},X={},pp=/^[\d.\-M][\d.\-,\s]/,mp=/["']/g,hp=function(e){for(var t={},n=e.substr(1,e.length-3).split(`:`),r=n[0],i=1,a=n.length,o,s,c;i<a;i++)s=n[i],o=i===a-1?s.length:s.lastIndexOf(`,`),c=s.substr(0,o),t[r]=isNaN(c)?c.replace(mp,``).trim():+c,r=s.substr(o+1).trim();return t},gp=function(e){var t=e.indexOf(`(`)+1,n=e.indexOf(`)`),r=e.indexOf(`(`,t);return e.substring(t,~r&&r<n?e.indexOf(`)`,n+1):n)},_p=function(e){var t=(e+``).split(`(`),n=X[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf(`{`)?[hp(t[1])]:gp(e).split(`,`).map(Gd)):X._CE&&pp.test(e)?X._CE(``,e):n},vp=function(e){return function(t){return 1-e(1-t)}},yp=function(e,t){return e&&(Ku(e)?e:X[e]||_p(e))||t},bp=function(e,t,n,r){n===void 0&&(n=function(e){return 1-t(1-e)}),r===void 0&&(r=function(e){return e<.5?t(e*2)/2:1-t((1-e)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},a;return Ld(e,function(e){for(var t in X[e]=md[e]=i,X[a=e.toLowerCase()]=n,i)X[a+(t===`easeIn`?`.in`:t===`easeOut`?`.out`:`.inOut`)]=X[e+`.`+t]=i[t]}),i},xp=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Sp=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/zu*(Math.asin(1/i)||0),s=function(e){return e===1?1:i*2**(-10*e)*Wu((e-o)*a)+1},c=t===`out`?s:t===`in`?function(e){return 1-s(1-e)}:xp(s);return a=zu/a,c.config=function(n,r){return e(t,n,r)},c},Cp=function e(t,n){n===void 0&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i=t===`out`?r:t===`in`?function(e){return 1-r(1-e)}:xp(r);return i.config=function(n){return e(t,n)},i};Ld(`Linear,Quad,Cubic,Quart,Quint,Strong`,function(e,t){var n=t<5?t+1:t;bp(e+`,Power`+(n-1),t?function(e){return e**+n}:function(e){return e},function(e){return 1-(1-e)**n},function(e){return e<.5?(e*2)**n/2:1-((1-e)*2)**n/2})}),X.Linear.easeNone=X.none=X.Linear.easeIn,bp(`Elastic`,Sp(`in`),Sp(`out`),Sp()),(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(a){return a<n?e*a*a:a<r?e*(a-1.5/t)**2+.75:a<i?e*(a-=2.25/t)*a+.9375:e*(a-2.625/t)**2+.984375};bp(`Bounce`,function(e){return 1-a(1-e)},a)})(7.5625,2.75),bp(`Expo`,function(e){return 2**(10*(e-1))*e+e*e*e*e*e*e*(1-e)}),bp(`Circ`,function(e){return-(Hu(1-e*e)-1)}),bp(`Sine`,function(e){return e===1?1:-Uu(e*Bu)+1}),bp(`Back`,Cp(`in`),Cp(`out`),Cp()),X.SteppedEase=X.steps=md.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+ +!t,i=+!!t,a=1-Ru;return function(e){return((r*Df(0,a,e)|0)+i)*n}}},Nu.ease=X[`quad.out`],Ld(`onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt`,function(e){return Nd+=e+`,`+e+`Params,`});var wp=function(e,t){this.id=Vu++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Id,this.set=t?t.getSetter:Gp},Tp=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,xf(this,+e.duration,1,1),this.data=e.data,Iu&&(this._ctx=Iu,Iu.data.push(this)),up||dp.wake()}var t=e.prototype;return t.delay=function(e){return e||e===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,xf(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(fp(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(ff(this,e),!n._dp||n.parent||pf(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&mf(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===Ru||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),Wd(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+cf(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-e:e)+cf(this),t):this.duration()?Math.min(1,this._time/this._dur):+(this.rawTime()>0)},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?lf(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-Ru?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?uf(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-Ru?0:this._rts,this.totalTime(Df(-Math.abs(this._delay),this.totalDuration(),n),t!==!1),df(this),af(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(fp(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ru&&(this._tTime-=Ru)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=zd(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&mf(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(Xu(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?uf(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){e===void 0&&(e=wd);var t=Fu;return Fu=e,Ud(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),this.data!==`nested`&&e.kill!==!1&&this.kill(),Fu=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,Sf(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,Sf(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(wf(this,e),Xu(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,Xu(t)),this._dur||(this._zTime=-Ru),this},t.play=function(e,t){return e!=null&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return e!=null&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return e!=null&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-Ru:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ru,this},t.isActive=function(){var e=this.parent||this._dp,t=this._start,n;return!!(!e||this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=t&&n<this.endTime(!0)-Ru)},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+`Params`]=n),e===`onUpdate`&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise(function(r){var i=Ku(e)?e:Kd,a=function(){var e=t.then;t.then=null,n&&n(),Ku(i)&&(i=i(t))&&(i.then||i===t)&&(t.then=e),r(i),t.then=e};t._initted&&t.totalProgress()===1&&t._ts>=0||!t._tTime&&t._ts<0?a():t._prom=a})},t.kill=function(){Zf(this)},e}();qd(Tp.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Ru,_prom:0,_ps:!1,_rts:1});var Ep=function(e){ju(t,e);function t(t,n){var r;return t===void 0&&(t={}),r=e.call(this,t)||this,r.labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=Xu(t.sortChildren),ud&&mf(t.parent||ud,Au(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&hf(Au(r),t.scrollTrigger),r}var n=t.prototype;return n.to=function(e,t,n){return Tf(0,arguments,this),this},n.from=function(e,t,n){return Tf(1,arguments,this),this},n.fromTo=function(e,t,n,r){return Tf(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,Qd(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Bp(e,t,wf(this,n),1),this},n.call=function(e,t,n){return mf(this,Bp.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new Bp(e,n,wf(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,Qd(n).immediateRender=Xu(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,Qd(r).immediateRender=Xu(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r=this._time,i=this._dirty?this.totalDuration():this._tDur,a=this._dur,o=e<=0?0:zd(e),s=this._zTime<0!=e<0&&(this._initted||!a),c,l,u,d,f,p,m,h,g,_,v,y;if(this!==ud&&o>i&&e>=0&&(o=i),o!==this._tTime||n||s){if(r!==this._time&&a&&(o+=this._time-r,e+=this._time-r),c=o,g=this._start,h=this._ts,p=!h,s&&(a||(r=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(v=this._yoyo,f=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(f*100+e,t,n);if(c=zd(o%f),o===i?(d=this._repeat,c=a):(_=zd(o/f),d=~~_,d&&d===_&&(c=a,d--),c>a&&(c=a)),_=lf(this._tTime,f),!r&&this._tTime&&_!==d&&this._tTime-_*f-this._dur<=0&&(_=d),v&&d&1&&(c=a-c,y=1),d!==_&&!this._lock){var b=v&&_&1,x=b===(v&&d&1);if(d<_&&(b=!b),r=b?0:o%a?a:o,this._lock=1,this.render(r||(y?0:zd(d*f)),t,!a)._lock=0,this._tTime=o,!t&&this.parent&&Xf(this,`onRepeat`),this.vars.repeatRefresh&&!y&&(this.invalidate()._lock=1,_=d),r&&r!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act||(a=this._dur,i=this._tDur,x&&(this._lock=2,r=b?a:-1e-4,this.render(r,!0),this.vars.repeatRefresh&&!y&&this.invalidate()),this._lock=0,!this._ts&&!p))return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(m=bf(this,zd(r),zd(c)),m&&(o-=c-(c=m._start))),this._tTime=o,this._time=c,this._act=!!h,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,r=0),!r&&o&&a&&!t&&!_&&(Xf(this,`onStart`),this._tTime!==o))return this;if(c>=r&&e>=0)for(l=this._first;l;){if(u=l._next,(l._act||c>=l._start)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(c-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(c-l._start)*l._ts,t,n),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=-Ru);break}}l=u}else{l=this._last;for(var S=e<0?e:c;l;){if(u=l._prev,(l._act||S<=l._end)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(S-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(S-l._start)*l._ts,t,n||Fu&&Ud(l)),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=S?-Ru:Ru);break}}l=u}}if(m&&!t&&(this.pause(),m.render(c>=r?0:-Ru)._zTime=c>=r?1:-1,this._ts))return this._start=g,df(this),this.render(e,t,n);this._onUpdate&&!t&&Xf(this,`onUpdate`,!0),(o===i&&this._tTime>=this.totalDuration()||!o&&r)&&(g===this._start||Math.abs(h)!==Math.abs(this._ts))&&(this._lock||((e||!a)&&(o===i&&this._ts>0||!o&&this._ts<0)&&nf(this,1),!t&&!(e<0&&!r)&&(o||r||!i)&&(Xf(this,o===i&&e>=0?`onComplete`:`onReverseComplete`,!0),this._prom&&!(o<i&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(qu(t)||(t=wf(this,t,e)),!(e instanceof Tp)){if(ed(e))return e.forEach(function(e){return n.add(e,t)}),this;if(Gu(e))return this.addLabel(e,t);if(Ku(e))e=Bp.delayedCall(0,e);else return this}return this===e?this:mf(this,e,t)},n.getChildren=function(e,t,n,r){e===void 0&&(e=!0),t===void 0&&(t=!0),n===void 0&&(n=!0),r===void 0&&(r=-Lu);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof Bp?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return Gu(e)?this.removeLabel(e):Ku(e)?this.killTweensOf(e):(e.parent===this&&tf(this,e),e===this._recent&&(this._recent=this._last),rf(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=zd(dp.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=wf(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=Bp.delayedCall(0,t||xd,n);return r.data=`isPause`,this._hasPause=1,mf(this,r,wf(this,e))},n.removePause=function(e){var t=this._first;for(e=wf(this,e);t;)t._start===e&&t.data===`isPause`&&nf(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)jp!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n=[],r=Nf(e),i=this._first,a=qu(t),o;i;)i instanceof Bp?Vd(i._targets,r)&&(a?(!jp||i._initted&&i._ts)&&i.globalTime(0)<=t&&i.globalTime(i.totalDuration())>t:!t||i.isActive())&&n.push(i):(o=i.getTweensOf(r,t)).length&&n.push.apply(n,o),i=i._next;return n},n.tweenTo=function(e,t){t||={};var n=this,r=wf(n,e),i=t,a=i.startAt,o=i.onStart,s=i.onStartParams,c=i.immediateRender,l,u=Bp.to(n,qd({ease:t.ease||`none`,lazy:!1,immediateRender:!1,time:r,overwrite:`auto`,duration:t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale())||Ru,onStart:function(){if(n.pause(),!l){var e=t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale());u._dur!==e&&xf(u,e,0,1).render(u._time,!0,!0),l=1}o&&o.apply(u,s||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,qd({startAt:{time:wf(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return e===void 0&&(e=this._time),Yf(this,wf(this,e))},n.previousLabel=function(e){return e===void 0&&(e=this._time),Yf(this,wf(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+Ru)},n.shiftChildren=function(e,t,n){n===void 0&&(n=0);var r=this._first,i=this.labels,a;for(e=zd(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(a in i)i[a]>=n&&(i[a]+=e);return rf(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){e===void 0&&(e=!0);for(var t=this._first,n;t;)n=t._next,this.remove(t),t=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),rf(this)},n.totalDuration=function(e){var t=0,n=this,r=n._last,i=Lu,a,o,s;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(s=n.parent;r;)a=r._prev,r._dirty&&r.totalDuration(),o=r._start,o>i&&n._sort&&r._ts&&!n._lock?(n._lock=1,mf(n,r,o-r._delay,1)._lock=0):i=o,o<0&&r._ts&&(t-=o,(!s&&!n._dp||s&&s.smoothChildTiming)&&(n._start+=zd(o/n._ts),n._time-=o,n._tTime-=o),n.shiftChildren(-o,!1,-1/0),i=0),r._end>t&&r._ts&&(t=r._end),r=a;xf(n,n===ud&&n._time>t?n._time:t,1,1),n._dirty=0}return n._tDur},t.updateRoot=function(e){if(ud._ts&&(Wd(ud,uf(e,ud)),Od=dp.frame),dp.frame>=jd){jd+=Mu.autoSleep||120;var t=ud._first;if((!t||!t._ts)&&Mu.autoSleep&&dp._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||dp.sleep()}}},t}(Tp);qd(Ep.prototype,{_lock:0,_hasPause:0,_forcing:0});var Dp=function(e,t,n,r,i,a,o){var s=new em(this._pt,e,t,0,1,Jp,null,i),c=0,l=0,u,d,f,p,m,h,g,_;for(s.b=n,s.e=r,n+=``,r+=``,(g=~r.indexOf(`random(`))&&(r=Kf(r)),a&&(_=[n,r],a(_,e,t),n=_[0],r=_[1]),d=n.match(od)||[];u=od.exec(r);)p=u[0],m=r.substring(c,u.index),f?f=(f+1)%5:m.substr(-5)===`rgba(`&&(f=1),p!==d[l++]&&(h=parseFloat(d[l-1])||0,s._pt={_next:s._pt,p:m||l===1?m:`,`,s:h,c:p.charAt(1)===`=`?Bd(h,p)-h:parseFloat(p)-h,m:f&&f<4?Math.round:0},c=od.lastIndex);return s.c=c<r.length?r.substring(c,r.length):``,s.fp=o,(sd.test(r)||g)&&(s.e=0),this._pt=s,s},Op=function(e,t,n,r,i,a,o,s,c,l){Ku(r)&&(r=r(i||0,e,a));var u=e[t],d=n===`get`?Ku(u)?c?e[t.indexOf(`set`)||!Ku(e[`get`+t.substr(3)])?t:`get`+t.substr(3)](c):e[t]():u:n,f=Ku(u)?c?Up:Hp:Vp,p;if(Gu(r)&&(~r.indexOf(`random(`)&&(r=Kf(r)),r.charAt(1)===`=`&&(p=Bd(d,r)+(Of(d)||0),(p||p===0)&&(r=p))),!l||d!==r||Mp)return!isNaN(d*r)&&r!==``?(p=new em(this._pt,e,t,+d||0,r-(d||0),typeof u==`boolean`?qp:Kp,0,f),c&&(p.fp=c),o&&p.modifier(o,this,e),this._pt=p):(!u&&!(t in e)&&vd(t,r),Dp.call(this,e,t,d,r,f,s||Mu.stringFilter,c))},kp=function(e,t,n,r,i){if(Ku(e)&&(e=Lp(e,i,t,n,r)),!Yu(e)||e.style&&e.nodeType||ed(e)||$u(e))return Gu(e)?Lp(e,i,t,n,r):e;var a={},o;for(o in e)a[o]=Lp(e[o],i,t,n,r);return a},Ap=function(e,t,n,r,i,a){var o,s,c,l;if(kd[e]&&(o=new kd[e]).init(i,o.rawVars?t[e]:kp(t[e],r,i,a,n),n,r,a)!==!1&&(n._pt=s=new em(n._pt,i,e,0,1,o.render,o,0,o.priority),n!==Qf))for(c=n._ptLookup[n._targets.indexOf(i)],l=o._props.length;l--;)c[o._props[l]]=s;return o},jp,Mp,Np=function e(t,n,r){var i=t.vars,a=i.ease,o=i.startAt,s=i.immediateRender,c=i.lazy,l=i.onUpdate,u=i.runBackwards,d=i.yoyoEase,f=i.keyframes,p=i.autoRevert,m=t._dur,h=t._startAt,g=t._targets,_=t.parent,v=_&&_.data===`nested`?_.vars.targets:g,y=t._overwrite===`auto`&&!Pu,b=t.timeline,x=i.easeReverse||d,S,C,w,T,E,D,O,k,A,j,M,N,P;if(b&&(!f||!a)&&(a=`none`),t._ease=yp(a,Nu.ease),t._rEase=x&&(yp(x)||t._ease),t._from=!b&&!!i.runBackwards,t._from&&(t.ratio=1),!b||f&&!i.stagger){if(k=g[0]?Fd(g[0]).harness:0,N=k&&i[k.prop],S=Zd(i,Td),h&&(h._zTime<0&&h.progress(1),n<0&&u&&s&&!p?h.render(-1,!0):h.revert(u&&m?Cd:Sd),h._lazy=0),o){if(nf(t._startAt=Bp.set(g,qd({data:`isStart`,overwrite:!1,parent:_,immediateRender:!0,lazy:!h&&Xu(c),startAt:null,delay:0,onUpdate:l&&function(){return Xf(t,`onUpdate`)},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(Fu||!s&&!p)&&t._startAt.revert(Cd),s&&m&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(u&&m&&!h){if(n&&(s=!1),w=qd({overwrite:!1,data:`isFromStart`,lazy:s&&!h&&Xu(c),immediateRender:s,stagger:0,parent:_},S),N&&(w[k.prop]=N),nf(t._startAt=Bp.set(g,w)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(Fu?t._startAt.revert(Cd):t._startAt.render(-1,!0)),t._zTime=n,!s)e(t._startAt,Ru,Ru);else if(!n)return}for(t._pt=t._ptCache=0,c=m&&Xu(c)||c&&!m,C=0;C<g.length;C++){if(E=g[C],O=E._gsap||Pd(g)[C]._gsap,t._ptLookup[C]=j={},Dd[O.id]&&Ed.length&&Hd(),M=v===g?C:v.indexOf(E),k&&(A=new k).init(E,N||S,t,M,v)!==!1&&(t._pt=T=new em(t._pt,E,A.name,0,1,A.render,A,0,A.priority),A._props.forEach(function(e){j[e]=T}),A.priority&&(D=1)),!k||N)for(w in S)kd[w]&&(A=Ap(w,S,t,M,E,v))?A.priority&&(D=1):j[w]=T=Op.call(t,E,w,`get`,S[w],M,v,0,i.stringFilter);t._op&&t._op[C]&&t.kill(E,t._op[C]),y&&t._pt&&(jp=t,ud.killTweensOf(E,j,t.globalTime(n)),P=!t.parent,jp=0),t._pt&&c&&(Dd[O.id]=1)}D&&$p(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!P,f&&n<=0&&b.render(Lu,!0,!0)},Pp=function(e,t,n,r,i,a,o,s){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],l,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(l=d[f][t],l&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return Mp=1,e.vars[t]=`+=0`,Np(e,o),Mp=0,s?yd(t+` not eligible for reset. Try splitting into individual properties`):1;c.push(l)}for(f=c.length;f--;)u=c[f],l=u._pt||u,l.s=(r||r===0)&&!i?r:l.s+(r||0)+a*l.c,l.c=n-l.s,u.e&&=Rd(n)+Of(u.e),u.b&&=l.s+Of(u.b)},Fp=function(e,t){var n=e[0]?Fd(e[0]).harness:0,r=n&&n.aliases,i,a,o,s;if(!r)return t;for(a in i=Yd({},t),r)if(a in i)for(s=r[a].split(`,`),o=s.length;o--;)i[s[o]]=i[a];return i},Ip=function(e,t,n,r){var i=t.ease||r||`power1.inOut`,a,o;if(ed(t))o=n[e]||(n[e]=[]),t.forEach(function(e,n){return o.push({t:n/(t.length-1)*100,v:e,e:i})});else for(a in t)o=n[a]||(n[a]=[]),a===`ease`||o.push({t:parseFloat(e),v:t[a],e:i})},Lp=function(e,t,n,r,i){return Ku(e)?e.call(t,n,r,i):Gu(e)&&~e.indexOf(`random(`)?Kf(e):e},Rp=Nd+`repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert`,zp={};Ld(Rp+`,id,stagger,delay,duration,paused,scrollTrigger`,function(e){return zp[e]=1});var Bp=function(e){ju(t,e);function t(t,n,r,i){var a;typeof n==`number`&&(r.duration=n,n=r,r=null),a=e.call(this,i?n:Qd(n))||this;var o=a.vars,s=o.duration,c=o.delay,l=o.immediateRender,u=o.stagger,d=o.overwrite,f=o.keyframes,p=o.defaults,m=o.scrollTrigger,h=n.parent||ud,g=(ed(t)||$u(t)?qu(t[0]):`length`in n)?[t]:Nf(t),_,v,y,b,x,S,C,w;if(a._targets=g.length?Pd(g):yd(`GSAP target `+t+` not found. https://gsap.com`,!Mu.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,f||u||Qu(s)||Qu(c)){n=a.vars;var T=n.easeReverse||n.yoyoEase;if(_=a.timeline=new Ep({data:`nested`,defaults:p||{},targets:h&&h.data===`nested`?h.vars.targets:g}),_.kill(),_.parent=_._dp=Au(a),_._start=0,u||Qu(s)||Qu(c)){if(b=g.length,C=u&&If(u),Yu(u))for(x in u)~Rp.indexOf(x)&&(w||={},w[x]=u[x]);for(v=0;v<b;v++)y=Zd(n,zp),y.stagger=0,T&&(y.easeReverse=T),w&&Yd(y,w),S=g[v],y.duration=+Lp(s,Au(a),v,S,g),y.delay=(+Lp(c,Au(a),v,S,g)||0)-a._delay,!u&&b===1&&y.delay&&(a._delay=c=y.delay,a._start+=c,y.delay=0),_.to(S,y,C?C(v,S,g):0),_._ease=X.none;_.duration()?s=c=0:a.timeline=0}else if(f){Qd(qd(_.vars.defaults,{ease:`none`})),_._ease=yp(f.ease||n.ease||`none`);var E=0,D,O,k;if(ed(f))f.forEach(function(e){return _.to(g,e,`>`)}),_.duration();else{for(x in y={},f)x===`ease`||x===`easeEach`||Ip(x,f[x],y,f.easeEach);for(x in y)for(D=y[x].sort(function(e,t){return e.t-t.t}),E=0,v=0;v<D.length;v++)O=D[v],k={ease:O.e,duration:(O.t-(v?D[v-1].t:0))/100*s},k[x]=O.v,_.to(g,k,E),E+=k.duration;_.duration()<s&&_.to({},{duration:s-_.duration()})}}s||a.duration(s=_.duration())}else a.timeline=0;return d===!0&&!Pu&&(jp=Au(a),ud.killTweensOf(g),jp=0),mf(h,Au(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(l||!s&&!f&&a._start===zd(h._time)&&Xu(l)&&sf(Au(a))&&h.data!==`nested`)&&(a._tTime=-Ru,a.render(Math.max(0,-c)||0)),m&&hf(Au(a),m),a}var n=t.prototype;return n.render=function(e,t,n){var r=this._time,i=this._tDur,a=this._dur,o=e<0,s=e>i-Ru&&!o?i:e<Ru?0:e,c,l,u,d,f,p,m,h;if(!a)yf(this,e,t,n);else if(s!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==o||this._lazy){if(c=s,h=this.timeline,this._repeat){if(d=a+this._rDelay,this._repeat<-1&&o)return this.totalTime(d*100+e,t,n);if(c=zd(s%d),s===i?(u=this._repeat,c=a):(f=zd(s/d),u=~~f,u&&u===f?(c=a,u--):c>a&&(c=a)),p=this._yoyo&&u&1,p&&(c=a-c),f=lf(this._tTime,d),c===r&&!n&&this._initted&&u===f)return this._tTime=s,this;u!==f&&this.vars.repeatRefresh&&!p&&!this._lock&&c!==d&&this._initted&&(this._lock=n=1,this.render(zd(d*u),!0).invalidate()._lock=0)}if(!this._initted){if(gf(this,o?e:c,n,t,s))return this._tTime=0,this;if(r!==this._time&&!(n&&this.vars.repeatRefresh&&u!==f))return this;if(a!==this._dur)return this.render(e,t,n)}if(this._rEase){var g=c<r;if(g!==this._inv){var _=g?r:a-r;this._inv=g,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=r,this._invRecip=_?(g?-1:1)/_:0,this._invScale=g?-this.ratio:1-this.ratio,this._invEase=g?this._rEase:this._ease}this.ratio=m=this._invRatio+this._invScale*this._invEase((c-this._invTime)*this._invRecip)}else this.ratio=m=this._ease(c/a);if(this._from&&(this.ratio=m=1-m),this._tTime=s,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),!r&&s&&!t&&!f&&(Xf(this,`onStart`),this._tTime!==s))return this;for(l=this._pt;l;)l.r(m,l.d),l=l._next;h&&h.render(e<0?e:h._dur*h._ease(c/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(o&&of(this,e,t,n),Xf(this,`onUpdate`)),this._repeat&&u!==f&&this.vars.onRepeat&&!t&&this.parent&&Xf(this,`onRepeat`),(s===this._tDur||!s)&&this._tTime===s&&(o&&!this._onUpdate&&of(this,e,!0,!0),(e||!a)&&(s===this._tDur&&this._ts>0||!s&&this._ts<0)&&nf(this,1),!t&&!(o&&!r)&&(s||r||p)&&(Xf(this,s===i?`onComplete`:`onReverseComplete`,!0),this._prom&&!(s<i&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,i){up||dp.wake(),this._ts||this.play();var a=Math.min(this._dur,(this._dp._time-this._start)*this._ts),o;return this._initted||Np(this,a),o=this._ease(a/this._dur),Pp(this,e,t,n,r,o,a,i)?this.resetTo(e,t,n,r,1):(ff(this,0),this.parent||ef(this._dp,this,`_first`,`_last`,this._dp._sort?`_start`:0),this.render(0))},n.kill=function(e,t){if(t===void 0&&(t=`all`),!e&&(!t||t===`all`))return this._lazy=this._pt=0,this.parent?Zf(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Fu),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,jp&&jp.vars.overwrite!==!0)._first||Zf(this),this.parent&&n!==this.timeline.totalDuration()&&xf(this,this._dur*this.timeline._tDur/n,0,1),this}var r=this._targets,i=e?Nf(e):r,a=this._ptLookup,o=this._pt,s,c,l,u,d,f,p;if((!t||t===`all`)&&$d(r,i))return t===`all`&&(this._pt=0),Zf(this);for(s=this._op=this._op||[],t!==`all`&&(Gu(t)&&(d={},Ld(t,function(e){return d[e]=1}),t=d),t=Fp(r,t)),p=r.length;p--;)if(~i.indexOf(r[p]))for(d in c=a[p],t===`all`?(s[p]=t,u=c,l={}):(l=s[p]=s[p]||{},u=t),u)f=c&&c[d],f&&((!(`kill`in f.d)||f.d.kill(d)===!0)&&tf(this,f,`_pt`),delete c[d]),l!==`all`&&(l[d]=1);return this._initted&&!this._pt&&o&&Zf(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return Tf(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return Tf(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return ud.killTweensOf(e,t,n)},t}(Tp);qd(Bp.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Ld(`staggerTo,staggerFrom,staggerFromTo`,function(e){Bp[e]=function(){var t=new Ep,n=Af.call(arguments,0);return n.splice(e===`staggerFromTo`?5:4,0,0),t[e].apply(t,n)}});var Vp=function(e,t,n){return e[t]=n},Hp=function(e,t,n){return e[t](n)},Up=function(e,t,n,r){return e[t](r.fp,n)},Wp=function(e,t,n){return e.setAttribute(t,n)},Gp=function(e,t){return Ku(e[t])?Hp:Ju(e[t])&&e.setAttribute?Wp:Vp},Kp=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},qp=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Jp=function(e,t){var n=t._pt,r=``;if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},Yp=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},Xp=function(e,t,n,r){for(var i=this._pt,a;i;)a=i._next,i.p===r&&i.modifier(e,t,n),i=a},Zp=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?tf(this,t,`_pt`):t.dep||(n=1),t=r;return!n},Qp=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},$p=function(e){for(var t=e._pt,n,r,i,a;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=i},em=function(){function e(e,t,n,r,i,a,o,s,c){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||Kp,this.d=o||this,this.set=s||Vp,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=e.prototype;return t.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=Qp,this.m=e,this.mt=n,this.tween=t},e}();Ld(Nd+`parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse`,function(e){return Td[e]=1}),md.TweenMax=md.TweenLite=Bp,md.TimelineLite=md.TimelineMax=Ep,ud=new Ep({sortChildren:!1,defaults:Nu,autoRemoveChildren:!0,id:`root`,smoothChildTiming:!0}),Mu.stringFilter=lp;var tm=[],nm={},rm=[],im=0,am=0,om=function(e){return(nm[e]||rm).map(function(e){return e()})},sm=function(){var e=Date.now(),t=[];e-im>2&&(om(`matchMediaInit`),tm.forEach(function(e){var n=e.queries,r=e.conditions,i,a,o,s;for(a in n)i=dd.matchMedia(n[a]).matches,i&&(o=1),i!==r[a]&&(r[a]=i,s=1);s&&(e.revert(),o&&t.push(e))}),om(`matchMediaRevert`),t.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),im=e,om(`matchMedia`))},cm=function(){function e(e,t){this.selector=t&&Pf(t),this.data=[],this._r=[],this.isReverted=!1,this.id=am++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){Ku(e)&&(n=t,t=e,e=Ku);var r=this,i=function(){var e=Iu,i=r.selector,a;return e&&e!==r&&e.data.push(r),n&&(r.selector=Pf(n)),Iu=r,a=t.apply(r,arguments),Ku(a)&&r._r.push(a),Iu=e,r.selector=i,r.isReverted=!1,a};return r.last=i,e===Ku?i(r,function(e){return r.add(null,e)}):e?r[e]=i:i},t.ignore=function(e){var t=Iu;Iu=null,e(this),Iu=t},t.getTweens=function(){var t=[];return this.data.forEach(function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof Bp&&!(n.parent&&n.parent.data===`nested`)&&t.push(n)}),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?(function(){for(var t=n.getTweens(),r=n.data.length,i;r--;)i=n.data[r],i.data===`isFlip`&&(i.revert(),i.getChildren(!0,!0,!1).forEach(function(e){return t.splice(t.indexOf(e),1)}));for(t.map(function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}}).sort(function(e,t){return t.g-e.g||-1/0}).forEach(function(t){return t.t.revert(e)}),r=n.data.length;r--;)i=n.data[r],i instanceof Ep?i.data!==`nested`&&(i.scrollTrigger&&i.scrollTrigger.revert(),i.kill()):!(i instanceof Bp)&&i.revert&&i.revert(e);n._r.forEach(function(t){return t(e,n)}),n.isReverted=!0})():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear(),t)for(var r=tm.length;r--;)tm[r].id===this.id&&tm.splice(r,1)},t.revert=function(e){this.kill(e||{})},e}(),lm=function(){function e(e){this.contexts=[],this.scope=e,Iu&&Iu.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){Yu(e)||(e={matches:e});var r=new cm(0,n||this.scope),i=r.conditions={},a,o,s;for(o in Iu&&!r.selector&&(r.selector=Iu.selector),this.contexts.push(r),t=r.add(`onMatch`,t),r.queries=e,e)o===`all`?s=1:(a=dd.matchMedia(e[o]),a&&(tm.indexOf(r)<0&&tm.push(r),(i[o]=a.matches)&&(s=1),a.addListener?a.addListener(sm):a.addEventListener(`change`,sm)));return s&&t(r,function(e){return r.add(null,e)}),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},e}(),um={registerPlugin:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(function(e){return ep(e)})},timeline:function(e){return new Ep(e)},getTweensOf:function(e,t){return ud.getTweensOf(e,t)},getProperty:function(e,t,n,r){Gu(e)&&(e=Nf(e)[0]);var i=Fd(e||{}).get,a=n?Kd:Gd;return n===`native`&&(n=``),e&&(t?a((kd[t]&&kd[t].get||i)(e,t,n,r)):function(t,n,r){return a((kd[t]&&kd[t].get||i)(e,t,n,r))})},quickSetter:function(e,t,n){if(e=Nf(e),e.length>1){var r=e.map(function(e){return mm.quickSetter(e,t,n)}),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=kd[t],o=Fd(e),s=o.harness&&(o.harness.aliases||{})[t]||t,c=a?function(t){var r=new a;Qf._pt=0,r.init(e,n?t+n:t,Qf,0,[e]),r.render(1,r),Qf._pt&&Yp(1,Qf)}:o.set(e,s);return a?c:function(t){return c(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=mm.to(e,qd((r={},r[t]=`+=0.1`,r.paused=!0,r.stagger=0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return ud.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=yp(e.ease,Nu.ease)),Xd(Nu,e||{})},config:function(e){return Xd(Mu,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||``).split(`,`).forEach(function(e){return e&&!kd[e]&&!md[e]&&yd(t+` effect requires `+e+` plugin.`)}),Ad[t]=function(e,t,r){return n(Nf(e),qd(t||{},i),r)},a&&(Ep.prototype[t]=function(e,n,r){return this.add(Ad[t](e,Yu(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){X[e]=yp(t)},parseEase:function(e,t){return arguments.length?yp(e,t):X},getById:function(e){return ud.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new Ep(e),r,i;for(n.smoothChildTiming=Xu(e.smoothChildTiming),ud.remove(n),n._dp=0,n._time=n._tTime=ud._time,r=ud._first;r;)i=r._next,(t||!(!r._dur&&r instanceof Bp&&r.vars.onComplete===r._targets[0]))&&mf(n,r,r._start-r._delay),r=i;return mf(ud,n,0),n},context:function(e,t){return e?new cm(e,t):Iu},matchMedia:function(e){return new lm(e)},matchMediaRefresh:function(){return tm.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||sm()},addEventListener:function(e,t){var n=nm[e]||(nm[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=nm[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:Wf,wrapYoyo:Gf,distribute:If,random:zf,snap:Rf,normalize:Hf,getUnit:Of,clamp:kf,splitColor:ip,toArray:Nf,selector:Pf,mapRange:qf,pipe:Bf,unitize:Vf,interpolate:Jf,shuffle:Ff},install:_d,effects:Ad,ticker:dp,updateRoot:Ep.updateRoot,plugins:kd,globalTimeline:ud,core:{PropTween:em,globals:bd,Tween:Bp,Timeline:Ep,Animation:Tp,getCache:Fd,_removeLinkedListItem:tf,reverting:function(){return Fu},context:function(e){return e&&Iu&&(Iu.data.push(e),e._ctx=Iu),Iu},suppressOverwrites:function(e){return Pu=e}}};Ld(`to,from,fromTo,delayedCall,set,killTweensOf`,function(e){return um[e]=Bp[e]}),dp.add(Ep.updateRoot),Qf=um.to({},{duration:0});var dm=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},fm=function(e,t){var n=e._targets,r,i,a;for(r in t)for(i=n.length;i--;)a=e._ptLookup[i][r],(a&&=a.d)&&(a._pt&&(a=dm(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[i],r))},pm=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(Gu(n)&&(r={},Ld(n,function(e){return r[e]=1}),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}fm(e,n)}}}},mm=um.registerPlugin({name:`attr`,init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||``,o=this.add(e,`setAttribute`,(s||0)+``,t[a],r,i,0,0,a),o.op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)Fu?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:`endArray`,headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},pm(`roundProps`,Lf),pm(`modifiers`),pm(`snap`,Rf))||um;Bp.version=Ep.version=mm.version=`3.15.0`,gd=1,Zu()&&fp(),X.Power0,X.Power1,X.Power2,X.Power3,X.Power4,X.Linear,X.Quad,X.Cubic,X.Quart,X.Quint,X.Strong,X.Elastic,X.Back,X.SteppedEase,X.Bounce,X.Sine,X.Expo,X.Circ;var hm,gm,_m,vm,ym,bm,xm,Sm=function(){return typeof window<`u`},Cm={},wm=180/Math.PI,Tm=Math.PI/180,Em=Math.atan2,Dm=1e8,Om=/([A-Z])/g,km=/(left|right|width|margin|padding|x)/i,Am=/[\s,\(]\S/,jm={autoAlpha:`opacity,visibility`,scale:`scaleX,scaleY`,alpha:`opacity`},Mm=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Nm=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Pm=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Fm=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Im=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},Lm=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Rm=function(e,t){return t.set(t.t,t.p,e===1?t.e:t.b,t)},zm=function(e,t,n){return e.style[t]=n},Bm=function(e,t,n){return e.style.setProperty(t,n)},Vm=function(e,t,n){return e._gsap[t]=n},Hm=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},Um=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},Wm=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},Gm=`transform`,Km=Gm+`Origin`,qm=function e(t,n){var r=this,i=this.target,a=i.style,o=i._gsap;if(t in Cm&&a){if(this.tfm=this.tfm||{},t!==`transform`)t=jm[t]||t,~t.indexOf(`,`)?t.split(`,`).forEach(function(e){return r.tfm[e]=fh(i,e)}):this.tfm[t]=o.x?o[t]:fh(i,t),t===Km&&(this.tfm.zOrigin=o.zOrigin);else return jm.transform.split(`,`).forEach(function(t){return e.call(r,t,n)});if(this.props.indexOf(Gm)>=0)return;o.svg&&(this.svgo=i.getAttribute(`data-svg-origin`),this.props.push(Km,n,``)),t=Gm}(a||n)&&this.props.push(t,n,a[t])},Jm=function(e){e.translate&&(e.removeProperty(`translate`),e.removeProperty(`scale`),e.removeProperty(`rotate`))},Ym=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?n[e[i]]=e[i+2]:n.removeProperty(e[i].substr(0,2)===`--`?e[i]:e[i].replace(Om,`-$1`).toLowerCase());if(this.tfm){for(a in this.tfm)r[a]=this.tfm[a];r.svg&&(r.renderTransform(),t.setAttribute(`data-svg-origin`,this.svgo||``)),i=xm(),(!i||!i.isStart)&&!n[Gm]&&(Jm(n),r.zOrigin&&n[Km]&&(n[Km]+=` `+r.zOrigin+`px`,r.zOrigin=0,r.renderTransform()),r.uncache=1)}},Xm=function(e,t){var n={target:e,props:[],revert:Ym,save:qm};return e._gsap||mm.core.getCache(e),t&&e.style&&e.nodeType&&t.split(`,`).forEach(function(e){return n.save(e)}),n},Zm,Qm=function(e,t){var n=gm.createElementNS?gm.createElementNS((t||`http://www.w3.org/1999/xhtml`).replace(/^https/,`http`),e):gm.createElement(e);return n&&n.style?n:gm.createElement(e)},$m=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(Om,`-$1`).toLowerCase())||i.getPropertyValue(n)||!r&&e(t,th(n)||n,1)||``},eh=`O,Moz,ms,Ms,Webkit`.split(`,`),th=function(e,t,n){var r=(t||ym).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(eh[i]+e in r););return i<0?null:(i===3?`ms`:i>=0?eh[i]:``)+e},nh=function(){Sm()&&window.document&&(hm=window,gm=hm.document,_m=gm.documentElement,ym=Qm(`div`)||{style:{}},Qm(`div`),Gm=th(Gm),Km=Gm+`Origin`,ym.style.cssText=`border-width:0;line-height:0;position:absolute;padding:0`,Zm=!!th(`perspective`),xm=mm.core.reverting,vm=1)},rh=function(e){var t=e.ownerSVGElement,n=Qm(`svg`,t&&t.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`),r=e.cloneNode(!0),i;r.style.display=`block`,n.appendChild(r),_m.appendChild(n);try{i=r.getBBox()}catch{}return n.removeChild(r),_m.removeChild(n),i},ih=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},ah=function(e){var t,n;try{t=e.getBBox()}catch{t=rh(e),n=1}return t&&(t.width||t.height)||n||(t=rh(e)),t&&!t.width&&!t.x&&!t.y?{x:+ih(e,[`x`,`cx`,`x1`])||0,y:+ih(e,[`y`,`cy`,`y1`])||0,width:0,height:0}:t},oh=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&ah(e))},sh=function(e,t){if(t){var n=e.style,r;t in Cm&&t!==Km&&(t=Gm),n.removeProperty?(r=t.substr(0,2),(r===`ms`||t.substr(0,6)===`webkit`)&&(t=`-`+t),n.removeProperty(r===`--`?t:t.replace(Om,`-$1`).toLowerCase())):n.removeAttribute(t)}},ch=function(e,t,n,r,i,a){var o=new em(e._pt,t,n,0,1,a?Rm:Lm);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},lh={deg:1,rad:1,turn:1},uh={grid:1,flex:1},dh=function e(t,n,r,i){var a=parseFloat(r)||0,o=(r+``).trim().substr((a+``).length)||`px`,s=ym.style,c=km.test(n),l=t.tagName.toLowerCase()===`svg`,u=(l?`client`:`offset`)+(c?`Width`:`Height`),d=100,f=i===`px`,p=i===`%`,m,h,g,_;if(i===o||!a||lh[i]||lh[o])return a;if(o!==`px`&&!f&&(a=e(t,n,r,`px`)),_=t.getCTM&&oh(t),(p||o===`%`)&&(Cm[n]||~n.indexOf(`adius`)))return m=_?t.getBBox()[c?`width`:`height`]:t[u],Rd(p?a/m*d:a/100*m);if(s[c?`width`:`height`]=d+(f?o:i),h=i!==`rem`&&~n.indexOf(`adius`)||i===`em`&&t.appendChild&&!l?t:t.parentNode,_&&(h=(t.ownerSVGElement||{}).parentNode),(!h||h===gm||!h.appendChild)&&(h=gm.body),g=h._gsap,g&&p&&g.width&&c&&g.time===dp.time&&!g.uncache)return Rd(a/g.width*d);if(p&&(n===`height`||n===`width`)){var v=t.style[n];t.style[n]=d+i,m=t[u],v?t.style[n]=v:sh(t,n)}else(p||o===`%`)&&!uh[$m(h,`display`)]&&(s.position=$m(t,`position`)),h===t&&(s.position=`static`),h.appendChild(ym),m=ym[u],h.removeChild(ym),s.position=`absolute`;return c&&p&&(g=Fd(h),g.time=dp.time,g.width=h[u]),Rd(f?m*a/d:m&&a?d/m*a:0)},fh=function(e,t,n,r){var i;return vm||nh(),t in jm&&t!==`transform`&&(t=jm[t],~t.indexOf(`,`)&&(t=t.split(`,`)[0])),Cm[t]&&t!==`transform`?(i=wh(e,r),i=t===`transformOrigin`?i.svg?i.origin:Th($m(e,Km))+` `+i.zOrigin+`px`:i[t]):(i=e.style[t],(!i||i===`auto`||r||~(i+``).indexOf(`calc(`))&&(i=_h[t]&&_h[t](e,t,n)||$m(e,t)||Id(e,t)||+(t===`opacity`))),n&&!~(i+``).trim().indexOf(` `)?dh(e,t,i,n)+n:i},ph=function(e,t,n,r){if(!n||n===`none`){var i=th(t,e,1),a=i&&$m(e,i,1);a&&a!==n?(t=i,n=a):t===`borderColor`&&(n=$m(e,`borderTopColor`))}var o=new em(this._pt,e.style,t,0,1,Jp),s=0,c=0,l,u,d,f,p,m,h,g,_,v,y,b;if(o.b=n,o.e=r,n+=``,r+=``,r.substring(0,6)===`var(--`&&(r=$m(e,r.substring(4,r.indexOf(`)`)))),r===`auto`&&(m=e.style[t],e.style[t]=r,r=$m(e,t)||r,m?e.style[t]=m:sh(e,t)),l=[n,r],lp(l),n=l[0],r=l[1],d=n.match(ad)||[],b=r.match(ad)||[],b.length){for(;u=ad.exec(r);)h=u[0],_=r.substring(s,u.index),p?p=(p+1)%5:(_.substr(-5)===`rgba(`||_.substr(-5)===`hsla(`)&&(p=1),h!==(m=d[c++]||``)&&(f=parseFloat(m)||0,y=m.substr((f+``).length),h.charAt(1)===`=`&&(h=Bd(f,h)+y),g=parseFloat(h),v=h.substr((g+``).length),s=ad.lastIndex-v.length,v||(v=v||Mu.units[t]||y,s===r.length&&(r+=v,o.e+=v)),y!==v&&(f=dh(e,t,m,v)||0),o._pt={_next:o._pt,p:_||c===1?_:`,`,s:f,c:g-f,m:p&&p<4||t===`zIndex`?Math.round:0});o.c=s<r.length?r.substring(s,r.length):``}else o.r=t===`display`&&r===`none`?Rm:Lm;return sd.test(r)&&(o.e=0),this._pt=o,o},mh={top:`0%`,bottom:`100%`,left:`0%`,right:`100%`,center:`50%`},hh=function(e){var t=e.split(` `),n=t[0],r=t[1]||`50%`;return(n===`top`||n===`bottom`||r===`left`||r===`right`)&&(e=n,n=r,r=e),t[0]=mh[n]||n,t[1]=mh[r]||r,t.join(` `)},gh=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,i=t.u,a=n._gsap,o,s,c;if(i===`all`||i===!0)r.cssText=``,s=1;else for(i=i.split(`,`),c=i.length;--c>-1;)o=i[c],Cm[o]&&(s=1,o=o===`transformOrigin`?Km:Gm),sh(n,o);s&&(sh(n,Gm),a&&(a.svg&&n.removeAttribute(`transform`),r.scale=r.rotate=r.translate=`none`,wh(n,1),a.uncache=1,Jm(r)))}},_h={clearProps:function(e,t,n,r,i){if(i.data!==`isFromStart`){var a=e._pt=new em(e._pt,t,n,0,0,gh);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},vh=[1,0,0,1,0,0],yh={},bh=function(e){return e===`matrix(1, 0, 0, 1, 0, 0)`||e===`none`||!e},xh=function(e){var t=$m(e,Gm);return bh(t)?vh:t.substr(7).match(id).map(Rd)},Sh=function(e,t){var n=e._gsap||Fd(e),r=e.style,i=xh(e),a,o,s,c;return n.svg&&e.getAttribute(`transform`)?(s=e.transform.baseVal.consolidate().matrix,i=[s.a,s.b,s.c,s.d,s.e,s.f],i.join(`,`)===`1,0,0,1,0,0`?vh:i):(i===vh&&!e.offsetParent&&e!==_m&&!n.svg&&(s=r.display,r.display=`block`,a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,_m.appendChild(e)),i=xh(e),s?r.display=s:sh(e,`display`),c&&(o?a.insertBefore(e,o):a?a.appendChild(e):_m.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},Ch=function(e,t,n,r,i,a){var o=e._gsap,s=i||Sh(e,!0),c=o.xOrigin||0,l=o.yOrigin||0,u=o.xOffset||0,d=o.yOffset||0,f=s[0],p=s[1],m=s[2],h=s[3],g=s[4],_=s[5],v=t.split(` `),y=parseFloat(v[0])||0,b=parseFloat(v[1])||0,x,S,C,w;n?s!==vh&&(S=f*h-p*m)&&(C=h/S*y+b*(-m/S)+(m*_-h*g)/S,w=y*(-p/S)+f/S*b-(f*_-p*g)/S,y=C,b=w):(x=ah(e),y=x.x+(~v[0].indexOf(`%`)?y/100*x.width:y),b=x.y+(~(v[1]||v[0]).indexOf(`%`)?b/100*x.height:b)),r||r!==!1&&o.smooth?(g=y-c,_=b-l,o.xOffset=u+(g*f+_*m)-g,o.yOffset=d+(g*p+_*h)-_):o.xOffset=o.yOffset=0,o.xOrigin=y,o.yOrigin=b,o.smooth=!!r,o.origin=t,o.originIsAbsolute=!!n,e.style[Km]=`0px 0px`,a&&(ch(a,o,`xOrigin`,c,y),ch(a,o,`yOrigin`,l,b),ch(a,o,`xOffset`,u,o.xOffset),ch(a,o,`yOffset`,d,o.yOffset)),e.setAttribute(`data-svg-origin`,y+` `+b)},wh=function(e,t){var n=e._gsap||new wp(e);if(`x`in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,a=`px`,o=`deg`,s=getComputedStyle(e),c=$m(e,Km)||`0`,l=u=d=m=h=g=_=v=y=0,u,d,f=p=1,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B;return n.svg=!!(e.getCTM&&oh(e)),s.translate&&((s.translate!==`none`||s.scale!==`none`||s.rotate!==`none`)&&(r[Gm]=(s.translate===`none`?``:`translate3d(`+(s.translate+` 0 0`).split(` `).slice(0,3).join(`, `)+`) `)+(s.rotate===`none`?``:`rotate(`+s.rotate+`) `)+(s.scale===`none`?``:`scale(`+s.scale.split(` `).join(`,`)+`) `)+(s[Gm]===`none`?``:s[Gm])),r.scale=r.rotate=r.translate=`none`),S=Sh(e,n.svg),n.svg&&(n.uncache?(N=e.getBBox(),c=n.xOrigin-N.x+`px `+(n.yOrigin-N.y)+`px`,M=``):M=!t&&e.getAttribute(`data-svg-origin`),Ch(e,M||c,!!M||n.originIsAbsolute,n.smooth!==!1,S)),b=n.xOrigin||0,x=n.yOrigin||0,S!==vh&&(E=S[0],D=S[1],O=S[2],k=S[3],l=A=S[4],u=j=S[5],S.length===6?(f=Math.sqrt(E*E+D*D),p=Math.sqrt(k*k+O*O),m=E||D?Em(D,E)*wm:0,_=O||k?Em(O,k)*wm+m:0,_&&(p*=Math.abs(Math.cos(_*Tm))),n.svg&&(l-=b-(b*E+x*O),u-=x-(b*D+x*k))):(B=S[6],R=S[7],F=S[8],I=S[9],L=S[10],z=S[11],l=S[12],u=S[13],d=S[14],C=Em(B,L),h=C*wm,C&&(w=Math.cos(-C),T=Math.sin(-C),M=A*w+F*T,N=j*w+I*T,P=B*w+L*T,F=A*-T+F*w,I=j*-T+I*w,L=B*-T+L*w,z=R*-T+z*w,A=M,j=N,B=P),C=Em(-O,L),g=C*wm,C&&(w=Math.cos(-C),T=Math.sin(-C),M=E*w-F*T,N=D*w-I*T,P=O*w-L*T,z=k*T+z*w,E=M,D=N,O=P),C=Em(D,E),m=C*wm,C&&(w=Math.cos(C),T=Math.sin(C),M=E*w+D*T,N=A*w+j*T,D=D*w-E*T,j=j*w-A*T,E=M,A=N),h&&Math.abs(h)+Math.abs(m)>359.9&&(h=m=0,g=180-g),f=Rd(Math.sqrt(E*E+D*D+O*O)),p=Rd(Math.sqrt(j*j+B*B)),C=Em(A,j),_=Math.abs(C)>2e-4?C*wm:0,y=z?1/(z<0?-z:z):0),n.svg&&(M=e.getAttribute(`transform`),n.forceCSS=e.setAttribute(`transform`,``)||!bh($m(e,Gm)),M&&e.setAttribute(`transform`,M))),Math.abs(_)>90&&Math.abs(_)<270&&(i?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t||=n.uncache,n.x=l-((n.xPercent=l&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-l)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=u-((n.yPercent=u&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=d+a,n.scaleX=Rd(f),n.scaleY=Rd(p),n.rotation=Rd(m)+o,n.rotationX=Rd(h)+o,n.rotationY=Rd(g)+o,n.skewX=_+o,n.skewY=v+o,n.transformPerspective=y+a,(n.zOrigin=parseFloat(c.split(` `)[2])||!t&&n.zOrigin||0)&&(r[Km]=Th(c)),n.xOffset=n.yOffset=0,n.force3D=Mu.force3D,n.renderTransform=n.svg?Mh:Zm?jh:Dh,n.uncache=0,n},Th=function(e){return(e=e.split(` `))[0]+` `+e[1]},Eh=function(e,t,n){var r=Of(t);return Rd(parseFloat(t)+parseFloat(dh(e,`x`,n+`px`,r)))+r},Dh=function(e,t){t.z=`0px`,t.rotationY=t.rotationX=`0deg`,t.force3D=0,jh(e,t)},Oh=`0deg`,kh=`0px`,Ah=`) `,jh=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,c=n.rotation,l=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,m=n.scaleY,h=n.transformPerspective,g=n.force3D,_=n.target,v=n.zOrigin,y=``,b=g===`auto`&&e&&e!==1||g===!0;if(v&&(u!==Oh||l!==Oh)){var x=parseFloat(l)*Tm,S=Math.sin(x),C=Math.cos(x),w;x=parseFloat(u)*Tm,w=Math.cos(x),a=Eh(_,a,S*w*-v),o=Eh(_,o,-Math.sin(x)*-v),s=Eh(_,s,C*w*-v+v)}h!==kh&&(y+=`perspective(`+h+Ah),(r||i)&&(y+=`translate(`+r+`%, `+i+`%) `),(b||a!==kh||o!==kh||s!==kh)&&(y+=s!==kh||b?`translate3d(`+a+`, `+o+`, `+s+`) `:`translate(`+a+`, `+o+Ah),c!==Oh&&(y+=`rotate(`+c+Ah),l!==Oh&&(y+=`rotateY(`+l+Ah),u!==Oh&&(y+=`rotateX(`+u+Ah),(d!==Oh||f!==Oh)&&(y+=`skew(`+d+`, `+f+Ah),(p!==1||m!==1)&&(y+=`scale(`+p+`, `+m+Ah),_.style[Gm]=y||`translate(0, 0)`},Mh=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.rotation,c=n.skewX,l=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,m=n.yOrigin,h=n.xOffset,g=n.yOffset,_=n.forceCSS,v=parseFloat(a),y=parseFloat(o),b,x,S,C,w;s=parseFloat(s),c=parseFloat(c),l=parseFloat(l),l&&(l=parseFloat(l),c+=l,s+=l),s||c?(s*=Tm,c*=Tm,b=Math.cos(s)*u,x=Math.sin(s)*u,S=Math.sin(s-c)*-d,C=Math.cos(s-c)*d,c&&(l*=Tm,w=Math.tan(c-l),w=Math.sqrt(1+w*w),S*=w,C*=w,l&&(w=Math.tan(l),w=Math.sqrt(1+w*w),b*=w,x*=w)),b=Rd(b),x=Rd(x),S=Rd(S),C=Rd(C)):(b=u,C=d,x=S=0),(v&&!~(a+``).indexOf(`px`)||y&&!~(o+``).indexOf(`px`))&&(v=dh(f,`x`,a,`px`),y=dh(f,`y`,o,`px`)),(p||m||h||g)&&(v=Rd(v+p-(p*b+m*S)+h),y=Rd(y+m-(p*x+m*C)+g)),(r||i)&&(w=f.getBBox(),v=Rd(v+r/100*w.width),y=Rd(y+i/100*w.height)),w=`matrix(`+b+`,`+x+`,`+S+`,`+C+`,`+v+`,`+y+`)`,f.setAttribute(`transform`,w),_&&(f.style[Gm]=w)},Nh=function(e,t,n,r,i){var a=360,o=Gu(i),s=parseFloat(i)*(o&&~i.indexOf(`rad`)?wm:1)-r,c=r+s+`deg`,l,u;return o&&(l=i.split(`_`)[1],l===`short`&&(s%=a,s!==s%(a/2)&&(s+=s<0?a:-a)),l===`cw`&&s<0?s=(s+a*Dm)%a-~~(s/a)*a:l===`ccw`&&s>0&&(s=(s-a*Dm)%a-~~(s/a)*a)),e._pt=u=new em(e._pt,t,n,r,s,Nm),u.e=c,u.u=`deg`,e._props.push(n),u},Ph=function(e,t){for(var n in t)e[n]=t[n];return e},Fh=function(e,t,n){var r=Ph({},n._gsap),i=`perspective,force3D,transformOrigin,svgOrigin`,a=n.style,o,s,c,l,u,d,f,p;for(s in r.svg?(c=n.getAttribute(`transform`),n.setAttribute(`transform`,``),a[Gm]=t,o=wh(n,1),sh(n,Gm),n.setAttribute(`transform`,c)):(c=getComputedStyle(n)[Gm],a[Gm]=t,o=wh(n,1),a[Gm]=c),Cm)c=r[s],l=o[s],c!==l&&i.indexOf(s)<0&&(f=Of(c),p=Of(l),u=f===p?parseFloat(c):dh(n,s,c,p),d=parseFloat(l),e._pt=new em(e._pt,o,s,u,d-u,Mm),e._pt.u=p||0,e._props.push(s));Ph(o,r)};Ld(`padding,margin,Width,Radius`,function(e,t){var n=`Top`,r=`Right`,i=`Bottom`,a=`Left`,o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(n){return t<2?e+n:`border`+n+e});_h[t>1?`border`+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map(function(t){return fh(e,t,n)}),s=a.join(` `),s.split(a[0]).length===5?a[0]:s;a=(r+``).split(` `),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),e.init(t,s,i)}});var Ih={name:`css`,register:nh,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a=this._props,o=e.style,s=n.vars.startAt,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;for(m in vm||nh(),this.styles=this.styles||Xm(e),C=this.styles.props,this.tween=n,t)if(m!==`autoRound`&&(l=t[m],!(kd[m]&&Ap(m,t,n,r,e,i)))){if(f=typeof l,p=_h[m],f===`function`&&(l=l.call(n,r,e,i),f=typeof l),f===`string`&&~l.indexOf(`random(`)&&(l=Kf(l)),p)p(this,e,m,l,n)&&(S=1);else if(m.substr(0,2)===`--`)c=(getComputedStyle(e).getPropertyValue(m)+``).trim(),l+=``,sp.lastIndex=0,sp.test(c)||(h=Of(c),g=Of(l),g?h!==g&&(c=dh(e,m,c,g)+g):h&&(l+=h)),this.add(o,`setProperty`,c,l,r,i,0,0,m),a.push(m),C.push(m,0,o[m]);else if(f!==`undefined`){if(s&&m in s?(c=typeof s[m]==`function`?s[m].call(n,r,e,i):s[m],Gu(c)&&~c.indexOf(`random(`)&&(c=Kf(c)),Of(c+``)||c===`auto`||(c+=Mu.units[m]||Of(fh(e,m))||``),(c+``).charAt(1)===`=`&&(c=fh(e,m))):c=fh(e,m),d=parseFloat(c),_=f===`string`&&l.charAt(1)===`=`&&l.substr(0,2),_&&(l=l.substr(2)),u=parseFloat(l),m in jm&&(m===`autoAlpha`&&(d===1&&fh(e,`visibility`)===`hidden`&&u&&(d=0),C.push(`visibility`,0,o.visibility),ch(this,o,`visibility`,d?`inherit`:`hidden`,u?`inherit`:`hidden`,!u)),m!==`scale`&&m!==`transform`&&(m=jm[m],~m.indexOf(`,`)&&(m=m.split(`,`)[0]))),v=m in Cm,v){if(this.styles.save(m),w=l,f===`string`&&l.substring(0,6)===`var(--`){if(l=$m(e,l.substring(4,l.indexOf(`)`))),l.substring(0,5)===`calc(`){var T=e.style.perspective;e.style.perspective=l,l=$m(e,`perspective`),T?e.style.perspective=T:sh(e,`perspective`)}u=parseFloat(l)}if(y||(b=e._gsap,b.renderTransform&&!t.parseTransform||wh(e,t.parseTransform),x=t.smoothOrigin!==!1&&b.smooth,y=this._pt=new em(this._pt,o,Gm,0,1,b.renderTransform,b,0,-1),y.dep=1),m===`scale`)this._pt=new em(this._pt,b,`scaleY`,b.scaleY,(_?Bd(b.scaleY,_+u):u)-b.scaleY||0,Mm),this._pt.u=0,a.push(`scaleY`,m),m+=`X`;else if(m===`transformOrigin`){C.push(Km,0,o[Km]),l=hh(l),b.svg?Ch(e,l,0,x,0,this):(g=parseFloat(l.split(` `)[2])||0,g!==b.zOrigin&&ch(this,b,`zOrigin`,b.zOrigin,g),ch(this,o,m,Th(c),Th(l)));continue}else if(m===`svgOrigin`){Ch(e,l,1,x,0,this);continue}else if(m in yh){Nh(this,b,m,d,_?Bd(d,_+l):l);continue}else if(m===`smoothOrigin`){ch(this,b,`smooth`,b.smooth,l);continue}else if(m===`force3D`){b[m]=l;continue}else if(m===`transform`){Fh(this,l,e);continue}}else m in o||(m=th(m)||m);if(v||(u||u===0)&&(d||d===0)&&!Am.test(l)&&m in o)h=(c+``).substr((d+``).length),u||=0,g=Of(l)||(m in Mu.units?Mu.units[m]:h),h!==g&&(d=dh(e,m,c,g)),this._pt=new em(this._pt,v?b:o,m,d,(_?Bd(d,_+u):u)-d,!v&&(g===`px`||m===`zIndex`)&&t.autoRound!==!1?Im:Mm),this._pt.u=g||0,v&&w!==l?(this._pt.b=c,this._pt.e=w,this._pt.r=Fm):h!==g&&g!==`%`&&(this._pt.b=c,this._pt.r=Pm);else if(m in o)ph.call(this,e,m,c,_?_+l:l);else if(m in e)this.add(e,m,c||e[m],_?_+l:l,r,i);else if(m!==`parseTransform`){vd(m,l);continue}v||(m in o?C.push(m,0,o[m]):typeof e[m]==`function`?C.push(m,2,e[m]()):C.push(m,1,c||e[m])),a.push(m)}}S&&$p(this)},render:function(e,t){if(t.tween._time||!xm())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:fh,aliases:jm,getSetter:function(e,t,n){var r=jm[t];return r&&r.indexOf(`,`)<0&&(t=r),t in Cm&&t!==Km&&(e._gsap.x||fh(e,`x`))?n&&bm===n?t===`scale`?Hm:Vm:(bm=n||{})&&(t===`scale`?Um:Wm):e.style&&!Ju(e.style[t])?zm:~t.indexOf(`-`)?Bm:Gp(e,t)},core:{_removeProperty:sh,_getMatrix:Sh}};mm.utils.checkPrefix=th,mm.core.getStyleSaver=Xm,(function(e,t,n,r){var i=Ld(e+`,`+t+`,`+n,function(e){Cm[e]=1});Ld(t,function(e){Mu.units[e]=`deg`,yh[e]=1}),jm[i[13]]=e+`,`+t,Ld(r,function(e){var t=e.split(`:`);jm[t[1]]=i[t[0]]})})(`x,y,z,scale,scaleX,scaleY,xPercent,yPercent`,`rotation,rotationX,rotationY,skewX,skewY`,`transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective`,`0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY`),Ld(`x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective`,function(e){Mu.units[e]=`px`}),mm.registerPlugin(Ih);var Lh=mm.registerPlugin(Ih)||mm;Lh.core.Tween;var Rh={IN_OUT:`power2.inOut`,OUT:`power2.out`},zh={NO_STAGGER:0,RIPPLE_STAGGER_DELAY:.05},Bh=class{timeline;currentStage=``;callbacks;durations;constructor(e,t={}){this.durations=e,this.callbacks=t,this.timeline=Lh.timeline({paused:!0,onUpdate:()=>this.handleProgress(),onComplete:()=>{this.callbacks.onComplete?.(),this.callbacks.onStageComplete?.(`complete`)}});let n=0;this.timeline.addLabel(`seatsToRings`,n),n+=e.seatsToRings/1e3,this.timeline.addLabel(`ringsToBar`,n),n+=e.ringsToBar/1e3,this.timeline.addLabel(`axesReveal`,n),n+=e.axesReveal/1e3,this.timeline.addLabel(`barSlide`,n),n+=e.barSlide/1e3,this.timeline.addLabel(`barsGrow`,n),n+=e.barsGrow/1e3,this.timeline.addLabel(`barsToArea`,n)}animateSeatsToRings(e,t){let n=this.durations.seatsToRings/1e3;return e.each(function(){let e=this;if(!e.getAttribute(`data-orig-x`)){let t=e.getAttribute(`x`),n=e.getAttribute(`y`),r=e.getAttribute(`width`),i=e.getAttribute(`height`);e.setAttribute(`data-orig-x`,t||`0`),e.setAttribute(`data-orig-y`,n||`0`),e.setAttribute(`data-orig-width`,r||`0`),e.setAttribute(`data-orig-height`,i||`0`)}}),this.timeline.to(e.nodes(),{width:2,y:(e,t)=>parseFloat(t.getAttribute(`y`)||`0`),height:(e,n)=>t-parseFloat(n.getAttribute(`y`)||`0`),duration:n,ease:Rh.IN_OUT,stagger:zh.NO_STAGGER,onStart:()=>{this.currentStage=`seatsToRings`,this.callbacks.onStageComplete?.(`seatsToRings`)}},`seatsToRings`),this}animateRingsToBar(e,t){let n=this.durations.ringsToBar/1e3;return e.each(function(e,n){let r=this;if(!t[n])return;let i=r.getAttribute(`x`),a=r.getAttribute(`y`),o=r.getAttribute(`width`),s=r.getAttribute(`height`);r.setAttribute(`data-orig-x`,i||`0`),r.setAttribute(`data-orig-y`,a||`0`),r.setAttribute(`data-orig-width`,o||`0`),r.setAttribute(`data-orig-height`,s||`0`)}),this.timeline.to(e.nodes(),{x:e=>t[e]?.x??0,y:e=>t[e]?.y??0,width:e=>t[e]?.width??0,height:e=>t[e]?.height??0,duration:n,ease:Rh.IN_OUT,stagger:zh.NO_STAGGER,onStart:()=>{this.currentStage=`ringsToBar`,this.callbacks.onStageComplete?.(`ringsToBar`)}},`ringsToBar`),this}animateAxesReveal(e,t){let n=this.durations.axesReveal/1e3;return this.timeline.to([e.node(),t.node()],{opacity:1,duration:n,ease:Rh.IN_OUT,stagger:zh.NO_STAGGER,onStart:()=>{this.currentStage=`axesReveal`,this.callbacks.onStageComplete?.(`axesReveal`)}},`axesReveal`),this}animateBarSlide(e,t){let n=this.durations.barSlide/1e3;return this.timeline.to(e.nodes(),{x:t,duration:n,ease:Rh.OUT,stagger:zh.NO_STAGGER,onStart:()=>{this.currentStage=`barSlide`,this.callbacks.onStageComplete?.(`barSlide`)}},`barSlide`),this}animateBarsGrow(e,t,n=zh.RIPPLE_STAGGER_DELAY){let r=this.durations.barsGrow/1e3;return e.nodes().forEach((e,i)=>{let a=e,o=a.getAttribute(`data-final-y`)||`0`,s=a.getAttribute(`data-final-height`)||`0`,c=parseInt(a.getAttribute(`data-timestamp-index`)||`0`),l=Math.abs(c-t)*n;this.timeline.fromTo(a,{height:0,y:parseFloat(a.getAttribute(`data-chart-baseline`)||`400`)},{y:parseFloat(o),height:parseFloat(s),duration:r,delay:l,ease:Rh.OUT},`barsGrow`)}),this.timeline.call(()=>{this.currentStage=`barsGrow`,this.callbacks.onStageComplete?.(`barsGrow`)},[],`barsGrow`),this}animateBarsToArea(e,t,n,r){let i=this.durations.barsToArea/1e3,a=new Map;return e.each(function(){let e=this,t=e.getAttribute(`class`);if(!t)return;let n=t.match(/category-([\w-]+)/);if(n&&n[1]){let t=n[1];a.has(t)||a.set(t,[]),a.get(t)?.push(e)}}),this.timeline.set(e.nodes(),{opacity:0},`barsToArea`),this.timeline.set(t.nodes(),{opacity:1},`barsToArea`),t.each(function(){let e=this,t=e.getAttribute(`data-category`);if(!t)return;let r=n.get(t);r&&Lh.to(e,{attr:{d:r},duration:i,ease:Rh.IN_OUT})}),this.timeline.call(()=>{this.currentStage=`barsToArea`,this.callbacks.onStageComplete?.(`barsToArea`)},[],`barsToArea`),this}handleProgress(){let e=this.timeline.progress();this.callbacks.onProgress?.(e)}getControls(){return{play:()=>this.timeline.play(),pause:()=>this.timeline.pause(),reverse:()=>this.timeline.reverse(),restart:()=>this.timeline.restart(),seek:e=>this.timeline.progress(e),seekToStage:e=>{let t=this.timeline.labels[e];t!==void 0&&this.timeline.seek(t)},kill:()=>this.timeline.kill(),getProgress:()=>this.timeline.progress(),getCurrentStage:()=>this.currentStage,getTimeline:()=>this.timeline}}play(){this.timeline.play()}destroy(){this.timeline.kill()}};function Vh(e,t){let{arcAngle:n,arcAngleFlexibility:r=5,radius:i,seatSize:a,minSeatSize:o,maxSeatSize:s,spacing:c,innerRadiusRatio:l}=t,u=i*l,d=e.reduce((e,t)=>e+t.seats,0),f={seatSize:a,arcAngle:n,rings:0,score:-1},p=n-r,m=n+r;for(let e=p;e<=m;e+=2.5){let t=e*Math.PI/180;for(let a=s;a>=o;a-=.1){let l=a*2,p=l*c,m=Math.floor((i-u)/p);for(let i=1;i<=Math.min(m,10);i++){let m=0;for(let e=0;e<i;e++){let n=u+(e+.5)*p,r=l*c/n,i=Math.floor(t/r);m+=i}if(m>=d){let t=d/m,c=(a-o)/(s-o),l=(m-d)/d,u=l<.15?1:l<.3?.7:l<.5?.4:.1,p=1-Math.abs(e-n)/r,h=u*.5+c*.3+t*.15+p*.05;h>f.score&&(f={seatSize:a,arcAngle:e,rings:i,score:h})}}}}let h=f.seatSize,g=f.arcAngle,_=g*Math.PI/180,v=h*2,y=v*c,b=Math.floor((i-u)/y),x=[],S=-_/2-Math.PI/2,C=[],w=0,T=[];for(let e=1;e<=b;e++){let t=0,n=[];for(let r=0;r<e;r++){let e=u+(r+.5)*y,i=v*c/e,a=Math.floor(_/i);n.push(a),t+=a}if(t>=d){w=e,T=n;break}}if(w>0)C.push(...T);else for(let e=0;e<b;e++){let t=u+(e+.5)*y,n=v*c/t,r=Math.floor(_/n);C.push(r)}for(let e=0;e<C.length;e++){let t=u+(e+.5)*y,n=C[e]??0;if(n>0){let r=_/n;for(let i=0;i<n;i++){let n=S+(i+.5)*r,a=Math.cos(n)*t,o=Math.sin(n)*t;x.push({ring:e,index:i,angle:n,x:a,y:o})}}}x.sort((e,t)=>{let n=e.angle-t.angle;return Math.abs(n)>.001?n:e.ring-t.ring});let E=[],D=0;return e.forEach((e,t)=>{let n=Math.min(e.seats,x.length-D);for(let r=0;r<n&&D<x.length;r++){let n=x[D++];n&&E.push({x:n.x,y:n.y,category:e.name,categoryIndex:t,seatIndex:r,ring:n.ring,angle:n.angle,radius:h})}}),{arcAngle:g,radius:i,innerRadius:u,centerX:i,centerY:i,seatSize:h,seats:E,totalSeats:d}}function Hh(e,t,n){let r=t<=n?1:n/t;return e.filter(e=>e.value>0).map(e=>{let i=t<=n?e.value:Math.max(1,Math.floor(e.value*r));return{id:e.dataKey,name:e.label,seats:i,colour:e.color}})}function Uh({svg:e,events:t,xScale:n,chartHeight:r,chartWidth:i,timelineHeight:a,timelineOffset:o,instanceId:s,setHoveredTimelineEvent:c,enableBrush:l=!1,onTimeRangeChange:u,minAllowedTime:d,maxAllowedTime:f,brushColor:p=`#69b3a2`,mainGroupSelector:m}){let h=r+o,g=s?`.main-chart-group-${s}`:`.main-chart-group`,_=e.select(m??g),v=s?`timeline-track timeline-track-${s}`:`timeline-track`,y=_.append(`g`).attr(`class`,v),b=s?`timeline-clip-${s}`:`timeline-clip-${Math.random().toString(36).substr(2,9)}`;if(e.append(`defs`).append(`clipPath`).attr(`id`,b).append(`rect`).attr(`x`,0).attr(`y`,h).attr(`width`,i+6).attr(`height`,a),y.append(`rect`).attr(`class`,`timeline-background`).attr(`x`,0).attr(`y`,h).attr(`width`,i).attr(`height`,a).attr(`fill`,`var(--rc-timeline-surface, #FFFFFF)`).attr(`stroke`,`var(--rc-timeline-border, #9CA3AF)`).attr(`stroke-width`,1),y.append(`g`).attr(`clip-path`,`url(#${b})`).selectAll(`.timeline-event`).data(t).enter().append(`rect`).attr(`class`,`timeline-event`).attr(`x`,e=>n(new Date(e.timestamp))-3/2).attr(`y`,h).attr(`width`,3).attr(`height`,a).attr(`fill`,e=>e.color||`#2F42FF`).attr(`stroke`,`none`).attr(`cursor`,`pointer`).attr(`data-timestamp`,e=>e.timestamp).attr(`data-event-name`,e=>e.eventName).on(`mouseenter`,function(e,t){let r=Y(this),i=n(new Date(t.timestamp));r.transition().duration(150).attr(`x`,i-6/2).attr(`width`,6),c&&c({timestamp:t.timestamp,eventName:t.eventName,x:i})}).on(`mouseleave`,function(e,t){let r=Y(this),i=n(new Date(t.timestamp));r.transition().duration(150).attr(`x`,i-3/2).attr(`width`,3),c&&c(null)}),l&&u){let t=d,r=f,o=Ou().extent([[0,h],[i,h+a]]).on(`start`,i=>{if(!i.selection&&t!==void 0&&r!==void 0){let a=i.sourceEvent;if(a){let i=a.offsetX,c=+n.invert(i);if(c<t||c>r){let t=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(t).call(o.move,null);return}}}}).on(`brush`,i=>{if(!i.selection)return;let[a,c]=i.selection,l=+n.invert(a),u=+n.invert(c);t!==void 0&&(l=Math.max(l,t),u=Math.max(u,t)),r!==void 0&&(l=Math.min(l,r),u=Math.min(u,r));let d=n(new Date(l)),f=n(new Date(u));if(d!==a||f!==c){let t=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(t).call(o.move,[d,f])}}).on(`end`,i=>{if(!i.selection)return;let[a,c]=i.selection,l=[+n.invert(a),+n.invert(c)];t!==void 0&&(l[0]=Math.max(l[0],t)),r!==void 0&&(l[1]=Math.min(l[1],r)),u(l);let d=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(d).call(o.move,null)}),c=s?`timeline-brush timeline-brush-${s}`:`timeline-brush`,l=_.append(`g`).attr(`class`,c).call(o);l.selectAll(`.selection`).attr(`fill`,p).attr(`fill-opacity`,.2).attr(`stroke`,p).attr(`stroke-width`,1),l.selectAll(`.handle`).attr(`fill`,p).attr(`fill-opacity`,.8),l.select(`.overlay`).style(`cursor`,`default`),l.on(`dblclick`,()=>{let e=n.domain();u([+e[0],+e[1]])})}}var Wh={greyHatch:{background:Da.neoGrey[200],lines:Da.neoGrey[400]},dataMissingHatch:{background:`#FFF3CC`,lines:`#FFB800`},noLstHatch:{background:`#FFE5E5`,lines:`#ED4134`}};function Gh(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-greyHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Wh.greyHatch.background),n.append(`path`).attr(`d`,`M0,2 L8,2`).attr(`stroke`,Wh.greyHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M0,6 L8,6`).attr(`stroke`,Wh.greyHatch.lines).attr(`stroke-width`,.5)}function Kh(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-dataMissingHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Wh.dataMissingHatch.background),n.append(`path`).attr(`d`,`M0,8 L8,0`).attr(`stroke`,Wh.dataMissingHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M-2,2 L2,-2`).attr(`stroke`,Wh.dataMissingHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M6,10 L10,6`).attr(`stroke`,Wh.dataMissingHatch.lines).attr(`stroke-width`,.5)}function qh(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-noLstHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Wh.noLstHatch.background),n.append(`path`).attr(`d`,`M0,0 L8,8`).attr(`stroke`,Wh.noLstHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M-2,6 L2,10`).attr(`stroke`,Wh.noLstHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M6,-2 L10,2`).attr(`stroke`,Wh.noLstHatch.lines).attr(`stroke-width`,.5)}function Jh(e,t){let n=e.select(`defs`);n.empty()&&(n=e.append(`defs`)),Gh(n,t),Kh(n,t),qh(n,t)}function Yh(e,t){return e.startsWith(`url(#`)&&e.endsWith(`)`)?`url(#${t}-${e.slice(5,-1)})`:e}function Xh(e){return e.includes(`greyHatchPattern`)?Wh.greyHatch.lines:e.includes(`dataMissingHatchPattern`)?Wh.dataMissingHatch.lines:e.includes(`noLstHatchPattern`)?Wh.noLstHatch.lines:e}function Zh(e,t,n,r){let{xScale:i,yScale:a,addClasses:o=!0,instanceId:s}=r,c=gi().x(e=>i(new Date(e.data.timestamp))).y0(e=>a(e[0])).y1(e=>a(e[1])).curve(fi),l=hi().x(e=>i(new Date(e.data.timestamp))).y(e=>a(e[1])).curve(fi),u=s?`areas areas-${s}`:`areas`,d=e.select(s?`.areas-${s}`:`.areas`);d.empty()&&(d=e.append(`g`).attr(`class`,u)),t.forEach((e,t)=>{let r=n[t];if(!r)return;let i=r.parliamentMapping?.isSpecialCategory??!1,a=Xh(r.color);if(i){let t=d.append(`path`).datum(e).attr(`fill`,`none`).attr(`stroke`,a).attr(`stroke-width`,3).attr(`stroke-dasharray`,`15 8`).attr(`d`,l).style(`pointer-events`,`none`);if(o){let e=s?`area area-${s} area-${r.dataKey}`:`area area-${r.dataKey}`;t.attr(`class`,e)}}else{let t=d.append(`path`).datum(e).attr(`fill`,r.color).attr(`fill-opacity`,r.fillOpacity??.7).attr(`stroke`,a).attr(`stroke-width`,r.strokeWidth??1.5).attr(`d`,c).style(`pointer-events`,`none`);if(o){let e=s?`area area-${s} area-${r.dataKey}`:`area area-${r.dataKey}`;t.attr(`class`,e)}}})}function Qh(e,t){let n=[];for(let r of e){let e=0;for(let i of t){let t=r[i.dataKey]||0,a=e,o=e+t;n.push({timestamp:r.timestamp,category:i.label,dataKey:i.dataKey,y0:a,y1:o,value:t,color:i.color,isSpecialCategory:i.parliamentMapping?.isSpecialCategory??!1}),e+=t}}return n}function $h(e){return e.replace(/[^a-zA-Z0-9-_]/g,`-`)}function eg(e,t,n,r){let{centerX:i,centerY:a,addClasses:o=!0,instanceId:s,parliamentRadius:c=200,paletteMode:l=`light`}=r,u=s?`parliament parliament-${s}`:`parliament`,d=e.select(s?`.parliament-${s}`:`.parliament`);d.empty()&&(d=e.append(`g`).attr(`class`,u));let f=t.seats[0]?.radius,p=new Map(n.map(e=>[e.label,Va(e.color,f,{paletteMode:l,label:e.label})]));t.seats.forEach(e=>{let t=n.find(t=>t.label===e.category);if(!t)return;let r=p.get(t.label);if(!r)return;let c=d.append(`circle`).attr(`cx`,i+e.x).attr(`cy`,a+e.y).attr(`r`,e.radius).attr(`fill`,r.fill).attr(`stroke`,r.stroke).attr(`stroke-width`,r.strokeWidth??.5);r.dashArray&&c.attr(`stroke-dasharray`,r.dashArray);let l=d.append(`circle`).attr(`cx`,i+e.x).attr(`cy`,a+e.y).attr(`r`,e.radius*2.5).attr(`fill`,`transparent`).attr(`stroke`,`none`).attr(`pointer-events`,`all`);if(o){let t=s?`seat seat-${s} seat-${$h(e.category)}`:`seat seat-${$h(e.category)}`;c.attr(`class`,t),l.attr(`class`,t)}});let m=s?`parliament-label parliament-label-${s}`:`parliament-label`;if(e.select(`.${m.split(` `)[0]}`).empty()){let t=e.append(`g`).attr(`class`,m).attr(`transform`,`translate(${i},${a-c*.15})`).style(`opacity`,`0`).style(`pointer-events`,`none`);t.append(`text`).attr(`class`,`label-category`).attr(`text-anchor`,`middle`).attr(`dy`,`-15`).style(`font-size`,`22px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-family`,`system-ui, -apple-system, sans-serif`),t.append(`text`).attr(`class`,`label-value`).attr(`text-anchor`,`middle`).attr(`dy`,`35`).style(`font-size`,`48px`).style(`font-weight`,`bold`).style(`font-family`,`system-ui, -apple-system, sans-serif`);let n=t.append(`g`).attr(`class`,`scale-indicator`).attr(`transform`,`translate(0, 65)`).style(`opacity`,`0`);n.append(`circle`).attr(`r`,4).attr(`cx`,-30).attr(`cy`,0).style(`fill`,`var(--rc-muted-text, #888)`),n.append(`text`).attr(`x`,-20).attr(`y`,0).attr(`dy`,`0.35em`).attr(`text-anchor`,`start`).style(`font-size`,`18px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-style`,`italic`).style(`font-family`,`system-ui, -apple-system, sans-serif`)}}function tg(e,t,n,r,i,a,o=!1){let s=new Map,c=i;if(t.length>0&&t[0]?.timestamp!==void 0){let e=t[0].timestamp;c=n(new Date(e))}let l=new Map;for(let t of e.seats)l.has(t.category)||l.set(t.category,[]),l.get(t.category).push(t);let u=new Map;for(let e of t)u.set(e.dataKey,{y0:e.y0,y1:e.y1,isSpecialCategory:e.isSpecialCategory}),e.label&&e.label!==e.dataKey&&u.set(e.label,{y0:e.y0,y1:e.y1,isSpecialCategory:e.isSpecialCategory});for(let t of e.seats){let e=u.get(t.category);if(!e){s.set(t,{x:c,y:a/2});continue}let n=r(e.y0),i=r(e.y1),d;if(o){let e=l.get(t.category)??[],r=t.seatIndex,a=e.length;if(a===1)d=(n+i)/2;else{let e=r/(a-1);d=n+(i-n)*e}}else d=i;s.set(t,{x:c,y:d})}return s}function ng(e,t,n){if(e.length===0)return[];let r=e[e.length-1],i=[],a=0;for(let e of t){let t=r[e.dataKey]||0,n=a,o=a+t;i.push({dataKey:e.dataKey,label:e.label,y0:n,y1:o,value:t,timestamp:r.timestamp,isSpecialCategory:e.parliamentMapping?.isSpecialCategory??!1}),a+=t}return i}function rg(e){let t=e;return{seatsToLines:t*.2,seatsToBar:t*.07,crossFadePause:t*.003,barSlideToTimeline:t*.22,axesAndBarsGrow:t*.22,barsToArea:t*.287}}var ig=new Map;Y.prototype.transition=Yl;var ag=({containerRef:e,data:t,categories:n,mode:r,paletteMode:i=`light`,width:a,height:o,margin:s,timeRange:c,showGrid:l=!0,showAxes:u=!0,axisLabelColor:f,axisLabelSize:p=14,formatDate:m,formatValue:h,markers:g=[],arcAngle:_=200,parliamentRadius:v=200,seatSize:y=4.5,animationDuration:b=900,onMorphComplete:x,onAnimationStateChange:S,onTimelineReady:C,onAnimationProgress:w,onHoveredDataChange:T,hoveredCategory:E,maxSeats:D=Na.maxSeats,parliamentTimestamp:O,enableBrush:k=!1,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,showScaleIndicator:N=!1,reposPerSeat:P=1,timelineEvents:F=[],showTimeline:I=!1,timelineHeight:L=40,timelineOffset:R=35,brushColor:z=`#69b3a2`,showCrosshair:B=!1,onCrosshairMove:V})=>{let[H,U]=(0,d.useState)(`area`),[ee,te]=(0,d.useState)(!1),[ne,re]=(0,d.useState)(null),[W,ie]=(0,d.useState)(0),[ae,G]=(0,d.useState)(null),[oe,se]=(0,d.useState)(null),[ce,le]=(0,d.useState)([]),K=(0,d.useRef)(null),ue=(0,d.useRef)(r),de=(0,d.useRef)(!0),fe=(0,d.useRef)(!1),q=(0,d.useRef)(`morph-${Math.random().toString(36).substr(2,9)}`),pe=(0,d.useRef)(void 0),me=(0,d.useRef)(c),he=(0,d.useRef)(g),ge=(0,d.useRef)(F),_e=(0,d.useRef)(x),ve=(0,d.useRef)(S),ye=(0,d.useRef)(C),be=(0,d.useRef)(w),xe=(0,d.useRef)(T),Se=(0,d.useRef)(V);(0,d.useEffect)(()=>{_e.current=x,ve.current=S,ye.current=C,be.current=w,xe.current=T,Se.current=V},[x,S,C,w,T,V]),(0,d.useEffect)(()=>{if(e.current&&H===`parliament`)if(E){let r=n.find(e=>e.dataKey===E);if(r){let n=r.label;if(re(n),_g(e.current,n),t.length>0){let n=t[t.length-1],i=Math.round(n.values[r.dataKey]||0),a={label:r.label,value:i,color:Xh(r.color)};hg(e.current,a,N,P,q.current)}}}else re(null),_g(e.current,null),hg(e.current,null,N,P,q.current)},[E,H,n,t,N,P]);let Ce=a-s.left-s.right,we=o-s.top-s.bottom;return(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0||(pe.current&&=(pe.current(),void 0),fe.current))return;let a=Y(e.current),o=r!==ue.current;de.current?(a.selectAll(`*`).remove(),Jh(a,q.current),de.current=!1):o||(a.selectAll(`*`).remove(),Jh(a,q.current));let d=t[t.length-1],x=n.reduce((e,t)=>e+(d.values[t.dataKey]||0),0),S=t.map(e=>{let t={timestamp:e.timestamp};for(let r of n)t[r.dataKey]=e.values[r.dataKey]||0;return t}),C=n.map(e=>e.dataKey),w=Ci().keys(C),T=w(S),E=t.map(e=>e.timestamp),H=o||!c?Math.min(...E):c[0],ee=o||!c?Math.max(...E):c[1],W=[...E].sort((e,t)=>e-t),ae=[];for(let e=0;e<W.length-1;e++)ae.push(W[e+1]-W[e]);let oe=ee+(ae.length>0?ae.reduce((e,t)=>e+t,0)/ae.length:0)*1.15,ce=Qr().domain([new Date(H),new Date(oe)]).range([0,Ce]),me=w(S.filter(e=>e.timestamp>=H&&e.timestamp<=ee)),he=me.length>0?Math.max(...me[me.length-1].map(e=>e[1]??0)):0,ge=Nt().domain([0,he*1.15]).range([we,0]),Se=n.map(e=>({...e,color:Yh(e.color,q.current)})),Te=Vh(Hh(Se.map(e=>({dataKey:e.dataKey,label:e.label,color:e.color,value:d.values[e.dataKey]||0})),x,D).reverse(),{arcAngle:_,radius:v,seatSize:y,minSeatSize:2,maxSeatSize:30,spacing:Na.chartConfig.spacing,innerRadiusRatio:.4});K.current=Te;let Ee=tg(Te,ng(S,n,ge),ce,ge,Ce,we);if(o&&!fe.current){fe.current=!0,te(!0),ve.current?.(!0),G(null),le([]),ie(0);let n=a.select(`g[transform]`);if(n.empty()&&(n=a.select(`g`)),n.empty()){a.selectAll(`*`).remove(),Jh(a,q.current),lg(a,r===`parliament`?`parliament`:`area`,T,Se,Te,ce,ge,Ce,we,s,l,u,f,p,m,h,k,A,q.current,g,c,le,G,F,I,L,R,se,j,M,z,B,V,i),te(!1),U(r===`parliament`?`parliament`:`area`),ie(+(r===`parliament`)),ue.current=r;return}let o=setTimeout(()=>{fe.current=!1,te(!1),ue.current=r},b*3);ug(a,r,T,Se,Te,Ee,ce,ge,Ce,we,s,b,()=>{if(clearTimeout(o),fe.current=!1,te(!1),U(r===`parliament`?`parliament`:`area`),r===`parliament`&&ie(1),ve.current?.(!1),_e.current?.(),ue.current=r,r===`parliament`&&e.current&&xe.current&&(pe.current=gg(e.current,Se,t,ne,re,xe.current,N,P,q.current)),r!==`parliament`&&e.current){re(null),xe.current?.(null),hg(e.current,null,N,P,q.current);let t=Y(e.current),n=t.select(q.current?`.main-chart-group-${q.current}`:`.main-chart-group`);if(I){let e=q.current?`.timeline-track-${q.current}`:`.timeline-track`,r=q.current?`.timeline-brush-${q.current}`:`.timeline-brush`;n.select(e).remove(),n.select(r).remove(),Uh({svg:t,events:F,xScale:ce,chartHeight:we,chartWidth:Ce,timelineHeight:L,timelineOffset:R,instanceId:q.current,setHoveredTimelineEvent:se,enableBrush:k,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,brushColor:z})}if(k&&A&&og(n.select(q.current?`.chart-content-group-${q.current}`:`.chart-content-group`),Ce,we,ce,A,q.current,t,j,M,z),g.length>0&&le&&G&&c){let e=g.filter(e=>e.timestamp>=(c[0]??0)-1&&e.timestamp<=(c[1]??1/0)+1).map(e=>({...e,x:ce(new Date(e.timestamp))}));if(le(e),e.length>0){sg(n,e,we,Ce,k,G,q.current);let t=n.select(q.current?`.markers-${q.current}`:`.markers`);if(!t.empty()){n.selectAll(`.marker-hover-overlay`).remove();let r=n.select(q.current?`.chart-content-group-${q.current}`:`.chart-content-group`);cg(r.empty()?n:r,t,e,Ce,we,k,G,s,B,V)}}}}},u,p,m,h,ye.current,(e,t)=>{if(r===`parliament`&&e>=.95){let t=(e-.95)/.05;ie(Math.min(t,1))}be.current?.(e,t)},O,q.current,i)}else ue.current=r,r===`parliament`&&(G(null),le([])),lg(a,r===`parliament`?`parliament`:`area`,T,Se,Te,ce,ge,Ce,we,s,l,u,f,p,m,h,k,A,q.current,g,c,le,G,F,I,L,R,se,j,M,z,B,V,i),U(r===`parliament`?`parliament`:`area`),ie(+(r===`parliament`)),r===`parliament`&&e.current&&xe.current&&(pe.current=gg(e.current,Se,t,ne,re,xe.current,N,P,q.current));return()=>{pe.current&&=(pe.current(),void 0)}},[r]),(0,d.useEffect)(()=>{if(!e.current||t.length===0||fe.current)return;if(de.current){me.current=c;return}if(!(c!==me.current&&(c?.[0]!==me.current?.[0]||c?.[1]!==me.current?.[1])))return;me.current=c;let r=Y(e.current),d=t.map(e=>{let t={timestamp:e.timestamp};for(let r of n)t[r.dataKey]=e.values[r.dataKey]||0;return t}),_=n.map(e=>e.dataKey),v=Ci().keys(_)(d),y=t.map(e=>e.timestamp),b=c?c[0]:Math.min(...y),x=c?c[1]:Math.max(...y),S=(y.length>1?(y[y.length-1]-y[0])/(y.length-1):0)*.5,C=Qr().domain([new Date(b-S),new Date(x+S)]).range([0,a-s.left-s.right]),w=Math.max(...v[v.length-1].map(e=>e[1])),T=Nt().domain([0,w*1.1]).range([o-s.top-s.bottom,0]);if(!K.current)return;let E=K.current,D=n.map(e=>({...e,color:Yh(e.color,q.current)}));r.selectAll(`*`).remove(),Jh(r,q.current),lg(r,H===`parliament`?`parliament`:`area`,v,D,E,C,T,a-s.left-s.right,o-s.top-s.bottom,s,l,u,f,p,m,h,k,A,q.current,g,c,le,G,F,I,L,R,se,j,M,z,B,V,i),H===`parliament`&&e.current&&xe.current&&(pe.current=gg(e.current,D,t,ne,re,xe.current,N,P,q.current))},[c]),(0,d.useEffect)(()=>{if(!e.current||t.length===0||fe.current)return;if(de.current){he.current=g,ge.current=F;return}if(H===`parliament`){he.current=g,ge.current=F;return}let n=g.length!==he.current.length||g.some((e,t)=>e.timestamp!==he.current[t]?.timestamp||e.label!==he.current[t]?.label),r=F.length!==ge.current.length||F.some((e,t)=>e.timestamp!==ge.current[t]?.timestamp||e.eventName!==ge.current[t]?.eventName);if(!n&&!r)return;he.current=g,ge.current=F;let i=Y(e.current),l=i.select(q.current?`.main-chart-group-${q.current}`:`.main-chart-group`);if(l.empty())return;let u=t.map(e=>e.timestamp),d=c?c[0]:Math.min(...u),f=c?c[1]:Math.max(...u),p=(u.length>1?(u[u.length-1]-u[0])/(u.length-1):0)*.5,m=a-s.left-s.right,h=o-s.top-s.bottom,_=Qr().domain([new Date(d-p),new Date(f+p)]).range([0,m]);if(r&&I){let e=q.current?`.timeline-track-${q.current}`:`.timeline-track`,t=q.current?`.timeline-brush-${q.current}`:`.timeline-brush`;l.select(e).remove(),l.select(t).remove(),Uh({svg:i,events:F,xScale:_,chartHeight:h,chartWidth:m,timelineHeight:L,timelineOffset:R,instanceId:q.current,setHoveredTimelineEvent:se,enableBrush:k,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,brushColor:z})}let v=[];if(n&&g.length>0&&c){let e=q.current?`.markers-${q.current}`:`.markers`;l.select(e).remove(),v=g.filter(e=>e.timestamp>=(c[0]??0)-1&&e.timestamp<=(c[1]??1/0)+1).map(e=>({...e,x:_(new Date(e.timestamp))})),le(v),v.length>0&&sg(l,v,h,m,k,G,q.current)}if(v.length>0){let e=l.select(q.current?`.markers-${q.current}`:`.markers`);if(!e.empty()){l.selectAll(`.marker-hover-overlay`).remove();let t=l.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`x`,0).attr(`y`,0).attr(`width`,m).attr(`height`,h).attr(`fill`,`none`).attr(`pointer-events`,`all`),n=null;t.on(`mousemove`,function(t){let[r]=dc(t,this),i=null,a=1/0;if(v.forEach(e=>{let t=Math.abs(r-e.x);t<a&&(a=t,i=e)}),!i||a>50){n!==null&&(n=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),G(null));return}let o=i;n!==o.timestamp&&(n=o.timestamp,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),e.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(o.timestamp)}).attr(`opacity`,.6),e.selectAll(`.marker-label`).filter(function(){return Y(this).attr(`data-timestamp`)===String(o.timestamp)}).attr(`opacity`,1),G(o))}),t.on(`mouseleave`,function(){n=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),G(null)})}}},[g,F,ee]),{isMorphing:ee,currentMode:H,hoveredCategory:ne,scaleIndicatorOpacity:W,visibleMarkers:ce,hoveredMarker:ae,setHoveredMarker:G,hoveredTimelineEvent:oe,setHoveredTimelineEvent:se}};function og(e,t,n,r,i,a,o,s,c,l){let u=s,d=c,f=Ou().extent([[0,0],[t,n]]).on(`start`,e=>{if(!e.selection&&u!==void 0&&d!==void 0){let t=e.sourceEvent;if(t){let e=t.offsetX,n=+r.invert(e);if(n<u||n>d){o.select(`.brush`).call(f.move,null);return}}}}).on(`brush`,e=>{if(!e.selection)return;let[t,n]=e.selection,i=+r.invert(t),a=+r.invert(n);u!==void 0&&(i=Math.max(i,u),a=Math.max(a,u)),d!==void 0&&(i=Math.min(i,d),a=Math.min(a,d));let s=r(new Date(i)),c=r(new Date(a));(s!==t||c!==n)&&o.select(`.brush`).call(f.move,[s,c])}).on(`end`,e=>{if(!e.selection)return;let[t,n]=e.selection,a=[+r.invert(t),+r.invert(n)];u!==void 0&&(a[0]=Math.max(a[0],u)),d!==void 0&&(a[1]=Math.min(a[1],d)),i(a),o.select(`.brush`).call(f.move,null)}),p=e.append(`g`).attr(`class`,`brush`).call(f);p.selectAll(`.selection`).attr(`fill`,l).attr(`fill-opacity`,.2).attr(`stroke`,l).attr(`stroke-width`,1),p.selectAll(`.handle`).attr(`fill`,l).attr(`fill-opacity`,.8),p.select(`.overlay`).style(`cursor`,`default`),p.on(`dblclick`,()=>{let e=r.domain(),t=[+e[0],+e[1]];s!==void 0&&(t[0]=Math.max(t[0],s)),c!==void 0&&(t[1]=Math.min(t[1],c)),i(t)})}function sg(e,t,n,r,i,a,o){let s=o?`markers markers-${o}`:`markers`,c=e.append(`g`).attr(`class`,s);t.forEach(e=>{c.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,e.timestamp).attr(`x1`,e.x).attr(`x2`,e.x).attr(`y1`,0).attr(`y2`,n).attr(`stroke`,e.color??`#2F42FF`).attr(`stroke-width`,2).attr(`opacity`,0),e.label&&c.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,e.timestamp).attr(`x`,e.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,e.color??`#2F42FF`).attr(`opacity`,0)})}function cg(e,t,n,r,i,a,o,s,c=!1,l){let u=null,d;d=a?e.select(`.brush .overlay`):e.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,r).attr(`height`,i).attr(`fill`,`none`).attr(`pointer-events`,`all`);let f=e=>{let r=null,i=1/0;if(n.forEach(t=>{let n=Math.abs(e-t.x);n<i&&(i=n,r=t)}),!r||i>50)return u!==null&&(u=null,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),o(null)),!1;let a=r;return u===a.timestamp?!0:(u=a.timestamp,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),t.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,.6),t.selectAll(`.marker-label`).filter(function(){return Y(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,1),o(a),!0)};d.on(`mousemove`,function(e){let[t,n]=dc(e,this);f(t),c&&l&&l({x:t+s.left,y:n+s.top})}),d.on(`mouseleave`,function(){u=null,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),o(null),l&&l(null)})}function lg(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=!1,_,v,y=[],b=[0,0],x,S,C=[],w=!1,T=40,E=15,D,O,k,A=`#69b3a2`,j=!1,M,N=`light`){let P=O,F=k,I=null,L=v?`main-chart-group main-chart-group-${v}`:`main-chart-group`,R=e.append(`g`).attr(`class`,L).attr(`transform`,`translate(${l.left},${l.top})`),z=v?`chart-clip-${v}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`;e.select(`defs`).append(`clipPath`).attr(`id`,z).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,s).attr(`height`,c);let B=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`,V=R.append(`g`).attr(`class`,B).attr(`clip-path`,`url(#${z})`);if(u&&t!==`parliament`&&(V.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(ro(a).ticks(6).tickSize(c).tickFormat(()=>``)),V.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(io(o).ticks(5).tickSize(-s).tickFormat(()=>``))),t===`area`&&(Zh(V,n,r,{xScale:a,yScale:o,addClasses:!0,instanceId:v}),y.length>0)){let e=y.filter(e=>e.timestamp>=b[0]-1&&e.timestamp<=b[1]+1).map(e=>({...e,x:a(new Date(e.timestamp))}));I={markersGroup:null,visibleMarkers:e},x&&x(e)}if(t===`parliament`){let e=s/2,t=i.radius+10,n=c-i.radius*.3;eg(V,i,r,{centerX:e,centerY:Math.max(t,n),addClasses:!0,instanceId:v,parliamentRadius:i.radius,paletteMode:N})}if(d&&t!==`parliament`){let e=ro(a).ticks(6).tickPadding(12);m&&e.tickFormat(e=>m(+e));let t=R.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${c})`).call(e).selectAll(`text`).attr(`font-size`,p).attr(`font-weight`,500);f&&t.attr(`fill`,f);let n=io(o).ticks(5);n.tickFormat(e=>+e==0?``:h?h(+e):String(e));let r=R.append(`g`).attr(`class`,`axis axis-y`).call(n).selectAll(`text`).attr(`font-size`,p).attr(`font-weight`,500);f&&r.attr(`fill`,f)}if(g&&_&&t===`area`){let t=P,n=F,r=Ou().extent([[0,0],[s,c]]).on(`start`,i=>{if(!i.selection&&t!==void 0&&n!==void 0){let o=i.sourceEvent;if(o){let i=o.offsetX-(l?.left||0),s=+a.invert(i);if(s<t||s>n){e.select(`.brush`).call(r.move,null);return}}}}).on(`brush`,i=>{if(!i.selection)return;let[o,s]=i.selection,c=+a.invert(o),l=+a.invert(s);t!==void 0&&(c=Math.max(c,t),l=Math.max(l,t)),n!==void 0&&(c=Math.min(c,n),l=Math.min(l,n));let u=a(new Date(c)),d=a(new Date(l));(u!==o||d!==s)&&e.select(`.brush`).call(r.move,[u,d])}).on(`end`,i=>{if(!i.selection)return;let[o,s]=i.selection,c=[+a.invert(o),+a.invert(s)];t!==void 0&&(c[0]=Math.max(c[0],t)),n!==void 0&&(c[1]=Math.min(c[1],n)),_(c),e.select(`.brush`).call(r.move,null)}),i=V.append(`g`).attr(`class`,`brush`).call(r);i.selectAll(`.selection`).attr(`fill`,A).attr(`fill-opacity`,.2).attr(`stroke`,A).attr(`stroke-width`,1),i.selectAll(`.handle`).attr(`fill`,A).attr(`fill-opacity`,.8),i.select(`.overlay`).style(`cursor`,`default`),i.on(`dblclick`,()=>{let e=a.domain();_([+e[0],+e[1]])})}if(t===`area`&&I&&I.visibleMarkers.length>0){let e=R.append(`g`).attr(`class`,`markers`).attr(`clip-path`,`url(#${z})`);I.visibleMarkers.forEach(t=>{e.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,t.timestamp).attr(`x1`,t.x).attr(`x2`,t.x).attr(`y1`,0).attr(`y2`,c).attr(`stroke`,t.color??`#2F42FF`).attr(`stroke-width`,2).attr(`opacity`,0),t.label&&e.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,t.timestamp).attr(`x`,t.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,t.color??`#2F42FF`).attr(`opacity`,0)}),I.markersGroup=e}t===`area`&&w&&D&&Uh({svg:e,events:C,xScale:a,chartHeight:c,chartWidth:s,timelineHeight:T,timelineOffset:E,instanceId:v,setHoveredTimelineEvent:D,enableBrush:g,onTimeRangeChange:_,minAllowedTime:P,maxAllowedTime:F,brushColor:A}),t===`area`&&cg(V,I?.markersGroup??V.append(`g`).attr(`class`,`empty-markers-group`),I?.visibleMarkers??[],s,c,g,S??(()=>{}),l,j,M)}function ug(e,t,n,r,i,a,o,s,c,l,u,d,f,p=!0,m=14,h,g,_,v,y,b,x=`light`){let S=e.select(b?`.main-chart-group-${b}`:`.main-chart-group`);S.selectAll(`.markers`).remove(),S.selectAll(`.marker-hover-overlay`).remove(),S.selectAll(`.brush`).remove(),t===`stacked-area`||t===`area`?fg(S,n,r,i,a,o,s,c,l,d,f,p,m,h,g,_,v,y,b):pg(S,n,r,i,a,o,s,c,l,d,f,p,m,h,g,_,v,y,b,x)}function dg(e,t,n,r,i,a,o,s){let c=e[a];if(!c)return``;let l=c.find(e=>e.data.timestamp===o);if(!l)return``;let u=l.data,d=t[a];if(!d)return``;let f=u[d.dataKey];if(!f||f<=0)return``;let p=n.get(o);if(!p)return``;let m=p.x,h=p.width,g=l[0],_=l[1],v=s?i:r(g),y=s?i:r(_),b=[];return b.push(`M ${m} ${v}`),b.push(`L ${m} ${y}`),b.push(`L ${m+h} ${y}`),b.push(`L ${m+h} ${v}`),b.push(`Z`),b.join(` `)}function fg(e,t,n,r,i,a,o,s,c,l,u,d=!0,f=14,p,m,h,g,_,v){let y=v?`.seat-${v}`:`.seat`,b=e.selectAll(y),x=v?`.chart-content-group-${v}`:`.chart-content-group`,S=e.select(x);if(S.empty()){let t=e.attr(`clip-path`),n=t&&t.match(/url\(#(.+)\)/)?.[1]||`chart-clip-${Math.random().toString(36).substr(2,9)}`,r=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`;S=e.append(`g`).attr(`class`,r).attr(`clip-path`,`url(#${n})`)}if(b.size()===0){Zh(e,t,n,{xScale:a,yScale:o,addClasses:!0,instanceId:v}),u();return}let C=rg(l),w=v?ig.get(v):void 0;w&&(w.destroy(),v&&ig.delete(v));let T=e=>e<.2?`seatsToRings`:e<.35?`ringsToBar`:e<.464?`axesReveal`:e<.6?`barSlide`:e<.82?`barsGrow`:`barsToArea`,E=new Bh({seatsToRings:C.seatsToLines,ringsToBar:C.seatsToBar,axesReveal:C.barSlideToTimeline*.3,barSlide:C.barSlideToTimeline*.7,barsGrow:C.axesAndBarsGrow,barsToArea:C.barsToArea},{onStageComplete:e=>{},onProgress:e=>{g&&g(e,T(e))},onComplete:()=>{u()}});v&&ig.set(v,E),h&&h(E.getControls().getTimeline());let D=t[0].map(e=>e.data),O=Qh(D,n),k=s/2,A=r.radius+10,j=c-r.radius*.3,M=Math.max(A,j),N=D.map(e=>e.timestamp),P=_??Math.max(...N),F=new Map,I=[];N.forEach((e,t)=>{let n=a(new Date(e)),r=N[t+1];if(r){let e=a(new Date(r))-n;I.push(e)}});let L=I.length>0?I.reduce((e,t)=>e+t,0)/I.length:30;N.forEach((e,t)=>{let n=a(new Date(e)),r=N[t+1],i=t===N.length-1?L:a(new Date(r))-n;F.set(e,{x:n,width:i})});let R=O.filter(e=>e.timestamp===P),z=F.get(P),B=v?`parliament-bar-path parliament-bar-path-${v}`:`parliament-bar-path`,V=S.append(`g`).attr(`class`,B);R.sort((e,t)=>t.y0-e.y0),new Map().set(P,{x:666-z.width/2,width:z.width});let H=[],U=(r.radius-r.innerRadius)*.6,ee=c*.8,te=M,ne=R.reduce((e,t)=>e+(t.y1-t.y0),0),re=0;n.forEach(e=>{let t=R.find(t=>t.dataKey===e.dataKey);if(!t)return;let n=(t.y1-t.y0)/ne*ee,r=te-re,i=te-re-n,a=666-U/2,o=`M ${a} ${r} L ${a} ${i} L ${a+U} ${i} L ${a+U} ${r} Z`;re+=n;let s=V.append(`path`).attr(`class`,`parliament-bar-segment category-${$h(t.dataKey)}`).attr(`d`,o).attr(`fill`,t.color).style(`opacity`,0).node();s&&H.push(s)}),v&&(window.orchestratorMap=ig);let W=E.getControls().getTimeline(),ie=C.seatsToLines/1e3,ae=C.seatsToBar/1e3;W.call(()=>{g?.(W.progress(),`seatsToRings`)},[],`seatsToRings`);let G=b.nodes(),oe=k,se=M,ce=Math.max(...r.seats.map(e=>e.ring)),le=r.seats.filter(e=>e.ring===ce),K=e.append(`g`).attr(`class`,`seat-lines-${v||`default`}`),ue=n.map(e=>{let t=b.filter(`.seat-${$h(e.dataKey)}`).size();return t>0?{name:e.dataKey,seatCount:t,color:e.color}:null}).filter(e=>e!==null).reverse(),de=ue.reduce((e,t)=>e+t.seatCount,0),fe=le.length,q=r.radius-r.innerRadius,pe=q*.6,me=pe/2,he=q*.6,ge=[],_e=0;ue.forEach(e=>{let t=Math.max(1,Math.round(e.seatCount/de*fe));for(let n=0;n<t;n++){let t=(_e+n)/fe,i=r.arcAngle*Math.PI/180,a=-i/2-Math.PI/2+t*i,o=(r.innerRadius+r.radius)/2,s=oe+Math.cos(a)*o,c=se+Math.sin(a)*o,l=Math.cos(a),u=Math.sin(a),d=s-me*l,f=c-me*u,p=s+me*l,m=c+me*u,h=K.append(`line`).attr(`class`,`seat-line`).attr(`x1`,d).attr(`y1`,f).attr(`x2`,p).attr(`y2`,m).attr(`stroke`,e.color).attr(`stroke-width`,r.seatSize*2).attr(`stroke-linecap`,`butt`).style(`opacity`,0).attr(`data-angle`,a*180/Math.PI).attr(`data-center-x`,s).attr(`data-center-y`,c).attr(`data-initial-length`,pe).node();ge.push({element:h,angle:a})}_e+=t});let ve=()=>{K.remove()},ye=ie*.5,be=[];if(be.push(...G),be.sort((e,t)=>parseInt(e.getAttribute(`data-layout-index`)||`-1`,10)-parseInt(t.getAttribute(`data-layout-index`)||`-1`,10)),be.length>0&&ge.length>0){let e=ge.map(e=>e.element);W.to(be,{attr:{r:1.5},duration:ye*.3,ease:`power2.in`},`seatsToRings+=0`),e.forEach(e=>{let t=e.getAttribute(`x1`)||`0`,n=e.getAttribute(`y1`)||`0`,r=e.getAttribute(`x2`)||`0`,i=e.getAttribute(`y2`)||`0`;e.setAttribute(`data-final-x1`,t),e.setAttribute(`data-final-y1`,n),e.setAttribute(`data-final-x2`,r),e.setAttribute(`data-final-y2`,i),e.setAttribute(`x1`,t),e.setAttribute(`y1`,n),e.setAttribute(`x2`,t),e.setAttribute(`y2`,n)}),W.to(e,{attr:{x2:(e,t)=>parseFloat(t.getAttribute(`data-final-x2`)||`0`),y2:(e,t)=>parseFloat(t.getAttribute(`data-final-y2`)||`0`)},opacity:.9,duration:ye*.6,ease:`power2.out`},`seatsToRings+=${0+ye*.2}`),W.to(be,{opacity:0,duration:ye*.3,ease:`power2.out`},`seatsToRings+=${0+ye*.3}`)}let xe=ie*.05,Se=ie*.7,Ce=0+ye+xe;if(ge.length>0){let e=M,t=c*.8/ge.length,n=e,r=[...ge].sort((e,t)=>t.angle-e.angle),i=.6/r.length;r.forEach((e,r)=>{let a=n-r*t,o=i*r*Se,s=e.element,c=parseFloat(s.getAttribute(`data-final-x1`)||`0`),l=parseFloat(s.getAttribute(`data-final-y1`)||`0`),u=parseFloat(s.getAttribute(`data-final-x2`)||`0`),d=parseFloat(s.getAttribute(`data-final-y2`)||`0`),f=(c+u)/2,p=(l+d)/2,m=Math.atan2(d-l,u-c),h=Math.sqrt((u-c)**2+(d-l)**2);W.to({progress:0},{progress:1,duration:Se*.5,ease:`power2.inOut`,delay:o,onUpdate:function(){let e=this.progress(),t=f+(666-f)*e,n=p+(a-p)*e,r=160*e*(1-e),i=t,o=n-r,c=0-m,l=m+c*e*e,u=(h+(he-h)*e)/2,d=i-u*Math.cos(l),g=o-u*Math.sin(l),_=i+u*Math.cos(l),v=o+u*Math.sin(l);s.setAttribute(`x1`,d.toString()),s.setAttribute(`y1`,g.toString()),s.setAttribute(`x2`,_.toString()),s.setAttribute(`y2`,v.toString())},onComplete:function(){let e=he/2;s.setAttribute(`x1`,(666-e).toString()),s.setAttribute(`y1`,a.toString()),s.setAttribute(`x2`,(666+e).toString()),s.setAttribute(`y2`,a.toString())}},`seatsToRings+=${Ce}`),W.to(e.element,{opacity:.95,duration:Se*.3,ease:`power2.out`,delay:o},`seatsToRings+=${Ce}`)})}let we=K,Te=[];R.forEach((e,t)=>{let n=b.filter(`.seat-${$h(e.category)}`),i=n.size();if(i===0)return;let a=o(e.y1),s=o(e.y0)-o(e.y1),c=n.nodes().sort((e,t)=>parseInt(e.getAttribute(`data-layout-index`)||`-1`,10)-parseInt(t.getAttribute(`data-layout-index`)||`-1`,10)),l=Math.max(z.width,100),u=s,d=l/Math.max(u,1),f=Math.max(2,Math.ceil(Math.sqrt(i*d))),p=Math.ceil(i/f),m=l*.8,h=u*.8,g=f>1?m/(f-1):0,_=p>1?h/(p-1):0,v=f>1?(f-1)*g:0,y=p>1?(p-1)*_:0,x=666-l/2+(l-v)/2,S=a+(u-y)/2;c.forEach((n,a)=>{let o=parseInt(n.getAttribute(`data-layout-index`)||`-1`,10),s=o>=0?r.seats[o]:void 0,c=s?k+s.x:parseFloat(n.getAttribute(`cx`)||`0`),l=s?M+s.y:parseFloat(n.getAttribute(`cy`)||`0`),u=s?.radius||parseFloat(n.getAttribute(`r`)||`4`),d=i%f,p,m;if(d>0&&a<d)m=0,p=a;else{let e=a-(d>0?d:0);p=e%f,m=Math.floor(e/f)+ +(d>0)}let h=x+p*g;if(d>0&&m===0){let e=d>1?(d-1)*g:0,t=(v-e)/2;h=x+t+p*g}let y=S+m*_;Te.push({element:n,startX:c,startY:l,startRadius:u,category:e.dataKey,segmentIndex:t,endY:y,endX:h})})});let Ee=Te.map(e=>{let t=e.startX-k,n=e.startY-M,r=Math.atan2(n,t);return{...e,angle:r}});Ee.sort((e,t)=>t.angle-e.angle);let De=ae*.8,Oe=Ee.length,ke=De/Math.max(Oe,1)*(Oe-1)+.6,Ae=ae*.3,je=ke;W.to(H,{opacity:1,duration:Ae,ease:`power2.inOut`},`seatsToBar+=${je}`),we&&(W.to(we.selectAll(`.seat-line`).nodes(),{opacity:0,duration:Ae,ease:`power2.inOut`},`seatsToBar+=${je}`),W.call(()=>{ve()},[],`seatsToBar+=${je+Ae}`));let Me=C.barSlideToTimeline/1e3,Ne=null,Pe=null;if(d){let t=ro(a).ticks(6).tickPadding(12);p&&t.tickFormat(e=>p(e.getTime())),Ne=e.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${c})`).attr(`opacity`,0),Ne.call(t).selectAll(`text`).attr(`font-size`,f).attr(`font-weight`,500);let n=io(o).ticks(5);n.tickFormat(e=>+e==0?``:m?m(e):String(e)),Pe=e.append(`g`).attr(`class`,`axis axis-y`).attr(`opacity`,0),Pe.call(n).selectAll(`text`).attr(`font-size`,f).attr(`font-weight`,500)}let Fe=C.crossFadePause/1e3,Ie=je+Ae+Fe;H.forEach(e=>{let r=Array.from(e.classList).find(e=>e.startsWith(`category-`));if(!r||!R.find(e=>$h(e.dataKey)===r.replace(`category-`,``)))return;let i=n.findIndex(e=>$h(e.dataKey)===r.replace(`category-`,``));if(i===-1)return;let a=dg(t,n,F,o,c,i,P,!1);a&&W.to(e,{attr:{d:a},duration:Me,ease:`power2.out`},`seatsToBar+=${Ie}`)});let Le=gi().x(e=>a(e.data.timestamp)).y0(e=>o(e[0])).y1(e=>o(e[1])).curve(fi),Re=new Map;t.forEach((e,t)=>{let r=n[t];if(r){let t=Le(e)||``;Re.set(r.dataKey,t)}});let ze=Ie+Me;d&&Ne&&Pe&&W.to([Ne.node(),Pe.node()],{opacity:1,duration:.6,ease:`power2.inOut`},`seatsToBar+=${Ie}`);let Be=S.select(`.grid-vertical`),Ve=S.select(`.grid-horizontal`);if(!Be.empty()||!Ve.empty()){let e=[];Be.empty()||e.push(Be.node()),Ve.empty()||e.push(Ve.node()),W.to(e,{opacity:.1,duration:.6,ease:`power2.inOut`},`seatsToBar+=${Ie}`)}let He=C.axesAndBarsGrow/1e3,Ue=C.barsToArea/1e3,We=v?`histogram-paths histogram-paths-${v}`:`histogram-paths`,Ge=S.append(`g`).attr(`class`,We);N.forEach(e=>{if(e===P)return;let r=F.get(e);r&&n.forEach((i,a)=>{let s=dg(t,n,F,o,c,a,e,!0),l=dg(t,n,F,o,c,a,e,!1);if(!s||!l)return;let u=v?`histogram-path histogram-path-${v} category-${$h(i.dataKey)}`:`histogram-path category-${$h(i.dataKey)}`;Ge.append(`path`).attr(`class`,u).attr(`d`,s).attr(`fill`,i.color).attr(`stroke`,i.color).attr(`stroke-width`,.5).attr(`shape-rendering`,`crispEdges`).attr(`opacity`,0).attr(`data-category`,i.dataKey).attr(`data-timestamp`,e).attr(`data-x-position`,r.x).attr(`data-full-height-path`,l)})});let Ke=v?`.histogram-path-${v}`:`.histogram-path`,qe=Ge.selectAll(Ke);W.to(qe.nodes(),{opacity:1,duration:.3,ease:`power2.inOut`},`seatsToBar+=${ze}`);let Je=z.x+z.width/2;qe.each(function(){let e=this.getAttribute(`data-full-height-path`);if(!e)return;let t=parseFloat(this.getAttribute(`data-x-position`)||`0`),n=parseFloat(this.getAttribute(`data-timestamp`)||`0`),r=t+(F.get(n)?.width||0)/2,i=Math.abs(r-Je)*8e-4;W.to(this,{attr:{d:e},duration:He,ease:`power2.out`},`seatsToBar+=${ze+i}`)});let Ye=ze+He,Xe=N[N.length-1],Ze=a(new Date(Xe))+L,Qe=a.invert(Ze).getTime();Zh(e,t.map(e=>{let t=e[e.length-1],n={...t,data:{...t.data,timestamp:Qe}};return[...e,n]}),n,{xScale:a,yScale:o,addClasses:!0,instanceId:v});let $e=v?`.area-${v}`:`.area`,et=e.selectAll($e);et.attr(`opacity`,0),W.to(qe.nodes(),{opacity:0,duration:Ue,ease:`power2.inOut`},`seatsToBar+=${Ye}`);let tt=V.selectAll(`path`).nodes();tt.length>0&&W.to(tt,{opacity:0,duration:Ue,ease:`power2.inOut`},`seatsToBar+=${Ye}`),W.to(et.nodes(),{opacity:1,duration:Ue,ease:`power2.inOut`},`seatsToBar+=${Ye}`);let nt=u;E.getControls().getTimeline().eventCallback(`onComplete`,()=>{let t=v?`.morph-bar-${v}`:`.morph-bar`;e.selectAll(t).remove();let n=v?`.histogram-paths-${v}`:`.histogram-paths`;e.selectAll(n).remove();let r=v?`.seat-${v}`:`.seat`;e.selectAll(r).style(`pointer-events`,`none`),d&&(Ne&&Ne.attr(`opacity`,1),Pe&&Pe.attr(`opacity`,1)),nt()}),E.play()}function pg(e,t,n,r,i,a,o,s,c,l,u,d=!0,f=14,p,m,h,g,_,v,y=`light`){let b=v?`.chart-content-group-${v}`:`.chart-content-group`,x=e.select(b);if(x.empty()){let t=e.attr(`clip-path`),n=t&&t.match(/url\(#(.+)\)/)?.[1]||`chart-clip-${Math.random().toString(36).substr(2,9)}`,r=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`;x=e.append(`g`).attr(`class`,r).attr(`clip-path`,`url(#${n})`)}let S=v?`.area-${v}`:`.area`,C=e.selectAll(S);if(C.size()===0){mg(e,n,r,s,c,v,y),u();return}let w={areaToBar:l*.18,barsShrink:l*.22,barSlide:l*.22,axesHide:l*.03,barToRings:l*.07,ringsExpand:l*.18,ringsHold:l*.05,ringsToSeats:l*.07},T=v?ig.get(v):void 0;T&&(T.destroy(),v&&ig.delete(v));let E=e=>e<.18?`areaToBar`:e<.4?`barsShrink`:e<.62?`barSlide`:e<.65?`axesHide`:e<.72?`barToRings`:e<.9?`ringsExpand`:e<.95?`ringsHold`:`ringsToSeats`,D=new Bh({seatsToRings:w.ringsToSeats,ringsHold:w.ringsHold,ringsToBar:w.barToRings,axesReveal:w.axesHide,barSlide:w.barSlide,barsGrow:w.barsShrink,barsToArea:w.areaToBar},{onStageComplete:e=>{},onProgress:e=>{g&&g(e,E(e))},onComplete:()=>{u()}});v&&ig.set(v,D),h&&h(D.getControls().getTimeline());let O=t[0].map(e=>e.data).map(e=>e.timestamp),k=_??Math.max(...O),A=new Map,j=[];O.forEach((e,t)=>{let n=a(new Date(e)),r=O[t+1];if(r){let e=a(new Date(r))-n;j.push(e)}});let M=j.length>0?j.reduce((e,t)=>e+t,0)/j.length:30;O.forEach((e,t)=>{let n=a(new Date(e)),r=O[t+1],i=t===O.length-1?M:a(new Date(r))-n;A.set(e,{x:n,width:i})});let N=D.getControls().getTimeline(),P=w.areaToBar/1e3,F=v?`histogram-paths histogram-paths-${v}`:`histogram-paths`,I=x.append(`g`).attr(`class`,F);O.forEach(e=>{let r=A.get(e);r&&n.forEach((i,a)=>{let s=dg(t,n,A,o,c,a,e,!1);if(!s)return;let l=v?`histogram-path histogram-path-${v} category-${$h(i.dataKey)}`:`histogram-path category-${$h(i.dataKey)}`;I.append(`path`).attr(`class`,l).attr(`d`,s).attr(`fill`,i.color).attr(`stroke`,i.color).attr(`stroke-width`,.5).attr(`shape-rendering`,`crispEdges`).attr(`opacity`,0).attr(`data-category`,i.dataKey).attr(`data-timestamp`,e).attr(`data-x-position`,r.x)})});let L=v?`.histogram-path-${v}`:`.histogram-path`,R=I.selectAll(L);N.to(C.nodes(),{opacity:0,duration:P,ease:`power2.inOut`},`areaToBar`),N.to(R.nodes(),{opacity:1,duration:P,ease:`power2.inOut`},`areaToBar`);let z=w.barsShrink/1e3,B=P;R.each(function(){let e=parseFloat(this.getAttribute(`data-timestamp`)||`0`);if(e===k)return;let r=n.find(e=>this.classList.contains(`category-${$h(e.dataKey)}`));if(!r)return;let i=n.indexOf(r),a=dg(t,n,A,o,c,i,e,!0);a&&N.to(this,{attr:{d:a},duration:z,ease:`power2.in`},B)});let V=w.axesHide/1e3,H=B+z;if(d){let t=e.select(`.axis-x`),n=e.select(`.axis-y`);t.empty()||N.to(t.node(),{opacity:0,duration:V,ease:`power2.inOut`},H),n.empty()||N.to(n.node(),{opacity:0,duration:V,ease:`power2.inOut`},H)}let U=x.select(`.grid-vertical`),ee=x.select(`.grid-horizontal`);U.empty()||N.to(U.node(),{opacity:0,duration:V,ease:`power2.inOut`},H),ee.empty()||N.to(ee.node(),{opacity:0,duration:V,ease:`power2.inOut`},H);let te=[];t.forEach((e,t)=>{let r=e.find(e=>e.data.timestamp===k);if(!r)return;let i=n[t];i&&te.push({category:i.label,dataKey:i.dataKey,color:i.color,y0:r[0],y1:r[1]})}),te.sort((e,t)=>t.y0-e.y0);let ne=te.reduce((e,t)=>e+(t.y1-t.y0),0),re=r.radius-r.innerRadius,W=s/2,ie=r.radius+10,ae=c-r.radius*.3,G=Math.max(ie,ae),oe=re*.6,se=c*.8,ce=G,le=w.barSlide/1e3,K=H+V,ue=R.nodes().filter(e=>parseFloat(e.getAttribute(`data-timestamp`)||`0`)!==k);N.to(ue,{opacity:0,duration:le*.2,ease:`power2.out`},K);let de=R.nodes().filter(e=>parseFloat(e.getAttribute(`data-timestamp`)||`0`)===k);de.forEach(e=>{let t=e.getAttribute(`data-category`);if(!t)return;let r=te.find(e=>e.dataKey===t);if(!r)return;let i=(r.y1-r.y0)/ne*se,a=0;for(let e of n){let t=te.find(t=>t.dataKey===e.dataKey);if(!t)continue;if(t.dataKey===r.dataKey)break;let n=(t.y1-t.y0)/ne;a+=n*se}let o=ce-a,s=ce-a-i,c=666-oe/2,l=`M ${c} ${o} L ${c} ${s} L ${c+oe} ${s} L ${c+oe} ${o} Z`;N.to(e,{attr:{d:l},duration:le,ease:`power2.inOut`},K)});let fe=w.barToRings/1e3,q=K+le,pe=w.ringsExpand/1e3,me=q+fe,he=w.ringsHold/1e3,ge=me+pe,_e=w.ringsToSeats/1e3,ve=ge+he,ye=Math.max(...r.seats.map(e=>e.ring)),be=r.seats.filter(e=>e.ring===ye),xe=x.append(`g`).attr(`class`,`slinky-${v||`h2p-default`}`),Se=()=>{xe.remove()};be.forEach((e,t)=>{let i=n.find(t=>t.label===e.category);i&&xe.append(`line`).attr(`class`,`slinky-ring`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,0).attr(`y2`,0).attr(`stroke`,i.color).attr(`stroke-width`,r.seatSize*2).attr(`stroke-linecap`,`butt`).attr(`data-category`,e.category).attr(`data-category-index`,e.categoryIndex).attr(`data-ring-index`,t).attr(`data-seat-x`,W+e.x).attr(`data-seat-y`,G+e.y).attr(`data-seat-angle`,Math.atan2(e.y,e.x)).style(`opacity`,0)});let Ce=xe.selectAll(`.slinky-ring`).nodes(),we=se/Ce.length,Te=[...Ce].sort((e,t)=>{let n=parseFloat(e.getAttribute(`data-seat-angle`)||`0`);return parseFloat(t.getAttribute(`data-seat-angle`)||`0`)-n}),Ee=ce;Te.forEach((e,t)=>{let n=Ee-t*we,r=oe/2,i=666-r,a=666+r;e.setAttribute(`x1`,i.toString()),e.setAttribute(`y1`,n.toString()),e.setAttribute(`x2`,a.toString()),e.setAttribute(`y2`,n.toString()),e.style.opacity=`0`}),N.to(de,{opacity:0,duration:fe*.7,ease:`power2.out`},q+fe*.3),N.to(Te,{opacity:1,duration:fe,ease:`power2.in`,stagger:.005},q);let De=re*.8;Te.forEach((e,t)=>{let n=parseFloat(e.getAttribute(`data-seat-x`)||`0`),r=parseFloat(e.getAttribute(`data-seat-y`)||`0`),i=parseFloat(e.getAttribute(`data-seat-angle`)||`0`),a=(Te.length-1-t)/Te.length*(pe*.4),o=parseFloat(e.getAttribute(`x1`)||`0`),s=parseFloat(e.getAttribute(`y1`)||`0`),c=parseFloat(e.getAttribute(`x2`)||`0`),l=parseFloat(e.getAttribute(`y2`)||`0`),u=(o+c)/2,d=(s+l)/2,f=Math.atan2(l-s,c-o),p=Math.sqrt((c-o)**2+(l-s)**2),m=n-De/2*Math.cos(i),h=r-De/2*Math.sin(i);N.to({progress:0},{progress:1,duration:pe*.7,ease:`power2.out`,onUpdate:function(){let t=this.progress(),n=u+(m-u)*t,r=d+(h-d)*t,a=f+(i-f)*t,o=(p+(De-p)*t)/2,s=n-o*Math.cos(a),c=r-o*Math.sin(a),l=n+o*Math.cos(a),g=r+o*Math.sin(a);e.setAttribute(`x1`,s.toString()),e.setAttribute(`y1`,c.toString()),e.setAttribute(`x2`,l.toString()),e.setAttribute(`y2`,g.toString())}},me+a),N.to(e,{opacity:.9,duration:pe*.3,ease:`power2.in`},me+a)}),N.call(()=>{g&&g(N.progress(),`ringsHold`)},[],ge);let Oe=v?`parliament parliament-${v}`:`parliament`,ke=x.append(`g`).attr(`class`,Oe),Ae=r.seats[0]?.radius,je=new Map(n.map(e=>[e.label,Va(e.color,Ae,{paletteMode:y,label:e.label})]));r.seats.forEach((e,t)=>{let r=n.find(t=>t.label===e.category);if(!r)return;let i=je.get(r.label);if(!i)return;let a=W+e.x,o=G+e.y,s,c,l;e.ring===ye?(s=a,c=o,l=2):(s=a,c=o,l=e.radius);let u=ke.append(`circle`).attr(`cx`,s).attr(`cy`,c).attr(`r`,l).attr(`fill`,i.fill).attr(`stroke`,i.stroke).attr(`stroke-width`,i.strokeWidth??.5).attr(`opacity`,0).attr(`class`,()=>v?`seat seat-${v} seat-${$h(e.category)}`:`seat seat-${$h(e.category)}`).attr(`data-layout-index`,t).attr(`data-ring`,e.ring).attr(`data-final-x`,a).attr(`data-final-y`,o).attr(`data-final-r`,e.radius);i.dashArray&&u.attr(`stroke-dasharray`,i.dashArray)});let Me=v?`.seat-${v}`:`.seat`,Ne=ke.selectAll(Me);N.to(Ce,{opacity:0,duration:_e*.2,ease:`power3.out`},ve),N.to(Ne.nodes(),{opacity:.8,duration:_e*.3,ease:`power2.in`},ve+_e*.25);let Pe=Ne.nodes(),Fe=[],Ie=[];Pe.forEach(e=>{parseInt(e.getAttribute(`data-ring`)||`0`)===ye?Fe.push(e):Ie.push(e)});let Le=_e*.2,Re=_e*.7;Fe.forEach(e=>{let t=parseFloat(e.getAttribute(`data-final-r`)||`4`);N.to(e,{attr:{r:t},opacity:1,duration:Re*.6,ease:`power2.out`},ve+Le)}),Ie.length>0&&N.to(Ie,{opacity:1,duration:Re*.5,ease:`power2.in`},ve+Le+_e*.15);let ze=u;D.getControls().getTimeline().eventCallback(`onComplete`,()=>{let t=v?`.areas-${v}`:`.areas`,n=v?`.histogram-paths-${v}`:`.histogram-paths`;e.selectAll(t).remove(),e.selectAll(n).remove(),Se(),e.selectAll(`.axis-x`).remove(),e.selectAll(`.axis-y`).remove(),x.selectAll(`.grid-vertical`).remove(),x.selectAll(`.grid-horizontal`).remove();let i=v?`.parliament-label-${v}`:`.parliament-label`;if(e.select(i).empty()){let t=s/2,n=r.radius+10,i=c-r.radius*.3,a=Math.max(n,i),o=v?`parliament-label parliament-label-${v}`:`parliament-label`,l=e.append(`g`).attr(`class`,o).attr(`transform`,`translate(${t},${a-r.radius*.15})`).style(`opacity`,`0`).style(`pointer-events`,`none`);l.append(`text`).attr(`class`,`label-category`).attr(`text-anchor`,`middle`).attr(`dy`,`-15`).style(`font-size`,`22px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-family`,`system-ui, -apple-system, sans-serif`),l.append(`text`).attr(`class`,`label-value`).attr(`text-anchor`,`middle`).attr(`dy`,`35`).style(`font-size`,`48px`).style(`font-weight`,`bold`).style(`font-family`,`system-ui, -apple-system, sans-serif`);let u=l.append(`g`).attr(`class`,`scale-indicator`).attr(`transform`,`translate(0, 65)`).style(`opacity`,`0`);u.append(`circle`).attr(`r`,4).attr(`cx`,-30).attr(`cy`,0).style(`fill`,`var(--rc-muted-text, #888)`),u.append(`text`).attr(`x`,-20).attr(`y`,0).attr(`dy`,`0.35em`).attr(`text-anchor`,`start`).style(`font-size`,`18px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-style`,`italic`).style(`font-family`,`system-ui, -apple-system, sans-serif`)}ze()}),D.play()}function mg(e,t,n,r,i,a,o=`light`){let s=r/2,c=n.radius+10,l=i-n.radius*.3;eg(e,n,t,{centerX:s,centerY:Math.max(c,l),addClasses:!0,instanceId:a,parliamentRadius:n.radius,paletteMode:o})}function hg(e,t,n,r,i){let a=i?`.parliament-label-${i}`:`.parliament-label`,o=Y(e).select(a);if(!o.empty())if(t){o.style(`opacity`,`1`),o.select(`.label-category`).text(t.label).style(`fill`,`var(--rc-muted-text, #666)`);let e=t.value>1?`repos`:`repo`;o.select(`.label-value`).text(`${t.value} ${e}`).style(`fill`,t.color);let i=o.select(`.scale-indicator`);n?i.style(`opacity`,`1`).select(`text`).text(`= ~${r} repos`):i.style(`opacity`,`0`)}else o.style(`opacity`,`0`)}function gg(e,t,n,r,i,a,o,s,c){let l=e.querySelectorAll(`.seat`);if(!l||l.length===0)return;let u=n[n.length-1];if(!u)return;let d=[];l.forEach(e=>{let t=e;t.style.cursor=`pointer`,t.style.transition=`opacity 150ms ease`}),l.forEach(n=>{let r=(n.getAttribute(`class`)||``).split(/\s+/).filter(e=>e.startsWith(`seat-`)),l=r[r.length-1];if(!l)return;let f=l.substring(5),p=t.find(e=>$h(e.label)===f);if(!p)return;let m=()=>{i(p.label);let t=Math.round(u.values[p.dataKey]||0),n=Xh(p.color),r={label:p.label,value:t,color:n};a&&a(r),hg(e,r,o??!1,s??1,c),_g(e,p.label)};n.addEventListener(`mouseenter`,m),d.push({element:n,handler:m})});let f=()=>{i(null),a&&a(null),hg(e,null,!1,1,c),_g(e,null)};return e.addEventListener(`mouseleave`,f),r&&_g(e,r),()=>{d.forEach(({element:e,handler:t})=>{e.removeEventListener(`mouseenter`,t)}),e.removeEventListener(`mouseleave`,f),l.forEach(e=>{let t=e;t.style.cursor=``,t.style.transition=``})}}function _g(e,t){let n=e.querySelectorAll(`.seat`),r=t?$h(t):null;n.forEach(e=>{let t=e,n=(e.getAttribute(`class`)||``).split(/\s+/).filter(e=>e.startsWith(`seat-`)),i=n[n.length-1];if(!i)return;let a=i.substring(5);r?a===r?t.style.opacity=`1`:t.style.opacity=`0.3`:t.style.opacity=`1`})}var vg=({data:e,categories:t,mode:n,paletteMode:r,width:i=900,height:a=400,margin:o={top:10,right:30,bottom:40,left:60},timeRange:s,showGrid:c=!0,showAxes:l=!0,axisLabelColor:p,axisLabelSize:m=14,formatDate:h,formatValue:g,markers:_=[],arcAngle:v=200,parliamentRadius:y=200,seatSize:b=4.5,animationDuration:x=900,onMorphComplete:S,onAnimationStateChange:C,onTimelineReady:w,onAnimationProgress:T,onHoveredDataChange:E,hoveredCategory:D,maxSeats:O=Na.maxSeats,showTooltip:k=!0,showTable:A=!1,showScaledIndicator:j=!0,parliamentTimestamp:M,enableBrush:N=!1,onTimeRangeChange:P,minAllowedTime:F,maxAllowedTime:I,timelineEvents:L=[],showTimeline:R=!1,timelineHeight:z=40,timelineOffset:B,brushColor:V=`#69b3a2`,showCrosshair:H=!1,crosshairColor:U=`#666`,crosshairDashArray:ee=`4,4`})=>{let te=(0,d.useRef)(null),[ne,re]=(0,d.useState)(null),W=(0,d.useCallback)(e=>{E&&E(e)},[E]),ie=B??18+m+12,ae=e[e.length-1],G=ae?t.reduce((e,t)=>e+(ae.values[t.dataKey]||0),0):0,oe=G>O,se=oe?Math.round(G/O):1,ce=R&&n===`stacked-area`?a+z+ie:a,{isMorphing:le,currentMode:K,visibleMarkers:ue,hoveredMarker:de,hoveredTimelineEvent:fe}=ag({containerRef:te,data:e,categories:t,mode:n,paletteMode:r,width:i,height:a,margin:o,timeRange:s,showGrid:c,showAxes:l,axisLabelColor:p,axisLabelSize:m,formatDate:h,formatValue:g,markers:_,arcAngle:v,parliamentRadius:y,seatSize:b,animationDuration:x,onMorphComplete:S,onAnimationStateChange:C,onTimelineReady:w,onAnimationProgress:T,onHoveredDataChange:W,hoveredCategory:D,maxSeats:O,parliamentTimestamp:M,enableBrush:N,onTimeRangeChange:P,minAllowedTime:F,maxAllowedTime:I,showScaleIndicator:j&&oe,reposPerSeat:se,timelineEvents:L,showTimeline:R,timelineHeight:z,timelineOffset:ie,brushColor:V,showCrosshair:H,onCrosshairMove:H?re:void 0});return(0,f.jsxs)(u.Box,{sx:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:te,viewBox:`0 0 ${i} ${ce}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,height:`auto`,display:`block`}}),H&&ne&&K===`area`&&!le&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${i} ${ce}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`auto`,pointerEvents:`none`},children:[(0,f.jsx)(`line`,{x1:ne.x,y1:o.top,x2:ne.x,y2:a-o.bottom,stroke:U,strokeDasharray:ee,strokeWidth:1}),(0,f.jsx)(`line`,{x1:o.left,y1:ne.y,x2:i-o.right,y2:ne.y,stroke:U,strokeDasharray:ee,strokeWidth:1})]}),K===`area`&&ue.map(e=>{let t=(e.x+o.left)/i*100,n=o.top/a*100,r=new Date(e.timestamp),s=h?h(e.timestamp):r.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0});return(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:e.label?.5:0},children:s}),e.label&&(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:e.label})]}),open:de?.timestamp===e.timestamp,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${t}%`,top:`${n}%`,width:`1px`,height:`${(a-o.top-o.bottom)/a*100}%`,pointerEvents:`none`}})},e.timestamp)}),fe&&K===`area`&&(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:.5},children:h?h(fe.timestamp):new Date(fe.timestamp).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}),(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:fe.eventName})]}),open:!0,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${(fe.x+o.left)/i*100}%`,top:`${(a+ie+z/2)/ce*100}%`,width:`1px`,height:`1px`,pointerEvents:`none`}})}),le&&(0,f.jsxs)(u.Box,{sx:{position:`absolute`,top:8,right:8,padding:`4px 8px`,backgroundColor:`rgba(0,0,0,0.7)`,color:`white`,borderRadius:`4px`,fontSize:`12px`,pointerEvents:`none`,display:`none`},children:[`Morphing: `,K,` → `,n]})]})},yg=[{minRepos:0,maxRepos:10,minArc:90,maxArc:90,minSeatSize:28,maxSeatSize:28},{minRepos:10,maxRepos:25,minArc:90,maxArc:110,minSeatSize:24,maxSeatSize:24},{minRepos:25,maxRepos:50,minArc:110,maxArc:120,minSeatSize:20,maxSeatSize:20},{minRepos:50,maxRepos:100,minArc:120,maxArc:150,minSeatSize:16.5,maxSeatSize:16.5},{minRepos:100,maxRepos:200,minArc:150,maxArc:180,minSeatSize:15,maxSeatSize:15},{minRepos:200,maxRepos:1/0,minArc:180,maxArc:180,minSeatSize:14.5,maxSeatSize:14.5}],bg=({repositoryCount:e})=>{let t=yg.find(t=>e>=t.minRepos&&e<t.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;let n=t.maxRepos-t.minRepos,r=(e-t.minRepos)/n,i=t.maxArc-t.minArc,a=t.minArc+i*r;return Math.round(a)},xg=({repositoryCount:e})=>{let t=yg.find(t=>e>=t.minRepos&&e<t.maxRepos);if(!t)return 6.5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;let n=t.maxRepos-t.minRepos,r=(e-t.minRepos)/n,i=t.maxSeatSize-t.minSeatSize,a=t.minSeatSize+i*r;return Math.round(a*10)/10},Sg=`ui-monospace, SFMono-Regular, Menlo, monospace`,Cg=e=>{let{typography:t}=e;if(`fontFamilyMonospace`in t){let e=t.fontFamilyMonospace;if(typeof e==`string`)return e}return Sg},wg=`category-table-num`,Tg=({categories:e,activeCategory:t,onCategoryHover:n,mode:r,visible:i=!0})=>{let a=(0,u.useTheme)().palette.mode;return(0,f.jsx)(u.Box,{className:`category-table`,sx:{width:`100%`,display:`flex`,justifyContent:`center`,opacity:+!!i,transition:`opacity 0.3s ease-in-out`,"@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:`auto`,maxWidth:`100%`}},onMouseLeave:()=>n(null),children:(0,f.jsxs)(u.Table,{"aria-label":`Categories summary`,className:`category-summary-table`,size:`small`,sx:e=>({maxWidth:{xs:`clamp(360px, 90%, 400px)`,sm:`clamp(360px, 90%, 400px)`,md:`clamp(360px, 85%, 420px)`,lg:`clamp(360px, 90%, 400px)`},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:`360px`},"& .MuiTableCell-root":{paddingTop:`4.5px`,paddingBottom:`4.5px`,paddingLeft:0,paddingRight:`4px`,lineHeight:`normal`,borderBottom:`1px solid`,borderColor:`var(--rc-table-border, ${e.palette.divider})`,fontSize:`clamp(10px, 1.8vw, 12px)`},"& thead .MuiTableCell-root":{paddingTop:`4px`,paddingBottom:`5px`,fontSize:`11px`,fontWeight:600,color:`text.secondary`},[`& .MuiTableCell-root.${wg}`]:{fontFamily:Cg,fontSize:`11px`},"& tbody tr:last-of-type .MuiTableCell-root":{borderBottom:`none`}}),children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(u.TableRow,{children:[(0,f.jsx)(u.TableCell,{colSpan:2,children:`Category`}),r===`point-in-time`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,children:`# of repositories`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Percentage`})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,children:`Last`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Max`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Min`})]})]})}),(0,f.jsx)(`tbody`,{children:e.map(e=>{let i=e.color,{fill:o,stroke:s,dashed:c}=Va(e.color,void 0,{paletteMode:a,label:e.label});return(0,f.jsxs)(u.TableRow,{onMouseEnter:()=>n(e.id),sx:{cursor:`pointer`,transition:`background-color 0.15s ease`,backgroundColor:t===e.id?`${i}15`:`transparent`,"&:hover":{backgroundColor:`${i}15`}},children:[(0,f.jsx)(u.TableCell,{align:`center`,sx:{width:20},children:(0,f.jsx)(u.Box,{sx:{width:r===`historical`?4:12,height:12,boxSizing:`border-box`,borderRadius:r===`historical`?1:`50%`,backgroundColor:r===`historical`?c?s:i:o,border:r===`historical`?`none`:`1.5px ${c?`dashed`:`solid`} ${s}`,transition:`transform 0.15s ease`,transform:t===e.id?`scale(1.2)`:`scale(1)`}})}),(0,f.jsx)(u.TableCell,{children:(0,f.jsxs)(u.Stack,{direction:`row`,alignItems:`center`,gap:.5,children:[(0,f.jsx)(`span`,{children:e.label}),e.tooltip&&(0,f.jsx)(u.Tooltip,{title:e.tooltip,placement:`right`,arrow:!0,children:(0,f.jsx)(p.InfoOutlined,{sx:{fontSize:`.875rem`,color:`text.secondary`}})})]})}),r===`point-in-time`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,className:wg,children:e.value}),(0,f.jsxs)(u.TableCell,{align:`right`,className:wg,children:[e.percentage>0&&e.percentage<1?`< 1`:Math.round(e.percentage),`%`]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,className:wg,children:e.value}),(0,f.jsx)(u.TableCell,{align:`right`,className:wg,children:e.max??`-`}),(0,f.jsx)(u.TableCell,{align:`right`,className:wg,children:e.min??`-`})]})]},e.id)})})]})})},Eg={"N/A":`Items that aren't applicable to this migration.`,"No LST":`There are no LSTs for these items.`,"Data Missing":`There is data missing in the LSTs.`},Dg=(e,t=`point-in-time`)=>{let n=e.timeSeries[e.timeSeries.length-1];if(!n)return[];let r=e.categories.filter(e=>!e.parliamentMapping?.isSpecialCategory),i=r.reduce((e,t)=>e+(n.values[t.id]??0),0),a=e.metadata.specialCounts,o=i+(a?(a.notApplicable??0)+(a.noLst??0)+(a.unavailable??0):0),s=t===`historical`?new Map(r.map(t=>{let n=e.timeSeries.map(e=>Math.round(e.values[t.id]??0)).filter(e=>e!==void 0);return[t.id,{max:Math.max(...n),min:Math.min(...n)}]})):null,c=r.map(e=>{let t=Math.round(n.values[e.id]??0),r=o>0?t/o*100:0,i={id:e.id,label:e.label,value:t,percentage:r,color:e.color,tooltip:Eg[e.label]};if(s){let t=s.get(e.id);t&&(i.max=t.max,i.min=t.min)}return i}),l=[];if(a){let t=e.categories.filter(e=>e.parliamentMapping?.isSpecialCategory);for(let e of t){let t=0;if(e.label===`N/A`?t=Math.round(a.notApplicable??0):e.label===`No LST`?t=Math.round(a.noLst??0):e.label===`Data Missing`&&(t=Math.round(a.unavailable??0)),t>0){let n=o>0?t/o*100:0;l.push({id:e.id,label:e.label,value:t,percentage:n,color:e.color,tooltip:Eg[e.label]})}}}return[...c,...l]},Og=e=>{if(!e.timeSeries[e.timeSeries.length-1])throw Error(`ChronoChart: No data points available`);return{data:e.timeSeries.map(e=>({timestamp:e.timestamp,values:e.values})),categories:e.categories.map(e=>({dataKey:e.id,label:e.label,color:e.color,fillOpacity:.7,strokeWidth:e.parliamentMapping?.isSpecialCategory?3:1.5,strokeDasharray:e.strokeDasharray,parliamentMapping:e.parliamentMapping}))}},kg=e=>{if(!e.timeSeries||e.timeSeries.length===0)throw Error(`ChronoChart: timeSeries must not be empty`);if(!e.categories||e.categories.length===0)throw Error(`ChronoChart: categories must not be empty`);if(!e.metadata||typeof e.metadata.total!=`number`)throw Error(`ChronoChart: metadata.total is required`);if(!e.timeSeries.every((t,n)=>n===0||t.timestamp>=e.timeSeries[n-1].timestamp))throw Error(`ChronoChart: timeSeries must be sorted by timestamp (ascending)`);let t=e.timeSeries[0];if(t){for(let n of e.categories.filter(e=>!e.parliamentMapping?.isSpecialCategory))if(!(n.id in t.values))throw Error(`ChronoChart: Category "${n.id}" not found in timeSeries data`)}},Ag=({data:e,selectedIndex:t,title:n,subtitle:r,showHeader:i=!0,width:a=960,height:o=400,timeRange:s,onTimeRangeChange:c,minAllowedTime:l,maxAllowedTime:p,enableBrush:m=!1,showLegend:h=!0,showTooltip:g=!0,showGrid:_=!0,axisLabelColor:v,axisLabelSize:y=14,enableAnimation:b=!0,animationDuration:x=5439,disableTimeline:S=!1,formatDate:C,formatValue:w,onAnimationStateChange:T,onTimelineReady:E,onAnimationProgress:D,brushColor:O=`#69b3a2`,showCrosshair:k=!0,crosshairColor:A=`#666`,crosshairDashArray:j=`4,4`})=>{kg(e);let M=(0,u.useTheme)().palette.mode,[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(!0),L=(0,d.useRef)(`historical`),R=(0,d.useRef)(void 0),z=(0,d.useMemo)(()=>e.timeSeries.length===1||t!==void 0?`point-in-time`:`historical`,[t,e.timeSeries.length]),B=(0,d.useMemo)(()=>{let n;return t!==void 0&&e.timeSeries[t]?(n=e.timeSeries[t].timestamp,R.current=n):n=L.current===`point-in-time`&&z===`historical`&&R.current!==void 0?R.current:e.timeSeries[e.timeSeries.length-1]?.timestamp,L.current=z,n},[t,e.timeSeries,z]),V=e.timeSeries[0].timestamp,H=e.timeSeries[e.timeSeries.length-1].timestamp,[U,ee]=(0,d.useState)([V,H]),te=s??U,ne=(0,d.useCallback)(e=>{let t=[l===void 0?e[0]:Math.max(e[0],l),p===void 0?e[1]:Math.min(e[1],p)];c?c(t):ee(t)},[c,l,p]);(0,d.useEffect)(()=>{P(null)},[z]);let re=(0,d.useMemo)(()=>({top:10,right:30,left:60,bottom:30}),[]),W=(0,d.useMemo)(()=>Og(e),[e]),ie=(0,d.useMemo)(()=>Dg(e,z),[e,z]),ae=(0,d.useMemo)(()=>{let t=e.timeSeries[e.timeSeries.length-1];return t?Object.values(t.values).reduce((e,t)=>e+t,0):0},[e.timeSeries]),G=(0,d.useMemo)(()=>bg({repositoryCount:ae}),[ae]),oe=(0,d.useMemo)(()=>xg({repositoryCount:ae}),[ae]),se=(0,d.useMemo)(()=>{let e=o-re.top-re.bottom;return Math.round(e*.9)},[o,re]),ce=(0,d.useMemo)(()=>e.events?e.events.map(e=>({timestamp:e.timestamp,label:e.eventName,color:typeof e.color==`string`?e.color:`#2F42FF`})):[],[e.events]),le=(0,d.useCallback)(t=>{if(t){let n=e.categories.find(e=>e.label===t.label);P(n?.id??null)}else P(null)},[e.categories]),K=(0,d.useCallback)(e=>{I(!e),T&&T(e)},[T]);return(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsx)(u.Box,{sx:{position:`relative`,width:`100%`},children:(0,f.jsx)(vg,{data:W.data,categories:W.categories,mode:z===`point-in-time`?`parliament`:`stacked-area`,paletteMode:M,width:a,height:o,timeRange:te,onTimeRangeChange:ne,minAllowedTime:l,maxAllowedTime:p,enableBrush:m,showGrid:_,showAxes:!0,axisLabelColor:v,axisLabelSize:y,margin:re,markers:ce,formatDate:C,formatValue:w,animationDuration:x,onAnimationStateChange:K,onTimelineReady:E,onAnimationProgress:D,onHoveredDataChange:le,hoveredCategory:N,arcAngle:G,parliamentRadius:se,seatSize:oe,parliamentTimestamp:B,timelineEvents:e.events??[],showTimeline:z===`historical`&&!S,brushColor:O,showCrosshair:k,crosshairColor:A,crosshairDashArray:j})}),(0,f.jsx)(Tg,{categories:ie,activeCategory:N,onCategoryHover:P,mode:z,visible:F})]})},jg=20,Mg=({visible:e,x:t,y:n,containerRef:r,viewBoxWidth:i,viewBoxHeight:a,usePortal:o=!1,scale:s=1,flipThreshold:c,anchorPosition:l=`cursor`,chartTopMargin:p=20,children:m})=>{let h=(0,d.useRef)(null),[g,_]=(0,d.useState)(0),[v,y]=(0,d.useState)(null),b=(0,d.useCallback)(()=>{if(r.current){let e=r.current.getBoundingClientRect();y({width:e.width,height:e.height,left:e.left,top:e.top})}},[r]);if((0,d.useLayoutEffect)(()=>{b();let e=()=>b();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[b]),(0,d.useLayoutEffect)(()=>{e&&b()},[e,b]),(0,d.useLayoutEffect)(()=>{h.current&&e&&_(h.current.offsetWidth)},[e]),!e||!v)return null;let x=v.width/i,S=v.height/a,C=t*x,w=n*S,T={pointerEvents:`none`,zIndex:1e3,p:2*s,whiteSpace:`nowrap`};if(o){let e=v.left+C,t=v.top+w;if(l===`top`){let t=v.top+p*S,n=(g>0?g:400)/2,r=e+n>window.innerWidth-jg,i=e-n<jg,a=`translateX(-50%)`;return r&&!i?a=`translateX(-50%) translateX(-${e+n-window.innerWidth+jg}px)`:i&&!r&&(a=`translateX(-50%) translateX(${jg-(e-n)}px)`),(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:e,top:t,transform:`${a} translateY(-100%) translateY(-10px)`},children:m})})}if(l===`bottom-corner`){let n=g>0?g:400,r=e+10+n,i=e-10-n,a=r>window.innerWidth-jg,o=i<jg,s,c;return a?o?(s=window.innerWidth-jg-n,c=`none`):(s=e-10,c=`translateX(-100%)`):(s=e+10,c=`none`),(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:s,top:t+10,transform:c},children:m})})}let n=g>0?g:450,r=e+10+n>window.innerWidth-jg,i=e>window.innerWidth-500,a=c===void 0?void 0:c*x,o=r||i||a!==void 0&&C>a?`translateX(-100%) translateX(-20px)`:`none`;return(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:e+10,top:t-10,transform:o},children:m})})}if(l===`top`){let e=p*S;return(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:C,top:e,transform:`translateX(-50%) translateY(-100%) translateY(-10px)`},children:m})}if(l===`bottom-corner`){let e=g>0?g:400,t=C+10+e,n=C-10-e,r=t>v.width,i=n<0,a,o;return r?i?(a=v.width-e,o=`none`):(a=C-10,o=`translateX(-100%)`):(a=C+10,o=`none`),(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:a,top:w+10,transform:o},children:m})}let E=c===void 0?void 0:c*x,D=E!==void 0&&C>E?`translateX(-100%) translateX(-20px)`:`none`;return(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:C+10,top:w-10,transform:D},children:m})},Ng=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:o,showGrid:s=!0,showXAxis:c=!0,showYAxis:l=!0,enableBrush:u=!1,zoomToSelection:f=!1,onTimeRangeChange:p,formatDate:m,formatValue:h,markers:g=[],markerVisibilityMode:_=`hover`,onMarkerHoverChange:v,brushColor:y=`#69b3a2`,showCrosshair:b=!1,onHoveredAreaChange:x,onCrosshairMove:S})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=Y(e.current),C=r-a.left-a.right,w=i-a.top-a.bottom;d.selectAll(`*`).remove();let T=d.append(`g`).attr(`transform`,`translate(${a.left},${a.top})`),E=`d3-chart-clip-${Math.random().toString(36).substr(2,9)}`;d.append(`defs`).append(`clipPath`).attr(`id`,E).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,C).attr(`height`,w);let D=T.append(`g`).attr(`clip-path`,`url(#${E})`),O=[...t].sort((e,t)=>e.timestamp-t.timestamp),k=n.map(e=>e.dataKey),A=Ci().keys(k),j=A(O),M=t.map(e=>e.timestamp),N=o?o[0]:Math.min(...M),P=o?o[1]:Math.max(...M),F=Qr().domain([new Date(N),new Date(P)]).range([0,C]),I=A(O.filter(e=>e.timestamp>=N&&e.timestamp<=P)),L=I.length>0?Math.max(...I[I.length-1].map(e=>e[1]??0)):0,R=Nt().domain([0,L*1.1]).range([w,0]).nice();s&&(D.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(ro(F).ticks(6).tickSize(w).tickFormat(()=>``)),D.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(io(R).ticks(5).tickSize(-C).tickFormat(()=>``)));let z=gi().x(e=>F(new Date(e.data.timestamp))).y0(e=>R(e[0])).y1(e=>R(e[1])).curve(fi),B=D.append(`g`).attr(`class`,`areas`);if(j.forEach((e,t)=>{let r=n[t];if(!r)return;let i=B.append(`path`).datum(e).attr(`class`,`area area-${r.dataKey}`).attr(`fill`,r.color).attr(`fill-opacity`,r.fillOpacity??.7).attr(`stroke`,r.color).attr(`stroke-width`,r.strokeWidth??1.5).attr(`d`,z).attr(`pointer-events`,`none`);r.strokeDasharray&&i.attr(`stroke-dasharray`,r.strokeDasharray)}),g.length>0){let e=D.append(`g`).attr(`class`,`markers`),t=_===`hover`?0:.6,n=g.filter(e=>e.timestamp>=N&&e.timestamp<=P).map(e=>({...e,x:F(new Date(e.timestamp))}));if(n.forEach(n=>{let r=e.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,n.timestamp).attr(`x1`,n.x).attr(`x2`,n.x).attr(`y1`,0).attr(`y2`,w).attr(`stroke`,n.color??`#131E7A`).attr(`stroke-width`,2).attr(`opacity`,t);n.strokeDasharray&&r.attr(`stroke-dasharray`,n.strokeDasharray),n.label&&e.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,n.timestamp).attr(`x`,n.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,n.color??`#131E7A`).attr(`opacity`,t).text(n.label)}),_===`hover`&&n.length>0){let t=d.append(`g`).attr(`class`,`marker-tooltip`).attr(`transform`,`translate(${a.left},${a.top})`).style(`pointer-events`,`none`).style(`display`,`none`),r=t.append(`rect`).attr(`fill`,`#131E7A`).attr(`rx`,4).attr(`ry`,4).attr(`filter`,`drop-shadow(0px 2px 4px rgba(0,0,0,0.2))`),i=t.append(`text`).attr(`fill`,`white`).attr(`font-size`,12).attr(`font-weight`,500).attr(`text-anchor`,`middle`),o=null,s=D.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,C).attr(`height`,w).attr(`fill`,`none`).attr(`pointer-events`,`all`),c=s=>{let c=null,l=1/0;if(n.forEach(e=>{let t=Math.abs(s-e.x);t<l&&(l=t,c=e)}),!c||l>50)return o!==null&&(o=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),t.style(`display`,`none`),v?.(!1)),!1;let u=c;if(o===null&&v?.(!0),o===u.timestamp)return!0;o=u.timestamp,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),e.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(u.timestamp)}).attr(`opacity`,.6),e.selectAll(`.marker-label`).filter(function(){return Y(this).attr(`data-timestamp`)===String(u.timestamp)}).attr(`opacity`,1);let d=new Date(u.timestamp),f=m?m(u.timestamp):d.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}),p=u.label?`${u.label}: ${f}`:f;i.text(p);let h=i.node().getBBox(),g=h.width+16,_=h.height+16;r.attr(`width`,g).attr(`height`,_);let y=u.x-g/2;return y<0?y=0:y+g>C&&(y=C-g),t.attr(`transform`,`translate(${a.left+y},${a.top+10})`),i.attr(`x`,g/2).attr(`y`,_/2+4),t.style(`display`,`block`),!0};s.on(`mousemove`,function(e){let[t]=dc(e,this);c(t)&&e.stopPropagation()}),s.on(`mouseleave`,function(){o=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),t.style(`display`,`none`),v?.(!1)})}}if(c){let e=ro(F).ticks(6);m&&e.tickFormat(e=>m(+e)),T.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${w})`).call(e).selectAll(`text`).attr(`font-size`,11)}if(l){let e=io(R).ticks(5);h&&e.tickFormat(e=>h(+e)),T.append(`g`).attr(`class`,`axis axis-y`).call(e).selectAll(`text`).attr(`font-size`,11)}let V=(e,t)=>{let r=+F.invert(e),i=-1;for(let e=0;e<O.length-1;e++)if(O[e].timestamp<=r&&O[e+1].timestamp>=r){i=e;break}i===-1&&(i=r<=O[0].timestamp?0:O.length-2);let a=O[i],o=O[i+1];if(!a||!o)return null;let s=o.timestamp-a.timestamp,c=s>0?(r-a.timestamp)/s:0;for(let e=j.length-1;e>=0;e--){let a=j[e],o=n[e];if(!a||!o)continue;let s=a[i],l=a[i+1];if(!s||!l)continue;let u=s[0]+c*(l[0]-s[0]),d=s[1]+c*(l[1]-s[1]),f=R(u);if(t>=R(d)&&t<=f){let e=d-u;return{timestamp:r,category:{label:o.label,color:o.color},value:e}}}return null},H=(e,t)=>{let[n,r]=dc(e,t);b&&S?.({x:n+a.left,y:r+a.top});let i=V(n,r);x?.(i)},U=()=>{S?.(null),x?.(null)};if(!u){let e=D.append(`rect`).attr(`class`,`mouse-overlay`).attr(`width`,C).attr(`height`,w).attr(`fill`,`none`).attr(`pointer-events`,`all`);e.on(`mousemove`,function(e){H(e,this)}),e.on(`mouseleave`,U)}if(u&&p){let e=Ou().extent([[0,0],[C,w]]).on(`brush`,()=>{}).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection;p([+F.invert(n),+F.invert(r)]),f&&d.select(`.brush`).call(e.move,null)}),t=d.append(`g`).attr(`class`,`brush`).attr(`transform`,`translate(${a.left},${a.top})`).call(e);t.select(`.selection`).style(`fill`,y).style(`fill-opacity`,`0.4`).style(`stroke`,y).style(`stroke-width`,`2px`),t.selectAll(`.handle`).style(`fill`,y).style(`fill-opacity`,`0.9`),t.select(`.overlay`).style(`cursor`,`default`),t.select(`.overlay`).on(`mousemove`,function(e){H(e,this)}).on(`mouseleave`,U)}return d.on(`mouseleave`,()=>{S?.(null),x?.(null)}),()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S])},Pg=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:o=!0,width:s=800,height:c=400,margin:l={top:20,right:30,bottom:40,left:60},timeRange:p,showGrid:m=!0,showAxes:h=!0,showXAxis:g,showYAxis:_,formatDate:v,formatValue:y,onTimeRangeChange:b,enableBrush:x=!1,zoomToSelection:S=!1,markers:C=[],markerVisibilityMode:w=`hover`,brushColor:T=`#69b3a2`,showCrosshair:E=!1,crosshairColor:D=`#666`,crosshairDashArray:O=`4,4`,tooltipScale:k=1,usePortalTooltip:A=!1})=>{let j=(0,d.useRef)(null),M=(0,d.useRef)(null),[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(null),[L,R]=(0,d.useState)(!1),z=(0,d.useCallback)(e=>{L||P(e)},[L]),B=(0,d.useCallback)(e=>{L||I(e)},[L]),V=(0,d.useCallback)(e=>{R(e),e&&(P(null),I(null))},[]);return Ng({containerRef:j,data:e,categories:t,width:s,height:c,margin:l,timeRange:p,showGrid:m,showXAxis:g===void 0?h:g,showYAxis:_===void 0?h:_,enableBrush:x,zoomToSelection:S,onTimeRangeChange:b,formatDate:v,formatValue:y,markers:C,markerVisibilityMode:w,onMarkerHoverChange:V,brushColor:T,showCrosshair:E,onHoveredAreaChange:z,onCrosshairMove:B}),(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsxs)(u.Box,{ref:M,sx:{width:`100%`,display:`flex`,justifyContent:`center`,alignItems:`flex-start`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:j,viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,display:`block`}}),E&&F&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,right:0,width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,pointerEvents:`none`,margin:`0 auto`},children:[(0,f.jsx)(`line`,{x1:F.x,y1:l.top,x2:F.x,y2:c-l.bottom,stroke:D,strokeDasharray:O,strokeWidth:1}),(0,f.jsx)(`line`,{x1:l.left,y1:F.y,x2:s-l.right,y2:F.y,stroke:D,strokeDasharray:O,strokeWidth:1})]}),o&&N&&F&&(0,f.jsxs)(Mg,{visible:!0,x:F.x,y:F.y,containerRef:M,viewBoxWidth:s,viewBoxHeight:c,usePortal:A,scale:k,flipThreshold:s/2,children:[(0,f.jsx)(u.Typography,{sx:{fontFamily:`monospace`,fontSize:`${.875*k}rem`,color:`text.secondary`,mb:1.5*k},children:(e=>v?v(e):new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}))(N.timestamp)}),(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1.5*k,children:[(0,f.jsx)(u.Box,{sx:{width:5*k,backgroundColor:N.category.color,borderRadius:1,flexShrink:0}}),(0,f.jsxs)(u.Stack,{children:[(0,f.jsx)(u.Typography,{sx:{fontWeight:700,fontSize:`${1.125*k}rem`,lineHeight:1.3},children:N.category.label}),(0,f.jsx)(u.Typography,{sx:{fontSize:`${1*k}rem`,color:`text.primary`,textDecoration:`underline`,textDecorationColor:`rgba(0,0,0,0.2)`,textUnderlineOffset:`3px`},children:y?y(N.value):N.value.toLocaleString()})]})]})]})]}),a&&(0,f.jsx)(u.Stack,{direction:`row`,spacing:3,sx:{flexWrap:`wrap`,justifyContent:`center`,gap:2},children:t.map(e=>(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1,alignItems:`center`,sx:{cursor:`pointer`,"&:hover":{opacity:.7}},children:[(0,f.jsx)(u.Box,{sx:{width:16,height:16,backgroundColor:e.color,opacity:e.fillOpacity??.7,border:`2px solid ${e.color}`,borderRadius:`2px`,...e.strokeDasharray&&{backgroundImage:`repeating-linear-gradient(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let u=require("@mui/material"),d=require("react");d=l(d,1);let f=require("react/jsx-runtime"),p=require("@mui/icons-material");var m=10.5,h=(0,d.memo)(({ticks:e,plotWidth:t,height:n,colors:r,fontFamily:i})=>(0,f.jsxs)(`g`,{className:`campaign-axis`,children:[(0,f.jsx)(`rect`,{x:0,y:0,width:t,height:n,fill:r.track,stroke:`none`}),(0,f.jsx)(`line`,{x1:0,y1:0,x2:t,y2:0,stroke:r.border,strokeWidth:1}),(0,f.jsx)(`line`,{x1:0,y1:n,x2:t,y2:n,stroke:r.border,strokeWidth:1}),e.map(e=>(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`line`,{x1:e.x,y1:0,x2:e.x,y2:e.showLabel?5:3,stroke:r.muted,strokeWidth:1,strokeOpacity:e.showLabel?1:.5}),e.showLabel?(0,f.jsx)(`text`,{x:e.x,y:n/2+1,textAnchor:`middle`,dominantBaseline:`central`,fill:r.text,fontSize:m,fontWeight:600,fontFamily:i,style:{fontVariantNumeric:`tabular-nums`},children:e.label}):null]},e.timestamp))]}));function g(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function v(e){let t,n,r;e.length===2?(t=e===g||e===_?e:y,n=e,r=e):(t=g,n=(t,n)=>g(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function y(){return 0}function b(e){return e===null?NaN:+e}var x=v(g),S=x.right;x.left,v(b).center;var C=Math.sqrt(50),w=Math.sqrt(10),T=Math.sqrt(2);function E(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=C?10:a>=w?5:a>=T?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?E(e,t,n*2):[s,c,l]}function D(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?E(t,e,n):E(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function O(e,t,n){return t=+t,e=+e,n=+n,E(e,t,n)[2]}function k(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?O(t,e,n):O(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function A(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function j(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function M(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function N(){}var P=.7,F=1/P,I=`\\s*([+-]?\\d+)\\s*`,L=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,R=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,z=/^#([0-9a-f]{3,8})$/,B=RegExp(`^rgb\\(${I},${I},${I}\\)$`),V=RegExp(`^rgb\\(${R},${R},${R}\\)$`),H=RegExp(`^rgba\\(${I},${I},${I},${L}\\)$`),U=RegExp(`^rgba\\(${R},${R},${R},${L}\\)$`),ee=RegExp(`^hsl\\(${L},${R},${R}\\)$`),te=RegExp(`^hsla\\(${L},${R},${R},${L}\\)$`),ne={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};j(N,G,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:re,formatHex:re,formatHex8:W,formatHsl:ie,formatRgb:ae,toString:ae});function re(){return this.rgb().formatHex()}function W(){return this.rgb().formatHex8()}function ie(){return ge(this).formatHsl()}function ae(){return this.rgb().formatRgb()}function G(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=z.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?oe(t):n===3?new K(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?se(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?se(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=B.exec(e))?new K(t[1],t[2],t[3],1):(t=V.exec(e))?new K(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H.exec(e))?se(t[1],t[2],t[3],t[4]):(t=U.exec(e))?se(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ee.exec(e))?he(t[1],t[2]/100,t[3]/100,1):(t=te.exec(e))?he(t[1],t[2]/100,t[3]/100,t[4]):ne.hasOwnProperty(e)?oe(ne[e]):e===`transparent`?new K(NaN,NaN,NaN,0):null}function oe(e){return new K(e>>16&255,e>>8&255,e&255,1)}function se(e,t,n,r){return r<=0&&(e=t=n=NaN),new K(e,t,n,r)}function ce(e){return e instanceof N||(e=G(e)),e?(e=e.rgb(),new K(e.r,e.g,e.b,e.opacity)):new K}function le(e,t,n,r){return arguments.length===1?ce(e):new K(e,t,n,r??1)}function K(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}j(K,le,M(N,{brighter(e){return e=e==null?F:F**+e,new K(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?P:P**+e,new K(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new K(pe(this.r),pe(this.g),pe(this.b),q(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ue,formatHex:ue,formatHex8:de,formatRgb:fe,toString:fe}));function ue(){return`#${me(this.r)}${me(this.g)}${me(this.b)}`}function de(){return`#${me(this.r)}${me(this.g)}${me(this.b)}${me((isNaN(this.opacity)?1:this.opacity)*255)}`}function fe(){let e=q(this.opacity);return`${e===1?`rgb(`:`rgba(`}${pe(this.r)}, ${pe(this.g)}, ${pe(this.b)}${e===1?`)`:`, ${e})`}`}function q(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function me(e){return e=pe(e),(e<16?`0`:``)+e.toString(16)}function he(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ve(e,t,n,r)}function ge(e){if(e instanceof ve)return new ve(e.h,e.s,e.l,e.opacity);if(e instanceof N||(e=G(e)),!e)return new ve;if(e instanceof ve)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new ve(o,s,c,e.opacity)}function _e(e,t,n,r){return arguments.length===1?ge(e):new ve(e,t,n,r??1)}function ve(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}j(ve,_e,M(N,{brighter(e){return e=e==null?F:F**+e,new ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?P:P**+e,new ve(this.h,this.s,this.l*e,this.opacity)},rgb(){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 K(xe(e>=240?e-240:e+120,i,r),xe(e,i,r),xe(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ve(ye(this.h),be(this.s),be(this.l),q(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=q(this.opacity);return`${e===1?`hsl(`:`hsla(`}${ye(this.h)}, ${be(this.s)*100}%, ${be(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function ye(e){return e=(e||0)%360,e<0?e+360:e}function be(e){return Math.max(0,Math.min(1,e||0))}function xe(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 Se=e=>()=>e;function Ce(e,t){return function(n){return e+n*t}}function we(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Te(e){return(e=+e)==1?Ee:function(t,n){return n-t?we(t,n,e):Se(isNaN(t)?n:t)}}function Ee(e,t){var n=t-e;return n?Ce(e,n):Se(isNaN(e)?t:e)}var De=(function e(t){var n=Te(t);function r(e,t){var r=n((e=le(e)).r,(t=le(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Ee(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Oe(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ke(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ae(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=ze(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function je(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Me(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ne(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=ze(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Pe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fe=new RegExp(Pe.source,`g`);function Ie(e){return function(){return e}}function Le(e){return function(t){return e(t)+``}}function Re(e,t){var n=Pe.lastIndex=Fe.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Pe.exec(e))&&(i=Fe.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Me(r,i)})),n=Fe.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Le(c[0].x):Ie(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function ze(e,t){var n=typeof t,r;return t==null||n===`boolean`?Se(t):(n===`number`?Me:n===`string`?(r=G(t))?(t=r,De):Re:t instanceof G?De:t instanceof Date?je:ke(t)?Oe:Array.isArray(t)?Ae:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Ne:Me)(e,t)}function Be(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ve=180/Math.PI,He={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ue(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Ve,skewX:Math.atan(c)*Ve,scaleX:o,scaleY:s}}var We;function Ge(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?He:Ue(t.a,t.b,t.c,t.d,t.e,t.f)}function Ke(e){return e==null||(We||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),We.setAttribute(`transform`,e),!(e=We.transform.baseVal.consolidate()))?He:(e=e.matrix,Ue(e.a,e.b,e.c,e.d,e.e,e.f))}function qe(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Me(e,i)},{i:c-2,x:Me(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Me(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Me(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Me(e,n)},{i:s-2,x:Me(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Je=qe(Ge,`px, `,`px)`,`deg)`),Ye=qe(Ke,`, `,`)`,`)`);function Xe(e){return function(){return e}}function Ze(e){return+e}var Qe=[0,1];function $e(e){return e}function et(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Xe(isNaN(t)?NaN:.5)}function tt(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function nt(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=et(i,r),a=n(o,a)):(r=et(r,i),a=n(a,o)),function(e){return a(r(e))}}function rt(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=et(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=S(e,t,1,r)-1;return a[n](i[n](t))}}function it(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function at(){var e=Qe,t=Qe,n=ze,r,i,a,o=$e,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==$e&&(o=tt(e[0],e[n-1])),s=n>2?rt:nt,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Me))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,Ze),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=Be,u()},d.clamp=function(e){return arguments.length?(o=e?!0:$e,u()):o!==$e},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function ot(){return at()($e,$e)}function st(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function ct(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function lt(e){return e=ct(Math.abs(e)),e?e[1]:NaN}function ut(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function dt(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var ft=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pt(e){if(!(t=ft.exec(e)))throw Error(`invalid format: `+e);var t;return new mt({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]})}pt.prototype=mt.prototype;function mt(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+``}mt.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 ht(e){out: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 out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var gt;function _t(e,t){var n=ct(e,t);if(!n)return gt=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(gt=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+ct(e,Math.max(0,t+a-1))[0]}function vt(e,t){var n=ct(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var yt={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:st,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>vt(e*100,t),r:vt,s:_t,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bt(e){return e}var xt=Array.prototype.map,St=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Ct(e){var t=e.grouping===void 0||e.thousands===void 0?bt:ut(xt.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+``,a=e.numerals===void 0?bt:dt(xt.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=pt(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):yt[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=yt[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=ht(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&>!==void 0?St[8+gt/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(lt(t)/3)))*3,r=10**-n,i=l((e=pt(e),e.type=`f`,e),{suffix:St[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var wt,Tt,Et;Dt({thousands:`,`,grouping:[3],currency:[`$`,``]});function Dt(e){return wt=Ct(e),Tt=wt.format,Et=wt.formatPrefix,wt}function Ot(e){return Math.max(0,-lt(Math.abs(e)))}function kt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lt(t)/3)))*3-lt(Math.abs(e)))}function At(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lt(t)-lt(e))+1}function jt(e,t,n,r){var i=k(e,t,n),a;switch(r=pt(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=kt(i,o))&&(r.precision=a),Et(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=At(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Ot(i))&&(r.precision=a-(r.type===`%`)*2)}return Tt(r)}function Mt(e){var t=e.domain;return e.ticks=function(e){var n=t();return D(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return jt(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=O(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Nt(){var e=ot();return e.copy=function(){return it(e,Nt())},A.apply(e,arguments),Mt(e)}function Pt(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Ft=new Date,It=new Date;function Lt(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Lt(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Ft.setTime(+t),It.setTime(+r),e(Ft),e(It),Math.floor(n(Ft,It))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Rt=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Rt.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Rt),Rt.range;var zt=1e3,Bt=zt*60,Vt=Bt*60,Ht=Vt*24,Ut=Ht*7,Wt=Ht*30,Gt=Ht*365,Kt=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getUTCSeconds());Kt.range;var qt=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt)},(e,t)=>{e.setTime(+e+t*Bt)},(e,t)=>(t-e)/Bt,e=>e.getMinutes());qt.range;var Jt=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Bt)},(e,t)=>(t-e)/Bt,e=>e.getUTCMinutes());Jt.range;var Yt=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt-e.getMinutes()*Bt)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getHours());Yt.range;var Xt=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getUTCHours());Xt.range;var Zt=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Bt)/Ht,e=>e.getDate()-1);Zt.range;var Qt=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ht,e=>e.getUTCDate()-1);Qt.range;var $t=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ht,e=>Math.floor(e/Ht));$t.range;function en(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Bt)/Ut)}var tn=en(0),nn=en(1),rn=en(2),an=en(3),on=en(4),sn=en(5),cn=en(6);tn.range,nn.range,rn.range,an.range,on.range,sn.range,cn.range;function ln(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ut)}var un=ln(0),dn=ln(1),fn=ln(2),pn=ln(3),mn=ln(4),hn=ln(5),gn=ln(6);un.range,dn.range,fn.range,pn.range,mn.range,hn.range,gn.range;var _n=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());_n.range;var vn=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());vn.range;var yn=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());yn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),yn.range;var bn=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());bn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),bn.range;function xn(e,t,n,r,i,a){let o=[[Kt,1,zt],[Kt,5,5*zt],[Kt,15,15*zt],[Kt,30,30*zt],[a,1,Bt],[a,5,5*Bt],[a,15,15*Bt],[a,30,30*Bt],[i,1,Vt],[i,3,3*Vt],[i,6,6*Vt],[i,12,12*Vt],[r,1,Ht],[r,2,2*Ht],[n,1,Ut],[t,1,Wt],[t,3,3*Wt],[e,1,Gt]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=v(([,,e])=>e).right(o,i);if(a===o.length)return e.every(k(t/Gt,n/Gt,r));if(a===0)return Rt.every(Math.max(k(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[Sn,Cn]=xn(bn,vn,un,$t,Xt,Jt),[wn,Tn]=xn(yn,_n,tn,Zt,Yt,qt);function En(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 Dn(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 On(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kn(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Fn(i),u=In(i),d=Fn(a),f=In(a),p=Fn(o),m=In(o),h=Fn(s),g=In(s),_=Fn(c),v=In(c),y={a:N,A:P,b:F,B:I,c:null,d:rr,e:rr,f:cr,g:yr,G:xr,H:ir,I:ar,j:or,L:sr,m:lr,M:ur,p:L,q:R,Q:Wr,s:Gr,S:dr,u:fr,U:pr,V:hr,w:gr,W:_r,x:null,X:null,y:vr,Y:br,Z:Sr,"%":Ur},b={a:z,A:B,b:V,B:H,c:null,d:Cr,e:Cr,f:Or,g:zr,G:Vr,H:wr,I:Tr,j:Er,L:Dr,m:kr,M:Ar,p:U,q:ee,Q:Wr,s:Gr,S:jr,u:Mr,U:Nr,V:Fr,w:Ir,W:Lr,x:null,X:null,y:Rr,Y:Br,Z:Hr,"%":Ur},x={a:E,A:D,b:O,B:k,c:A,d:qn,e:qn,f:$n,g:Un,G:Hn,H:Yn,I:Yn,j:Jn,L:Qn,m:Kn,M:Xn,p:T,q:Gn,Q:tr,s:nr,S:Zn,u:Rn,U:zn,V:Bn,w:Ln,W:Vn,x:j,X:M,y:Un,Y:Hn,Z:Wn,"%":er};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=An[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=On(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=Dn(On(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?dn.ceil(a):dn(a),a=Qt.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=En(On(r.y,0,1)),o=a.getDay(),a=o>4||o===0?nn.ceil(a):nn(a),a=Zt.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?Dn(On(r.y,0,1)).getUTCDay():En(On(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Dn(r)):En(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in An?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function U(e){return i[+(e.getUTCHours()>=12)]}function ee(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var An={"-":``,_:` `,0:`0`},jn=/^\s*\d+/,Mn=/^%/,Nn=/[\\^$*+?|[\]().{}]/g;function J(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Pn(e){return e.replace(Nn,`\\$&`)}function Fn(e){return RegExp(`^(?:`+e.map(Pn).join(`|`)+`)`,`i`)}function In(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Ln(e,t,n){var r=jn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Rn(e,t,n){var r=jn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function zn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Vn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Hn(e,t,n){var r=jn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Un(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Wn(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 Gn(e,t,n){var r=jn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Kn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function qn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Jn(e,t,n){var r=jn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Yn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Xn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Zn(e,t,n){var r=jn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Qn(e,t,n){var r=jn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function $n(e,t,n){var r=jn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function er(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tr(e,t,n){var r=jn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nr(e,t,n){var r=jn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function rr(e,t){return J(e.getDate(),t,2)}function ir(e,t){return J(e.getHours(),t,2)}function ar(e,t){return J(e.getHours()%12||12,t,2)}function or(e,t){return J(1+Zt.count(yn(e),e),t,3)}function sr(e,t){return J(e.getMilliseconds(),t,3)}function cr(e,t){return sr(e,t)+`000`}function lr(e,t){return J(e.getMonth()+1,t,2)}function ur(e,t){return J(e.getMinutes(),t,2)}function dr(e,t){return J(e.getSeconds(),t,2)}function fr(e){var t=e.getDay();return t===0?7:t}function pr(e,t){return J(tn.count(yn(e)-1,e),t,2)}function mr(e){var t=e.getDay();return t>=4||t===0?on(e):on.ceil(e)}function hr(e,t){return e=mr(e),J(on.count(yn(e),e)+(yn(e).getDay()===4),t,2)}function gr(e){return e.getDay()}function _r(e,t){return J(nn.count(yn(e)-1,e),t,2)}function vr(e,t){return J(e.getFullYear()%100,t,2)}function yr(e,t){return e=mr(e),J(e.getFullYear()%100,t,2)}function br(e,t){return J(e.getFullYear()%1e4,t,4)}function xr(e,t){var n=e.getDay();return e=n>=4||n===0?on(e):on.ceil(e),J(e.getFullYear()%1e4,t,4)}function Sr(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+J(t/60|0,`0`,2)+J(t%60,`0`,2)}function Cr(e,t){return J(e.getUTCDate(),t,2)}function wr(e,t){return J(e.getUTCHours(),t,2)}function Tr(e,t){return J(e.getUTCHours()%12||12,t,2)}function Er(e,t){return J(1+Qt.count(bn(e),e),t,3)}function Dr(e,t){return J(e.getUTCMilliseconds(),t,3)}function Or(e,t){return Dr(e,t)+`000`}function kr(e,t){return J(e.getUTCMonth()+1,t,2)}function Ar(e,t){return J(e.getUTCMinutes(),t,2)}function jr(e,t){return J(e.getUTCSeconds(),t,2)}function Mr(e){var t=e.getUTCDay();return t===0?7:t}function Nr(e,t){return J(un.count(bn(e)-1,e),t,2)}function Pr(e){var t=e.getUTCDay();return t>=4||t===0?mn(e):mn.ceil(e)}function Fr(e,t){return e=Pr(e),J(mn.count(bn(e),e)+(bn(e).getUTCDay()===4),t,2)}function Ir(e){return e.getUTCDay()}function Lr(e,t){return J(dn.count(bn(e)-1,e),t,2)}function Rr(e,t){return J(e.getUTCFullYear()%100,t,2)}function zr(e,t){return e=Pr(e),J(e.getUTCFullYear()%100,t,2)}function Br(e,t){return J(e.getUTCFullYear()%1e4,t,4)}function Vr(e,t){var n=e.getUTCDay();return e=n>=4||n===0?mn(e):mn.ceil(e),J(e.getUTCFullYear()%1e4,t,4)}function Hr(){return`+0000`}function Ur(){return`%`}function Wr(e){return+e}function Gr(e){return Math.floor(e/1e3)}var Kr,qr;Jr({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 Jr(e){return Kr=kn(e),qr=Kr.format,Kr.parse,Kr.utcFormat,Kr.utcParse,Kr}function Yr(e){return new Date(e)}function Xr(e){return e instanceof Date?+e:+new Date(+e)}function Zr(e,t,n,r,i,a,o,s,c,l){var u=ot(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Xr)):f().map(Yr)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Pt(n,e)):u},u.copy=function(){return it(u,Zr(e,t,n,r,i,a,o,s,c,l))},u}function Qr(){return A.apply(Zr(wn,Tn,yn,_n,tn,Zt,Yt,qt,Kt,qr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var $r=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}};function ei(e){return function(){return e}}var ti=Math.PI,ni=2*ti,ri=1e-6,ii=ni-ri;function ai(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function oi(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return ai;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var si=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?ai:oi(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>ri){if(!(Math.abs(u*s-c*l)>ri)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((ti-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>ri&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>ri||Math.abs(this._y1-l)>ri)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%ni+ni),d>ii?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>ri&&this._append`A${n},${n},0,${+(d>=ti)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};si.prototype;function ci(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new si(t)}Array.prototype.slice;function li(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ui(e){this._context=e}ui.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)}}};function di(e){return new ui(e)}function fi(e){return e[0]}function pi(e){return e[1]}function mi(e,t){var n=ei(!0),r=null,i=di,a=null,o=ci(s);e=typeof e==`function`?e:e===void 0?fi:ei(e),t=typeof t==`function`?t:t===void 0?pi:ei(t);function s(s){var c,l=(s=li(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:ei(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:ei(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:ei(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function hi(e,t,n){var r=null,i=ei(!0),a=null,o=di,s=null,c=ci(l);e=typeof e==`function`?e:e===void 0?fi:ei(+e),t=typeof t==`function`?t:ei(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?pi:ei(+n);function l(l){var u,d,f,p=(l=li(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return mi().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:ei(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:ei(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:ei(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:ei(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:ei(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:ei(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:ei(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function gi(e,t){this._context=e,this._t=t}gi.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)}}this._x=e,this._y=t}};function _i(e){return new gi(e,1)}function vi(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function yi(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function bi(e,t){return e[t]}function xi(e){let t=[];return t.key=e,t}function Si(){var e=ei([]),t=yi,n=vi,r=bi;function i(i){var a=Array.from(e.apply(this,arguments),xi),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=li(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:ei(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:ei(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?yi:typeof e==`function`?e:ei(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??vi,i):n},i}var Ci=(e,t)=>t.reduce((t,{key:n})=>t+(e.values[n]??0),0),wi=(e,t)=>e.map(e=>Ci(e,t)),Ti=(e,t)=>Number.isFinite(e.timestamp)&&t.every(({key:t})=>Number.isFinite(e.values[t]??0)),Ei=(e,t,n)=>{let r=e.filter(e=>Ti(e,n));return r.length!==e.length&&$r()&&console.warn(`react-charts: CampaignTimeline dropped ${e.length-r.length} burndown point(s) with a non-finite timestamp or value.`),r.filter(e=>e.timestamp<=t).sort((e,t)=>e.timestamp-t.timestamp)},Di=(e,t,n,r)=>{let i=e.filter(e=>Ti(e,t));if(i.length===0)return{linePath:``,bands:[]};let a=Si().keys(t.map(({key:e})=>e)).value((e,t)=>e.values[t]??0)(i),o=hi().curve(_i).x(e=>n(e.data.timestamp)).y0(e=>r(e[0])).y1(e=>r(e[1])),s=mi().curve(_i).x((e,t)=>n(i[t]?.timestamp??0)).y(e=>r(e)),c=a.map((e,n)=>{let r=t[n];return{key:r?.key??``,color:r?.color??`currentColor`,d:o(e)??``}});return{linePath:s(wi(i,t))??``,bands:c}},Oi,ki=()=>{if(Oi!==void 0)return Oi;try{Oi=document.createElement(`canvas`).getContext(`2d`)}catch{Oi=null}return Oi},Ai=.58,ji=(e,t)=>e.length*t*Ai,Mi=new Map,Ni=1e3;typeof document<`u`&&document.fonts?.ready&&document.fonts.ready.then(()=>Mi.clear()).catch(()=>void 0);var Pi=(e,t,n,r=600)=>{if(e.length===0)return 0;let i=`${r} ${t}px ${n}`,a=`${i}|${e}`,o=Mi.get(a);if(o!==void 0)return o;let s=ki(),c;if(s){s.font=i;let n=s.measureText(e).width;c=n>0?n:ji(e,t)}else c=ji(e,t);return Mi.size>=Ni&&Mi.clear(),Mi.set(a,c),c},Fi=14,Ii=10,Li=5,Ri=16,zi=(0,d.memo)(({points:e,series:t,total:n,height:r,plotWidth:i,scaleX:a,now:o,colors:s,formatValue:c,totalLabel:l,remainingLabel:u,fontFamily:d})=>{let p=Ei(e,o,t),m=wi(p,t);$r()&&(!Number.isFinite(n)||n<=0)&&console.warn(`react-charts: CampaignTimeline burndown.total should be a positive number (got ${n}); falling back to the largest observed value.`);let h=Math.max(1,...m),g=Number.isFinite(n)&&n>0?Math.max(n,h):h,_=Nt().domain([0,g]).range([r,Fi]),v=_(g),y=(0,f.jsx)(`line`,{x1:0,y1:v,x2:i,y2:v,stroke:s.grid,strokeWidth:1,strokeDasharray:`3 3`});if(p.length===0)return(0,f.jsx)(`g`,{className:`campaign-burndown`,children:y});let{linePath:b,bands:x}=Di(p,t,a,_),S=p[p.length-1],C=m[m.length-1]??0,w=S?a(S.timestamp):0,T=_(C),E=`${c(C)} ${u}`,D=Pi(E,Ii,d,600)+10,O=Math.max(0,Math.min(w-D-4,i-D)),k=Math.max(0,Math.min(T-Ri-3,r-Ri));return(0,f.jsxs)(`g`,{className:`campaign-burndown`,children:[y,x.map(e=>(0,f.jsx)(`path`,{d:e.d,fill:e.color,fillOpacity:.22,stroke:`none`},e.key)),(0,f.jsx)(`path`,{d:b,fill:`none`,stroke:s.accent,strokeWidth:1.75,strokeLinejoin:`miter`}),(0,f.jsx)(`text`,{x:2,y:v-4,fill:s.muted,fontSize:Ii,fontFamily:d,style:{fontVariantNumeric:`tabular-nums`},children:`${l} — ${c(n)}`}),(0,f.jsxs)(`g`,{transform:`translate(${O}, ${k})`,children:[(0,f.jsx)(`rect`,{width:D,height:Ri,rx:4,fill:s.surface,fillOpacity:.92}),(0,f.jsx)(`text`,{x:Li,y:Ri/2,dominantBaseline:`central`,fill:s.accent,fontSize:Ii,fontWeight:600,fontFamily:d,style:{fontVariantNumeric:`tabular-nums`},children:E})]})]})});function Bi(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Vi(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Hi(e,t=0,n=1){return process.env.NODE_ENV!==`production`&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Vi(e,t,n)}function Ui(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),process.env.NODE_ENV!==`production`&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function Wi(e){if(e.type)return e;if(e.charAt(0)===`#`)return Wi(Ui(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(process.env.NODE_ENV===`production`?Bi(9,e):`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`);let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(process.env.NODE_ENV===`production`?Bi(10,i):`MUI: unsupported \`${i}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`)}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}function Gi(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function Ki(e){e=Wi(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),Gi({type:s,values:c})}function qi(e){e=Wi(e);let t=e.type===`hsl`||e.type===`hsla`?Wi(Ki(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ji(e,t){let n=qi(e),r=qi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Yi(e,t){if(e=Wi(e),t=Hi(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Gi(e)}function Xi(e,t){if(e=Wi(e),t=Hi(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Gi(e)}var Zi=4.5,Qi=.12,$i=.96,ea=new Set,ta=(e,t)=>{!$r()||ea.has(e)||(ea.add(e),console.warn(`react-charts: cannot contrast-correct "${e}" (${t}). It is painted as given and may be illegible. MUI parses #nnn, #nnnnnn, rgb()/rgba() and hsl()/hsla() with COMMA separators only.`))},na=(e,t,n)=>{let r;try{r=Ji(e,t)}catch{return ta(e,`unsupported color format`),e}if(!Number.isFinite(r))return ta(e,`parsed to NaN - use comma-separated rgb()/hsl()`),e;if(r>=Zi)return e;let i=e,a=r;for(let r=Qi;r<=$i;r+=Qi){let o=n?Xi(e,r):Yi(e,r),s=Ji(o,t);if(s>=Zi)return o;s>a&&(i=o,a=s)}return ta(e,`best achievable contrast ${a.toFixed(2)}:1 against ${t} is below ${Zi}:1`),i},ra=(e,t=8)=>{let n=[],r=Array(e.length).fill(0),i=e.map((e,t)=>t).sort((t,n)=>{let r=e[t],i=e[n];return!r||!i?0:r.x0-i.x0||r.x1-i.x1});for(let a of i){let i=e[a];if(!i)continue;let o=n.findIndex(e=>e+t<=i.x0);if(o===-1){r[a]=n.length,n.push(i.x1);continue}r[a]=o,n[o]=i.x1}return{rows:r,rowCount:n.length}},ia=2.5,aa=9,oa=16,sa=12,ca=24,la=6,ua=6,da=e=>e.end===null||e.end===void 0,fa=({events:e,xScale:t,plotWidth:n,fontFamily:r,runningLabel:i,gap:a=8})=>{let o=e.map(e=>{let a=da(e)?`${e.name} · ${i}`:e.name,o=Pi(a,11,r,600),s=t(e.start),c=Math.max(ca,oa+o+sa),l=s+ia+c>n,u=l?Math.max(0,Math.min(ca,n-s-ia)):c,d=l?o+12:0,f=l?Math.max(0,Math.min(s-la-o-ua,n-d)):0,p=l?f+d-ua:s+oa,m=s+ia+u;return{event:e,poleX:s,width:u,label:a,labelOutside:l,labelX:p,chipX:f,chipWidth:d,x0:l?Math.min(f,s):s,x1:l?Math.max(m,f+d):m}}),{rows:s,rowCount:c}=ra(o.map(({x0:e,x1:t})=>({x0:e,x1:t})),a);return{flags:o.map((e,t)=>({...e,row:s[t]??0})),rowCount:c}},pa=(e,t,n,r)=>{let i=Math.min(aa,n);return[`M${e} ${t+r/2}`,`L${e+i} ${t}`,`L${e+n} ${t}`,`L${e+n} ${t+r}`,`L${e+i} ${t+r}`,`Z`].join(` `)},ma=(0,d.memo)(({flags:e,rowCount:t,laneHeight:n,plotWidth:r,defaultColor:i,selectedIds:a,colors:o,fontFamily:s,onEventClick:c,onEventHover:l})=>{let u=(0,d.useMemo)(()=>{let t=new Map;for(let n of e){let e=n.event.color??i;t.has(e)||t.set(e,na(e,o.surfaceValue,o.isDark))}return t},[e,i,o.surfaceValue,o.isDark]),p=a.size>0;return(0,f.jsxs)(`g`,{className:`campaign-lanes`,children:[Array.from({length:Math.max(0,t-1)},(e,t)=>(0,f.jsx)(`line`,{x1:0,y1:(t+1)*n,x2:r,y2:(t+1)*n,stroke:o.grid,strokeWidth:1,strokeDasharray:`3 3`},`divider-${t}`)),e.map(e=>{let{event:t}=e,r=t.color??i,d=u.get(r)??r,m=a.has(t.id),h=e.row*n,g=h+(n-20)/2,_=pa(e.poleX+ia,g,e.width,20);return(0,f.jsxs)(`g`,{"data-campaign-flag":t.id,style:{cursor:c?`pointer`:`default`},opacity:p&&!m?.32:1,onPointerDown:e=>e.stopPropagation(),onClick:()=>c?.(t),onMouseEnter:()=>l?.(t),onMouseLeave:()=>l?.(null),children:[m?(0,f.jsx)(`rect`,{x:e.poleX-4,y:g-2,width:e.width+8,height:24,fill:o.accent,fillOpacity:.2,stroke:o.accent,strokeWidth:1}):null,(0,f.jsx)(`path`,{d:_,fill:o.surface}),(0,f.jsx)(`path`,{d:_,fill:d,fillOpacity:.16}),(0,f.jsx)(`rect`,{x:e.poleX,y:h+1,width:ia,height:n-2,fill:d}),e.labelOutside?(0,f.jsx)(`rect`,{x:e.chipX,y:g+1,width:e.chipWidth,height:18,rx:5,fill:o.surface,stroke:d,strokeOpacity:.5,strokeWidth:1}):null,(0,f.jsx)(`text`,{x:e.labelX,y:g+10,textAnchor:e.labelOutside?`end`:`start`,dominantBaseline:`central`,fill:d,fontSize:11,fontWeight:600,fontFamily:s,style:{pointerEvents:`none`},children:e.label}),(0,f.jsx)(`rect`,{x:e.x0,y:h,width:e.x1-e.x0,height:n,fill:`none`,pointerEvents:`all`})]},t.id)})]})}),ha=10,ga=20,_a=({x:e,totalHeight:t,gripCenterY:n,label:r,color:i,contrastColor:a,fontFamily:o,plotWidth:s})=>{let c=Pi(r,ha,o,700)+18,l=Math.max(0,Math.min(e-c/2,s-c));return(0,f.jsxs)(`g`,{className:`campaign-playhead`,style:{pointerEvents:`none`},children:[(0,f.jsx)(`line`,{x1:e,y1:0,x2:e,y2:t,stroke:i,strokeWidth:2}),(0,f.jsxs)(`g`,{transform:`translate(${l}, ${n-ga/2})`,children:[(0,f.jsx)(`rect`,{width:c,height:ga,rx:ga/2,fill:i}),(0,f.jsx)(`text`,{x:c/2,y:ga/2,textAnchor:`middle`,dominantBaseline:`central`,fill:a,fontSize:ha,fontWeight:700,fontFamily:o,style:{fontVariantNumeric:`tabular-nums`},children:r})]})]})},va=36e5,ya=864e5,ba=e=>t=>{let n=new Date(t);return e>=ya?n.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):e>=va?n.toLocaleString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,hour12:!0}):n.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0})},xa=({events:e,burndown:t,time:n,defaultTime:r,onTimeChange:i,snapToEvents:a,now:o,horizonEnd:s,width:c,fontFamily:l,formatDate:u})=>{let f=(0,d.useRef)(null),[p,h]=(0,d.useState)(null),[g,_]=(0,d.useState)(!1),v=(0,d.useRef)(Date.now());(0,d.useEffect)(()=>{if(c!==void 0)return;let e=f.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let t=e[0];t&&h(t.contentRect.width)});return t.observe(e),()=>t.disconnect()},[c]);let y=c??(p!==null&&p>0?p:900),b=Math.max(1,y-10),[x,S]=(0,d.useMemo)(()=>{let n=1/0,r=-1/0,i=e=>{Number.isFinite(e)&&(e<n&&(n=e),e>r&&(r=e))};for(let t of e)i(t.start),da(t)||i(t.end);for(let e of t.points)i(e.timestamp);return o!==void 0&&i(o),s!==void 0&&i(s),n===1/0?[v.current-ya,v.current]:n===r?[n-va,r+va]:[n,r]},[e,t.points,o,s]),C=(0,d.useMemo)(()=>[x,S],[x,S]),w=(0,d.useMemo)(()=>Qr().domain([x,S]).range([0,b]),[x,S,b]),T=(0,d.useCallback)(e=>w(e),[w]),E=(0,d.useMemo)(()=>{let e=Math.max(2,Math.floor(b/90)),t=w.ticks(e),n=t[0],r=t[1],i=n&&r?r.getTime()-n.getTime():2**53-1,a=u??ba(i),o=[],s=-1/0,c=null;for(let e of t){let t=e.getTime(),n=a(t),r=Pi(n,m,l,600),i=w(t),u=i-r/2,d=u>=0&&i+r/2<=b&&u>=s+12&&n!==c;d&&(s=i+r/2,c=n),o.push({timestamp:t,x:i,label:n,showLabel:d})}return o},[w,b,u,l]),D=(0,d.useMemo)(()=>{let t=new Set;for(let n of e)t.add(n.start),da(n)||t.add(n.end);return[...t].sort((e,t)=>e-t)},[e]),[O,k]=(0,d.useState)(()=>r??S),A=n!==void 0,j=Math.min(S,Math.max(x,A?n:O)),M=(0,d.useCallback)(e=>{if(!a||D.length===0)return e;let t=8/b*(S-x),n=e,r=t;for(let i of D){if(i<e-t)continue;if(i>e+t)break;let a=Math.abs(i-e);a<=r&&(n=i,r=a)}return n},[a,D,x,S,b]),N=(0,d.useCallback)((e,t)=>{let n=Math.min(S,Math.max(x,e));A||k(n),i?.(n,t)},[x,S,A,i]),P=(0,d.useCallback)(e=>{let t=f.current;if(!t)return x;let n=t.getBoundingClientRect(),r=Math.min(b,Math.max(0,e-n.left));return M(w.invert(r).getTime())},[x,b,M,w]);return{containerRef:f,width:y,plotWidth:b,domain:C,placedTicks:E,scaleX:T,currentTime:j,isScrubbing:g,handlePointerDown:(0,d.useCallback)(e=>{e.button===0&&(_(!0),e.currentTarget.setPointerCapture(e.pointerId),N(P(e.clientX),`click`))},[N,P]),handlePointerMove:(0,d.useCallback)(e=>{g&&N(P(e.clientX),`drag`)},[N,g,P]),handlePointerUp:(0,d.useCallback)(e=>{g&&(_(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},[g]),handleKeyDown:(0,d.useCallback)(e=>{let{key:t}=e;if(t===`Home`){e.preventDefault(),N(x,`keyboard`);return}if(t===`End`){e.preventDefault(),N(S,`keyboard`);return}if(t!==`ArrowLeft`&&t!==`ArrowRight`)return;e.preventDefault();let n=t===`ArrowRight`,r;if(n)r=D.find(e=>e>j+1);else for(let e=D.length-1;e>=0;e--){let t=D[e];if(t!==void 0&&t<j-1){r=t;break}}N(r??(n?S:x),`keyboard`)},[N,j,x,S,D])}},Sa=e=>new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,hour12:!0}),Ca=e=>e.toLocaleString(`en-US`),wa=({events:e,burndown:t,time:n,defaultTime:r,onTimeChange:i,snapToEvents:a=!0,now:o,horizonEnd:s,selectedEventIds:c,onEventClick:l,onEventHover:p,width:m,burndownHeight:g=132,axisHeight:_=26,laneHeight:v=26,formatDate:y,formatPlayheadLabel:b=Sa,formatValue:x=Ca,totalLabel:S=`total`,remainingLabel:C=`in flight`,runningLabel:w=`running`,hatchLabel:T,defaultEventColor:E,playheadAriaLabel:D=`Timeline position`})=>{let O=(0,u.useTheme)(),k=(0,d.useId)(),A=O.typography.fontFamily??`system-ui, sans-serif`,{containerRef:j,width:M,plotWidth:N,domain:P,placedTicks:F,scaleX:I,currentTime:L,isScrubbing:R,handlePointerDown:z,handlePointerMove:B,handlePointerUp:V,handleKeyDown:H}=xa({events:e,burndown:t,time:n,defaultTime:r,onTimeChange:i,snapToEvents:a,now:o,horizonEnd:s,width:m,fontFamily:A,formatDate:y}),U=(0,d.useMemo)(()=>({surface:`var(--rc-campaign-surface, ${O.palette.background.paper})`,surfaceValue:O.palette.background.paper,isDark:O.palette.mode===`dark`,track:`var(--rc-campaign-track, ${O.palette.action.hover})`,border:`var(--rc-campaign-border, ${O.palette.divider})`,grid:`var(--rc-campaign-grid, ${O.palette.divider})`,muted:`var(--rc-campaign-muted, ${O.palette.text.secondary})`,text:`var(--rc-campaign-text, ${O.palette.text.primary})`,accent:`var(--rc-campaign-accent, ${O.palette.primary.main})`,accentContrast:`var(--rc-campaign-accent-contrast, ${O.palette.primary.contrastText})`}),[O]),ee=E??O.palette.primary.main,te=o??P[1],{flags:ne,rowCount:re}=(0,d.useMemo)(()=>fa({events:e,xScale:I,plotWidth:N,fontFamily:A,runningLabel:w}),[e,I,N,A,w]),W=Math.max(1,re)*v,ie=g,ae=g+_,G=g+_+W,oe=(0,d.useMemo)(()=>new Set(c??[]),[c]),se=I(L),ce=b(L),le=I(te),K=Math.max(0,N-le),ue=(0,d.useMemo)(()=>({position:`relative`,width:m??`100%`,touchAction:`none`,cursor:R?`grabbing`:`ew-resize`,userSelect:`none`,outline:`none`,"&:focus-visible":{boxShadow:`0 0 0 2px ${O.palette.primary.main}40`,borderRadius:1}}),[m,R,O.palette.primary.main]);return(0,f.jsx)(u.Box,{ref:j,role:`slider`,tabIndex:0,"aria-label":D,"aria-valuemin":P[0],"aria-valuemax":P[1],"aria-valuenow":L,"aria-valuetext":ce,onPointerDown:z,onPointerMove:B,onPointerUp:V,onPointerCancel:V,onKeyDown:H,sx:ue,children:(0,f.jsxs)(`svg`,{width:M,height:G,role:`presentation`,style:{display:`block`,overflow:`visible`},children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`pattern`,{id:k,width:7,height:7,patternUnits:`userSpaceOnUse`,patternTransform:`rotate(45)`,children:(0,f.jsx)(`line`,{x1:0,y1:0,x2:0,y2:7,stroke:U.muted,strokeWidth:1,strokeOpacity:.28})})}),F.map(e=>(0,f.jsx)(`line`,{x1:e.x,y1:0,x2:e.x,y2:G,stroke:U.grid,strokeWidth:1,strokeOpacity:e.showLabel?.5:.22},`grid-${e.timestamp}`)),K>0?(0,f.jsxs)(`g`,{className:`campaign-hatch`,children:[(0,f.jsx)(`rect`,{x:le,y:0,width:K,height:G,fill:`url(#${k})`}),(0,f.jsx)(`line`,{x1:le,y1:0,x2:le,y2:G,stroke:U.border,strokeWidth:1}),T&&K>90?(0,f.jsx)(`text`,{x:le+K/2,y:g/2,textAnchor:`middle`,dominantBaseline:`central`,fill:U.muted,fontSize:11,fontWeight:600,fontFamily:A,children:T}):null]}):null,(0,f.jsx)(zi,{points:t.points,series:t.series,total:t.total,height:g,plotWidth:N,scaleX:I,now:te,colors:U,formatValue:x,totalLabel:S,remainingLabel:C,fontFamily:A}),(0,f.jsx)(`g`,{transform:`translate(0, ${ie})`,children:(0,f.jsx)(h,{ticks:F,plotWidth:N,height:_,colors:U,fontFamily:A})}),(0,f.jsx)(`g`,{transform:`translate(0, ${ae})`,children:(0,f.jsx)(ma,{flags:ne,rowCount:re,laneHeight:v,plotWidth:N,defaultColor:ee,selectedIds:oe,colors:U,fontFamily:A,...l?{onEventClick:l}:{},...p?{onEventHover:p}:{}})}),(0,f.jsx)(_a,{x:se,totalHeight:G,gripCenterY:ie+_/2,label:ce,color:U.accent,contrastColor:U.accentContrast,fontFamily:A,plotWidth:N})]})})},Ta={neoGrey:{200:`#EDEFEF`,400:`#ADB5BD`},neoDigitalGreen:{600:`#40c048`}},Ea=[`#30F284`,`#FFD34D`,`#FFA83D`,`#FF8F52`,`#FF6F61`],Da={"#30F284":`#1D5937`,"#FFD34D":`#806A00`,"#FFA83D":`#935B00`,"#FF8F52":`#A34E14`,"#FF6F61":`#A63325`,"#DEDBD0":`#82806F`},Oa=e=>{let t=e.replace(`#`,``);return t.length===3?t.split(``).map(e=>e+e).join(``):t},ka=(e,t)=>{let n=Oa(e),r=Number.parseInt(n,16);if(Number.isNaN(r))return e;let i=1-t,a=e=>Math.max(0,Math.min(255,Math.round((r>>e&255)*i))).toString(16).padStart(2,`0`);return`#${a(16)}${a(8)}${a(0)}`},Aa=e=>Da[e.toUpperCase()]??ka(e,.28),ja={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.5,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:`#f8f8f8`,emptySeatsBorder:`#d8d8d8`,seatBorder:`#fff`},seatBorderDarken:.28,animation:{transitionDuration:`0.2s`,hoverOpacity:{active:`1`,dimmed:`0.2`,empty:`0.3`}},scaling:{enableScaling:!0,scaleThreshold:200}},Ma={COMPLETED:Ta.neoDigitalGreen[600],NOT_APPLICABLE:`#DEDBD0`,NO_LST:`#A63325`,DATA_MISSING:`#FFD34D`},Na=`rgba(166, 51, 37, 0.12)`,Pa=`rgba(166, 51, 37, 0.9)`,Fa=new Set([Ma.NO_LST]),Ia=.3,La=.24,Ra={dash:.48,gap:.38};function za(e,t,n){let r=n?.paletteMode??`light`,i=n?.label==null?Fa.has(e):n.label===Va,a=r===`dark`&&i,o=a?Na:e,s=a?Pa:r===`dark`?o:Aa(e);if(t==null)return{fill:o,stroke:s,dashed:a};let c=e.startsWith(`#`);return{fill:o,stroke:s,dashed:a,strokeWidth:a?Math.max(.5,t*La):c?Math.max(.5,t*Ia):.5,dashArray:a?`${(t*Ra.dash).toFixed(2)} ${(t*Ra.gap).toFixed(2)}`:void 0}}var Ba=`N/A`,Va=`No LST`,Ha=`Data Missing`;function Ua(e){return e}var Wa=1,Ga=2,Ka=3,qa=4,Ja=1e-6;function Ya(e){return`translate(`+e+`,0)`}function Xa(e){return`translate(0,`+e+`)`}function Za(e){return t=>+e(t)}function Qa(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function $a(){return!this.__axis}function eo(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===Wa||e===qa?-1:1,u=e===qa||e===Ga?`x`:`y`,d=e===Wa||e===Ka?Ya:Xa;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):Ua),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?Qa:Za)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===Wa?`0em`:e===Ka?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,Ja).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,Ja).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===qa||e===Ga?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter($a).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===Ga?`start`:e===qa?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function to(e){return eo(Ka,e)}function no(e){return eo(qa,e)}var ro={value:()=>{}};function io(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new ao(n)}function ao(e){this._=e}function oo(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}ao.prototype=io.prototype={constructor:ao,on:function(e,t){var n=this._,r=oo(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=so(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=co(n[i],e.name,t);else if(t==null)for(i in n)n[i]=co(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 ao(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function so(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function co(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ro,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var lo={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function uo(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),lo.hasOwnProperty(t)?{space:lo[t],local:e}:e}function fo(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function po(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mo(e){var t=uo(e);return(t.local?po:fo)(t)}function ho(){}function go(e){return e==null?ho:function(){return this.querySelector(e)}}function _o(e){typeof e!=`function`&&(e=go(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new ac(r,this._parents)}function vo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yo(){return[]}function bo(e){return e==null?yo:function(){return this.querySelectorAll(e)}}function xo(e){return function(){return vo(e.apply(this,arguments))}}function So(e){e=typeof e==`function`?xo(e):bo(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new ac(r,i)}function Co(e){return function(){return this.matches(e)}}function wo(e){return function(t){return t.matches(e)}}var To=Array.prototype.find;function Eo(e){return function(){return To.call(this.children,e)}}function Do(){return this.firstElementChild}function Oo(e){return this.select(e==null?Do:Eo(typeof e==`function`?e:wo(e)))}var ko=Array.prototype.filter;function Ao(){return Array.from(this.children)}function jo(e){return function(){return ko.call(this.children,e)}}function Mo(e){return this.selectAll(e==null?Ao:jo(typeof e==`function`?e:wo(e)))}function No(e){typeof e!=`function`&&(e=Co(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ac(r,this._parents)}function Po(e){return Array(e.length)}function Fo(){return new ac(this._enter||this._groups.map(Po),this._parents)}function Io(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Io.prototype={constructor:Io,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}}function Ro(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Io(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function zo(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Io(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Bo(e){return e.__data__}function Vo(e,t){if(!arguments.length)return Array.from(this,Bo);var n=t?zo:Ro,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Lo(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Ho(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new ac(o,r),o._enter=s,o._exit=c,o}function Ho(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Uo(){return new ac(this._exit||this._groups.map(Po),this._parents)}function Wo(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Go(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new ac(s,this._parents)}function Ko(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function qo(e){e||=Jo;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new ac(i,this._parents).order()}function Jo(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Yo(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Xo(){return Array.from(this)}function Zo(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Qo(){let e=0;for(let t of this)++e;return e}function $o(){return!this.node()}function es(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function ts(e){return function(){this.removeAttribute(e)}}function ns(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rs(e,t){return function(){this.setAttribute(e,t)}}function is(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function as(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function os(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 ss(e,t){var n=uo(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?ns:ts:typeof t==`function`?n.local?os:as:n.local?is:rs)(n,t))}function cs(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ls(e){return function(){this.style.removeProperty(e)}}function us(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ds(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function fs(e,t,n){return arguments.length>1?this.each((t==null?ls:typeof t==`function`?ds:us)(e,t,n??``)):ps(this.node(),e)}function ps(e,t){return e.style.getPropertyValue(t)||cs(e).getComputedStyle(e,null).getPropertyValue(t)}function ms(e){return function(){delete this[e]}}function hs(e,t){return function(){this[e]=t}}function gs(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function _s(e,t){return arguments.length>1?this.each((t==null?ms:typeof t==`function`?gs:hs)(e,t)):this.node()[e]}function vs(e){return e.trim().split(/^|\s+/)}function ys(e){return e.classList||new bs(e)}function bs(e){this._node=e,this._names=vs(e.getAttribute(`class`)||``)}bs.prototype={add:function(e){this._names.indexOf(e)<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 xs(e,t){for(var n=ys(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Ss(e,t){for(var n=ys(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Cs(e){return function(){xs(this,e)}}function ws(e){return function(){Ss(this,e)}}function Ts(e,t){return function(){(t.apply(this,arguments)?xs:Ss)(this,e)}}function Es(e,t){var n=vs(e+``);if(arguments.length<2){for(var r=ys(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Ts:t?Cs:ws)(n,t))}function Ds(){this.textContent=``}function Os(e){return function(){this.textContent=e}}function ks(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function As(e){return arguments.length?this.each(e==null?Ds:(typeof e==`function`?ks:Os)(e)):this.node().textContent}function js(){this.innerHTML=``}function Ms(e){return function(){this.innerHTML=e}}function Ns(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Ps(e){return arguments.length?this.each(e==null?js:(typeof e==`function`?Ns:Ms)(e)):this.node().innerHTML}function Fs(){this.nextSibling&&this.parentNode.appendChild(this)}function Is(){return this.each(Fs)}function Ls(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Rs(){return this.each(Ls)}function zs(e){var t=typeof e==`function`?e:mo(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Bs(){return null}function Vs(e,t){var n=typeof e==`function`?e:mo(e),r=t==null?Bs:typeof t==`function`?t:go(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Hs(){var e=this.parentNode;e&&e.removeChild(this)}function Us(){return this.each(Hs)}function Ws(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gs(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ks(e){return this.select(e?Gs:Ws)}function qs(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Js(e){return function(t){e.call(this,t,this.__data__)}}function Ys(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Xs(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Zs(e,t,n){return function(){var r=this.__on,i,a=Js(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Qs(e,t,n){var r=Ys(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Zs:Xs,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function $s(e,t,n){var r=cs(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 ec(e,t){return function(){return $s(this,e,t)}}function tc(e,t){return function(){return $s(this,e,t.apply(this,arguments))}}function nc(e,t){return this.each((typeof t==`function`?tc:ec)(e,t))}function*rc(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var ic=[null];function ac(e,t){this._groups=e,this._parents=t}function oc(){return new ac([[document.documentElement]],ic)}function sc(){return this}ac.prototype=oc.prototype={constructor:ac,select:_o,selectAll:So,selectChild:Oo,selectChildren:Mo,filter:No,data:Vo,enter:Fo,exit:Uo,join:Wo,merge:Go,selection:sc,order:Ko,sort:qo,call:Yo,nodes:Xo,node:Zo,size:Qo,empty:$o,each:es,attr:ss,style:fs,property:_s,classed:Es,text:As,html:Ps,raise:Is,lower:Rs,append:zs,insert:Vs,remove:Us,clone:Ks,datum:qs,on:Qs,dispatch:nc,[Symbol.iterator]:rc};function Y(e){return typeof e==`string`?new ac([[document.querySelector(e)]],[document.documentElement]):new ac([[e]],ic)}function cc(e){let t;for(;t=e.sourceEvent;)e=t;return e}function lc(e,t){if(e=cc(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var uc={capture:!0,passive:!1};function dc(e){e.preventDefault(),e.stopImmediatePropagation()}function fc(e){var t=e.document.documentElement,n=Y(e).on(`dragstart.drag`,dc,uc);`onselectstart`in t?n.on(`selectstart.drag`,dc,uc):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function pc(e,t){var n=e.document.documentElement,r=Y(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,dc,uc),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var mc=0,hc=0,gc=0,_c=1e3,vc,yc,bc=0,xc=0,Sc=0,Cc=typeof performance==`object`&&performance.now?performance:Date,wc=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tc(){return xc||=(wc(Ec),Cc.now()+Sc)}function Ec(){xc=0}function Dc(){this._call=this._time=this._next=null}Dc.prototype=Oc.prototype={constructor:Dc,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Tc():+n)+(t==null?0:+t),!this._next&&yc!==this&&(yc?yc._next=this:vc=this,yc=this),this._call=e,this._time=n,Nc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nc())}};function Oc(e,t,n){var r=new Dc;return r.restart(e,t,n),r}function kc(){Tc(),++mc;for(var e=vc,t;e;)(t=xc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--mc}function Ac(){xc=(bc=Cc.now())+Sc,mc=hc=0;try{kc()}finally{mc=0,Mc(),xc=0}}function jc(){var e=Cc.now(),t=e-bc;t>_c&&(Sc-=t,bc=e)}function Mc(){for(var e,t=vc,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:vc=n);yc=e,Nc(r)}function Nc(e){mc||(hc&&=clearTimeout(hc),e-xc>24?(e<1/0&&(hc=setTimeout(Ac,e-Cc.now()-Sc)),gc&&=clearInterval(gc)):(gc||=(bc=Cc.now(),setInterval(jc,_c)),mc=1,wc(Ac)))}function Pc(e,t,n){var r=new Dc;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Fc=io(`start`,`end`,`cancel`,`interrupt`),Ic=[];function Lc(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Vc(e,n,{name:t,index:r,group:i,on:Fc,tween:Ic,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Rc(e,t){var n=Bc(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function zc(e,t){var n=Bc(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Bc(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Vc(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Oc(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Pc(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Pc(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Hc(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Uc(e){return this.each(function(){Hc(this,e)})}function Wc(e,t){var n,r;return function(){var i=zc(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Gc(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=zc(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Kc(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Bc(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Wc:Gc)(n,e,t))}function qc(e,t,n){var r=e._id;return e.each(function(){var e=zc(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Bc(e,r).value[t]}}function Jc(e,t){var n;return(typeof t==`number`?Me:t instanceof G?De:(n=G(t))?(t=n,De):Re)(e,t)}function Yc(e){return function(){this.removeAttribute(e)}}function Xc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zc(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Qc(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function $c(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function el(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function tl(e,t){var n=uo(e),r=n===`transform`?Ye:Jc;return this.attrTween(e,typeof t==`function`?(n.local?el:$c)(n,r,qc(this,`attr.`+e,t)):t==null?(n.local?Xc:Yc)(n):(n.local?Qc:Zc)(n,r,t))}function nl(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function rl(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function il(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&rl(e,i)),n}return i._value=t,i}function al(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&nl(e,i)),n}return i._value=t,i}function ol(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 Error();var r=uo(e);return this.tween(n,(r.local?il:al)(r,t))}function sl(e,t){return function(){Rc(this,e).delay=+t.apply(this,arguments)}}function cl(e,t){return t=+t,function(){Rc(this,e).delay=t}}function ll(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?sl:cl)(t,e)):Bc(this.node(),t).delay}function ul(e,t){return function(){zc(this,e).duration=+t.apply(this,arguments)}}function dl(e,t){return t=+t,function(){zc(this,e).duration=t}}function fl(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ul:dl)(t,e)):Bc(this.node(),t).duration}function pl(e,t){if(typeof t!=`function`)throw Error();return function(){zc(this,e).ease=t}}function ml(e){var t=this._id;return arguments.length?this.each(pl(t,e)):Bc(this.node(),t).ease}function hl(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();zc(this,e).ease=n}}function gl(e){if(typeof e!=`function`)throw Error();return this.each(hl(this._id,e))}function _l(e){typeof e!=`function`&&(e=Co(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Kl(r,this._parents,this._name,this._id)}function vl(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Kl(o,this._parents,this._name,this._id)}function yl(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function bl(e,t,n){var r,i,a=yl(t)?Rc:zc;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function xl(e,t){var n=this._id;return arguments.length<2?Bc(this.node(),n).on.on(e):this.each(bl(n,e,t))}function Sl(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Cl(){return this.on(`end.remove`,Sl(this._id))}function wl(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=go(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Lc(l[f],t,n,f,l,Bc(u,n)));return new Kl(a,this._parents,t,n)}function Tl(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=bo(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Bc(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Lc(p,t,n,h,f,m);a.push(f),o.push(u)}return new Kl(a,o,t,n)}var El=oc.prototype.constructor;function Dl(){return new El(this._groups,this._parents)}function Ol(e,t){var n,r,i;return function(){var a=ps(this,e),o=(this.style.removeProperty(e),ps(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function kl(e){return function(){this.style.removeProperty(e)}}function Al(e,t,n){var r,i=n+``,a;return function(){var o=ps(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function jl(e,t,n){var r,i,a;return function(){var o=ps(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),ps(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Ml(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=zc(this,e),l=c.on,u=c.value[a]==null?s||=kl(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Nl(e,t,n){var r=(e+=``)==`transform`?Je:Jc;return t==null?this.styleTween(e,Ol(e,r)).on(`end.style.`+e,kl(e)):typeof t==`function`?this.styleTween(e,jl(e,r,qc(this,`style.`+e,t))).each(Ml(this._id,e)):this.styleTween(e,Al(e,r,t),n).on(`end.style.`+e,null)}function Pl(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Fl(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Pl(e,a,n)),r}return a._value=t,a}function Il(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 Error();return this.tween(r,Fl(e,t,n??``))}function Ll(e){return function(){this.textContent=e}}function Rl(e){return function(){var t=e(this);this.textContent=t??``}}function zl(e){return this.tween(`text`,typeof e==`function`?Rl(qc(this,`text`,e)):Ll(e==null?``:e+``))}function Bl(e){return function(t){this.textContent=e.call(this,t)}}function Vl(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Bl(r)),t}return r._value=e,r}function Hl(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 Error();return this.tween(t,Vl(e))}function Ul(){for(var e=this._name,t=this._id,n=Jl(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Bc(c,t);Lc(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Kl(r,this._parents,e,n)}function Wl(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=zc(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Gl=0;function Kl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ql(e){return oc().transition(e)}function Jl(){return++Gl}var Yl=oc.prototype;Kl.prototype=ql.prototype={constructor:Kl,select:wl,selectAll:Tl,selectChild:Yl.selectChild,selectChildren:Yl.selectChildren,filter:_l,merge:vl,selection:Dl,transition:Ul,call:Yl.call,nodes:Yl.nodes,node:Yl.node,size:Yl.size,empty:Yl.empty,each:Yl.each,on:xl,attr:tl,attrTween:ol,style:Nl,styleTween:Il,text:zl,textTween:Hl,remove:Cl,tween:Kc,delay:ll,duration:fl,ease:ml,easeVarying:gl,end:Wl,[Symbol.iterator]:Yl[Symbol.iterator]};function Xl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Zl={time:null,delay:0,duration:250,ease:Xl};function Ql(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function $l(e){var t,n;e instanceof Kl?(t=e._id,e=e._name):(t=Jl(),(n=Zl).time=Tc(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Lc(c,e,t,l,o,n||Ql(c,t));return new Kl(r,this._parents,e,t)}oc.prototype.interrupt=Uc,oc.prototype.transition=$l;var eu=e=>()=>e;function tu(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function nu(e){e.stopImmediatePropagation()}function ru(e){e.preventDefault(),e.stopImmediatePropagation()}var iu={name:`drag`},au={name:`space`},ou={name:`handle`},su={name:`center`},{abs:cu,max:lu,min:uu}=Math;function du(e){return[+e[0],+e[1]]}function fu(e){return[du(e[0]),du(e[1])]}var pu={name:`x`,handles:[`w`,`e`].map(bu),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]]}},mu={name:`y`,handles:[`n`,`s`].map(bu),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]]}};[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(bu);var hu={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`},gu={e:`w`,w:`e`,nw:`ne`,ne:`nw`,se:`sw`,sw:`se`},_u={n:`s`,s:`n`,nw:`sw`,ne:`se`,se:`ne`,sw:`nw`},vu={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yu={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function bu(e){return{type:e}}function xu(e){return!e.ctrlKey&&!e.button}function Su(){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 Cu(){return navigator.maxTouchPoints||`ontouchstart`in this}function wu(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Tu(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function Eu(){return Du(pu)}function Du(e){var t=Su,n=xu,r=Cu,i=!0,a=io(`start`,`brush`,`end`),o=6,s;function c(t){var n=t.property(`__brush`,h).selectAll(`.overlay`).data([bu(`overlay`)]);n.enter().append(`rect`).attr(`class`,`overlay`).attr(`pointer-events`,`all`).attr(`cursor`,hu.overlay).merge(n).each(function(){var e=wu(this).extent;Y(this).attr(`x`,e[0][0]).attr(`y`,e[0][1]).attr(`width`,e[1][0]-e[0][0]).attr(`height`,e[1][1]-e[0][1])}),t.selectAll(`.selection`).data([bu(`selection`)]).enter().append(`rect`).attr(`class`,`selection`).attr(`cursor`,hu.selection).attr(`fill`,`#777`).attr(`fill-opacity`,.3).attr(`stroke`,`#fff`).attr(`shape-rendering`,`crispEdges`);var i=t.selectAll(`.handle`).data(e.handles,function(e){return e.type});i.exit().remove(),i.enter().append(`rect`).attr(`class`,function(e){return`handle handle--`+e.type}).attr(`cursor`,function(e){return hu[e.type]}),t.each(l).attr(`fill`,`none`).attr(`pointer-events`,`all`).on(`mousedown.brush`,f).filter(r).on(`touchstart.brush`,f).on(`touchmove.brush`,p).on(`touchend.brush touchcancel.brush`,m).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}c.move=function(t,n,r){t.tween?t.on(`start.brush`,function(e){u(this,arguments).beforestart().start(e)}).on(`interrupt.brush end.brush`,function(e){u(this,arguments).end(e)}).tween(`brush`,function(){var t=this,r=t.__brush,i=u(t,arguments),a=r.selection,o=e.input(typeof n==`function`?n.apply(this,arguments):n,r.extent),s=ze(a,o);function c(e){r.selection=e===1&&o===null?null:s(e),l.call(t),i.brush()}return a!==null&&o!==null?c:c(1)}):t.each(function(){var t=this,i=arguments,a=t.__brush,o=e.input(typeof n==`function`?n.apply(t,i):n,a.extent),s=u(t,i).beforestart();Hc(t),a.selection=o===null?null:o,l.call(t),s.start(r).brush(r).end(r)})},c.clear=function(e,t){c.move(e,null,t)};function l(){var e=Y(this),t=wu(this).selection;t?(e.selectAll(`.selection`).style(`display`,null).attr(`x`,t[0][0]).attr(`y`,t[0][1]).attr(`width`,t[1][0]-t[0][0]).attr(`height`,t[1][1]-t[0][1]),e.selectAll(`.handle`).style(`display`,null).attr(`x`,function(e){return e.type[e.type.length-1]===`e`?t[1][0]-o/2:t[0][0]-o/2}).attr(`y`,function(e){return e.type[0]===`s`?t[1][1]-o/2:t[0][1]-o/2}).attr(`width`,function(e){return e.type===`n`||e.type===`s`?t[1][0]-t[0][0]+o:o}).attr(`height`,function(e){return e.type===`e`||e.type===`w`?t[1][1]-t[0][1]+o:o})):e.selectAll(`.selection,.handle`).style(`display`,`none`).attr(`x`,null).attr(`y`,null).attr(`width`,null).attr(`height`,null)}function u(e,t,n){var r=e.__brush.emitter;return r&&(!n||!r.clean)?r:new d(e,t,n)}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit(`start`,e,t)):this.emit(`brush`,e),this},brush:function(e,t){return this.emit(`brush`,e,t),this},end:function(e,t){return--this.active===0&&(delete this.state.emitter,this.emit(`end`,e,t)),this},emit:function(t,n,r){var i=Y(this.that).datum();a.call(t,this.that,new tu(t,{sourceEvent:n,target:c,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}};function f(t){if(s&&!t.touches||!n.apply(this,arguments))return;var r=this,a=t.target.__data__.type,o=(i&&t.metaKey?a=`overlay`:a)===`selection`?iu:i&&t.altKey?su:ou,c=e===mu?null:vu[a],d=e===pu?null:yu[a],f=wu(r),p=f.extent,m=f.selection,h=p[0][0],g,_,v=p[0][1],y,b,x=p[1][0],S,C,w=p[1][1],T,E,D=0,O=0,k,A=c&&d&&i&&t.shiftKey,j,M,N=Array.from(t.touches||[t],e=>{let t=e.identifier;return e=lc(e,r),e.point0=e.slice(),e.identifier=t,e});Hc(r);var P=u(r,arguments,!0).beforestart();if(a===`overlay`){m&&(k=!0);let n=[N[0],N[1]||N[0]];f.selection=m=[[g=e===mu?h:uu(n[0][0],n[1][0]),y=e===pu?v:uu(n[0][1],n[1][1])],[S=e===mu?x:lu(n[0][0],n[1][0]),T=e===pu?w:lu(n[0][1],n[1][1])]],N.length>1&&z(t)}else g=m[0][0],y=m[0][1],S=m[1][0],T=m[1][1];_=g,b=y,C=S,E=T;var F=Y(r).attr(`pointer-events`,`none`),I=F.selectAll(`.overlay`).attr(`cursor`,hu[a]);if(t.touches)P.moved=R,P.ended=B;else{var L=Y(t.view).on(`mousemove.brush`,R,!0).on(`mouseup.brush`,B,!0);i&&L.on(`keydown.brush`,V,!0).on(`keyup.brush`,H,!0),fc(t.view)}l.call(r),P.start(t,o.name);function R(e){for(let t of e.changedTouches||[e])for(let e of N)e.identifier===t.identifier&&(e.cur=lc(t,r));if(A&&!j&&!M&&N.length===1){let e=N[0];cu(e.cur[0]-e[0])>cu(e.cur[1]-e[1])?M=!0:j=!0}for(let e of N)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);k=!0,ru(e),z(e)}function z(e){let t=N[0],n=t.point0;var i;switch(D=t[0]-n[0],O=t[1]-n[1],o){case au:case iu:c&&(D=lu(h-g,uu(x-S,D)),_=g+D,C=S+D),d&&(O=lu(v-y,uu(w-T,O)),b=y+O,E=T+O);break;case ou:N[1]?(c&&=(_=lu(h,uu(x,N[0][0])),C=lu(h,uu(x,N[1][0])),1),d&&=(b=lu(v,uu(w,N[0][1])),E=lu(v,uu(w,N[1][1])),1)):(c<0?(D=lu(h-g,uu(x-g,D)),_=g+D,C=S):c>0&&(D=lu(h-S,uu(x-S,D)),_=g,C=S+D),d<0?(O=lu(v-y,uu(w-y,O)),b=y+O,E=T):d>0&&(O=lu(v-T,uu(w-T,O)),b=y,E=T+O));break;case su:c&&(_=lu(h,uu(x,g-D*c)),C=lu(h,uu(x,S+D*c))),d&&(b=lu(v,uu(w,y-O*d)),E=lu(v,uu(w,T+O*d)))}C<_&&(c*=-1,i=g,g=S,S=i,i=_,_=C,C=i,a in gu&&I.attr(`cursor`,hu[a=gu[a]])),E<b&&(d*=-1,i=y,y=T,T=i,i=b,b=E,E=i,a in _u&&I.attr(`cursor`,hu[a=_u[a]])),f.selection&&(m=f.selection),j&&(_=m[0][0],C=m[1][0]),M&&(b=m[0][1],E=m[1][1]),(m[0][0]!==_||m[0][1]!==b||m[1][0]!==C||m[1][1]!==E)&&(f.selection=[[_,b],[C,E]],l.call(r),P.brush(e,o.name))}function B(e){if(nu(e),e.touches){if(e.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else pc(e.view,k),L.on(`keydown.brush keyup.brush mousemove.brush mouseup.brush`,null);F.attr(`pointer-events`,`all`),I.attr(`cursor`,hu.overlay),f.selection&&(m=f.selection),Tu(m)&&(f.selection=null,l.call(r)),P.end(e,o.name)}function V(e){switch(e.keyCode){case 16:A=c&&d;break;case 18:o===ou&&(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=su,z(e));break;case 32:(o===ou||o===su)&&(c<0?S=C-D:c>0&&(g=_-D),d<0?T=E-O:d>0&&(y=b-O),o=au,I.attr(`cursor`,hu.selection),z(e));break;default:return}ru(e)}function H(e){switch(e.keyCode){case 16:A&&(j=M=A=!1,z(e));break;case 18:o===su&&(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=ou,z(e));break;case 32:o===au&&(e.altKey?(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=su):(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=ou),I.attr(`cursor`,hu[a]),z(e));break;default:return}ru(e)}}function p(e){u(this,arguments).moved(e)}function m(e){u(this,arguments).ended(e)}function h(){var n=this.__brush||{selection:null};return n.extent=fu(t.apply(this,arguments)),n.dim=e,n}return c.extent=function(e){return arguments.length?(t=typeof e==`function`?e:eu(fu(e)),c):t},c.filter=function(e){return arguments.length?(n=typeof e==`function`?e:eu(!!e),c):n},c.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:eu(!!e),c):r},c.handleSize=function(e){return arguments.length?(o=+e,c):o},c.keyModifiers=function(e){return arguments.length?(i=!!e,c):i},c.on=function(){var e=a.on.apply(a,arguments);return e===a?c:e},c}function Ou(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ku(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Au={autoSleep:120,force3D:`auto`,nullTargetWarn:1,units:{lineHeight:``}},ju={duration:.5,overwrite:!1,delay:0},Mu,Nu,Pu,Fu=1e8,X=1/Fu,Iu=Math.PI*2,Lu=Iu/4,Ru=0,zu=Math.sqrt,Bu=Math.cos,Vu=Math.sin,Hu=function(e){return typeof e==`string`},Uu=function(e){return typeof e==`function`},Wu=function(e){return typeof e==`number`},Gu=function(e){return e===void 0},Ku=function(e){return typeof e==`object`},qu=function(e){return e!==!1},Ju=function(){return typeof window<`u`},Yu=function(e){return Uu(e)||Hu(e)},Xu=typeof ArrayBuffer==`function`&&ArrayBuffer.isView||function(){},Zu=Array.isArray,Qu=/random\([^)]+\)/g,$u=/,\s*/g,ed=/(?:-?\.?\d|\.)+/gi,td=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nd=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,rd=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,id=/[+-]=-?[.\d]+/,ad=/[^,'"\[\]\s]+/gi,od=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,sd,cd,ld,ud,dd={},fd={},pd,md=function(e){return(fd=Kd(e,dd))&&dm},hd=function(e,t){return console.warn(`Invalid property`,e,`set to`,t,`Missing plugin? gsap.registerPlugin()`)},gd=function(e,t){return!t&&console.warn(e)},_d=function(e,t){return e&&(dd[e]=t)&&fd&&(fd[e]=t)||dd},vd=function(){return 0},yd={suppressEvents:!0,isStart:!0,kill:!1},bd={suppressEvents:!0,kill:!1},xd={suppressEvents:!0},Sd={},Cd=[],wd={},Td,Ed={},Dd={},Od=30,kd=[],Ad=``,jd=function(e){var t=e[0],n,r;if(Ku(t)||Uu(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=kd.length;r--&&!kd[r].targetTest(t););n=kd[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new xp(e[r],n)))||e.splice(r,1);return e},Md=function(e){return e._gsap||jd(Af(e))[0]._gsap},Nd=function(e,t,n){return(n=e[t])&&Uu(n)?e[t]():Gu(n)&&e.getAttribute&&e.getAttribute(t)||n},Pd=function(e,t){return(e=e.split(`,`)).forEach(t)||e},Fd=function(e){return Math.round(e*1e5)/1e5||0},Id=function(e){return Math.round(e*1e7)/1e7||0},Ld=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n===`+`?e+r:n===`-`?e-r:n===`*`?e*r:e/r},Rd=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},zd=function(){var e=Cd.length,t=Cd.slice(0),n,r;for(wd={},Cd.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},Bd=function(e){return!!(e._initted||e._startAt||e.add)},Vd=function(e,t,n,r){Cd.length&&!Nu&&zd(),e.render(t,n,r||!!(Nu&&t<0&&Bd(e))),Cd.length&&!Nu&&zd()},Hd=function(e){var t=parseFloat(e);return(t||t===0)&&(e+``).match(ad).length<2?t:Hu(e)?e.trim():e},Ud=function(e){return e},Wd=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Gd=function(e){return function(t,n){for(var r in n)r in t||r===`duration`&&e||r===`ease`||(t[r]=n[r])}},Kd=function(e,t){for(var n in t)e[n]=t[n];return e},qd=function e(t,n){for(var r in n)r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(t[r]=Ku(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},Jd=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},Yd=function(e){var t=e.parent||sd,n=e.keyframes?Gd(Zu(e.keyframes)):Wd;if(qu(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},Xd=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},Zd=function(e,t,n,r,i){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var a=e[r],o;if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},Qd=function(e,t,n,r){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},$d=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},ef=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},tf=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},nf=function(e,t,n,r){return e._startAt&&(Nu?e._startAt.revert(bd):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},rf=function e(t){return!t||t._ts&&e(t.parent)},af=function(e){return e._repeat?of(e._tTime,e=e.duration()+e._rDelay)*e:0},of=function(e,t){var n=Math.floor(e=Id(e/t));return e&&n===e?n-1:n},sf=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},cf=function(e){return e._end=Id(e._start+(e._tDur/Math.abs(e._ts||e._rts||X)||0))},lf=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=Id(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),cf(e),n._dirty||ef(n,e)),e},uf=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=sf(e.rawTime(),t),(!t._dur||wf(0,t.totalDuration(),n)-t._tTime>X)&&t.render(n,!0)),ef(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-X}},df=function(e,t,n,r){return t.parent&&$d(t),t._start=Id((Wu(n)?n:n||e!==sd?xf(e,n,t):e._time)+t._delay),t._end=Id(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Zd(e,t,`_first`,`_last`,e._sort?`_start`:0),hf(t)||(e._recent=t),r||uf(e,t),e._ts<0&&lf(e,e._tTime),e},ff=function(e,t){return(dd.ScrollTrigger||hd(`scrollTrigger`,t))&&dd.ScrollTrigger.create(t,e)},pf=function(e,t,n,r,i){if(Ap(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!Nu&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Td!==cp.frame)return Cd.push(e),e._lazy=[i,r],1},mf=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},hf=function(e){var t=e.data;return t===`isFromStart`||t===`isStart`},gf=function(e,t,n,r){var i=e.ratio,a=t<0||!t&&(!e._start&&mf(e)&&!(!e._initted&&hf(e))||(e._ts<0||e._dp._ts<0)&&!hf(e))?0:1,o=e._rDelay,s=0,c,l,u;if(o&&e._repeat&&(s=wf(0,e._tDur,t),l=of(s,o),e._yoyo&&l&1&&(a=1-a),l!==of(e._tTime,o)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||Nu||r||e._zTime===X||!t&&e._zTime){if(!e._initted&&pf(e,t,r,n,s))return;for(u=e._zTime,e._zTime=t||(n?X:0),n||=t&&!u,e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=s,c=e._pt;c;)c.r(a,c.d),c=c._next;t<0&&nf(e,t,n,!0),e._onUpdate&&!n&&qf(e,`onUpdate`),s&&e._repeat&&!n&&e.parent&&qf(e,`onRepeat`),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&$d(e,1),!n&&!Nu&&(qf(e,a?`onComplete`:`onReverseComplete`,!0),e._prom&&e._prom()))}else e._zTime||=t},_f=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data===`isPause`&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data===`isPause`&&r._start<t)return r;r=r._prev}},vf=function(e,t,n,r){var i=e._repeat,a=Id(t)||0,o=e._tTime/e._tDur;return o&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:Id(a*(i+1)+e._rDelay*i):a,o>0&&!r&&lf(e,e._tTime=e._tDur*o),e.parent&&cf(e),n||ef(e.parent,e),e},yf=function(e){return e instanceof Cp?ef(e):vf(e,e._dur)},bf={_start:0,endTime:vd,totalDuration:vd},xf=function e(t,n,r){var i=t.labels,a=t._recent||bf,o=t.duration()>=Fu?a.endTime(!1):t._dur,s,c,l;return Hu(n)&&(isNaN(n)||n in i)?(c=n.charAt(0),l=n.substr(-1)===`%`,s=n.indexOf(`=`),c===`<`||c===`>`?(s>=0&&(n=n.replace(/=/,``)),(c===`<`?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(l?(s<0?a:r).totalDuration()/100:1)):s<0?(n in i||(i[n]=o),i[n]):(c=parseFloat(n.charAt(s-1)+n.substr(s+1)),l&&r&&(c=c/100*(Zu(r)?r[0]:r).totalDuration()),s>1?e(t,n.substr(0,s-1),r)+c:o+c)):n==null?o:+n},Sf=function(e,t,n){var r=Wu(t[1]),i=(r?2:1)+(e<2?0:1),a=t[i],o,s;if(r&&(a.duration=t[1]),a.parent=n,e){for(o=a,s=n;s&&!(`immediateRender`in o);)o=s.vars.defaults||{},s=qu(s.vars.inherit)&&s.parent;a.immediateRender=qu(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[i-1]}return new Lp(t[0],a,t[i+1])},Cf=function(e,t){return e||e===0?t(e):t},wf=function(e,t,n){return n<e?e:n>t?t:n},Tf=function(e,t){return!Hu(e)||!(t=od.exec(e))?``:t[1]},Ef=function(e,t,n){return Cf(n,function(n){return wf(e,t,n)})},Df=[].slice,Of=function(e,t){return e&&Ku(e)&&`length`in e&&(!t&&!e.length||e.length-1 in e&&Ku(e[0]))&&!e.nodeType&&e!==cd},kf=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(e){var r;return Hu(e)&&!t||Of(e,1)?(r=n).push.apply(r,Af(e)):n.push(e)})||n},Af=function(e,t,n){return Pu&&!t&&Pu.selector?Pu.selector(e):Hu(e)&&!n&&(ld||!lp())?Df.call((t||ud).querySelectorAll(e),0):Zu(e)?kf(e,n):Of(e)?Df.call(e,0):e?[e]:[]},jf=function(e){return e=Af(e)[0]||gd(`Invalid scope`)||{},function(t){var n=e.current||e.nativeElement||e;return Af(t,n.querySelectorAll?n:n===e?gd(`Invalid scope`)||ud.createElement(`div`):e)}},Mf=function(e){return e.sort(function(){return .5-Math.random()})},Nf=function(e){if(Uu(e))return e;var t=Ku(e)?e:{each:e},n=gp(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,c=t.axis,l=r,u=r;return Hu(r)?l=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(l=r[0],u=r[1]),function(e,o,d){var f=(d||t).length,p=a[f],m,h,g,_,v,y,b,x,S;if(!p){if(S=t.grid===`auto`?0:(t.grid||[1,Fu])[1],!S){for(b=-Fu;b<(b=d[S++].getBoundingClientRect().left)&&S<f;);S<f&&S--}for(p=a[f]=[],m=s?Math.min(S,f)*l-.5:r%S,h=S===Fu?0:s?f*u/S-.5:r/S|0,b=0,x=Fu,y=0;y<f;y++)g=y%S-m,_=h-(y/S|0),p[y]=v=c?Math.abs(c===`y`?_:g):zu(g*g+_*_),v>b&&(b=v),v<x&&(x=v);r===`random`&&Mf(p),p.max=b-x,p.min=x,p.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(S>f?f-1:c?c===`y`?f/S:S:Math.max(S,f/S))||0)*(r===`edges`?-1:1),p.b=f<0?i-f:i,p.u=Tf(t.amount||t.each)||0,n=n&&f<0?hp(n):n}return f=(p[e]-p.min)/p.max||0,Id(p.b+(n?n(f):f)*p.v)+p.u}},Pf=function(e){var t=10**((e+``).split(`.`)[1]||``).length;return function(n){var r=Id(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(Wu(n)?0:Tf(n))}},Ff=function(e,t){var n=Zu(e),r,i;return!n&&Ku(e)&&(r=n=e.radius||Fu,e.values?(e=Af(e.values),(i=!Wu(e[0]))&&(r*=r)):e=Pf(e.increment)),Cf(t,n?Uu(e)?function(t){return i=e(t),Math.abs(i-t)<=r?i:t}:function(t){for(var n=parseFloat(i?t.x:t),a=parseFloat(i?t.y:0),o=Fu,s=0,c=e.length,l,u;c--;)i?(l=e[c].x-n,u=e[c].y-a,l=l*l+u*u):l=Math.abs(e[c]-n),l<o&&(o=l,s=c);return s=!r||o<=r?e[s]:t,i||s===t||Wu(t)?s:s+Tf(t)}:Pf(e))},If=function(e,t,n,r){return Cf(Zu(e)?!t:n===!0?!!(n=0):!r,function(){return Zu(e)?e[~~(Math.random()*e.length)]:(n||=1e-5)&&(r=n<1?10**((n+``).length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},Lf=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce(function(e,t){return t(e)},e)}},Rf=function(e,t){return function(n){return e(parseFloat(n))+(t||Tf(n))}},zf=function(e,t,n){return Wf(e,t,0,1,n)},Bf=function(e,t,n){return Cf(n,function(n){return e[~~t(n)]})},Vf=function e(t,n,r){var i=n-t;return Zu(t)?Bf(t,e(0,t.length),n):Cf(r,function(e){return(i+(e-t)%i)%i+t})},Hf=function e(t,n,r){var i=n-t,a=i*2;return Zu(t)?Bf(t,e(0,t.length-1),n):Cf(r,function(e){return e=(a+(e-t)%a)%a||0,t+(e>i?a-e:e)})},Uf=function(e){return e.replace(Qu,function(e){var t=e.indexOf(`[`)+1,n=e.substring(t||7,t?e.indexOf(`]`):e.length-1).split($u);return If(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)})},Wf=function(e,t,n,r,i){var a=t-e,o=r-n;return Cf(i,function(t){return n+((t-e)/a*o||0)})},Gf=function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o=Hu(t),s={},c,l,u,d,f;if(r===!0&&(i=1)&&(r=null),o)t={p:t},n={p:n};else if(Zu(t)&&!Zu(n)){for(u=[],d=t.length,f=d-2,l=1;l<d;l++)u.push(e(t[l-1],t[l]));d--,a=function(e){e*=d;var t=Math.min(f,~~e);return u[t](e-t)},r=n}else i||(t=Kd(Zu(t)?[]:{},t));if(!u){for(c in n)Tp.call(s,t,c,`get`,n[c]);a=function(e){return Kp(e,s)||(o?t.p:t)}}}return Cf(r,a)},Kf=function(e,t,n){var r=e.labels,i=Fu,a,o,s;for(a in r)o=r[a]-t,o<0==!!n&&o&&i>(o=Math.abs(o))&&(s=a,i=o);return s},qf=function(e,t,n){var r=e.vars,i=r[t],a=Pu,o=e._ctx,s,c,l;if(i)return s=r[t+`Params`],c=r.callbackScope||e,n&&Cd.length&&zd(),o&&(Pu=o),l=s?i.apply(c,s):i.call(c),Pu=a,l},Jf=function(e){return $d(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Nu),e.progress()<1&&qf(e,`onInterrupt`),e},Yf,Xf=[],Zf=function(e){if(e){if(e=!e.name&&e.default||e,Ju()||e.headless){var t=e.name,n=Uu(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:vd,render:Kp,add:Tp,kill:Jp,modifier:qp,rawVars:0},a={targetTest:0,get:0,getSetter:Hp,aliases:{},register:0};if(lp(),e!==r){if(Ed[t])return;Wd(r,Wd(Jd(e,i),a)),Kd(r.prototype,Kd(i,Jd(e,a))),Ed[r.prop=t]=r,e.targetTest&&(kd.push(r),Sd[t]=1),t=(t===`css`?`CSS`:t.charAt(0).toUpperCase()+t.substr(1))+`Plugin`}_d(t,r),e.register&&e.register(dm,r,Zp)}else Xf.push(e)}},Qf=255,$f={aqua:[0,Qf,Qf],lime:[0,Qf,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Qf],navy:[0,0,128],white:[Qf,Qf,Qf],olive:[128,128,0],yellow:[Qf,Qf,0],orange:[Qf,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Qf,0,0],pink:[Qf,192,203],cyan:[0,Qf,Qf],transparent:[Qf,Qf,Qf,0]},ep=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Qf+.5|0},tp=function(e,t,n){var r=e?Wu(e)?[e>>16,e>>8&Qf,e&Qf]:0:$f.black,i,a,o,s,c,l,u,d,f,p;if(!r){if(e.substr(-1)===`,`&&(e=e.substr(0,e.length-1)),$f[e])r=$f[e];else if(e.charAt(0)===`#`){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e=`#`+i+i+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):``)),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Qf,r&Qf,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Qf,e&Qf]}else if(e.substr(0,3)===`hsl`){if(r=p=e.match(ed),!t)s=r[0]%360/360,c=r[1]/100,l=r[2]/100,a=l<=.5?l*(c+1):l+c-l*c,i=l*2-a,r.length>3&&(r[3]*=1),r[0]=ep(s+1/3,i,a),r[1]=ep(s,i,a),r[2]=ep(s-1/3,i,a);else if(~e.indexOf(`=`))return r=e.match(td),n&&r.length<4&&(r[3]=1),r}else r=e.match(ed)||$f.transparent;r=r.map(Number)}return t&&!p&&(i=r[0]/Qf,a=r[1]/Qf,o=r[2]/Qf,u=Math.max(i,a,o),d=Math.min(i,a,o),l=(u+d)/2,u===d?s=c=0:(f=u-d,c=l>.5?f/(2-u-d):f/(u+d),s=u===i?(a-o)/f+(a<o?6:0):u===a?(o-i)/f+2:(i-a)/f+4,s*=60),r[0]=~~(s+.5),r[1]=~~(c*100+.5),r[2]=~~(l*100+.5)),n&&r.length<4&&(r[3]=1),r},np=function(e){var t=[],n=[],r=-1;return e.split(ip).forEach(function(e){var i=e.match(nd)||[];t.push.apply(t,i),n.push(r+=i.length+1)}),t.c=n,t},rp=function(e,t,n){var r=``,i=(e+r).match(ip),a=t?`hsla(`:`rgba(`,o=0,s,c,l,u;if(!i)return e;if(i=i.map(function(e){return(e=tp(e,t,1))&&a+(t?e[0]+`,`+e[1]+`%,`+e[2]+`%,`+e[3]:e.join(`,`))+`)`}),n&&(l=np(e),s=n.c,s.join(r)!==l.c.join(r)))for(c=e.replace(ip,`1`).split(nd),u=c.length-1;o<u;o++)r+=c[o]+(~s.indexOf(o)?i.shift()||a+`0,0,0,0)`:(l.length?l:i.length?i:n).shift());if(!c)for(c=e.split(ip),u=c.length-1;o<u;o++)r+=c[o]+i[o];return r+c[u]},ip=function(){var e=`(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b`,t;for(t in $f)e+=`|`+t+`\\b`;return RegExp(e+`)`,`gi`)}(),ap=/hsl[a]?\(/,op=function(e){var t=e.join(` `),n;if(ip.lastIndex=0,ip.test(t))return n=ap.test(t),e[1]=rp(e[1],n),e[0]=rp(e[0],n,np(e[1])),!0},sp,cp=function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,o=a,s=[],c,l,u,d,f,p,m=function u(m){var h=e()-i,g=m===!0,_,v,y,b;if((h>t||h<0)&&(r+=h-n),i+=h,y=i-r,_=y-o,(_>0||g)&&(b=++d.frame,f=y-d.time*1e3,d.time=y/=1e3,o+=_+(_>=a?4:a-_),v=1),g||(c=l(u)),v)for(p=0;p<s.length;p++)s[p](y,f,b,m)};return d={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(e){return f/(1e3/(e||60))},wake:function(){pd&&(!ld&&Ju()&&(cd=ld=window,ud=cd.document||{},dd.gsap=dm,(cd.gsapVersions||(cd.gsapVersions=[])).push(dm.version),md(fd||cd.GreenSockGlobals||!cd.gsap&&cd||{}),Xf.forEach(Zf)),u=typeof requestAnimationFrame<`u`&&requestAnimationFrame,c&&d.sleep(),l=u||function(e){return setTimeout(e,o-d.time*1e3+1|0)},sp=1,m(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(c),sp=0,l=vd},lagSmoothing:function(e,r){t=e||1/0,n=Math.min(r||33,t)},fps:function(e){a=1e3/(e||240),o=d.time*1e3+a},add:function(e,t,n){var r=t?function(t,n,i,a){e(t,n,i,a),d.remove(r)}:e;return d.remove(e),s[n?`unshift`:`push`](r),lp(),r},remove:function(e,t){~(t=s.indexOf(e))&&s.splice(t,1)&&p>=t&&p--},_listeners:s},d}(),lp=function(){return!sp&&cp.wake()},Z={},up=/^[\d.\-M][\d.\-,\s]/,dp=/["']/g,fp=function(e){for(var t={},n=e.substr(1,e.length-3).split(`:`),r=n[0],i=1,a=n.length,o,s,c;i<a;i++)s=n[i],o=i===a-1?s.length:s.lastIndexOf(`,`),c=s.substr(0,o),t[r]=isNaN(c)?c.replace(dp,``).trim():+c,r=s.substr(o+1).trim();return t},pp=function(e){var t=e.indexOf(`(`)+1,n=e.indexOf(`)`),r=e.indexOf(`(`,t);return e.substring(t,~r&&r<n?e.indexOf(`)`,n+1):n)},mp=function(e){var t=(e+``).split(`(`),n=Z[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf(`{`)?[fp(t[1])]:pp(e).split(`,`).map(Hd)):Z._CE&&up.test(e)?Z._CE(``,e):n},hp=function(e){return function(t){return 1-e(1-t)}},gp=function(e,t){return e&&(Uu(e)?e:Z[e]||mp(e))||t},_p=function(e,t,n,r){n===void 0&&(n=function(e){return 1-t(1-e)}),r===void 0&&(r=function(e){return e<.5?t(e*2)/2:1-t((1-e)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},a;return Pd(e,function(e){for(var t in Z[e]=dd[e]=i,Z[a=e.toLowerCase()]=n,i)Z[a+(t===`easeIn`?`.in`:t===`easeOut`?`.out`:`.inOut`)]=Z[e+`.`+t]=i[t]}),i},vp=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},yp=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/Iu*(Math.asin(1/i)||0),s=function(e){return e===1?1:i*2**(-10*e)*Vu((e-o)*a)+1},c=t===`out`?s:t===`in`?function(e){return 1-s(1-e)}:vp(s);return a=Iu/a,c.config=function(n,r){return e(t,n,r)},c},bp=function e(t,n){n===void 0&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i=t===`out`?r:t===`in`?function(e){return 1-r(1-e)}:vp(r);return i.config=function(n){return e(t,n)},i};Pd(`Linear,Quad,Cubic,Quart,Quint,Strong`,function(e,t){var n=t<5?t+1:t;_p(e+`,Power`+(n-1),t?function(e){return e**+n}:function(e){return e},function(e){return 1-(1-e)**n},function(e){return e<.5?(e*2)**n/2:1-((1-e)*2)**n/2})}),Z.Linear.easeNone=Z.none=Z.Linear.easeIn,_p(`Elastic`,yp(`in`),yp(`out`),yp()),(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(a){return a<n?e*a*a:a<r?e*(a-1.5/t)**2+.75:a<i?e*(a-=2.25/t)*a+.9375:e*(a-2.625/t)**2+.984375};_p(`Bounce`,function(e){return 1-a(1-e)},a)})(7.5625,2.75),_p(`Expo`,function(e){return 2**(10*(e-1))*e+e*e*e*e*e*e*(1-e)}),_p(`Circ`,function(e){return-(zu(1-e*e)-1)}),_p(`Sine`,function(e){return e===1?1:-Bu(e*Lu)+1}),_p(`Back`,bp(`in`),bp(`out`),bp()),Z.SteppedEase=Z.steps=dd.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+ +!t,i=+!!t,a=1-X;return function(e){return((r*wf(0,a,e)|0)+i)*n}}},ju.ease=Z[`quad.out`],Pd(`onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt`,function(e){return Ad+=e+`,`+e+`Params,`});var xp=function(e,t){this.id=Ru++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Nd,this.set=t?t.getSetter:Hp},Sp=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,vf(this,+e.duration,1,1),this.data=e.data,Pu&&(this._ctx=Pu,Pu.data.push(this)),sp||cp.wake()}var t=e.prototype;return t.delay=function(e){return e||e===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,vf(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(lp(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(lf(this,e),!n._dp||n.parent||uf(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&df(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===X||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),Vd(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+af(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-e:e)+af(this),t):this.duration()?Math.min(1,this._time/this._dur):+(this.rawTime()>0)},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?of(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-X?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?sf(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-X?0:this._rts,this.totalTime(wf(-Math.abs(this._delay),this.totalDuration(),n),t!==!1),cf(this),tf(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(lp(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==X&&(this._tTime-=X)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=Id(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&df(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(qu(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?sf(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){e===void 0&&(e=xd);var t=Nu;return Nu=e,Bd(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),this.data!==`nested`&&e.kill!==!1&&this.kill(),Nu=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,yf(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,yf(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(xf(this,e),qu(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,qu(t)),this._dur||(this._zTime=-X),this},t.play=function(e,t){return e!=null&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return e!=null&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return e!=null&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-X:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-X,this},t.isActive=function(){var e=this.parent||this._dp,t=this._start,n;return!!(!e||this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=t&&n<this.endTime(!0)-X)},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+`Params`]=n),e===`onUpdate`&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise(function(r){var i=Uu(e)?e:Ud,a=function(){var e=t.then;t.then=null,n&&n(),Uu(i)&&(i=i(t))&&(i.then||i===t)&&(t.then=e),r(i),t.then=e};t._initted&&t.totalProgress()===1&&t._ts>=0||!t._tTime&&t._ts<0?a():t._prom=a})},t.kill=function(){Jf(this)},e}();Wd(Sp.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-X,_prom:0,_ps:!1,_rts:1});var Cp=function(e){ku(t,e);function t(t,n){var r;return t===void 0&&(t={}),r=e.call(this,t)||this,r.labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=qu(t.sortChildren),sd&&df(t.parent||sd,Ou(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&ff(Ou(r),t.scrollTrigger),r}var n=t.prototype;return n.to=function(e,t,n){return Sf(0,arguments,this),this},n.from=function(e,t,n){return Sf(1,arguments,this),this},n.fromTo=function(e,t,n,r){return Sf(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,Yd(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Lp(e,t,xf(this,n),1),this},n.call=function(e,t,n){return df(this,Lp.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new Lp(e,n,xf(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,Yd(n).immediateRender=qu(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,Yd(r).immediateRender=qu(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r=this._time,i=this._dirty?this.totalDuration():this._tDur,a=this._dur,o=e<=0?0:Id(e),s=this._zTime<0!=e<0&&(this._initted||!a),c,l,u,d,f,p,m,h,g,_,v,y;if(this!==sd&&o>i&&e>=0&&(o=i),o!==this._tTime||n||s){if(r!==this._time&&a&&(o+=this._time-r,e+=this._time-r),c=o,g=this._start,h=this._ts,p=!h,s&&(a||(r=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(v=this._yoyo,f=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(f*100+e,t,n);if(c=Id(o%f),o===i?(d=this._repeat,c=a):(_=Id(o/f),d=~~_,d&&d===_&&(c=a,d--),c>a&&(c=a)),_=of(this._tTime,f),!r&&this._tTime&&_!==d&&this._tTime-_*f-this._dur<=0&&(_=d),v&&d&1&&(c=a-c,y=1),d!==_&&!this._lock){var b=v&&_&1,x=b===(v&&d&1);if(d<_&&(b=!b),r=b?0:o%a?a:o,this._lock=1,this.render(r||(y?0:Id(d*f)),t,!a)._lock=0,this._tTime=o,!t&&this.parent&&qf(this,`onRepeat`),this.vars.repeatRefresh&&!y&&(this.invalidate()._lock=1,_=d),r&&r!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act||(a=this._dur,i=this._tDur,x&&(this._lock=2,r=b?a:-1e-4,this.render(r,!0),this.vars.repeatRefresh&&!y&&this.invalidate()),this._lock=0,!this._ts&&!p))return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(m=_f(this,Id(r),Id(c)),m&&(o-=c-(c=m._start))),this._tTime=o,this._time=c,this._act=!!h,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,r=0),!r&&o&&a&&!t&&!_&&(qf(this,`onStart`),this._tTime!==o))return this;if(c>=r&&e>=0)for(l=this._first;l;){if(u=l._next,(l._act||c>=l._start)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(c-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(c-l._start)*l._ts,t,n),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=-X);break}}l=u}else{l=this._last;for(var S=e<0?e:c;l;){if(u=l._prev,(l._act||S<=l._end)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(S-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(S-l._start)*l._ts,t,n||Nu&&Bd(l)),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=S?-X:X);break}}l=u}}if(m&&!t&&(this.pause(),m.render(c>=r?0:-X)._zTime=c>=r?1:-1,this._ts))return this._start=g,cf(this),this.render(e,t,n);this._onUpdate&&!t&&qf(this,`onUpdate`,!0),(o===i&&this._tTime>=this.totalDuration()||!o&&r)&&(g===this._start||Math.abs(h)!==Math.abs(this._ts))&&(this._lock||((e||!a)&&(o===i&&this._ts>0||!o&&this._ts<0)&&$d(this,1),!t&&!(e<0&&!r)&&(o||r||!i)&&(qf(this,o===i&&e>=0?`onComplete`:`onReverseComplete`,!0),this._prom&&!(o<i&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(Wu(t)||(t=xf(this,t,e)),!(e instanceof Sp)){if(Zu(e))return e.forEach(function(e){return n.add(e,t)}),this;if(Hu(e))return this.addLabel(e,t);if(Uu(e))e=Lp.delayedCall(0,e);else return this}return this===e?this:df(this,e,t)},n.getChildren=function(e,t,n,r){e===void 0&&(e=!0),t===void 0&&(t=!0),n===void 0&&(n=!0),r===void 0&&(r=-Fu);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof Lp?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return Hu(e)?this.removeLabel(e):Uu(e)?this.killTweensOf(e):(e.parent===this&&Qd(this,e),e===this._recent&&(this._recent=this._last),ef(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Id(cp.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=xf(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=Lp.delayedCall(0,t||vd,n);return r.data=`isPause`,this._hasPause=1,df(this,r,xf(this,e))},n.removePause=function(e){var t=this._first;for(e=xf(this,e);t;)t._start===e&&t.data===`isPause`&&$d(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)Op!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n=[],r=Af(e),i=this._first,a=Wu(t),o;i;)i instanceof Lp?Rd(i._targets,r)&&(a?(!Op||i._initted&&i._ts)&&i.globalTime(0)<=t&&i.globalTime(i.totalDuration())>t:!t||i.isActive())&&n.push(i):(o=i.getTweensOf(r,t)).length&&n.push.apply(n,o),i=i._next;return n},n.tweenTo=function(e,t){t||={};var n=this,r=xf(n,e),i=t,a=i.startAt,o=i.onStart,s=i.onStartParams,c=i.immediateRender,l,u=Lp.to(n,Wd({ease:t.ease||`none`,lazy:!1,immediateRender:!1,time:r,overwrite:`auto`,duration:t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale())||X,onStart:function(){if(n.pause(),!l){var e=t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale());u._dur!==e&&vf(u,e,0,1).render(u._time,!0,!0),l=1}o&&o.apply(u,s||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,Wd({startAt:{time:xf(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return e===void 0&&(e=this._time),Kf(this,xf(this,e))},n.previousLabel=function(e){return e===void 0&&(e=this._time),Kf(this,xf(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+X)},n.shiftChildren=function(e,t,n){n===void 0&&(n=0);var r=this._first,i=this.labels,a;for(e=Id(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(a in i)i[a]>=n&&(i[a]+=e);return ef(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){e===void 0&&(e=!0);for(var t=this._first,n;t;)n=t._next,this.remove(t),t=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),ef(this)},n.totalDuration=function(e){var t=0,n=this,r=n._last,i=Fu,a,o,s;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(s=n.parent;r;)a=r._prev,r._dirty&&r.totalDuration(),o=r._start,o>i&&n._sort&&r._ts&&!n._lock?(n._lock=1,df(n,r,o-r._delay,1)._lock=0):i=o,o<0&&r._ts&&(t-=o,(!s&&!n._dp||s&&s.smoothChildTiming)&&(n._start+=Id(o/n._ts),n._time-=o,n._tTime-=o),n.shiftChildren(-o,!1,-1/0),i=0),r._end>t&&r._ts&&(t=r._end),r=a;vf(n,n===sd&&n._time>t?n._time:t,1,1),n._dirty=0}return n._tDur},t.updateRoot=function(e){if(sd._ts&&(Vd(sd,sf(e,sd)),Td=cp.frame),cp.frame>=Od){Od+=Au.autoSleep||120;var t=sd._first;if((!t||!t._ts)&&Au.autoSleep&&cp._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||cp.sleep()}}},t}(Sp);Wd(Cp.prototype,{_lock:0,_hasPause:0,_forcing:0});var wp=function(e,t,n,r,i,a,o){var s=new Zp(this._pt,e,t,0,1,Gp,null,i),c=0,l=0,u,d,f,p,m,h,g,_;for(s.b=n,s.e=r,n+=``,r+=``,(g=~r.indexOf(`random(`))&&(r=Uf(r)),a&&(_=[n,r],a(_,e,t),n=_[0],r=_[1]),d=n.match(rd)||[];u=rd.exec(r);)p=u[0],m=r.substring(c,u.index),f?f=(f+1)%5:m.substr(-5)===`rgba(`&&(f=1),p!==d[l++]&&(h=parseFloat(d[l-1])||0,s._pt={_next:s._pt,p:m||l===1?m:`,`,s:h,c:p.charAt(1)===`=`?Ld(h,p)-h:parseFloat(p)-h,m:f&&f<4?Math.round:0},c=rd.lastIndex);return s.c=c<r.length?r.substring(c,r.length):``,s.fp=o,(id.test(r)||g)&&(s.e=0),this._pt=s,s},Tp=function(e,t,n,r,i,a,o,s,c,l){Uu(r)&&(r=r(i||0,e,a));var u=e[t],d=n===`get`?Uu(u)?c?e[t.indexOf(`set`)||!Uu(e[`get`+t.substr(3)])?t:`get`+t.substr(3)](c):e[t]():u:n,f=Uu(u)?c?Bp:zp:Rp,p;if(Hu(r)&&(~r.indexOf(`random(`)&&(r=Uf(r)),r.charAt(1)===`=`&&(p=Ld(d,r)+(Tf(d)||0),(p||p===0)&&(r=p))),!l||d!==r||kp)return!isNaN(d*r)&&r!==``?(p=new Zp(this._pt,e,t,+d||0,r-(d||0),typeof u==`boolean`?Wp:Up,0,f),c&&(p.fp=c),o&&p.modifier(o,this,e),this._pt=p):(!u&&!(t in e)&&hd(t,r),wp.call(this,e,t,d,r,f,s||Au.stringFilter,c))},Ep=function(e,t,n,r,i){if(Uu(e)&&(e=Pp(e,i,t,n,r)),!Ku(e)||e.style&&e.nodeType||Zu(e)||Xu(e))return Hu(e)?Pp(e,i,t,n,r):e;var a={},o;for(o in e)a[o]=Pp(e[o],i,t,n,r);return a},Dp=function(e,t,n,r,i,a){var o,s,c,l;if(Ed[e]&&(o=new Ed[e]).init(i,o.rawVars?t[e]:Ep(t[e],r,i,a,n),n,r,a)!==!1&&(n._pt=s=new Zp(n._pt,i,e,0,1,o.render,o,0,o.priority),n!==Yf))for(c=n._ptLookup[n._targets.indexOf(i)],l=o._props.length;l--;)c[o._props[l]]=s;return o},Op,kp,Ap=function e(t,n,r){var i=t.vars,a=i.ease,o=i.startAt,s=i.immediateRender,c=i.lazy,l=i.onUpdate,u=i.runBackwards,d=i.yoyoEase,f=i.keyframes,p=i.autoRevert,m=t._dur,h=t._startAt,g=t._targets,_=t.parent,v=_&&_.data===`nested`?_.vars.targets:g,y=t._overwrite===`auto`&&!Mu,b=t.timeline,x=i.easeReverse||d,S,C,w,T,E,D,O,k,A,j,M,N,P;if(b&&(!f||!a)&&(a=`none`),t._ease=gp(a,ju.ease),t._rEase=x&&(gp(x)||t._ease),t._from=!b&&!!i.runBackwards,t._from&&(t.ratio=1),!b||f&&!i.stagger){if(k=g[0]?Md(g[0]).harness:0,N=k&&i[k.prop],S=Jd(i,Sd),h&&(h._zTime<0&&h.progress(1),n<0&&u&&s&&!p?h.render(-1,!0):h.revert(u&&m?bd:yd),h._lazy=0),o){if($d(t._startAt=Lp.set(g,Wd({data:`isStart`,overwrite:!1,parent:_,immediateRender:!0,lazy:!h&&qu(c),startAt:null,delay:0,onUpdate:l&&function(){return qf(t,`onUpdate`)},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(Nu||!s&&!p)&&t._startAt.revert(bd),s&&m&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(u&&m&&!h){if(n&&(s=!1),w=Wd({overwrite:!1,data:`isFromStart`,lazy:s&&!h&&qu(c),immediateRender:s,stagger:0,parent:_},S),N&&(w[k.prop]=N),$d(t._startAt=Lp.set(g,w)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(Nu?t._startAt.revert(bd):t._startAt.render(-1,!0)),t._zTime=n,!s)e(t._startAt,X,X);else if(!n)return}for(t._pt=t._ptCache=0,c=m&&qu(c)||c&&!m,C=0;C<g.length;C++){if(E=g[C],O=E._gsap||jd(g)[C]._gsap,t._ptLookup[C]=j={},wd[O.id]&&Cd.length&&zd(),M=v===g?C:v.indexOf(E),k&&(A=new k).init(E,N||S,t,M,v)!==!1&&(t._pt=T=new Zp(t._pt,E,A.name,0,1,A.render,A,0,A.priority),A._props.forEach(function(e){j[e]=T}),A.priority&&(D=1)),!k||N)for(w in S)Ed[w]&&(A=Dp(w,S,t,M,E,v))?A.priority&&(D=1):j[w]=T=Tp.call(t,E,w,`get`,S[w],M,v,0,i.stringFilter);t._op&&t._op[C]&&t.kill(E,t._op[C]),y&&t._pt&&(Op=t,sd.killTweensOf(E,j,t.globalTime(n)),P=!t.parent,Op=0),t._pt&&c&&(wd[O.id]=1)}D&&Xp(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!P,f&&n<=0&&b.render(Fu,!0,!0)},jp=function(e,t,n,r,i,a,o,s){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],l,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(l=d[f][t],l&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return kp=1,e.vars[t]=`+=0`,Ap(e,o),kp=0,s?gd(t+` not eligible for reset. Try splitting into individual properties`):1;c.push(l)}for(f=c.length;f--;)u=c[f],l=u._pt||u,l.s=(r||r===0)&&!i?r:l.s+(r||0)+a*l.c,l.c=n-l.s,u.e&&(u.e=Fd(n)+Tf(u.e)),u.b&&(u.b=l.s+Tf(u.b))},Mp=function(e,t){var n=e[0]?Md(e[0]).harness:0,r=n&&n.aliases,i,a,o,s;if(!r)return t;for(a in i=Kd({},t),r)if(a in i)for(s=r[a].split(`,`),o=s.length;o--;)i[s[o]]=i[a];return i},Np=function(e,t,n,r){var i=t.ease||r||`power1.inOut`,a,o;if(Zu(t))o=n[e]||(n[e]=[]),t.forEach(function(e,n){return o.push({t:n/(t.length-1)*100,v:e,e:i})});else for(a in t)o=n[a]||(n[a]=[]),a===`ease`||o.push({t:parseFloat(e),v:t[a],e:i})},Pp=function(e,t,n,r,i){return Uu(e)?e.call(t,n,r,i):Hu(e)&&~e.indexOf(`random(`)?Uf(e):e},Fp=Ad+`repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert`,Ip={};Pd(Fp+`,id,stagger,delay,duration,paused,scrollTrigger`,function(e){return Ip[e]=1});var Lp=function(e){ku(t,e);function t(t,n,r,i){var a;typeof n==`number`&&(r.duration=n,n=r,r=null),a=e.call(this,i?n:Yd(n))||this;var o=a.vars,s=o.duration,c=o.delay,l=o.immediateRender,u=o.stagger,d=o.overwrite,f=o.keyframes,p=o.defaults,m=o.scrollTrigger,h=n.parent||sd,g=(Zu(t)||Xu(t)?Wu(t[0]):`length`in n)?[t]:Af(t),_,v,y,b,x,S,C,w;if(a._targets=g.length?jd(g):gd(`GSAP target `+t+` not found. https://gsap.com`,!Au.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,f||u||Yu(s)||Yu(c)){n=a.vars;var T=n.easeReverse||n.yoyoEase;if(_=a.timeline=new Cp({data:`nested`,defaults:p||{},targets:h&&h.data===`nested`?h.vars.targets:g}),_.kill(),_.parent=_._dp=Ou(a),_._start=0,u||Yu(s)||Yu(c)){if(b=g.length,C=u&&Nf(u),Ku(u))for(x in u)~Fp.indexOf(x)&&(w||={},w[x]=u[x]);for(v=0;v<b;v++)y=Jd(n,Ip),y.stagger=0,T&&(y.easeReverse=T),w&&Kd(y,w),S=g[v],y.duration=+Pp(s,Ou(a),v,S,g),y.delay=(+Pp(c,Ou(a),v,S,g)||0)-a._delay,!u&&b===1&&y.delay&&(a._delay=c=y.delay,a._start+=c,y.delay=0),_.to(S,y,C?C(v,S,g):0),_._ease=Z.none;_.duration()?s=c=0:a.timeline=0}else if(f){Yd(Wd(_.vars.defaults,{ease:`none`})),_._ease=gp(f.ease||n.ease||`none`);var E=0,D,O,k;if(Zu(f))f.forEach(function(e){return _.to(g,e,`>`)}),_.duration();else{for(x in y={},f)x===`ease`||x===`easeEach`||Np(x,f[x],y,f.easeEach);for(x in y)for(D=y[x].sort(function(e,t){return e.t-t.t}),E=0,v=0;v<D.length;v++)O=D[v],k={ease:O.e,duration:(O.t-(v?D[v-1].t:0))/100*s},k[x]=O.v,_.to(g,k,E),E+=k.duration;_.duration()<s&&_.to({},{duration:s-_.duration()})}}s||a.duration(s=_.duration())}else a.timeline=0;return d===!0&&!Mu&&(Op=Ou(a),sd.killTweensOf(g),Op=0),df(h,Ou(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(l||!s&&!f&&a._start===Id(h._time)&&qu(l)&&rf(Ou(a))&&h.data!==`nested`)&&(a._tTime=-X,a.render(Math.max(0,-c)||0)),m&&ff(Ou(a),m),a}var n=t.prototype;return n.render=function(e,t,n){var r=this._time,i=this._tDur,a=this._dur,o=e<0,s=e>i-X&&!o?i:e<X?0:e,c,l,u,d,f,p,m,h;if(!a)gf(this,e,t,n);else if(s!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==o||this._lazy){if(c=s,h=this.timeline,this._repeat){if(d=a+this._rDelay,this._repeat<-1&&o)return this.totalTime(d*100+e,t,n);if(c=Id(s%d),s===i?(u=this._repeat,c=a):(f=Id(s/d),u=~~f,u&&u===f?(c=a,u--):c>a&&(c=a)),p=this._yoyo&&u&1,p&&(c=a-c),f=of(this._tTime,d),c===r&&!n&&this._initted&&u===f)return this._tTime=s,this;u!==f&&this.vars.repeatRefresh&&!p&&!this._lock&&c!==d&&this._initted&&(this._lock=n=1,this.render(Id(d*u),!0).invalidate()._lock=0)}if(!this._initted){if(pf(this,o?e:c,n,t,s))return this._tTime=0,this;if(r!==this._time&&!(n&&this.vars.repeatRefresh&&u!==f))return this;if(a!==this._dur)return this.render(e,t,n)}if(this._rEase){var g=c<r;if(g!==this._inv){var _=g?r:a-r;this._inv=g,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=r,this._invRecip=_?(g?-1:1)/_:0,this._invScale=g?-this.ratio:1-this.ratio,this._invEase=g?this._rEase:this._ease}this.ratio=m=this._invRatio+this._invScale*this._invEase((c-this._invTime)*this._invRecip)}else this.ratio=m=this._ease(c/a);if(this._from&&(this.ratio=m=1-m),this._tTime=s,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),!r&&s&&!t&&!f&&(qf(this,`onStart`),this._tTime!==s))return this;for(l=this._pt;l;)l.r(m,l.d),l=l._next;h&&h.render(e<0?e:h._dur*h._ease(c/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(o&&nf(this,e,t,n),qf(this,`onUpdate`)),this._repeat&&u!==f&&this.vars.onRepeat&&!t&&this.parent&&qf(this,`onRepeat`),(s===this._tDur||!s)&&this._tTime===s&&(o&&!this._onUpdate&&nf(this,e,!0,!0),(e||!a)&&(s===this._tDur&&this._ts>0||!s&&this._ts<0)&&$d(this,1),!t&&!(o&&!r)&&(s||r||p)&&(qf(this,s===i?`onComplete`:`onReverseComplete`,!0),this._prom&&!(s<i&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,i){sp||cp.wake(),this._ts||this.play();var a=Math.min(this._dur,(this._dp._time-this._start)*this._ts),o;return this._initted||Ap(this,a),o=this._ease(a/this._dur),jp(this,e,t,n,r,o,a,i)?this.resetTo(e,t,n,r,1):(lf(this,0),this.parent||Zd(this._dp,this,`_first`,`_last`,this._dp._sort?`_start`:0),this.render(0))},n.kill=function(e,t){if(t===void 0&&(t=`all`),!e&&(!t||t===`all`))return this._lazy=this._pt=0,this.parent?Jf(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Nu),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,Op&&Op.vars.overwrite!==!0)._first||Jf(this),this.parent&&n!==this.timeline.totalDuration()&&vf(this,this._dur*this.timeline._tDur/n,0,1),this}var r=this._targets,i=e?Af(e):r,a=this._ptLookup,o=this._pt,s,c,l,u,d,f,p;if((!t||t===`all`)&&Xd(r,i))return t===`all`&&(this._pt=0),Jf(this);for(s=this._op=this._op||[],t!==`all`&&(Hu(t)&&(d={},Pd(t,function(e){return d[e]=1}),t=d),t=Mp(r,t)),p=r.length;p--;)if(~i.indexOf(r[p]))for(d in c=a[p],t===`all`?(s[p]=t,u=c,l={}):(l=s[p]=s[p]||{},u=t),u)f=c&&c[d],f&&((!(`kill`in f.d)||f.d.kill(d)===!0)&&Qd(this,f,`_pt`),delete c[d]),l!==`all`&&(l[d]=1);return this._initted&&!this._pt&&o&&Jf(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return Sf(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return Sf(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return sd.killTweensOf(e,t,n)},t}(Sp);Wd(Lp.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Pd(`staggerTo,staggerFrom,staggerFromTo`,function(e){Lp[e]=function(){var t=new Cp,n=Df.call(arguments,0);return n.splice(e===`staggerFromTo`?5:4,0,0),t[e].apply(t,n)}});var Rp=function(e,t,n){return e[t]=n},zp=function(e,t,n){return e[t](n)},Bp=function(e,t,n,r){return e[t](r.fp,n)},Vp=function(e,t,n){return e.setAttribute(t,n)},Hp=function(e,t){return Uu(e[t])?zp:Gu(e[t])&&e.setAttribute?Vp:Rp},Up=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},Wp=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Gp=function(e,t){var n=t._pt,r=``;if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},Kp=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},qp=function(e,t,n,r){for(var i=this._pt,a;i;)a=i._next,i.p===r&&i.modifier(e,t,n),i=a},Jp=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Qd(this,t,`_pt`):t.dep||(n=1),t=r;return!n},Yp=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},Xp=function(e){for(var t=e._pt,n,r,i,a;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=i},Zp=function(){function e(e,t,n,r,i,a,o,s,c){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||Up,this.d=o||this,this.set=s||Rp,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=e.prototype;return t.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=Yp,this.m=e,this.mt=n,this.tween=t},e}();Pd(Ad+`parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse`,function(e){return Sd[e]=1}),dd.TweenMax=dd.TweenLite=Lp,dd.TimelineLite=dd.TimelineMax=Cp,sd=new Cp({sortChildren:!1,defaults:ju,autoRemoveChildren:!0,id:`root`,smoothChildTiming:!0}),Au.stringFilter=op;var Qp=[],$p={},em=[],tm=0,nm=0,rm=function(e){return($p[e]||em).map(function(e){return e()})},im=function(){var e=Date.now(),t=[];e-tm>2&&(rm(`matchMediaInit`),Qp.forEach(function(e){var n=e.queries,r=e.conditions,i,a,o,s;for(a in n)i=cd.matchMedia(n[a]).matches,i&&(o=1),i!==r[a]&&(r[a]=i,s=1);s&&(e.revert(),o&&t.push(e))}),rm(`matchMediaRevert`),t.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),tm=e,rm(`matchMedia`))},am=function(){function e(e,t){this.selector=t&&jf(t),this.data=[],this._r=[],this.isReverted=!1,this.id=nm++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){Uu(e)&&(n=t,t=e,e=Uu);var r=this,i=function(){var e=Pu,i=r.selector,a;return e&&e!==r&&e.data.push(r),n&&(r.selector=jf(n)),Pu=r,a=t.apply(r,arguments),Uu(a)&&r._r.push(a),Pu=e,r.selector=i,r.isReverted=!1,a};return r.last=i,e===Uu?i(r,function(e){return r.add(null,e)}):e?r[e]=i:i},t.ignore=function(e){var t=Pu;Pu=null,e(this),Pu=t},t.getTweens=function(){var t=[];return this.data.forEach(function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof Lp&&!(n.parent&&n.parent.data===`nested`)&&t.push(n)}),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?(function(){for(var t=n.getTweens(),r=n.data.length,i;r--;)i=n.data[r],i.data===`isFlip`&&(i.revert(),i.getChildren(!0,!0,!1).forEach(function(e){return t.splice(t.indexOf(e),1)}));for(t.map(function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}}).sort(function(e,t){return t.g-e.g||-1/0}).forEach(function(t){return t.t.revert(e)}),r=n.data.length;r--;)i=n.data[r],i instanceof Cp?i.data!==`nested`&&(i.scrollTrigger&&i.scrollTrigger.revert(),i.kill()):!(i instanceof Lp)&&i.revert&&i.revert(e);n._r.forEach(function(t){return t(e,n)}),n.isReverted=!0})():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear(),t)for(var r=Qp.length;r--;)Qp[r].id===this.id&&Qp.splice(r,1)},t.revert=function(e){this.kill(e||{})},e}(),om=function(){function e(e){this.contexts=[],this.scope=e,Pu&&Pu.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){Ku(e)||(e={matches:e});var r=new am(0,n||this.scope),i=r.conditions={},a,o,s;for(o in Pu&&!r.selector&&(r.selector=Pu.selector),this.contexts.push(r),t=r.add(`onMatch`,t),r.queries=e,e)o===`all`?s=1:(a=cd.matchMedia(e[o]),a&&(Qp.indexOf(r)<0&&Qp.push(r),(i[o]=a.matches)&&(s=1),a.addListener?a.addListener(im):a.addEventListener(`change`,im)));return s&&t(r,function(e){return r.add(null,e)}),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},e}(),sm={registerPlugin:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(function(e){return Zf(e)})},timeline:function(e){return new Cp(e)},getTweensOf:function(e,t){return sd.getTweensOf(e,t)},getProperty:function(e,t,n,r){Hu(e)&&(e=Af(e)[0]);var i=Md(e||{}).get,a=n?Ud:Hd;return n===`native`&&(n=``),e&&(t?a((Ed[t]&&Ed[t].get||i)(e,t,n,r)):function(t,n,r){return a((Ed[t]&&Ed[t].get||i)(e,t,n,r))})},quickSetter:function(e,t,n){if(e=Af(e),e.length>1){var r=e.map(function(e){return dm.quickSetter(e,t,n)}),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=Ed[t],o=Md(e),s=o.harness&&(o.harness.aliases||{})[t]||t,c=a?function(t){var r=new a;Yf._pt=0,r.init(e,n?t+n:t,Yf,0,[e]),r.render(1,r),Yf._pt&&Kp(1,Yf)}:o.set(e,s);return a?c:function(t){return c(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=dm.to(e,Wd((r={},r[t]=`+=0.1`,r.paused=!0,r.stagger=0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return sd.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=gp(e.ease,ju.ease)),qd(ju,e||{})},config:function(e){return qd(Au,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||``).split(`,`).forEach(function(e){return e&&!Ed[e]&&!dd[e]&&gd(t+` effect requires `+e+` plugin.`)}),Dd[t]=function(e,t,r){return n(Af(e),Wd(t||{},i),r)},a&&(Cp.prototype[t]=function(e,n,r){return this.add(Dd[t](e,Ku(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){Z[e]=gp(t)},parseEase:function(e,t){return arguments.length?gp(e,t):Z},getById:function(e){return sd.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new Cp(e),r,i;for(n.smoothChildTiming=qu(e.smoothChildTiming),sd.remove(n),n._dp=0,n._time=n._tTime=sd._time,r=sd._first;r;)i=r._next,(t||!(!r._dur&&r instanceof Lp&&r.vars.onComplete===r._targets[0]))&&df(n,r,r._start-r._delay),r=i;return df(sd,n,0),n},context:function(e,t){return e?new am(e,t):Pu},matchMedia:function(e){return new om(e)},matchMediaRefresh:function(){return Qp.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||im()},addEventListener:function(e,t){var n=$p[e]||($p[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=$p[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:Vf,wrapYoyo:Hf,distribute:Nf,random:If,snap:Ff,normalize:zf,getUnit:Tf,clamp:Ef,splitColor:tp,toArray:Af,selector:jf,mapRange:Wf,pipe:Lf,unitize:Rf,interpolate:Gf,shuffle:Mf},install:md,effects:Dd,ticker:cp,updateRoot:Cp.updateRoot,plugins:Ed,globalTimeline:sd,core:{PropTween:Zp,globals:_d,Tween:Lp,Timeline:Cp,Animation:Sp,getCache:Md,_removeLinkedListItem:Qd,reverting:function(){return Nu},context:function(e){return e&&Pu&&(Pu.data.push(e),e._ctx=Pu),Pu},suppressOverwrites:function(e){return Mu=e}}};Pd(`to,from,fromTo,delayedCall,set,killTweensOf`,function(e){return sm[e]=Lp[e]}),cp.add(Cp.updateRoot),Yf=sm.to({},{duration:0});var cm=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},lm=function(e,t){var n=e._targets,r,i,a;for(r in t)for(i=n.length;i--;)a=e._ptLookup[i][r],(a&&=a.d)&&(a._pt&&(a=cm(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[i],r))},um=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(Hu(n)&&(r={},Pd(n,function(e){return r[e]=1}),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}lm(e,n)}}}},dm=sm.registerPlugin({name:`attr`,init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||``,o=this.add(e,`setAttribute`,(s||0)+``,t[a],r,i,0,0,a),o.op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)Nu?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:`endArray`,headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},um(`roundProps`,Pf),um(`modifiers`),um(`snap`,Ff))||sm;Lp.version=Cp.version=dm.version=`3.15.0`,pd=1,Ju()&&lp(),Z.Power0,Z.Power1,Z.Power2,Z.Power3,Z.Power4,Z.Linear,Z.Quad,Z.Cubic,Z.Quart,Z.Quint,Z.Strong,Z.Elastic,Z.Back,Z.SteppedEase,Z.Bounce,Z.Sine,Z.Expo,Z.Circ;var fm,pm,mm,hm,gm,_m,vm,ym=function(){return typeof window<`u`},bm={},xm=180/Math.PI,Sm=Math.PI/180,Cm=Math.atan2,wm=1e8,Tm=/([A-Z])/g,Em=/(left|right|width|margin|padding|x)/i,Dm=/[\s,\(]\S/,Om={autoAlpha:`opacity,visibility`,scale:`scaleX,scaleY`,alpha:`opacity`},km=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Am=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},jm=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Mm=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Nm=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},Pm=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Fm=function(e,t){return t.set(t.t,t.p,e===1?t.e:t.b,t)},Im=function(e,t,n){return e.style[t]=n},Lm=function(e,t,n){return e.style.setProperty(t,n)},Rm=function(e,t,n){return e._gsap[t]=n},zm=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},Bm=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},Vm=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},Hm=`transform`,Um=Hm+`Origin`,Wm=function e(t,n){var r=this,i=this.target,a=i.style,o=i._gsap;if(t in bm&&a){if(this.tfm=this.tfm||{},t!==`transform`)t=Om[t]||t,~t.indexOf(`,`)?t.split(`,`).forEach(function(e){return r.tfm[e]=lh(i,e)}):this.tfm[t]=o.x?o[t]:lh(i,t),t===Um&&(this.tfm.zOrigin=o.zOrigin);else return Om.transform.split(`,`).forEach(function(t){return e.call(r,t,n)});if(this.props.indexOf(Hm)>=0)return;o.svg&&(this.svgo=i.getAttribute(`data-svg-origin`),this.props.push(Um,n,``)),t=Hm}(a||n)&&this.props.push(t,n,a[t])},Gm=function(e){e.translate&&(e.removeProperty(`translate`),e.removeProperty(`scale`),e.removeProperty(`rotate`))},Km=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?n[e[i]]=e[i+2]:n.removeProperty(e[i].substr(0,2)===`--`?e[i]:e[i].replace(Tm,`-$1`).toLowerCase());if(this.tfm){for(a in this.tfm)r[a]=this.tfm[a];r.svg&&(r.renderTransform(),t.setAttribute(`data-svg-origin`,this.svgo||``)),i=vm(),(!i||!i.isStart)&&!n[Hm]&&(Gm(n),r.zOrigin&&n[Um]&&(n[Um]+=` `+r.zOrigin+`px`,r.zOrigin=0,r.renderTransform()),r.uncache=1)}},qm=function(e,t){var n={target:e,props:[],revert:Km,save:Wm};return e._gsap||dm.core.getCache(e),t&&e.style&&e.nodeType&&t.split(`,`).forEach(function(e){return n.save(e)}),n},Jm,Ym=function(e,t){var n=pm.createElementNS?pm.createElementNS((t||`http://www.w3.org/1999/xhtml`).replace(/^https/,`http`),e):pm.createElement(e);return n&&n.style?n:pm.createElement(e)},Xm=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(Tm,`-$1`).toLowerCase())||i.getPropertyValue(n)||!r&&e(t,Qm(n)||n,1)||``},Zm=`O,Moz,ms,Ms,Webkit`.split(`,`),Qm=function(e,t,n){var r=(t||gm).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(Zm[i]+e in r););return i<0?null:(i===3?`ms`:i>=0?Zm[i]:``)+e},$m=function(){ym()&&window.document&&(fm=window,pm=fm.document,mm=pm.documentElement,gm=Ym(`div`)||{style:{}},Ym(`div`),Hm=Qm(Hm),Um=Hm+`Origin`,gm.style.cssText=`border-width:0;line-height:0;position:absolute;padding:0`,Jm=!!Qm(`perspective`),vm=dm.core.reverting,hm=1)},eh=function(e){var t=e.ownerSVGElement,n=Ym(`svg`,t&&t.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`),r=e.cloneNode(!0),i;r.style.display=`block`,n.appendChild(r),mm.appendChild(n);try{i=r.getBBox()}catch{}return n.removeChild(r),mm.removeChild(n),i},th=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},nh=function(e){var t,n;try{t=e.getBBox()}catch{t=eh(e),n=1}return t&&(t.width||t.height)||n||(t=eh(e)),t&&!t.width&&!t.x&&!t.y?{x:+th(e,[`x`,`cx`,`x1`])||0,y:+th(e,[`y`,`cy`,`y1`])||0,width:0,height:0}:t},rh=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&nh(e))},ih=function(e,t){if(t){var n=e.style,r;t in bm&&t!==Um&&(t=Hm),n.removeProperty?(r=t.substr(0,2),(r===`ms`||t.substr(0,6)===`webkit`)&&(t=`-`+t),n.removeProperty(r===`--`?t:t.replace(Tm,`-$1`).toLowerCase())):n.removeAttribute(t)}},ah=function(e,t,n,r,i,a){var o=new Zp(e._pt,t,n,0,1,a?Fm:Pm);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},oh={deg:1,rad:1,turn:1},sh={grid:1,flex:1},ch=function e(t,n,r,i){var a=parseFloat(r)||0,o=(r+``).trim().substr((a+``).length)||`px`,s=gm.style,c=Em.test(n),l=t.tagName.toLowerCase()===`svg`,u=(l?`client`:`offset`)+(c?`Width`:`Height`),d=100,f=i===`px`,p=i===`%`,m,h,g,_;if(i===o||!a||oh[i]||oh[o])return a;if(o!==`px`&&!f&&(a=e(t,n,r,`px`)),_=t.getCTM&&rh(t),(p||o===`%`)&&(bm[n]||~n.indexOf(`adius`)))return m=_?t.getBBox()[c?`width`:`height`]:t[u],Fd(p?a/m*d:a/100*m);if(s[c?`width`:`height`]=d+(f?o:i),h=i!==`rem`&&~n.indexOf(`adius`)||i===`em`&&t.appendChild&&!l?t:t.parentNode,_&&(h=(t.ownerSVGElement||{}).parentNode),(!h||h===pm||!h.appendChild)&&(h=pm.body),g=h._gsap,g&&p&&g.width&&c&&g.time===cp.time&&!g.uncache)return Fd(a/g.width*d);if(p&&(n===`height`||n===`width`)){var v=t.style[n];t.style[n]=d+i,m=t[u],v?t.style[n]=v:ih(t,n)}else(p||o===`%`)&&!sh[Xm(h,`display`)]&&(s.position=Xm(t,`position`)),h===t&&(s.position=`static`),h.appendChild(gm),m=gm[u],h.removeChild(gm),s.position=`absolute`;return c&&p&&(g=Md(h),g.time=cp.time,g.width=h[u]),Fd(f?m*a/d:m&&a?d/m*a:0)},lh=function(e,t,n,r){var i;return hm||$m(),t in Om&&t!==`transform`&&(t=Om[t],~t.indexOf(`,`)&&(t=t.split(`,`)[0])),bm[t]&&t!==`transform`?(i=xh(e,r),i=t===`transformOrigin`?i.svg?i.origin:Sh(Xm(e,Um))+` `+i.zOrigin+`px`:i[t]):(i=e.style[t],(!i||i===`auto`||r||~(i+``).indexOf(`calc(`))&&(i=mh[t]&&mh[t](e,t,n)||Xm(e,t)||Nd(e,t)||+(t===`opacity`))),n&&!~(i+``).trim().indexOf(` `)?ch(e,t,i,n)+n:i},uh=function(e,t,n,r){if(!n||n===`none`){var i=Qm(t,e,1),a=i&&Xm(e,i,1);a&&a!==n?(t=i,n=a):t===`borderColor`&&(n=Xm(e,`borderTopColor`))}var o=new Zp(this._pt,e.style,t,0,1,Gp),s=0,c=0,l,u,d,f,p,m,h,g,_,v,y,b;if(o.b=n,o.e=r,n+=``,r+=``,r.substring(0,6)===`var(--`&&(r=Xm(e,r.substring(4,r.indexOf(`)`)))),r===`auto`&&(m=e.style[t],e.style[t]=r,r=Xm(e,t)||r,m?e.style[t]=m:ih(e,t)),l=[n,r],op(l),n=l[0],r=l[1],d=n.match(nd)||[],b=r.match(nd)||[],b.length){for(;u=nd.exec(r);)h=u[0],_=r.substring(s,u.index),p?p=(p+1)%5:(_.substr(-5)===`rgba(`||_.substr(-5)===`hsla(`)&&(p=1),h!==(m=d[c++]||``)&&(f=parseFloat(m)||0,y=m.substr((f+``).length),h.charAt(1)===`=`&&(h=Ld(f,h)+y),g=parseFloat(h),v=h.substr((g+``).length),s=nd.lastIndex-v.length,v||(v=v||Au.units[t]||y,s===r.length&&(r+=v,o.e+=v)),y!==v&&(f=ch(e,t,m,v)||0),o._pt={_next:o._pt,p:_||c===1?_:`,`,s:f,c:g-f,m:p&&p<4||t===`zIndex`?Math.round:0});o.c=s<r.length?r.substring(s,r.length):``}else o.r=t===`display`&&r===`none`?Fm:Pm;return id.test(r)&&(o.e=0),this._pt=o,o},dh={top:`0%`,bottom:`100%`,left:`0%`,right:`100%`,center:`50%`},fh=function(e){var t=e.split(` `),n=t[0],r=t[1]||`50%`;return(n===`top`||n===`bottom`||r===`left`||r===`right`)&&(e=n,n=r,r=e),t[0]=dh[n]||n,t[1]=dh[r]||r,t.join(` `)},ph=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,i=t.u,a=n._gsap,o,s,c;if(i===`all`||i===!0)r.cssText=``,s=1;else for(i=i.split(`,`),c=i.length;--c>-1;)o=i[c],bm[o]&&(s=1,o=o===`transformOrigin`?Um:Hm),ih(n,o);s&&(ih(n,Hm),a&&(a.svg&&n.removeAttribute(`transform`),r.scale=r.rotate=r.translate=`none`,xh(n,1),a.uncache=1,Gm(r)))}},mh={clearProps:function(e,t,n,r,i){if(i.data!==`isFromStart`){var a=e._pt=new Zp(e._pt,t,n,0,0,ph);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},hh=[1,0,0,1,0,0],gh={},_h=function(e){return e===`matrix(1, 0, 0, 1, 0, 0)`||e===`none`||!e},vh=function(e){var t=Xm(e,Hm);return _h(t)?hh:t.substr(7).match(td).map(Fd)},yh=function(e,t){var n=e._gsap||Md(e),r=e.style,i=vh(e),a,o,s,c;return n.svg&&e.getAttribute(`transform`)?(s=e.transform.baseVal.consolidate().matrix,i=[s.a,s.b,s.c,s.d,s.e,s.f],i.join(`,`)===`1,0,0,1,0,0`?hh:i):(i===hh&&!e.offsetParent&&e!==mm&&!n.svg&&(s=r.display,r.display=`block`,a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,mm.appendChild(e)),i=vh(e),s?r.display=s:ih(e,`display`),c&&(o?a.insertBefore(e,o):a?a.appendChild(e):mm.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},bh=function(e,t,n,r,i,a){var o=e._gsap,s=i||yh(e,!0),c=o.xOrigin||0,l=o.yOrigin||0,u=o.xOffset||0,d=o.yOffset||0,f=s[0],p=s[1],m=s[2],h=s[3],g=s[4],_=s[5],v=t.split(` `),y=parseFloat(v[0])||0,b=parseFloat(v[1])||0,x,S,C,w;n?s!==hh&&(S=f*h-p*m)&&(C=h/S*y+b*(-m/S)+(m*_-h*g)/S,w=y*(-p/S)+f/S*b-(f*_-p*g)/S,y=C,b=w):(x=nh(e),y=x.x+(~v[0].indexOf(`%`)?y/100*x.width:y),b=x.y+(~(v[1]||v[0]).indexOf(`%`)?b/100*x.height:b)),r||r!==!1&&o.smooth?(g=y-c,_=b-l,o.xOffset=u+(g*f+_*m)-g,o.yOffset=d+(g*p+_*h)-_):o.xOffset=o.yOffset=0,o.xOrigin=y,o.yOrigin=b,o.smooth=!!r,o.origin=t,o.originIsAbsolute=!!n,e.style[Um]=`0px 0px`,a&&(ah(a,o,`xOrigin`,c,y),ah(a,o,`yOrigin`,l,b),ah(a,o,`xOffset`,u,o.xOffset),ah(a,o,`yOffset`,d,o.yOffset)),e.setAttribute(`data-svg-origin`,y+` `+b)},xh=function(e,t){var n=e._gsap||new xp(e);if(`x`in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,a=`px`,o=`deg`,s=getComputedStyle(e),c=Xm(e,Um)||`0`,l=u=d=m=h=g=_=v=y=0,u,d,f=p=1,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B;return n.svg=!!(e.getCTM&&rh(e)),s.translate&&((s.translate!==`none`||s.scale!==`none`||s.rotate!==`none`)&&(r[Hm]=(s.translate===`none`?``:`translate3d(`+(s.translate+` 0 0`).split(` `).slice(0,3).join(`, `)+`) `)+(s.rotate===`none`?``:`rotate(`+s.rotate+`) `)+(s.scale===`none`?``:`scale(`+s.scale.split(` `).join(`,`)+`) `)+(s[Hm]===`none`?``:s[Hm])),r.scale=r.rotate=r.translate=`none`),S=yh(e,n.svg),n.svg&&(n.uncache?(N=e.getBBox(),c=n.xOrigin-N.x+`px `+(n.yOrigin-N.y)+`px`,M=``):M=!t&&e.getAttribute(`data-svg-origin`),bh(e,M||c,!!M||n.originIsAbsolute,n.smooth!==!1,S)),b=n.xOrigin||0,x=n.yOrigin||0,S!==hh&&(E=S[0],D=S[1],O=S[2],k=S[3],l=A=S[4],u=j=S[5],S.length===6?(f=Math.sqrt(E*E+D*D),p=Math.sqrt(k*k+O*O),m=E||D?Cm(D,E)*xm:0,_=O||k?Cm(O,k)*xm+m:0,_&&(p*=Math.abs(Math.cos(_*Sm))),n.svg&&(l-=b-(b*E+x*O),u-=x-(b*D+x*k))):(B=S[6],R=S[7],F=S[8],I=S[9],L=S[10],z=S[11],l=S[12],u=S[13],d=S[14],C=Cm(B,L),h=C*xm,C&&(w=Math.cos(-C),T=Math.sin(-C),M=A*w+F*T,N=j*w+I*T,P=B*w+L*T,F=A*-T+F*w,I=j*-T+I*w,L=B*-T+L*w,z=R*-T+z*w,A=M,j=N,B=P),C=Cm(-O,L),g=C*xm,C&&(w=Math.cos(-C),T=Math.sin(-C),M=E*w-F*T,N=D*w-I*T,P=O*w-L*T,z=k*T+z*w,E=M,D=N,O=P),C=Cm(D,E),m=C*xm,C&&(w=Math.cos(C),T=Math.sin(C),M=E*w+D*T,N=A*w+j*T,D=D*w-E*T,j=j*w-A*T,E=M,A=N),h&&Math.abs(h)+Math.abs(m)>359.9&&(h=m=0,g=180-g),f=Fd(Math.sqrt(E*E+D*D+O*O)),p=Fd(Math.sqrt(j*j+B*B)),C=Cm(A,j),_=Math.abs(C)>2e-4?C*xm:0,y=z?1/(z<0?-z:z):0),n.svg&&(M=e.getAttribute(`transform`),n.forceCSS=e.setAttribute(`transform`,``)||!_h(Xm(e,Hm)),M&&e.setAttribute(`transform`,M))),Math.abs(_)>90&&Math.abs(_)<270&&(i?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t||=n.uncache,n.x=l-((n.xPercent=l&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-l)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=u-((n.yPercent=u&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=d+a,n.scaleX=Fd(f),n.scaleY=Fd(p),n.rotation=Fd(m)+o,n.rotationX=Fd(h)+o,n.rotationY=Fd(g)+o,n.skewX=_+o,n.skewY=v+o,n.transformPerspective=y+a,(n.zOrigin=parseFloat(c.split(` `)[2])||!t&&n.zOrigin||0)&&(r[Um]=Sh(c)),n.xOffset=n.yOffset=0,n.force3D=Au.force3D,n.renderTransform=n.svg?kh:Jm?Oh:wh,n.uncache=0,n},Sh=function(e){return(e=e.split(` `))[0]+` `+e[1]},Ch=function(e,t,n){var r=Tf(t);return Fd(parseFloat(t)+parseFloat(ch(e,`x`,n+`px`,r)))+r},wh=function(e,t){t.z=`0px`,t.rotationY=t.rotationX=`0deg`,t.force3D=0,Oh(e,t)},Th=`0deg`,Eh=`0px`,Dh=`) `,Oh=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,c=n.rotation,l=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,m=n.scaleY,h=n.transformPerspective,g=n.force3D,_=n.target,v=n.zOrigin,y=``,b=g===`auto`&&e&&e!==1||g===!0;if(v&&(u!==Th||l!==Th)){var x=parseFloat(l)*Sm,S=Math.sin(x),C=Math.cos(x),w;x=parseFloat(u)*Sm,w=Math.cos(x),a=Ch(_,a,S*w*-v),o=Ch(_,o,-Math.sin(x)*-v),s=Ch(_,s,C*w*-v+v)}h!==Eh&&(y+=`perspective(`+h+Dh),(r||i)&&(y+=`translate(`+r+`%, `+i+`%) `),(b||a!==Eh||o!==Eh||s!==Eh)&&(y+=s!==Eh||b?`translate3d(`+a+`, `+o+`, `+s+`) `:`translate(`+a+`, `+o+Dh),c!==Th&&(y+=`rotate(`+c+Dh),l!==Th&&(y+=`rotateY(`+l+Dh),u!==Th&&(y+=`rotateX(`+u+Dh),(d!==Th||f!==Th)&&(y+=`skew(`+d+`, `+f+Dh),(p!==1||m!==1)&&(y+=`scale(`+p+`, `+m+Dh),_.style[Hm]=y||`translate(0, 0)`},kh=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.rotation,c=n.skewX,l=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,m=n.yOrigin,h=n.xOffset,g=n.yOffset,_=n.forceCSS,v=parseFloat(a),y=parseFloat(o),b,x,S,C,w;s=parseFloat(s),c=parseFloat(c),l=parseFloat(l),l&&(l=parseFloat(l),c+=l,s+=l),s||c?(s*=Sm,c*=Sm,b=Math.cos(s)*u,x=Math.sin(s)*u,S=Math.sin(s-c)*-d,C=Math.cos(s-c)*d,c&&(l*=Sm,w=Math.tan(c-l),w=Math.sqrt(1+w*w),S*=w,C*=w,l&&(w=Math.tan(l),w=Math.sqrt(1+w*w),b*=w,x*=w)),b=Fd(b),x=Fd(x),S=Fd(S),C=Fd(C)):(b=u,C=d,x=S=0),(v&&!~(a+``).indexOf(`px`)||y&&!~(o+``).indexOf(`px`))&&(v=ch(f,`x`,a,`px`),y=ch(f,`y`,o,`px`)),(p||m||h||g)&&(v=Fd(v+p-(p*b+m*S)+h),y=Fd(y+m-(p*x+m*C)+g)),(r||i)&&(w=f.getBBox(),v=Fd(v+r/100*w.width),y=Fd(y+i/100*w.height)),w=`matrix(`+b+`,`+x+`,`+S+`,`+C+`,`+v+`,`+y+`)`,f.setAttribute(`transform`,w),_&&(f.style[Hm]=w)},Ah=function(e,t,n,r,i){var a=360,o=Hu(i),s=parseFloat(i)*(o&&~i.indexOf(`rad`)?xm:1)-r,c=r+s+`deg`,l,u;return o&&(l=i.split(`_`)[1],l===`short`&&(s%=a,s!==s%(a/2)&&(s+=s<0?a:-a)),l===`cw`&&s<0?s=(s+a*wm)%a-~~(s/a)*a:l===`ccw`&&s>0&&(s=(s-a*wm)%a-~~(s/a)*a)),e._pt=u=new Zp(e._pt,t,n,r,s,Am),u.e=c,u.u=`deg`,e._props.push(n),u},jh=function(e,t){for(var n in t)e[n]=t[n];return e},Mh=function(e,t,n){var r=jh({},n._gsap),i=`perspective,force3D,transformOrigin,svgOrigin`,a=n.style,o,s,c,l,u,d,f,p;for(s in r.svg?(c=n.getAttribute(`transform`),n.setAttribute(`transform`,``),a[Hm]=t,o=xh(n,1),ih(n,Hm),n.setAttribute(`transform`,c)):(c=getComputedStyle(n)[Hm],a[Hm]=t,o=xh(n,1),a[Hm]=c),bm)c=r[s],l=o[s],c!==l&&i.indexOf(s)<0&&(f=Tf(c),p=Tf(l),u=f===p?parseFloat(c):ch(n,s,c,p),d=parseFloat(l),e._pt=new Zp(e._pt,o,s,u,d-u,km),e._pt.u=p||0,e._props.push(s));jh(o,r)};Pd(`padding,margin,Width,Radius`,function(e,t){var n=`Top`,r=`Right`,i=`Bottom`,a=`Left`,o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(n){return t<2?e+n:`border`+n+e});mh[t>1?`border`+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map(function(t){return lh(e,t,n)}),s=a.join(` `),s.split(a[0]).length===5?a[0]:s;a=(r+``).split(` `),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),e.init(t,s,i)}});var Nh={name:`css`,register:$m,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a=this._props,o=e.style,s=n.vars.startAt,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;for(m in hm||$m(),this.styles=this.styles||qm(e),C=this.styles.props,this.tween=n,t)if(m!==`autoRound`&&(l=t[m],!(Ed[m]&&Dp(m,t,n,r,e,i)))){if(f=typeof l,p=mh[m],f===`function`&&(l=l.call(n,r,e,i),f=typeof l),f===`string`&&~l.indexOf(`random(`)&&(l=Uf(l)),p)p(this,e,m,l,n)&&(S=1);else if(m.substr(0,2)===`--`)c=(getComputedStyle(e).getPropertyValue(m)+``).trim(),l+=``,ip.lastIndex=0,ip.test(c)||(h=Tf(c),g=Tf(l),g?h!==g&&(c=ch(e,m,c,g)+g):h&&(l+=h)),this.add(o,`setProperty`,c,l,r,i,0,0,m),a.push(m),C.push(m,0,o[m]);else if(f!==`undefined`){if(s&&m in s?(c=typeof s[m]==`function`?s[m].call(n,r,e,i):s[m],Hu(c)&&~c.indexOf(`random(`)&&(c=Uf(c)),Tf(c+``)||c===`auto`||(c+=Au.units[m]||Tf(lh(e,m))||``),(c+``).charAt(1)===`=`&&(c=lh(e,m))):c=lh(e,m),d=parseFloat(c),_=f===`string`&&l.charAt(1)===`=`&&l.substr(0,2),_&&(l=l.substr(2)),u=parseFloat(l),m in Om&&(m===`autoAlpha`&&(d===1&&lh(e,`visibility`)===`hidden`&&u&&(d=0),C.push(`visibility`,0,o.visibility),ah(this,o,`visibility`,d?`inherit`:`hidden`,u?`inherit`:`hidden`,!u)),m!==`scale`&&m!==`transform`&&(m=Om[m],~m.indexOf(`,`)&&(m=m.split(`,`)[0]))),v=m in bm,v){if(this.styles.save(m),w=l,f===`string`&&l.substring(0,6)===`var(--`){if(l=Xm(e,l.substring(4,l.indexOf(`)`))),l.substring(0,5)===`calc(`){var T=e.style.perspective;e.style.perspective=l,l=Xm(e,`perspective`),T?e.style.perspective=T:ih(e,`perspective`)}u=parseFloat(l)}if(y||(b=e._gsap,b.renderTransform&&!t.parseTransform||xh(e,t.parseTransform),x=t.smoothOrigin!==!1&&b.smooth,y=this._pt=new Zp(this._pt,o,Hm,0,1,b.renderTransform,b,0,-1),y.dep=1),m===`scale`)this._pt=new Zp(this._pt,b,`scaleY`,b.scaleY,(_?Ld(b.scaleY,_+u):u)-b.scaleY||0,km),this._pt.u=0,a.push(`scaleY`,m),m+=`X`;else if(m===`transformOrigin`){C.push(Um,0,o[Um]),l=fh(l),b.svg?bh(e,l,0,x,0,this):(g=parseFloat(l.split(` `)[2])||0,g!==b.zOrigin&&ah(this,b,`zOrigin`,b.zOrigin,g),ah(this,o,m,Sh(c),Sh(l)));continue}else if(m===`svgOrigin`){bh(e,l,1,x,0,this);continue}else if(m in gh){Ah(this,b,m,d,_?Ld(d,_+l):l);continue}else if(m===`smoothOrigin`){ah(this,b,`smooth`,b.smooth,l);continue}else if(m===`force3D`){b[m]=l;continue}else if(m===`transform`){Mh(this,l,e);continue}}else m in o||(m=Qm(m)||m);if(v||(u||u===0)&&(d||d===0)&&!Dm.test(l)&&m in o)h=(c+``).substr((d+``).length),u||=0,g=Tf(l)||(m in Au.units?Au.units[m]:h),h!==g&&(d=ch(e,m,c,g)),this._pt=new Zp(this._pt,v?b:o,m,d,(_?Ld(d,_+u):u)-d,!v&&(g===`px`||m===`zIndex`)&&t.autoRound!==!1?Nm:km),this._pt.u=g||0,v&&w!==l?(this._pt.b=c,this._pt.e=w,this._pt.r=Mm):h!==g&&g!==`%`&&(this._pt.b=c,this._pt.r=jm);else if(m in o)uh.call(this,e,m,c,_?_+l:l);else if(m in e)this.add(e,m,c||e[m],_?_+l:l,r,i);else if(m!==`parseTransform`){hd(m,l);continue}v||(m in o?C.push(m,0,o[m]):typeof e[m]==`function`?C.push(m,2,e[m]()):C.push(m,1,c||e[m])),a.push(m)}}S&&Xp(this)},render:function(e,t){if(t.tween._time||!vm())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:lh,aliases:Om,getSetter:function(e,t,n){var r=Om[t];return r&&r.indexOf(`,`)<0&&(t=r),t in bm&&t!==Um&&(e._gsap.x||lh(e,`x`))?n&&_m===n?t===`scale`?zm:Rm:(_m=n||{})&&(t===`scale`?Bm:Vm):e.style&&!Gu(e.style[t])?Im:~t.indexOf(`-`)?Lm:Hp(e,t)},core:{_removeProperty:ih,_getMatrix:yh}};dm.utils.checkPrefix=Qm,dm.core.getStyleSaver=qm,(function(e,t,n,r){var i=Pd(e+`,`+t+`,`+n,function(e){bm[e]=1});Pd(t,function(e){Au.units[e]=`deg`,gh[e]=1}),Om[i[13]]=e+`,`+t,Pd(r,function(e){var t=e.split(`:`);Om[t[1]]=i[t[0]]})})(`x,y,z,scale,scaleX,scaleY,xPercent,yPercent`,`rotation,rotationX,rotationY,skewX,skewY`,`transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective`,`0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY`),Pd(`x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective`,function(e){Au.units[e]=`px`}),dm.registerPlugin(Nh);var Ph=dm.registerPlugin(Nh)||dm;Ph.core.Tween;var Fh={IN_OUT:`power2.inOut`,OUT:`power2.out`},Ih={NO_STAGGER:0,RIPPLE_STAGGER_DELAY:.05},Lh=class{timeline;currentStage=``;callbacks;durations;constructor(e,t={}){this.durations=e,this.callbacks=t,this.timeline=Ph.timeline({paused:!0,onUpdate:()=>this.handleProgress(),onComplete:()=>{this.callbacks.onComplete?.(),this.callbacks.onStageComplete?.(`complete`)}});let n=0;this.timeline.addLabel(`seatsToRings`,n),n+=e.seatsToRings/1e3,this.timeline.addLabel(`ringsToBar`,n),n+=e.ringsToBar/1e3,this.timeline.addLabel(`axesReveal`,n),n+=e.axesReveal/1e3,this.timeline.addLabel(`barSlide`,n),n+=e.barSlide/1e3,this.timeline.addLabel(`barsGrow`,n),n+=e.barsGrow/1e3,this.timeline.addLabel(`barsToArea`,n)}animateSeatsToRings(e,t){let n=this.durations.seatsToRings/1e3;return e.each(function(){let e=this;if(!e.getAttribute(`data-orig-x`)){let t=e.getAttribute(`x`),n=e.getAttribute(`y`),r=e.getAttribute(`width`),i=e.getAttribute(`height`);e.setAttribute(`data-orig-x`,t||`0`),e.setAttribute(`data-orig-y`,n||`0`),e.setAttribute(`data-orig-width`,r||`0`),e.setAttribute(`data-orig-height`,i||`0`)}}),this.timeline.to(e.nodes(),{width:2,y:(e,t)=>parseFloat(t.getAttribute(`y`)||`0`),height:(e,n)=>t-parseFloat(n.getAttribute(`y`)||`0`),duration:n,ease:Fh.IN_OUT,stagger:Ih.NO_STAGGER,onStart:()=>{this.currentStage=`seatsToRings`,this.callbacks.onStageComplete?.(`seatsToRings`)}},`seatsToRings`),this}animateRingsToBar(e,t){let n=this.durations.ringsToBar/1e3;return e.each(function(e,n){let r=this;if(!t[n])return;let i=r.getAttribute(`x`),a=r.getAttribute(`y`),o=r.getAttribute(`width`),s=r.getAttribute(`height`);r.setAttribute(`data-orig-x`,i||`0`),r.setAttribute(`data-orig-y`,a||`0`),r.setAttribute(`data-orig-width`,o||`0`),r.setAttribute(`data-orig-height`,s||`0`)}),this.timeline.to(e.nodes(),{x:e=>t[e]?.x??0,y:e=>t[e]?.y??0,width:e=>t[e]?.width??0,height:e=>t[e]?.height??0,duration:n,ease:Fh.IN_OUT,stagger:Ih.NO_STAGGER,onStart:()=>{this.currentStage=`ringsToBar`,this.callbacks.onStageComplete?.(`ringsToBar`)}},`ringsToBar`),this}animateAxesReveal(e,t){let n=this.durations.axesReveal/1e3;return this.timeline.to([e.node(),t.node()],{opacity:1,duration:n,ease:Fh.IN_OUT,stagger:Ih.NO_STAGGER,onStart:()=>{this.currentStage=`axesReveal`,this.callbacks.onStageComplete?.(`axesReveal`)}},`axesReveal`),this}animateBarSlide(e,t){let n=this.durations.barSlide/1e3;return this.timeline.to(e.nodes(),{x:t,duration:n,ease:Fh.OUT,stagger:Ih.NO_STAGGER,onStart:()=>{this.currentStage=`barSlide`,this.callbacks.onStageComplete?.(`barSlide`)}},`barSlide`),this}animateBarsGrow(e,t,n=Ih.RIPPLE_STAGGER_DELAY){let r=this.durations.barsGrow/1e3;return e.nodes().forEach((e,i)=>{let a=e,o=a.getAttribute(`data-final-y`)||`0`,s=a.getAttribute(`data-final-height`)||`0`,c=parseInt(a.getAttribute(`data-timestamp-index`)||`0`),l=Math.abs(c-t)*n;this.timeline.fromTo(a,{height:0,y:parseFloat(a.getAttribute(`data-chart-baseline`)||`400`)},{y:parseFloat(o),height:parseFloat(s),duration:r,delay:l,ease:Fh.OUT},`barsGrow`)}),this.timeline.call(()=>{this.currentStage=`barsGrow`,this.callbacks.onStageComplete?.(`barsGrow`)},[],`barsGrow`),this}animateBarsToArea(e,t,n,r){let i=this.durations.barsToArea/1e3,a=new Map;return e.each(function(){let e=this,t=e.getAttribute(`class`);if(!t)return;let n=t.match(/category-([\w-]+)/);if(n&&n[1]){let t=n[1];a.has(t)||a.set(t,[]),a.get(t)?.push(e)}}),this.timeline.set(e.nodes(),{opacity:0},`barsToArea`),this.timeline.set(t.nodes(),{opacity:1},`barsToArea`),t.each(function(){let e=this,t=e.getAttribute(`data-category`);if(!t)return;let r=n.get(t);r&&Ph.to(e,{attr:{d:r},duration:i,ease:Fh.IN_OUT})}),this.timeline.call(()=>{this.currentStage=`barsToArea`,this.callbacks.onStageComplete?.(`barsToArea`)},[],`barsToArea`),this}handleProgress(){let e=this.timeline.progress();this.callbacks.onProgress?.(e)}getControls(){return{play:()=>this.timeline.play(),pause:()=>this.timeline.pause(),reverse:()=>this.timeline.reverse(),restart:()=>this.timeline.restart(),seek:e=>this.timeline.progress(e),seekToStage:e=>{let t=this.timeline.labels[e];t!==void 0&&this.timeline.seek(t)},kill:()=>this.timeline.kill(),getProgress:()=>this.timeline.progress(),getCurrentStage:()=>this.currentStage,getTimeline:()=>this.timeline}}play(){this.timeline.play()}destroy(){this.timeline.kill()}};function Rh(e,t){let{arcAngle:n,arcAngleFlexibility:r=5,radius:i,seatSize:a,minSeatSize:o,maxSeatSize:s,spacing:c,innerRadiusRatio:l}=t,u=i*l,d=e.reduce((e,t)=>e+t.seats,0),f={seatSize:a,arcAngle:n,rings:0,score:-1},p=n-r,m=n+r;for(let e=p;e<=m;e+=2.5){let t=e*Math.PI/180;for(let a=s;a>=o;a-=.1){let l=a*2,p=l*c,m=Math.floor((i-u)/p);for(let i=1;i<=Math.min(m,10);i++){let m=0;for(let e=0;e<i;e++){let n=u+(e+.5)*p,r=l*c/n,i=Math.floor(t/r);m+=i}if(m>=d){let t=d/m,c=(a-o)/(s-o),l=(m-d)/d,u=l<.15?1:l<.3?.7:l<.5?.4:.1,p=1-Math.abs(e-n)/r,h=u*.5+c*.3+t*.15+p*.05;h>f.score&&(f={seatSize:a,arcAngle:e,rings:i,score:h})}}}}let h=f.seatSize,g=f.arcAngle,_=g*Math.PI/180,v=h*2,y=v*c,b=Math.floor((i-u)/y),x=[],S=-_/2-Math.PI/2,C=[],w=0,T=[];for(let e=1;e<=b;e++){let t=0,n=[];for(let r=0;r<e;r++){let e=u+(r+.5)*y,i=v*c/e,a=Math.floor(_/i);n.push(a),t+=a}if(t>=d){w=e,T=n;break}}if(w>0)C.push(...T);else for(let e=0;e<b;e++){let t=u+(e+.5)*y,n=v*c/t,r=Math.floor(_/n);C.push(r)}for(let e=0;e<C.length;e++){let t=u+(e+.5)*y,n=C[e]??0;if(n>0){let r=_/n;for(let i=0;i<n;i++){let n=S+(i+.5)*r,a=Math.cos(n)*t,o=Math.sin(n)*t;x.push({ring:e,index:i,angle:n,x:a,y:o})}}}x.sort((e,t)=>{let n=e.angle-t.angle;return Math.abs(n)>.001?n:e.ring-t.ring});let E=[],D=0;return e.forEach((e,t)=>{let n=Math.min(e.seats,x.length-D);for(let r=0;r<n&&D<x.length;r++){let n=x[D++];n&&E.push({x:n.x,y:n.y,category:e.name,categoryIndex:t,seatIndex:r,ring:n.ring,angle:n.angle,radius:h})}}),{arcAngle:g,radius:i,innerRadius:u,centerX:i,centerY:i,seatSize:h,seats:E,totalSeats:d}}function zh(e,t,n){let r=t<=n?1:n/t;return e.filter(e=>e.value>0).map(e=>{let i=t<=n?e.value:Math.max(1,Math.floor(e.value*r));return{id:e.dataKey,name:e.label,seats:i,colour:e.color}})}function Bh({svg:e,events:t,xScale:n,chartHeight:r,chartWidth:i,timelineHeight:a,timelineOffset:o,instanceId:s,setHoveredTimelineEvent:c,enableBrush:l=!1,onTimeRangeChange:u,minAllowedTime:d,maxAllowedTime:f,brushColor:p=`#69b3a2`,mainGroupSelector:m}){let h=r+o,g=s?`.main-chart-group-${s}`:`.main-chart-group`,_=e.select(m??g),v=s?`timeline-track timeline-track-${s}`:`timeline-track`,y=_.append(`g`).attr(`class`,v),b=s?`timeline-clip-${s}`:`timeline-clip-${Math.random().toString(36).substr(2,9)}`;if(e.append(`defs`).append(`clipPath`).attr(`id`,b).append(`rect`).attr(`x`,0).attr(`y`,h).attr(`width`,i+6).attr(`height`,a),y.append(`rect`).attr(`class`,`timeline-background`).attr(`x`,0).attr(`y`,h).attr(`width`,i).attr(`height`,a).attr(`fill`,`var(--rc-timeline-surface, #FFFFFF)`).attr(`stroke`,`var(--rc-timeline-border, #9CA3AF)`).attr(`stroke-width`,1),y.append(`g`).attr(`clip-path`,`url(#${b})`).selectAll(`.timeline-event`).data(t).enter().append(`rect`).attr(`class`,`timeline-event`).attr(`x`,e=>n(new Date(e.timestamp))-3/2).attr(`y`,h).attr(`width`,3).attr(`height`,a).attr(`fill`,e=>e.color||`#2F42FF`).attr(`stroke`,`none`).attr(`cursor`,`pointer`).attr(`data-timestamp`,e=>e.timestamp).attr(`data-event-name`,e=>e.eventName).on(`mouseenter`,function(e,t){let r=Y(this),i=n(new Date(t.timestamp));r.transition().duration(150).attr(`x`,i-3).attr(`width`,6),c&&c({timestamp:t.timestamp,eventName:t.eventName,x:i})}).on(`mouseleave`,function(e,t){let r=Y(this),i=n(new Date(t.timestamp));r.transition().duration(150).attr(`x`,i-3/2).attr(`width`,3),c&&c(null)}),l&&u){let t=d,r=f,o=Eu().extent([[0,h],[i,h+a]]).on(`start`,i=>{if(!i.selection&&t!==void 0&&r!==void 0){let a=i.sourceEvent;if(a){let i=a.offsetX,c=+n.invert(i);if(c<t||c>r){let t=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(t).call(o.move,null);return}}}}).on(`brush`,i=>{if(!i.selection)return;let[a,c]=i.selection,l=+n.invert(a),u=+n.invert(c);t!==void 0&&(l=Math.max(l,t),u=Math.max(u,t)),r!==void 0&&(l=Math.min(l,r),u=Math.min(u,r));let d=n(new Date(l)),f=n(new Date(u));if(d!==a||f!==c){let t=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(t).call(o.move,[d,f])}}).on(`end`,i=>{if(!i.selection)return;let[a,c]=i.selection,l=[+n.invert(a),+n.invert(c)];t!==void 0&&(l[0]=Math.max(l[0],t)),r!==void 0&&(l[1]=Math.min(l[1],r)),u(l);let d=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(d).call(o.move,null)}),c=s?`timeline-brush timeline-brush-${s}`:`timeline-brush`,l=_.append(`g`).attr(`class`,c).call(o);l.selectAll(`.selection`).attr(`fill`,p).attr(`fill-opacity`,.2).attr(`stroke`,p).attr(`stroke-width`,1),l.selectAll(`.handle`).attr(`fill`,p).attr(`fill-opacity`,.8),l.select(`.overlay`).style(`cursor`,`default`),l.on(`dblclick`,()=>{let e=n.domain();u([+e[0],+e[1]])})}}var Vh={greyHatch:{background:Ta.neoGrey[200],lines:Ta.neoGrey[400]},dataMissingHatch:{background:`#FFF3CC`,lines:`#FFB800`},noLstHatch:{background:`#FFE5E5`,lines:`#ED4134`}};function Hh(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-greyHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Vh.greyHatch.background),n.append(`path`).attr(`d`,`M0,2 L8,2`).attr(`stroke`,Vh.greyHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M0,6 L8,6`).attr(`stroke`,Vh.greyHatch.lines).attr(`stroke-width`,.5)}function Uh(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-dataMissingHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Vh.dataMissingHatch.background),n.append(`path`).attr(`d`,`M0,8 L8,0`).attr(`stroke`,Vh.dataMissingHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M-2,2 L2,-2`).attr(`stroke`,Vh.dataMissingHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M6,10 L10,6`).attr(`stroke`,Vh.dataMissingHatch.lines).attr(`stroke-width`,.5)}function Wh(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-noLstHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Vh.noLstHatch.background),n.append(`path`).attr(`d`,`M0,0 L8,8`).attr(`stroke`,Vh.noLstHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M-2,6 L2,10`).attr(`stroke`,Vh.noLstHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M6,-2 L10,2`).attr(`stroke`,Vh.noLstHatch.lines).attr(`stroke-width`,.5)}function Gh(e,t){let n=e.select(`defs`);n.empty()&&(n=e.append(`defs`)),Hh(n,t),Uh(n,t),Wh(n,t)}function Kh(e,t){return e.startsWith(`url(#`)&&e.endsWith(`)`)?`url(#${t}-${e.slice(5,-1)})`:e}function qh(e){return e.includes(`greyHatchPattern`)?Vh.greyHatch.lines:e.includes(`dataMissingHatchPattern`)?Vh.dataMissingHatch.lines:e.includes(`noLstHatchPattern`)?Vh.noLstHatch.lines:e}function Jh(e,t,n,r){let{xScale:i,yScale:a,addClasses:o=!0,instanceId:s}=r,c=hi().x(e=>i(new Date(e.data.timestamp))).y0(e=>a(e[0])).y1(e=>a(e[1])).curve(di),l=mi().x(e=>i(new Date(e.data.timestamp))).y(e=>a(e[1])).curve(di),u=s?`areas areas-${s}`:`areas`,d=e.select(s?`.areas-${s}`:`.areas`);d.empty()&&(d=e.append(`g`).attr(`class`,u)),t.forEach((e,t)=>{let r=n[t];if(!r)return;let i=r.parliamentMapping?.isSpecialCategory??!1,a=qh(r.color);if(i){let t=d.append(`path`).datum(e).attr(`fill`,`none`).attr(`stroke`,a).attr(`stroke-width`,3).attr(`stroke-dasharray`,`15 8`).attr(`d`,l).style(`pointer-events`,`none`);if(o){let e=s?`area area-${s} area-${r.dataKey}`:`area area-${r.dataKey}`;t.attr(`class`,e)}}else{let t=d.append(`path`).datum(e).attr(`fill`,r.color).attr(`fill-opacity`,r.fillOpacity??.7).attr(`stroke`,a).attr(`stroke-width`,r.strokeWidth??1.5).attr(`d`,c).style(`pointer-events`,`none`);if(o){let e=s?`area area-${s} area-${r.dataKey}`:`area area-${r.dataKey}`;t.attr(`class`,e)}}})}function Yh(e,t){let n=[];for(let r of e){let e=0;for(let i of t){let t=r[i.dataKey]||0,a=e,o=e+t;n.push({timestamp:r.timestamp,category:i.label,dataKey:i.dataKey,y0:a,y1:o,value:t,color:i.color,isSpecialCategory:i.parliamentMapping?.isSpecialCategory??!1}),e+=t}}return n}function Xh(e){return e.replace(/[^a-zA-Z0-9-_]/g,`-`)}function Zh(e,t,n,r){let{centerX:i,centerY:a,addClasses:o=!0,instanceId:s,parliamentRadius:c=200,paletteMode:l=`light`}=r,u=s?`parliament parliament-${s}`:`parliament`,d=e.select(s?`.parliament-${s}`:`.parliament`);d.empty()&&(d=e.append(`g`).attr(`class`,u));let f=t.seats[0]?.radius,p=new Map(n.map(e=>[e.label,za(e.color,f,{paletteMode:l,label:e.label})]));t.seats.forEach(e=>{let t=n.find(t=>t.label===e.category);if(!t)return;let r=p.get(t.label);if(!r)return;let c=d.append(`circle`).attr(`cx`,i+e.x).attr(`cy`,a+e.y).attr(`r`,e.radius).attr(`fill`,r.fill).attr(`stroke`,r.stroke).attr(`stroke-width`,r.strokeWidth??.5);r.dashArray&&c.attr(`stroke-dasharray`,r.dashArray);let l=d.append(`circle`).attr(`cx`,i+e.x).attr(`cy`,a+e.y).attr(`r`,e.radius*2.5).attr(`fill`,`transparent`).attr(`stroke`,`none`).attr(`pointer-events`,`all`);if(o){let t=s?`seat seat-${s} seat-${Xh(e.category)}`:`seat seat-${Xh(e.category)}`;c.attr(`class`,t),l.attr(`class`,t)}});let m=s?`parliament-label parliament-label-${s}`:`parliament-label`;if(e.select(`.${m.split(` `)[0]}`).empty()){let t=e.append(`g`).attr(`class`,m).attr(`transform`,`translate(${i},${a-c*.15})`).style(`opacity`,`0`).style(`pointer-events`,`none`);t.append(`text`).attr(`class`,`label-category`).attr(`text-anchor`,`middle`).attr(`dy`,`-15`).style(`font-size`,`22px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-family`,`system-ui, -apple-system, sans-serif`),t.append(`text`).attr(`class`,`label-value`).attr(`text-anchor`,`middle`).attr(`dy`,`35`).style(`font-size`,`48px`).style(`font-weight`,`bold`).style(`font-family`,`system-ui, -apple-system, sans-serif`);let n=t.append(`g`).attr(`class`,`scale-indicator`).attr(`transform`,`translate(0, 65)`).style(`opacity`,`0`);n.append(`circle`).attr(`r`,4).attr(`cx`,-30).attr(`cy`,0).style(`fill`,`var(--rc-muted-text, #888)`),n.append(`text`).attr(`x`,-20).attr(`y`,0).attr(`dy`,`0.35em`).attr(`text-anchor`,`start`).style(`font-size`,`18px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-style`,`italic`).style(`font-family`,`system-ui, -apple-system, sans-serif`)}}function Qh(e,t,n,r,i,a,o=!1){let s=new Map,c=i;if(t.length>0&&t[0]?.timestamp!==void 0){let e=t[0].timestamp;c=n(new Date(e))}let l=new Map;for(let t of e.seats)l.has(t.category)||l.set(t.category,[]),l.get(t.category).push(t);let u=new Map;for(let e of t)u.set(e.dataKey,{y0:e.y0,y1:e.y1,isSpecialCategory:e.isSpecialCategory}),e.label&&e.label!==e.dataKey&&u.set(e.label,{y0:e.y0,y1:e.y1,isSpecialCategory:e.isSpecialCategory});for(let t of e.seats){let e=u.get(t.category);if(!e){s.set(t,{x:c,y:a/2});continue}let n=r(e.y0),i=r(e.y1),d;if(o){let e=l.get(t.category)??[],r=t.seatIndex,a=e.length;if(a===1)d=(n+i)/2;else{let e=r/(a-1);d=n+(i-n)*e}}else d=i;s.set(t,{x:c,y:d})}return s}function $h(e,t,n){if(e.length===0)return[];let r=e[e.length-1],i=[],a=0;for(let e of t){let t=r[e.dataKey]||0,n=a,o=a+t;i.push({dataKey:e.dataKey,label:e.label,y0:n,y1:o,value:t,timestamp:r.timestamp,isSpecialCategory:e.parliamentMapping?.isSpecialCategory??!1}),a+=t}return i}function eg(e){let t=e;return{seatsToLines:t*.2,seatsToBar:t*.07,crossFadePause:t*.003,barSlideToTimeline:t*.22,axesAndBarsGrow:t*.22,barsToArea:t*.287}}var tg=new Map;Y.prototype.transition=ql;var ng=({containerRef:e,data:t,categories:n,mode:r,paletteMode:i=`light`,width:a,height:o,margin:s,timeRange:c,showGrid:l=!0,showAxes:u=!0,axisLabelColor:f,axisLabelSize:p=14,formatDate:m,formatValue:h,markers:g=[],arcAngle:_=200,parliamentRadius:v=200,seatSize:y=4.5,animationDuration:b=900,onMorphComplete:x,onAnimationStateChange:S,onTimelineReady:C,onAnimationProgress:w,onHoveredDataChange:T,hoveredCategory:E,maxSeats:D=ja.maxSeats,parliamentTimestamp:O,enableBrush:k=!1,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,showScaleIndicator:N=!1,reposPerSeat:P=1,timelineEvents:F=[],showTimeline:I=!1,timelineHeight:L=40,timelineOffset:R=35,brushColor:z=`#69b3a2`,showCrosshair:B=!1,onCrosshairMove:V})=>{let[H,U]=(0,d.useState)(`area`),[ee,te]=(0,d.useState)(!1),[ne,re]=(0,d.useState)(null),[W,ie]=(0,d.useState)(0),[ae,G]=(0,d.useState)(null),[oe,se]=(0,d.useState)(null),[ce,le]=(0,d.useState)([]),K=(0,d.useRef)(null),ue=(0,d.useRef)(r),de=(0,d.useRef)(!0),fe=(0,d.useRef)(!1),q=(0,d.useRef)(`morph-${Math.random().toString(36).substr(2,9)}`),pe=(0,d.useRef)(void 0),me=(0,d.useRef)(c),he=(0,d.useRef)(g),ge=(0,d.useRef)(F),_e=(0,d.useRef)(x),ve=(0,d.useRef)(S),ye=(0,d.useRef)(C),be=(0,d.useRef)(w),xe=(0,d.useRef)(T),Se=(0,d.useRef)(V);(0,d.useEffect)(()=>{_e.current=x,ve.current=S,ye.current=C,be.current=w,xe.current=T,Se.current=V},[x,S,C,w,T,V]),(0,d.useEffect)(()=>{if(e.current&&H===`parliament`){if(E){let r=n.find(e=>e.dataKey===E);if(r){let n=r.label;if(re(n),mg(e.current,n),t.length>0){let n=t[t.length-1],i=Math.round(n.values[r.dataKey]||0),a={label:r.label,value:i,color:qh(r.color)};fg(e.current,a,N,P,q.current)}}}else re(null),mg(e.current,null),fg(e.current,null,N,P,q.current)}},[E,H,n,t,N,P]);let Ce=a-s.left-s.right,we=o-s.top-s.bottom;return(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0||(pe.current&&=(pe.current(),void 0),fe.current))return;let a=Y(e.current),o=r!==ue.current;de.current?(a.selectAll(`*`).remove(),Gh(a,q.current),de.current=!1):o||(a.selectAll(`*`).remove(),Gh(a,q.current));let d=t[t.length-1],x=n.reduce((e,t)=>e+(d.values[t.dataKey]||0),0),S=t.map(e=>{let t={timestamp:e.timestamp};for(let r of n)t[r.dataKey]=e.values[r.dataKey]||0;return t}),C=n.map(e=>e.dataKey),w=Si().keys(C),T=w(S),E=t.map(e=>e.timestamp),H=o||!c?Math.min(...E):c[0],ee=o||!c?Math.max(...E):c[1],W=[...E].sort((e,t)=>e-t),ae=[];for(let e=0;e<W.length-1;e++)ae.push(W[e+1]-W[e]);let oe=ee+(ae.length>0?ae.reduce((e,t)=>e+t,0)/ae.length:0)*1.15,ce=Qr().domain([new Date(H),new Date(oe)]).range([0,Ce]),me=w(S.filter(e=>e.timestamp>=H&&e.timestamp<=ee)),he=me.length>0?Math.max(...me[me.length-1].map(e=>e[1]??0)):0,ge=Nt().domain([0,he*1.15]).range([we,0]),Se=n.map(e=>({...e,color:Kh(e.color,q.current)})),Te=Rh(zh(Se.map(e=>({dataKey:e.dataKey,label:e.label,color:e.color,value:d.values[e.dataKey]||0})),x,D).reverse(),{arcAngle:_,radius:v,seatSize:y,minSeatSize:2,maxSeatSize:30,spacing:ja.chartConfig.spacing,innerRadiusRatio:.4});K.current=Te;let Ee=Qh(Te,$h(S,n,ge),ce,ge,Ce,we);if(o&&!fe.current){fe.current=!0,te(!0),ve.current?.(!0),G(null),le([]),ie(0);let n=a.select(`g[transform]`);if(n.empty()&&(n=a.select(`g`)),n.empty()){a.selectAll(`*`).remove(),Gh(a,q.current),og(a,r===`parliament`?`parliament`:`area`,T,Se,Te,ce,ge,Ce,we,s,l,u,f,p,m,h,k,A,q.current,g,c,le,G,F,I,L,R,se,j,M,z,B,V,i),te(!1),U(r===`parliament`?`parliament`:`area`),ie(+(r===`parliament`)),ue.current=r;return}let o=setTimeout(()=>{fe.current=!1,te(!1),ue.current=r},b*3);sg(a,r,T,Se,Te,Ee,ce,ge,Ce,we,s,b,()=>{if(clearTimeout(o),fe.current=!1,te(!1),U(r===`parliament`?`parliament`:`area`),r===`parliament`&&ie(1),ve.current?.(!1),_e.current?.(),ue.current=r,r===`parliament`&&e.current&&xe.current&&(pe.current=pg(e.current,Se,t,ne,re,xe.current,N,P,q.current)),r!==`parliament`&&e.current){re(null),xe.current?.(null),fg(e.current,null,N,P,q.current);let t=Y(e.current),n=t.select(q.current?`.main-chart-group-${q.current}`:`.main-chart-group`);if(I){let e=q.current?`.timeline-track-${q.current}`:`.timeline-track`,r=q.current?`.timeline-brush-${q.current}`:`.timeline-brush`;n.select(e).remove(),n.select(r).remove(),Bh({svg:t,events:F,xScale:ce,chartHeight:we,chartWidth:Ce,timelineHeight:L,timelineOffset:R,instanceId:q.current,setHoveredTimelineEvent:se,enableBrush:k,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,brushColor:z})}if(k&&A&&rg(n.select(q.current?`.chart-content-group-${q.current}`:`.chart-content-group`),Ce,we,ce,A,q.current,t,j,M,z),g.length>0&&le&&G&&c){let e=g.filter(e=>e.timestamp>=(c[0]??0)-1&&e.timestamp<=(c[1]??1/0)+1).map(e=>({...e,x:ce(new Date(e.timestamp))}));if(le(e),e.length>0){ig(n,e,we,Ce,k,G,q.current);let t=n.select(q.current?`.markers-${q.current}`:`.markers`);if(!t.empty()){n.selectAll(`.marker-hover-overlay`).remove();let r=n.select(q.current?`.chart-content-group-${q.current}`:`.chart-content-group`);ag(r.empty()?n:r,t,e,Ce,we,k,G,s,B,V)}}}}},u,p,m,h,ye.current,(e,t)=>{if(r===`parliament`&&e>=.95){let t=(e-.95)/.05;ie(Math.min(t,1))}be.current?.(e,t)},O,q.current,i)}else ue.current=r,r===`parliament`&&(G(null),le([])),og(a,r===`parliament`?`parliament`:`area`,T,Se,Te,ce,ge,Ce,we,s,l,u,f,p,m,h,k,A,q.current,g,c,le,G,F,I,L,R,se,j,M,z,B,V,i),U(r===`parliament`?`parliament`:`area`),ie(+(r===`parliament`)),r===`parliament`&&e.current&&xe.current&&(pe.current=pg(e.current,Se,t,ne,re,xe.current,N,P,q.current));return()=>{pe.current&&=(pe.current(),void 0)}},[r]),(0,d.useEffect)(()=>{if(!e.current||t.length===0||fe.current)return;if(de.current){me.current=c;return}if(c===me.current||c?.[0]===me.current?.[0]&&c?.[1]===me.current?.[1])return;me.current=c;let r=Y(e.current),d=t.map(e=>{let t={timestamp:e.timestamp};for(let r of n)t[r.dataKey]=e.values[r.dataKey]||0;return t}),_=n.map(e=>e.dataKey),v=Si().keys(_)(d),y=t.map(e=>e.timestamp),b=c?c[0]:Math.min(...y),x=c?c[1]:Math.max(...y),S=(y.length>1?(y[y.length-1]-y[0])/(y.length-1):0)*.5,C=Qr().domain([new Date(b-S),new Date(x+S)]).range([0,a-s.left-s.right]),w=Math.max(...v[v.length-1].map(e=>e[1])),T=Nt().domain([0,w*1.1]).range([o-s.top-s.bottom,0]);if(!K.current)return;let E=K.current,D=n.map(e=>({...e,color:Kh(e.color,q.current)}));r.selectAll(`*`).remove(),Gh(r,q.current),og(r,H===`parliament`?`parliament`:`area`,v,D,E,C,T,a-s.left-s.right,o-s.top-s.bottom,s,l,u,f,p,m,h,k,A,q.current,g,c,le,G,F,I,L,R,se,j,M,z,B,V,i),H===`parliament`&&e.current&&xe.current&&(pe.current=pg(e.current,D,t,ne,re,xe.current,N,P,q.current))},[c]),(0,d.useEffect)(()=>{if(!e.current||t.length===0||fe.current)return;if(de.current){he.current=g,ge.current=F;return}if(H===`parliament`){he.current=g,ge.current=F;return}let n=g.length!==he.current.length||g.some((e,t)=>e.timestamp!==he.current[t]?.timestamp||e.label!==he.current[t]?.label),r=F.length!==ge.current.length||F.some((e,t)=>e.timestamp!==ge.current[t]?.timestamp||e.eventName!==ge.current[t]?.eventName);if(!n&&!r)return;he.current=g,ge.current=F;let i=Y(e.current),l=i.select(q.current?`.main-chart-group-${q.current}`:`.main-chart-group`);if(l.empty())return;let u=t.map(e=>e.timestamp),d=c?c[0]:Math.min(...u),f=c?c[1]:Math.max(...u),p=(u.length>1?(u[u.length-1]-u[0])/(u.length-1):0)*.5,m=a-s.left-s.right,h=o-s.top-s.bottom,_=Qr().domain([new Date(d-p),new Date(f+p)]).range([0,m]);if(r&&I){let e=q.current?`.timeline-track-${q.current}`:`.timeline-track`,t=q.current?`.timeline-brush-${q.current}`:`.timeline-brush`;l.select(e).remove(),l.select(t).remove(),Bh({svg:i,events:F,xScale:_,chartHeight:h,chartWidth:m,timelineHeight:L,timelineOffset:R,instanceId:q.current,setHoveredTimelineEvent:se,enableBrush:k,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,brushColor:z})}let v=[];if(n&&g.length>0&&c){let e=q.current?`.markers-${q.current}`:`.markers`;l.select(e).remove(),v=g.filter(e=>e.timestamp>=(c[0]??0)-1&&e.timestamp<=(c[1]??1/0)+1).map(e=>({...e,x:_(new Date(e.timestamp))})),le(v),v.length>0&&ig(l,v,h,m,k,G,q.current)}if(v.length>0){let e=l.select(q.current?`.markers-${q.current}`:`.markers`);if(!e.empty()){l.selectAll(`.marker-hover-overlay`).remove();let t=l.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`x`,0).attr(`y`,0).attr(`width`,m).attr(`height`,h).attr(`fill`,`none`).attr(`pointer-events`,`all`),n=null;t.on(`mousemove`,function(t){let[r]=lc(t,this),i=null,a=1/0;if(v.forEach(e=>{let t=Math.abs(r-e.x);t<a&&(a=t,i=e)}),!i||a>50){n!==null&&(n=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),G(null));return}let o=i;n!==o.timestamp&&(n=o.timestamp,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),e.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(o.timestamp)}).attr(`opacity`,.6),e.selectAll(`.marker-label`).filter(function(){return Y(this).attr(`data-timestamp`)===String(o.timestamp)}).attr(`opacity`,1),G(o))}),t.on(`mouseleave`,function(){n=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),G(null)})}}},[g,F,ee]),{isMorphing:ee,currentMode:H,hoveredCategory:ne,scaleIndicatorOpacity:W,visibleMarkers:ce,hoveredMarker:ae,setHoveredMarker:G,hoveredTimelineEvent:oe,setHoveredTimelineEvent:se}};function rg(e,t,n,r,i,a,o,s,c,l){let u=s,d=c,f=Eu().extent([[0,0],[t,n]]).on(`start`,e=>{if(!e.selection&&u!==void 0&&d!==void 0){let t=e.sourceEvent;if(t){let e=t.offsetX,n=+r.invert(e);if(n<u||n>d){o.select(`.brush`).call(f.move,null);return}}}}).on(`brush`,e=>{if(!e.selection)return;let[t,n]=e.selection,i=+r.invert(t),a=+r.invert(n);u!==void 0&&(i=Math.max(i,u),a=Math.max(a,u)),d!==void 0&&(i=Math.min(i,d),a=Math.min(a,d));let s=r(new Date(i)),c=r(new Date(a));(s!==t||c!==n)&&o.select(`.brush`).call(f.move,[s,c])}).on(`end`,e=>{if(!e.selection)return;let[t,n]=e.selection,a=[+r.invert(t),+r.invert(n)];u!==void 0&&(a[0]=Math.max(a[0],u)),d!==void 0&&(a[1]=Math.min(a[1],d)),i(a),o.select(`.brush`).call(f.move,null)}),p=e.append(`g`).attr(`class`,`brush`).call(f);p.selectAll(`.selection`).attr(`fill`,l).attr(`fill-opacity`,.2).attr(`stroke`,l).attr(`stroke-width`,1),p.selectAll(`.handle`).attr(`fill`,l).attr(`fill-opacity`,.8),p.select(`.overlay`).style(`cursor`,`default`),p.on(`dblclick`,()=>{let e=r.domain(),t=[+e[0],+e[1]];s!==void 0&&(t[0]=Math.max(t[0],s)),c!==void 0&&(t[1]=Math.min(t[1],c)),i(t)})}function ig(e,t,n,r,i,a,o){let s=o?`markers markers-${o}`:`markers`,c=e.append(`g`).attr(`class`,s);t.forEach(e=>{c.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,e.timestamp).attr(`x1`,e.x).attr(`x2`,e.x).attr(`y1`,0).attr(`y2`,n).attr(`stroke`,e.color??`#2F42FF`).attr(`stroke-width`,2).attr(`opacity`,0),e.label&&c.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,e.timestamp).attr(`x`,e.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,e.color??`#2F42FF`).attr(`opacity`,0)})}function ag(e,t,n,r,i,a,o,s,c=!1,l){let u=null,d;d=a?e.select(`.brush .overlay`):e.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,r).attr(`height`,i).attr(`fill`,`none`).attr(`pointer-events`,`all`);let f=e=>{let r=null,i=1/0;if(n.forEach(t=>{let n=Math.abs(e-t.x);n<i&&(i=n,r=t)}),!r||i>50)return u!==null&&(u=null,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),o(null)),!1;let a=r;return u===a.timestamp||(u=a.timestamp,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),t.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,.6),t.selectAll(`.marker-label`).filter(function(){return Y(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,1),o(a),!0)};d.on(`mousemove`,function(e){let[t,n]=lc(e,this);f(t),c&&l&&l({x:t+s.left,y:n+s.top})}),d.on(`mouseleave`,function(){u=null,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),o(null),l&&l(null)})}function og(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=!1,_,v,y=[],b=[0,0],x,S,C=[],w=!1,T=40,E=15,D,O,k,A=`#69b3a2`,j=!1,M,N=`light`){let P=O,F=k,I=null,L=v?`main-chart-group main-chart-group-${v}`:`main-chart-group`,R=e.append(`g`).attr(`class`,L).attr(`transform`,`translate(${l.left},${l.top})`),z=v?`chart-clip-${v}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`;e.select(`defs`).append(`clipPath`).attr(`id`,z).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,s).attr(`height`,c);let B=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`,V=R.append(`g`).attr(`class`,B).attr(`clip-path`,`url(#${z})`);if(u&&t!==`parliament`&&(V.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(to(a).ticks(6).tickSize(c).tickFormat(()=>``)),V.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(no(o).ticks(5).tickSize(-s).tickFormat(()=>``))),t===`area`&&(Jh(V,n,r,{xScale:a,yScale:o,addClasses:!0,instanceId:v}),y.length>0)){let e=y.filter(e=>e.timestamp>=b[0]-1&&e.timestamp<=b[1]+1).map(e=>({...e,x:a(new Date(e.timestamp))}));I={markersGroup:null,visibleMarkers:e},x&&x(e)}if(t===`parliament`){let e=s/2,t=i.radius+10,n=c-i.radius*.3;Zh(V,i,r,{centerX:e,centerY:Math.max(t,n),addClasses:!0,instanceId:v,parliamentRadius:i.radius,paletteMode:N})}if(d&&t!==`parliament`){let e=to(a).ticks(6).tickPadding(12);m&&e.tickFormat(e=>m(+e));let t=R.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${c})`).call(e).selectAll(`text`).attr(`font-size`,p).attr(`font-weight`,500);f&&t.attr(`fill`,f);let n=no(o).ticks(5);n.tickFormat(e=>+e==0?``:h?h(+e):String(e));let r=R.append(`g`).attr(`class`,`axis axis-y`).call(n).selectAll(`text`).attr(`font-size`,p).attr(`font-weight`,500);f&&r.attr(`fill`,f)}if(g&&_&&t===`area`){let t=P,n=F,r=Eu().extent([[0,0],[s,c]]).on(`start`,i=>{if(!i.selection&&t!==void 0&&n!==void 0){let o=i.sourceEvent;if(o){let i=o.offsetX-(l?.left||0),s=+a.invert(i);if(s<t||s>n){e.select(`.brush`).call(r.move,null);return}}}}).on(`brush`,i=>{if(!i.selection)return;let[o,s]=i.selection,c=+a.invert(o),l=+a.invert(s);t!==void 0&&(c=Math.max(c,t),l=Math.max(l,t)),n!==void 0&&(c=Math.min(c,n),l=Math.min(l,n));let u=a(new Date(c)),d=a(new Date(l));(u!==o||d!==s)&&e.select(`.brush`).call(r.move,[u,d])}).on(`end`,i=>{if(!i.selection)return;let[o,s]=i.selection,c=[+a.invert(o),+a.invert(s)];t!==void 0&&(c[0]=Math.max(c[0],t)),n!==void 0&&(c[1]=Math.min(c[1],n)),_(c),e.select(`.brush`).call(r.move,null)}),i=V.append(`g`).attr(`class`,`brush`).call(r);i.selectAll(`.selection`).attr(`fill`,A).attr(`fill-opacity`,.2).attr(`stroke`,A).attr(`stroke-width`,1),i.selectAll(`.handle`).attr(`fill`,A).attr(`fill-opacity`,.8),i.select(`.overlay`).style(`cursor`,`default`),i.on(`dblclick`,()=>{let e=a.domain();_([+e[0],+e[1]])})}if(t===`area`&&I&&I.visibleMarkers.length>0){let e=R.append(`g`).attr(`class`,`markers`).attr(`clip-path`,`url(#${z})`);I.visibleMarkers.forEach(t=>{e.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,t.timestamp).attr(`x1`,t.x).attr(`x2`,t.x).attr(`y1`,0).attr(`y2`,c).attr(`stroke`,t.color??`#2F42FF`).attr(`stroke-width`,2).attr(`opacity`,0),t.label&&e.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,t.timestamp).attr(`x`,t.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,t.color??`#2F42FF`).attr(`opacity`,0)}),I.markersGroup=e}t===`area`&&w&&D&&Bh({svg:e,events:C,xScale:a,chartHeight:c,chartWidth:s,timelineHeight:T,timelineOffset:E,instanceId:v,setHoveredTimelineEvent:D,enableBrush:g,onTimeRangeChange:_,minAllowedTime:P,maxAllowedTime:F,brushColor:A}),t===`area`&&ag(V,I?.markersGroup??V.append(`g`).attr(`class`,`empty-markers-group`),I?.visibleMarkers??[],s,c,g,S??(()=>{}),l,j,M)}function sg(e,t,n,r,i,a,o,s,c,l,u,d,f,p=!0,m=14,h,g,_,v,y,b,x=`light`){let S=e.select(b?`.main-chart-group-${b}`:`.main-chart-group`);S.selectAll(`.markers`).remove(),S.selectAll(`.marker-hover-overlay`).remove(),S.selectAll(`.brush`).remove(),t===`stacked-area`||t===`area`?lg(S,n,r,i,a,o,s,c,l,d,f,p,m,h,g,_,v,y,b):ug(S,n,r,i,a,o,s,c,l,d,f,p,m,h,g,_,v,y,b,x)}function cg(e,t,n,r,i,a,o,s){let c=e[a];if(!c)return``;let l=c.find(e=>e.data.timestamp===o);if(!l)return``;let u=l.data,d=t[a];if(!d)return``;let f=u[d.dataKey];if(!f||f<=0)return``;let p=n.get(o);if(!p)return``;let m=p.x,h=p.width,g=l[0],_=l[1],v=s?i:r(g),y=s?i:r(_),b=[];return b.push(`M ${m} ${v}`),b.push(`L ${m} ${y}`),b.push(`L ${m+h} ${y}`),b.push(`L ${m+h} ${v}`),b.push(`Z`),b.join(` `)}function lg(e,t,n,r,i,a,o,s,c,l,u,d=!0,f=14,p,m,h,g,_,v){let y=v?`.seat-${v}`:`.seat`,b=e.selectAll(y),x=v?`.chart-content-group-${v}`:`.chart-content-group`,S=e.select(x);if(S.empty()){let t=e.attr(`clip-path`),n=t&&t.match(/url\(#(.+)\)/)?.[1]||`chart-clip-${Math.random().toString(36).substr(2,9)}`,r=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`;S=e.append(`g`).attr(`class`,r).attr(`clip-path`,`url(#${n})`)}if(b.size()===0){Jh(e,t,n,{xScale:a,yScale:o,addClasses:!0,instanceId:v}),u();return}let C=eg(l),w=v?tg.get(v):void 0;w&&(w.destroy(),v&&tg.delete(v));let T=e=>e<.2?`seatsToRings`:e<.35?`ringsToBar`:e<.464?`axesReveal`:e<.6?`barSlide`:e<.82?`barsGrow`:`barsToArea`,E=new Lh({seatsToRings:C.seatsToLines,ringsToBar:C.seatsToBar,axesReveal:C.barSlideToTimeline*.3,barSlide:C.barSlideToTimeline*.7,barsGrow:C.axesAndBarsGrow,barsToArea:C.barsToArea},{onStageComplete:e=>{},onProgress:e=>{g&&g(e,T(e))},onComplete:()=>{u()}});v&&tg.set(v,E),h&&h(E.getControls().getTimeline());let D=t[0].map(e=>e.data),O=Yh(D,n),k=s/2,A=r.radius+10,j=c-r.radius*.3,M=Math.max(A,j),N=D.map(e=>e.timestamp),P=_??Math.max(...N),F=new Map,I=[];N.forEach((e,t)=>{let n=a(new Date(e)),r=N[t+1];if(r){let e=a(new Date(r))-n;I.push(e)}});let L=I.length>0?I.reduce((e,t)=>e+t,0)/I.length:30;N.forEach((e,t)=>{let n=a(new Date(e)),r=N[t+1],i=t===N.length-1?L:a(new Date(r))-n;F.set(e,{x:n,width:i})});let R=O.filter(e=>e.timestamp===P),z=F.get(P),B=v?`parliament-bar-path parliament-bar-path-${v}`:`parliament-bar-path`,V=S.append(`g`).attr(`class`,B);R.sort((e,t)=>t.y0-e.y0),new Map().set(P,{x:666-z.width/2,width:z.width});let H=[],U=(r.radius-r.innerRadius)*.6,ee=c*.8,te=M,ne=R.reduce((e,t)=>e+(t.y1-t.y0),0),re=0;n.forEach(e=>{let t=R.find(t=>t.dataKey===e.dataKey);if(!t)return;let n=(t.y1-t.y0)/ne*ee,r=te-re,i=te-re-n,a=666-U/2,o=`M ${a} ${r} L ${a} ${i} L ${a+U} ${i} L ${a+U} ${r} Z`;re+=n;let s=V.append(`path`).attr(`class`,`parliament-bar-segment category-${Xh(t.dataKey)}`).attr(`d`,o).attr(`fill`,t.color).style(`opacity`,0).node();s&&H.push(s)}),v&&(window.orchestratorMap=tg);let W=E.getControls().getTimeline(),ie=C.seatsToLines/1e3,ae=C.seatsToBar/1e3;W.call(()=>{g?.(W.progress(),`seatsToRings`)},[],`seatsToRings`);let G=b.nodes(),oe=k,se=M,ce=Math.max(...r.seats.map(e=>e.ring)),le=r.seats.filter(e=>e.ring===ce),K=e.append(`g`).attr(`class`,`seat-lines-${v||`default`}`),ue=n.map(e=>{let t=b.filter(`.seat-${Xh(e.dataKey)}`).size();return t>0?{name:e.dataKey,seatCount:t,color:e.color}:null}).filter(e=>e!==null).reverse(),de=ue.reduce((e,t)=>e+t.seatCount,0),fe=le.length,q=r.radius-r.innerRadius,pe=q*.6,me=pe/2,he=q*.6,ge=[],_e=0;ue.forEach(e=>{let t=Math.max(1,Math.round(e.seatCount/de*fe));for(let n=0;n<t;n++){let t=(_e+n)/fe,i=r.arcAngle*Math.PI/180,a=-i/2-Math.PI/2+t*i,o=(r.innerRadius+r.radius)/2,s=oe+Math.cos(a)*o,c=se+Math.sin(a)*o,l=Math.cos(a),u=Math.sin(a),d=s-me*l,f=c-me*u,p=s+me*l,m=c+me*u,h=K.append(`line`).attr(`class`,`seat-line`).attr(`x1`,d).attr(`y1`,f).attr(`x2`,p).attr(`y2`,m).attr(`stroke`,e.color).attr(`stroke-width`,r.seatSize*2).attr(`stroke-linecap`,`butt`).style(`opacity`,0).attr(`data-angle`,a*180/Math.PI).attr(`data-center-x`,s).attr(`data-center-y`,c).attr(`data-initial-length`,pe).node();ge.push({element:h,angle:a})}_e+=t});let ve=()=>{K.remove()},ye=ie*.5,be=[];if(be.push(...G),be.sort((e,t)=>parseInt(e.getAttribute(`data-layout-index`)||`-1`,10)-parseInt(t.getAttribute(`data-layout-index`)||`-1`,10)),be.length>0&&ge.length>0){let e=ge.map(e=>e.element);W.to(be,{attr:{r:1.5},duration:ye*.3,ease:`power2.in`},`seatsToRings+=0`),e.forEach(e=>{let t=e.getAttribute(`x1`)||`0`,n=e.getAttribute(`y1`)||`0`,r=e.getAttribute(`x2`)||`0`,i=e.getAttribute(`y2`)||`0`;e.setAttribute(`data-final-x1`,t),e.setAttribute(`data-final-y1`,n),e.setAttribute(`data-final-x2`,r),e.setAttribute(`data-final-y2`,i),e.setAttribute(`x1`,t),e.setAttribute(`y1`,n),e.setAttribute(`x2`,t),e.setAttribute(`y2`,n)}),W.to(e,{attr:{x2:(e,t)=>parseFloat(t.getAttribute(`data-final-x2`)||`0`),y2:(e,t)=>parseFloat(t.getAttribute(`data-final-y2`)||`0`)},opacity:.9,duration:ye*.6,ease:`power2.out`},`seatsToRings+=${0+ye*.2}`),W.to(be,{opacity:0,duration:ye*.3,ease:`power2.out`},`seatsToRings+=${0+ye*.3}`)}let xe=ie*.05,Se=ie*.7,Ce=0+ye+xe;if(ge.length>0){let e=M,t=c*.8/ge.length,n=e,r=[...ge].sort((e,t)=>t.angle-e.angle),i=.6/r.length;r.forEach((e,r)=>{let a=n-r*t,o=i*r*Se,s=e.element,c=parseFloat(s.getAttribute(`data-final-x1`)||`0`),l=parseFloat(s.getAttribute(`data-final-y1`)||`0`),u=parseFloat(s.getAttribute(`data-final-x2`)||`0`),d=parseFloat(s.getAttribute(`data-final-y2`)||`0`),f=(c+u)/2,p=(l+d)/2,m=Math.atan2(d-l,u-c),h=Math.sqrt((u-c)**2+(d-l)**2);W.to({progress:0},{progress:1,duration:Se*.5,ease:`power2.inOut`,delay:o,onUpdate:function(){let e=this.progress(),t=f+(666-f)*e,n=p+(a-p)*e,r=160*e*(1-e),i=t,o=n-r,c=0-m,l=m+c*e*e,u=(h+(he-h)*e)/2,d=i-u*Math.cos(l),g=o-u*Math.sin(l),_=i+u*Math.cos(l),v=o+u*Math.sin(l);s.setAttribute(`x1`,d.toString()),s.setAttribute(`y1`,g.toString()),s.setAttribute(`x2`,_.toString()),s.setAttribute(`y2`,v.toString())},onComplete:function(){let e=he/2;s.setAttribute(`x1`,(666-e).toString()),s.setAttribute(`y1`,a.toString()),s.setAttribute(`x2`,(666+e).toString()),s.setAttribute(`y2`,a.toString())}},`seatsToRings+=${Ce}`),W.to(e.element,{opacity:.95,duration:Se*.3,ease:`power2.out`,delay:o},`seatsToRings+=${Ce}`)})}let we=K,Te=[];R.forEach((e,t)=>{let n=b.filter(`.seat-${Xh(e.category)}`),i=n.size();if(i===0)return;let a=o(e.y1),s=o(e.y0)-o(e.y1),c=n.nodes().sort((e,t)=>parseInt(e.getAttribute(`data-layout-index`)||`-1`,10)-parseInt(t.getAttribute(`data-layout-index`)||`-1`,10)),l=Math.max(z.width,100),u=s,d=l/Math.max(u,1),f=Math.max(2,Math.ceil(Math.sqrt(i*d))),p=Math.ceil(i/f),m=l*.8,h=u*.8,g=f>1?m/(f-1):0,_=p>1?h/(p-1):0,v=f>1?(f-1)*g:0,y=p>1?(p-1)*_:0,x=666-l/2+(l-v)/2,S=a+(u-y)/2;c.forEach((n,a)=>{let o=parseInt(n.getAttribute(`data-layout-index`)||`-1`,10),s=o>=0?r.seats[o]:void 0,c=s?k+s.x:parseFloat(n.getAttribute(`cx`)||`0`),l=s?M+s.y:parseFloat(n.getAttribute(`cy`)||`0`),u=s?.radius||parseFloat(n.getAttribute(`r`)||`4`),d=i%f,p,m;if(d>0&&a<d)m=0,p=a;else{let e=a-(d>0?d:0);p=e%f,m=Math.floor(e/f)+ +(d>0)}let h=x+p*g;if(d>0&&m===0){let e=d>1?(d-1)*g:0,t=(v-e)/2;h=x+t+p*g}let y=S+m*_;Te.push({element:n,startX:c,startY:l,startRadius:u,category:e.dataKey,segmentIndex:t,endY:y,endX:h})})});let Ee=Te.map(e=>{let t=e.startX-k,n=e.startY-M,r=Math.atan2(n,t);return{...e,angle:r}});Ee.sort((e,t)=>t.angle-e.angle);let De=ae*.8,Oe=Ee.length,ke=De/Math.max(Oe,1)*(Oe-1)+.6,Ae=ae*.3,je=ke;W.to(H,{opacity:1,duration:Ae,ease:`power2.inOut`},`seatsToBar+=${je}`),we&&(W.to(we.selectAll(`.seat-line`).nodes(),{opacity:0,duration:Ae,ease:`power2.inOut`},`seatsToBar+=${je}`),W.call(()=>{ve()},[],`seatsToBar+=${je+Ae}`));let Me=C.barSlideToTimeline/1e3,Ne=null,Pe=null;if(d){let t=to(a).ticks(6).tickPadding(12);p&&t.tickFormat(e=>p(e.getTime())),Ne=e.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${c})`).attr(`opacity`,0),Ne.call(t).selectAll(`text`).attr(`font-size`,f).attr(`font-weight`,500);let n=no(o).ticks(5);n.tickFormat(e=>+e==0?``:m?m(e):String(e)),Pe=e.append(`g`).attr(`class`,`axis axis-y`).attr(`opacity`,0),Pe.call(n).selectAll(`text`).attr(`font-size`,f).attr(`font-weight`,500)}let Fe=C.crossFadePause/1e3,Ie=je+Ae+Fe;H.forEach(e=>{let r=Array.from(e.classList).find(e=>e.startsWith(`category-`));if(!r||!R.find(e=>Xh(e.dataKey)===r.replace(`category-`,``)))return;let i=n.findIndex(e=>Xh(e.dataKey)===r.replace(`category-`,``));if(i===-1)return;let a=cg(t,n,F,o,c,i,P,!1);a&&W.to(e,{attr:{d:a},duration:Me,ease:`power2.out`},`seatsToBar+=${Ie}`)});let Le=hi().x(e=>a(e.data.timestamp)).y0(e=>o(e[0])).y1(e=>o(e[1])).curve(di),Re=new Map;t.forEach((e,t)=>{let r=n[t];if(r){let t=Le(e)||``;Re.set(r.dataKey,t)}});let ze=Ie+Me;d&&Ne&&Pe&&W.to([Ne.node(),Pe.node()],{opacity:1,duration:.6,ease:`power2.inOut`},`seatsToBar+=${Ie}`);let Be=S.select(`.grid-vertical`),Ve=S.select(`.grid-horizontal`);if(!Be.empty()||!Ve.empty()){let e=[];Be.empty()||e.push(Be.node()),Ve.empty()||e.push(Ve.node()),W.to(e,{opacity:.1,duration:.6,ease:`power2.inOut`},`seatsToBar+=${Ie}`)}let He=C.axesAndBarsGrow/1e3,Ue=C.barsToArea/1e3,We=v?`histogram-paths histogram-paths-${v}`:`histogram-paths`,Ge=S.append(`g`).attr(`class`,We);N.forEach(e=>{if(e===P)return;let r=F.get(e);r&&n.forEach((i,a)=>{let s=cg(t,n,F,o,c,a,e,!0),l=cg(t,n,F,o,c,a,e,!1);if(!s||!l)return;let u=v?`histogram-path histogram-path-${v} category-${Xh(i.dataKey)}`:`histogram-path category-${Xh(i.dataKey)}`;Ge.append(`path`).attr(`class`,u).attr(`d`,s).attr(`fill`,i.color).attr(`stroke`,i.color).attr(`stroke-width`,.5).attr(`shape-rendering`,`crispEdges`).attr(`opacity`,0).attr(`data-category`,i.dataKey).attr(`data-timestamp`,e).attr(`data-x-position`,r.x).attr(`data-full-height-path`,l)})});let Ke=v?`.histogram-path-${v}`:`.histogram-path`,qe=Ge.selectAll(Ke);W.to(qe.nodes(),{opacity:1,duration:.3,ease:`power2.inOut`},`seatsToBar+=${ze}`);let Je=z.x+z.width/2;qe.each(function(){let e=this.getAttribute(`data-full-height-path`);if(!e)return;let t=parseFloat(this.getAttribute(`data-x-position`)||`0`),n=parseFloat(this.getAttribute(`data-timestamp`)||`0`),r=t+(F.get(n)?.width||0)/2,i=Math.abs(r-Je)*8e-4;W.to(this,{attr:{d:e},duration:He,ease:`power2.out`},`seatsToBar+=${ze+i}`)});let Ye=ze+He,Xe=N[N.length-1],Ze=a(new Date(Xe))+L,Qe=a.invert(Ze).getTime();Jh(e,t.map(e=>{let t=e[e.length-1],n={...t,data:{...t.data,timestamp:Qe}};return[...e,n]}),n,{xScale:a,yScale:o,addClasses:!0,instanceId:v});let $e=v?`.area-${v}`:`.area`,et=e.selectAll($e);et.attr(`opacity`,0),W.to(qe.nodes(),{opacity:0,duration:Ue,ease:`power2.inOut`},`seatsToBar+=${Ye}`);let tt=V.selectAll(`path`).nodes();tt.length>0&&W.to(tt,{opacity:0,duration:Ue,ease:`power2.inOut`},`seatsToBar+=${Ye}`),W.to(et.nodes(),{opacity:1,duration:Ue,ease:`power2.inOut`},`seatsToBar+=${Ye}`);let nt=u;E.getControls().getTimeline().eventCallback(`onComplete`,()=>{let t=v?`.morph-bar-${v}`:`.morph-bar`;e.selectAll(t).remove();let n=v?`.histogram-paths-${v}`:`.histogram-paths`;e.selectAll(n).remove();let r=v?`.seat-${v}`:`.seat`;e.selectAll(r).style(`pointer-events`,`none`),d&&(Ne&&Ne.attr(`opacity`,1),Pe&&Pe.attr(`opacity`,1)),nt()}),E.play()}function ug(e,t,n,r,i,a,o,s,c,l,u,d=!0,f=14,p,m,h,g,_,v,y=`light`){let b=v?`.chart-content-group-${v}`:`.chart-content-group`,x=e.select(b);if(x.empty()){let t=e.attr(`clip-path`),n=t&&t.match(/url\(#(.+)\)/)?.[1]||`chart-clip-${Math.random().toString(36).substr(2,9)}`,r=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`;x=e.append(`g`).attr(`class`,r).attr(`clip-path`,`url(#${n})`)}let S=v?`.area-${v}`:`.area`,C=e.selectAll(S);if(C.size()===0){dg(e,n,r,s,c,v,y),u();return}let w={areaToBar:l*.18,barsShrink:l*.22,barSlide:l*.22,axesHide:l*.03,barToRings:l*.07,ringsExpand:l*.18,ringsHold:l*.05,ringsToSeats:l*.07},T=v?tg.get(v):void 0;T&&(T.destroy(),v&&tg.delete(v));let E=e=>e<.18?`areaToBar`:e<.4?`barsShrink`:e<.62?`barSlide`:e<.65?`axesHide`:e<.72?`barToRings`:e<.9?`ringsExpand`:e<.95?`ringsHold`:`ringsToSeats`,D=new Lh({seatsToRings:w.ringsToSeats,ringsHold:w.ringsHold,ringsToBar:w.barToRings,axesReveal:w.axesHide,barSlide:w.barSlide,barsGrow:w.barsShrink,barsToArea:w.areaToBar},{onStageComplete:e=>{},onProgress:e=>{g&&g(e,E(e))},onComplete:()=>{u()}});v&&tg.set(v,D),h&&h(D.getControls().getTimeline());let O=t[0].map(e=>e.data).map(e=>e.timestamp),k=_??Math.max(...O),A=new Map,j=[];O.forEach((e,t)=>{let n=a(new Date(e)),r=O[t+1];if(r){let e=a(new Date(r))-n;j.push(e)}});let M=j.length>0?j.reduce((e,t)=>e+t,0)/j.length:30;O.forEach((e,t)=>{let n=a(new Date(e)),r=O[t+1],i=t===O.length-1?M:a(new Date(r))-n;A.set(e,{x:n,width:i})});let N=D.getControls().getTimeline(),P=w.areaToBar/1e3,F=v?`histogram-paths histogram-paths-${v}`:`histogram-paths`,I=x.append(`g`).attr(`class`,F);O.forEach(e=>{let r=A.get(e);r&&n.forEach((i,a)=>{let s=cg(t,n,A,o,c,a,e,!1);if(!s)return;let l=v?`histogram-path histogram-path-${v} category-${Xh(i.dataKey)}`:`histogram-path category-${Xh(i.dataKey)}`;I.append(`path`).attr(`class`,l).attr(`d`,s).attr(`fill`,i.color).attr(`stroke`,i.color).attr(`stroke-width`,.5).attr(`shape-rendering`,`crispEdges`).attr(`opacity`,0).attr(`data-category`,i.dataKey).attr(`data-timestamp`,e).attr(`data-x-position`,r.x)})});let L=v?`.histogram-path-${v}`:`.histogram-path`,R=I.selectAll(L);N.to(C.nodes(),{opacity:0,duration:P,ease:`power2.inOut`},`areaToBar`),N.to(R.nodes(),{opacity:1,duration:P,ease:`power2.inOut`},`areaToBar`);let z=w.barsShrink/1e3,B=P;R.each(function(){let e=parseFloat(this.getAttribute(`data-timestamp`)||`0`);if(e===k)return;let r=n.find(e=>this.classList.contains(`category-${Xh(e.dataKey)}`));if(!r)return;let i=n.indexOf(r),a=cg(t,n,A,o,c,i,e,!0);a&&N.to(this,{attr:{d:a},duration:z,ease:`power2.in`},B)});let V=w.axesHide/1e3,H=B+z;if(d){let t=e.select(`.axis-x`),n=e.select(`.axis-y`);t.empty()||N.to(t.node(),{opacity:0,duration:V,ease:`power2.inOut`},H),n.empty()||N.to(n.node(),{opacity:0,duration:V,ease:`power2.inOut`},H)}let U=x.select(`.grid-vertical`),ee=x.select(`.grid-horizontal`);U.empty()||N.to(U.node(),{opacity:0,duration:V,ease:`power2.inOut`},H),ee.empty()||N.to(ee.node(),{opacity:0,duration:V,ease:`power2.inOut`},H);let te=[];t.forEach((e,t)=>{let r=e.find(e=>e.data.timestamp===k);if(!r)return;let i=n[t];i&&te.push({category:i.label,dataKey:i.dataKey,color:i.color,y0:r[0],y1:r[1]})}),te.sort((e,t)=>t.y0-e.y0);let ne=te.reduce((e,t)=>e+(t.y1-t.y0),0),re=r.radius-r.innerRadius,W=s/2,ie=r.radius+10,ae=c-r.radius*.3,G=Math.max(ie,ae),oe=re*.6,se=c*.8,ce=G,le=w.barSlide/1e3,K=H+V,ue=R.nodes().filter(e=>parseFloat(e.getAttribute(`data-timestamp`)||`0`)!==k);N.to(ue,{opacity:0,duration:le*.2,ease:`power2.out`},K);let de=R.nodes().filter(e=>parseFloat(e.getAttribute(`data-timestamp`)||`0`)===k);de.forEach(e=>{let t=e.getAttribute(`data-category`);if(!t)return;let r=te.find(e=>e.dataKey===t);if(!r)return;let i=(r.y1-r.y0)/ne*se,a=0;for(let e of n){let t=te.find(t=>t.dataKey===e.dataKey);if(!t)continue;if(t.dataKey===r.dataKey)break;let n=(t.y1-t.y0)/ne;a+=n*se}let o=ce-a,s=ce-a-i,c=666-oe/2,l=`M ${c} ${o} L ${c} ${s} L ${c+oe} ${s} L ${c+oe} ${o} Z`;N.to(e,{attr:{d:l},duration:le,ease:`power2.inOut`},K)});let fe=w.barToRings/1e3,q=K+le,pe=w.ringsExpand/1e3,me=q+fe,he=w.ringsHold/1e3,ge=me+pe,_e=w.ringsToSeats/1e3,ve=ge+he,ye=Math.max(...r.seats.map(e=>e.ring)),be=r.seats.filter(e=>e.ring===ye),xe=x.append(`g`).attr(`class`,`slinky-${v||`h2p-default`}`),Se=()=>{xe.remove()};be.forEach((e,t)=>{let i=n.find(t=>t.label===e.category);i&&xe.append(`line`).attr(`class`,`slinky-ring`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,0).attr(`y2`,0).attr(`stroke`,i.color).attr(`stroke-width`,r.seatSize*2).attr(`stroke-linecap`,`butt`).attr(`data-category`,e.category).attr(`data-category-index`,e.categoryIndex).attr(`data-ring-index`,t).attr(`data-seat-x`,W+e.x).attr(`data-seat-y`,G+e.y).attr(`data-seat-angle`,Math.atan2(e.y,e.x)).style(`opacity`,0)});let Ce=xe.selectAll(`.slinky-ring`).nodes(),we=se/Ce.length,Te=[...Ce].sort((e,t)=>{let n=parseFloat(e.getAttribute(`data-seat-angle`)||`0`);return parseFloat(t.getAttribute(`data-seat-angle`)||`0`)-n}),Ee=ce;Te.forEach((e,t)=>{let n=Ee-t*we,r=oe/2,i=666-r,a=666+r;e.setAttribute(`x1`,i.toString()),e.setAttribute(`y1`,n.toString()),e.setAttribute(`x2`,a.toString()),e.setAttribute(`y2`,n.toString()),e.style.opacity=`0`}),N.to(de,{opacity:0,duration:fe*.7,ease:`power2.out`},q+fe*.3),N.to(Te,{opacity:1,duration:fe,ease:`power2.in`,stagger:.005},q);let De=re*.8;Te.forEach((e,t)=>{let n=parseFloat(e.getAttribute(`data-seat-x`)||`0`),r=parseFloat(e.getAttribute(`data-seat-y`)||`0`),i=parseFloat(e.getAttribute(`data-seat-angle`)||`0`),a=(Te.length-1-t)/Te.length*(pe*.4),o=parseFloat(e.getAttribute(`x1`)||`0`),s=parseFloat(e.getAttribute(`y1`)||`0`),c=parseFloat(e.getAttribute(`x2`)||`0`),l=parseFloat(e.getAttribute(`y2`)||`0`),u=(o+c)/2,d=(s+l)/2,f=Math.atan2(l-s,c-o),p=Math.sqrt((c-o)**2+(l-s)**2),m=n-De/2*Math.cos(i),h=r-De/2*Math.sin(i);N.to({progress:0},{progress:1,duration:pe*.7,ease:`power2.out`,onUpdate:function(){let t=this.progress(),n=u+(m-u)*t,r=d+(h-d)*t,a=f+(i-f)*t,o=(p+(De-p)*t)/2,s=n-o*Math.cos(a),c=r-o*Math.sin(a),l=n+o*Math.cos(a),g=r+o*Math.sin(a);e.setAttribute(`x1`,s.toString()),e.setAttribute(`y1`,c.toString()),e.setAttribute(`x2`,l.toString()),e.setAttribute(`y2`,g.toString())}},me+a),N.to(e,{opacity:.9,duration:pe*.3,ease:`power2.in`},me+a)}),N.call(()=>{g&&g(N.progress(),`ringsHold`)},[],ge);let Oe=v?`parliament parliament-${v}`:`parliament`,ke=x.append(`g`).attr(`class`,Oe),Ae=r.seats[0]?.radius,je=new Map(n.map(e=>[e.label,za(e.color,Ae,{paletteMode:y,label:e.label})]));r.seats.forEach((e,t)=>{let r=n.find(t=>t.label===e.category);if(!r)return;let i=je.get(r.label);if(!i)return;let a=W+e.x,o=G+e.y,s,c,l;e.ring===ye?(s=a,c=o,l=2):(s=a,c=o,l=e.radius);let u=ke.append(`circle`).attr(`cx`,s).attr(`cy`,c).attr(`r`,l).attr(`fill`,i.fill).attr(`stroke`,i.stroke).attr(`stroke-width`,i.strokeWidth??.5).attr(`opacity`,0).attr(`class`,()=>v?`seat seat-${v} seat-${Xh(e.category)}`:`seat seat-${Xh(e.category)}`).attr(`data-layout-index`,t).attr(`data-ring`,e.ring).attr(`data-final-x`,a).attr(`data-final-y`,o).attr(`data-final-r`,e.radius);i.dashArray&&u.attr(`stroke-dasharray`,i.dashArray)});let Me=v?`.seat-${v}`:`.seat`,Ne=ke.selectAll(Me);N.to(Ce,{opacity:0,duration:_e*.2,ease:`power3.out`},ve),N.to(Ne.nodes(),{opacity:.8,duration:_e*.3,ease:`power2.in`},ve+_e*.25);let Pe=Ne.nodes(),Fe=[],Ie=[];Pe.forEach(e=>{parseInt(e.getAttribute(`data-ring`)||`0`)===ye?Fe.push(e):Ie.push(e)});let Le=_e*.2,Re=_e*.7;Fe.forEach(e=>{let t=parseFloat(e.getAttribute(`data-final-r`)||`4`);N.to(e,{attr:{r:t},opacity:1,duration:Re*.6,ease:`power2.out`},ve+Le)}),Ie.length>0&&N.to(Ie,{opacity:1,duration:Re*.5,ease:`power2.in`},ve+Le+_e*.15);let ze=u;D.getControls().getTimeline().eventCallback(`onComplete`,()=>{let t=v?`.areas-${v}`:`.areas`,n=v?`.histogram-paths-${v}`:`.histogram-paths`;e.selectAll(t).remove(),e.selectAll(n).remove(),Se(),e.selectAll(`.axis-x`).remove(),e.selectAll(`.axis-y`).remove(),x.selectAll(`.grid-vertical`).remove(),x.selectAll(`.grid-horizontal`).remove();let i=v?`.parliament-label-${v}`:`.parliament-label`;if(e.select(i).empty()){let t=s/2,n=r.radius+10,i=c-r.radius*.3,a=Math.max(n,i),o=v?`parliament-label parliament-label-${v}`:`parliament-label`,l=e.append(`g`).attr(`class`,o).attr(`transform`,`translate(${t},${a-r.radius*.15})`).style(`opacity`,`0`).style(`pointer-events`,`none`);l.append(`text`).attr(`class`,`label-category`).attr(`text-anchor`,`middle`).attr(`dy`,`-15`).style(`font-size`,`22px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-family`,`system-ui, -apple-system, sans-serif`),l.append(`text`).attr(`class`,`label-value`).attr(`text-anchor`,`middle`).attr(`dy`,`35`).style(`font-size`,`48px`).style(`font-weight`,`bold`).style(`font-family`,`system-ui, -apple-system, sans-serif`);let u=l.append(`g`).attr(`class`,`scale-indicator`).attr(`transform`,`translate(0, 65)`).style(`opacity`,`0`);u.append(`circle`).attr(`r`,4).attr(`cx`,-30).attr(`cy`,0).style(`fill`,`var(--rc-muted-text, #888)`),u.append(`text`).attr(`x`,-20).attr(`y`,0).attr(`dy`,`0.35em`).attr(`text-anchor`,`start`).style(`font-size`,`18px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-style`,`italic`).style(`font-family`,`system-ui, -apple-system, sans-serif`)}ze()}),D.play()}function dg(e,t,n,r,i,a,o=`light`){let s=r/2,c=n.radius+10,l=i-n.radius*.3;Zh(e,n,t,{centerX:s,centerY:Math.max(c,l),addClasses:!0,instanceId:a,parliamentRadius:n.radius,paletteMode:o})}function fg(e,t,n,r,i){let a=i?`.parliament-label-${i}`:`.parliament-label`,o=Y(e).select(a);if(!o.empty()){if(t){o.style(`opacity`,`1`),o.select(`.label-category`).text(t.label).style(`fill`,`var(--rc-muted-text, #666)`);let e=t.value>1?`repos`:`repo`;o.select(`.label-value`).text(`${t.value} ${e}`).style(`fill`,t.color);let i=o.select(`.scale-indicator`);n?i.style(`opacity`,`1`).select(`text`).text(`= ~${r} repos`):i.style(`opacity`,`0`)}else o.style(`opacity`,`0`)}}function pg(e,t,n,r,i,a,o,s,c){let l=e.querySelectorAll(`.seat`);if(!l||l.length===0)return;let u=n[n.length-1];if(!u)return;let d=[];l.forEach(e=>{let t=e;t.style.cursor=`pointer`,t.style.transition=`opacity 150ms ease`}),l.forEach(n=>{let r=(n.getAttribute(`class`)||``).split(/\s+/).filter(e=>e.startsWith(`seat-`)),l=r[r.length-1];if(!l)return;let f=l.substring(5),p=t.find(e=>Xh(e.label)===f);if(!p)return;let m=()=>{i(p.label);let t=Math.round(u.values[p.dataKey]||0),n=qh(p.color),r={label:p.label,value:t,color:n};a&&a(r),fg(e,r,o??!1,s??1,c),mg(e,p.label)};n.addEventListener(`mouseenter`,m),d.push({element:n,handler:m})});let f=()=>{i(null),a&&a(null),fg(e,null,!1,1,c),mg(e,null)};return e.addEventListener(`mouseleave`,f),r&&mg(e,r),()=>{d.forEach(({element:e,handler:t})=>{e.removeEventListener(`mouseenter`,t)}),e.removeEventListener(`mouseleave`,f),l.forEach(e=>{let t=e;t.style.cursor=``,t.style.transition=``})}}function mg(e,t){let n=e.querySelectorAll(`.seat`),r=t?Xh(t):null;n.forEach(e=>{let t=e,n=(e.getAttribute(`class`)||``).split(/\s+/).filter(e=>e.startsWith(`seat-`)),i=n[n.length-1];if(!i)return;let a=i.substring(5);r?a===r?t.style.opacity=`1`:t.style.opacity=`0.3`:t.style.opacity=`1`})}var hg=({data:e,categories:t,mode:n,paletteMode:r,width:i=900,height:a=400,margin:o={top:10,right:30,bottom:40,left:60},timeRange:s,showGrid:c=!0,showAxes:l=!0,axisLabelColor:p,axisLabelSize:m=14,formatDate:h,formatValue:g,markers:_=[],arcAngle:v=200,parliamentRadius:y=200,seatSize:b=4.5,animationDuration:x=900,onMorphComplete:S,onAnimationStateChange:C,onTimelineReady:w,onAnimationProgress:T,onHoveredDataChange:E,hoveredCategory:D,maxSeats:O=ja.maxSeats,showTooltip:k=!0,showTable:A=!1,showScaledIndicator:j=!0,parliamentTimestamp:M,enableBrush:N=!1,onTimeRangeChange:P,minAllowedTime:F,maxAllowedTime:I,timelineEvents:L=[],showTimeline:R=!1,timelineHeight:z=40,timelineOffset:B,brushColor:V=`#69b3a2`,showCrosshair:H=!1,crosshairColor:U=`#666`,crosshairDashArray:ee=`4,4`})=>{let te=(0,d.useRef)(null),[ne,re]=(0,d.useState)(null),W=(0,d.useCallback)(e=>{E&&E(e)},[E]),ie=B??18+m+12,ae=e[e.length-1],G=ae?t.reduce((e,t)=>e+(ae.values[t.dataKey]||0),0):0,oe=G>O,se=oe?Math.round(G/O):1,ce=R&&n===`stacked-area`?a+z+ie:a,{isMorphing:le,currentMode:K,visibleMarkers:ue,hoveredMarker:de,hoveredTimelineEvent:fe}=ng({containerRef:te,data:e,categories:t,mode:n,paletteMode:r,width:i,height:a,margin:o,timeRange:s,showGrid:c,showAxes:l,axisLabelColor:p,axisLabelSize:m,formatDate:h,formatValue:g,markers:_,arcAngle:v,parliamentRadius:y,seatSize:b,animationDuration:x,onMorphComplete:S,onAnimationStateChange:C,onTimelineReady:w,onAnimationProgress:T,onHoveredDataChange:W,hoveredCategory:D,maxSeats:O,parliamentTimestamp:M,enableBrush:N,onTimeRangeChange:P,minAllowedTime:F,maxAllowedTime:I,showScaleIndicator:j&&oe,reposPerSeat:se,timelineEvents:L,showTimeline:R,timelineHeight:z,timelineOffset:ie,brushColor:V,showCrosshair:H,onCrosshairMove:H?re:void 0});return(0,f.jsxs)(u.Box,{sx:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:te,viewBox:`0 0 ${i} ${ce}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,height:`auto`,display:`block`}}),H&&ne&&K===`area`&&!le&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${i} ${ce}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`auto`,pointerEvents:`none`},children:[(0,f.jsx)(`line`,{x1:ne.x,y1:o.top,x2:ne.x,y2:a-o.bottom,stroke:U,strokeDasharray:ee,strokeWidth:1}),(0,f.jsx)(`line`,{x1:o.left,y1:ne.y,x2:i-o.right,y2:ne.y,stroke:U,strokeDasharray:ee,strokeWidth:1})]}),K===`area`&&ue.map(e=>{let t=(e.x+o.left)/i*100,n=o.top/a*100,r=new Date(e.timestamp),s=h?h(e.timestamp):r.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}),c=(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:e.label?.5:0},children:s}),e.label&&(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:e.label})]});return(0,f.jsx)(u.Tooltip,{title:c,open:de?.timestamp===e.timestamp,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${t}%`,top:`${n}%`,width:`1px`,height:`${(a-o.top-o.bottom)/a*100}%`,pointerEvents:`none`}})},e.timestamp)}),fe&&K===`area`&&(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:.5},children:h?h(fe.timestamp):new Date(fe.timestamp).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}),(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:fe.eventName})]}),open:!0,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${(fe.x+o.left)/i*100}%`,top:`${(a+ie+z/2)/ce*100}%`,width:`1px`,height:`1px`,pointerEvents:`none`}})}),le&&(0,f.jsxs)(u.Box,{sx:{position:`absolute`,top:8,right:8,padding:`4px 8px`,backgroundColor:`rgba(0,0,0,0.7)`,color:`white`,borderRadius:`4px`,fontSize:`12px`,pointerEvents:`none`,display:`none`},children:[`Morphing: `,K,` → `,n]})]})},gg=[{minRepos:0,maxRepos:10,minArc:90,maxArc:90,minSeatSize:28,maxSeatSize:28},{minRepos:10,maxRepos:25,minArc:90,maxArc:110,minSeatSize:24,maxSeatSize:24},{minRepos:25,maxRepos:50,minArc:110,maxArc:120,minSeatSize:20,maxSeatSize:20},{minRepos:50,maxRepos:100,minArc:120,maxArc:150,minSeatSize:16.5,maxSeatSize:16.5},{minRepos:100,maxRepos:200,minArc:150,maxArc:180,minSeatSize:15,maxSeatSize:15},{minRepos:200,maxRepos:1/0,minArc:180,maxArc:180,minSeatSize:14.5,maxSeatSize:14.5}],_g=({repositoryCount:e})=>{let t=gg.find(t=>e>=t.minRepos&&e<t.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;let n=t.maxRepos-t.minRepos,r=(e-t.minRepos)/n,i=t.maxArc-t.minArc,a=t.minArc+i*r;return Math.round(a)},vg=({repositoryCount:e})=>{let t=gg.find(t=>e>=t.minRepos&&e<t.maxRepos);if(!t)return 6.5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;let n=t.maxRepos-t.minRepos,r=(e-t.minRepos)/n,i=t.maxSeatSize-t.minSeatSize,a=t.minSeatSize+i*r;return Math.round(a*10)/10},yg=`ui-monospace, SFMono-Regular, Menlo, monospace`,bg=e=>{let{typography:t}=e;if(`fontFamilyMonospace`in t){let e=t.fontFamilyMonospace;if(typeof e==`string`)return e}return yg},xg=`category-table-num`,Sg=({categories:e,activeCategory:t,onCategoryHover:n,mode:r,visible:i=!0})=>{let a=(0,u.useTheme)().palette.mode;return(0,f.jsx)(u.Box,{className:`category-table`,sx:{width:`100%`,display:`flex`,justifyContent:`center`,opacity:+!!i,transition:`opacity 0.3s ease-in-out`,"@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:`auto`,maxWidth:`100%`}},onMouseLeave:()=>n(null),children:(0,f.jsxs)(u.Table,{"aria-label":`Categories summary`,className:`category-summary-table`,size:`small`,sx:e=>({maxWidth:{xs:`clamp(360px, 90%, 400px)`,sm:`clamp(360px, 90%, 400px)`,md:`clamp(360px, 85%, 420px)`,lg:`clamp(360px, 90%, 400px)`},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:`360px`},"& .MuiTableCell-root":{paddingTop:`4.5px`,paddingBottom:`4.5px`,paddingLeft:0,paddingRight:`4px`,lineHeight:`normal`,borderBottom:`1px solid`,borderColor:`var(--rc-table-border, ${e.palette.divider})`,fontSize:`clamp(10px, 1.8vw, 12px)`},"& thead .MuiTableCell-root":{paddingTop:`4px`,paddingBottom:`5px`,fontSize:`11px`,fontWeight:600,color:`text.secondary`},[`& .MuiTableCell-root.${xg}`]:{fontFamily:bg,fontSize:`11px`},"& tbody tr:last-of-type .MuiTableCell-root":{borderBottom:`none`}}),children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(u.TableRow,{children:[(0,f.jsx)(u.TableCell,{colSpan:2,children:`Category`}),r===`point-in-time`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,children:`# of repositories`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Percentage`})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,children:`Last`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Max`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Min`})]})]})}),(0,f.jsx)(`tbody`,{children:e.map(e=>{let i=e.color,{fill:o,stroke:s,dashed:c}=za(e.color,void 0,{paletteMode:a,label:e.label});return(0,f.jsxs)(u.TableRow,{onMouseEnter:()=>n(e.id),sx:{cursor:`pointer`,transition:`background-color 0.15s ease`,backgroundColor:t===e.id?`${i}15`:`transparent`,"&:hover":{backgroundColor:`${i}15`}},children:[(0,f.jsx)(u.TableCell,{align:`center`,sx:{width:20},children:(0,f.jsx)(u.Box,{sx:{width:r===`historical`?4:12,height:12,boxSizing:`border-box`,borderRadius:r===`historical`?1:`50%`,backgroundColor:r===`historical`?c?s:i:o,border:r===`historical`?`none`:`1.5px ${c?`dashed`:`solid`} ${s}`,transition:`transform 0.15s ease`,transform:t===e.id?`scale(1.2)`:`scale(1)`}})}),(0,f.jsx)(u.TableCell,{children:(0,f.jsxs)(u.Stack,{direction:`row`,alignItems:`center`,gap:.5,children:[(0,f.jsx)(`span`,{children:e.label}),e.tooltip&&(0,f.jsx)(u.Tooltip,{title:e.tooltip,placement:`right`,arrow:!0,children:(0,f.jsx)(p.InfoOutlined,{sx:{fontSize:`.875rem`,color:`text.secondary`}})})]})}),r===`point-in-time`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,className:xg,children:e.value}),(0,f.jsxs)(u.TableCell,{align:`right`,className:xg,children:[e.percentage>0&&e.percentage<1?`< 1`:Math.round(e.percentage),`%`]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,className:xg,children:e.value}),(0,f.jsx)(u.TableCell,{align:`right`,className:xg,children:e.max??`-`}),(0,f.jsx)(u.TableCell,{align:`right`,className:xg,children:e.min??`-`})]})]},e.id)})})]})})},Cg={"N/A":`Items that aren't applicable to this migration.`,"No LST":`There are no LSTs for these items.`,"Data Missing":`There is data missing in the LSTs.`},wg=(e,t=`point-in-time`)=>{let n=e.timeSeries[e.timeSeries.length-1];if(!n)return[];let r=e.categories.filter(e=>!e.parliamentMapping?.isSpecialCategory),i=r.reduce((e,t)=>e+(n.values[t.id]??0),0),a=e.metadata.specialCounts,o=i+(a?(a.notApplicable??0)+(a.noLst??0)+(a.unavailable??0):0),s=t===`historical`?new Map(r.map(t=>{let n=e.timeSeries.map(e=>Math.round(e.values[t.id]??0)).filter(e=>e!==void 0);return[t.id,{max:Math.max(...n),min:Math.min(...n)}]})):null,c=r.map(e=>{let t=Math.round(n.values[e.id]??0),r=o>0?t/o*100:0,i={id:e.id,label:e.label,value:t,percentage:r,color:e.color,tooltip:Cg[e.label]};if(s){let t=s.get(e.id);t&&(i.max=t.max,i.min=t.min)}return i}),l=[];if(a){let t=e.categories.filter(e=>e.parliamentMapping?.isSpecialCategory);for(let e of t){let t=0;if(e.label===`N/A`?t=Math.round(a.notApplicable??0):e.label===`No LST`?t=Math.round(a.noLst??0):e.label===`Data Missing`&&(t=Math.round(a.unavailable??0)),t>0){let n=o>0?t/o*100:0;l.push({id:e.id,label:e.label,value:t,percentage:n,color:e.color,tooltip:Cg[e.label]})}}}return[...c,...l]},Tg=e=>{if(!e.timeSeries[e.timeSeries.length-1])throw Error(`ChronoChart: No data points available`);return{data:e.timeSeries.map(e=>({timestamp:e.timestamp,values:e.values})),categories:e.categories.map(e=>({dataKey:e.id,label:e.label,color:e.color,fillOpacity:.7,strokeWidth:e.parliamentMapping?.isSpecialCategory?3:1.5,strokeDasharray:e.strokeDasharray,parliamentMapping:e.parliamentMapping}))}},Eg=e=>{if(!e.timeSeries||e.timeSeries.length===0)throw Error(`ChronoChart: timeSeries must not be empty`);if(!e.categories||e.categories.length===0)throw Error(`ChronoChart: categories must not be empty`);if(!e.metadata||typeof e.metadata.total!=`number`)throw Error(`ChronoChart: metadata.total is required`);if(!e.timeSeries.every((t,n)=>n===0||t.timestamp>=e.timeSeries[n-1].timestamp))throw Error(`ChronoChart: timeSeries must be sorted by timestamp (ascending)`);let t=e.timeSeries[0];if(t){for(let n of e.categories.filter(e=>!e.parliamentMapping?.isSpecialCategory))if(!(n.id in t.values))throw Error(`ChronoChart: Category "${n.id}" not found in timeSeries data`)}},Dg=({data:e,selectedIndex:t,title:n,subtitle:r,showHeader:i=!0,width:a=960,height:o=400,timeRange:s,onTimeRangeChange:c,minAllowedTime:l,maxAllowedTime:p,enableBrush:m=!1,showLegend:h=!0,showTooltip:g=!0,showGrid:_=!0,axisLabelColor:v,axisLabelSize:y=14,enableAnimation:b=!0,animationDuration:x=5439,disableTimeline:S=!1,formatDate:C,formatValue:w,onAnimationStateChange:T,onTimelineReady:E,onAnimationProgress:D,brushColor:O=`#69b3a2`,showCrosshair:k=!0,crosshairColor:A=`#666`,crosshairDashArray:j=`4,4`})=>{Eg(e);let M=(0,u.useTheme)().palette.mode,[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(!0),L=(0,d.useRef)(`historical`),R=(0,d.useRef)(void 0),z=(0,d.useMemo)(()=>e.timeSeries.length===1||t!==void 0?`point-in-time`:`historical`,[t,e.timeSeries.length]),B=(0,d.useMemo)(()=>{let n;return t!==void 0&&e.timeSeries[t]?(n=e.timeSeries[t].timestamp,R.current=n):n=L.current===`point-in-time`&&z===`historical`&&R.current!==void 0?R.current:e.timeSeries[e.timeSeries.length-1]?.timestamp,L.current=z,n},[t,e.timeSeries,z]),V=e.timeSeries[0].timestamp,H=e.timeSeries[e.timeSeries.length-1].timestamp,[U,ee]=(0,d.useState)([V,H]),te=s??U,ne=(0,d.useCallback)(e=>{let t=[l===void 0?e[0]:Math.max(e[0],l),p===void 0?e[1]:Math.min(e[1],p)];c?c(t):ee(t)},[c,l,p]);(0,d.useEffect)(()=>{P(null)},[z]);let re=(0,d.useMemo)(()=>({top:10,right:30,left:60,bottom:30}),[]),W=(0,d.useMemo)(()=>Tg(e),[e]),ie=(0,d.useMemo)(()=>wg(e,z),[e,z]),ae=(0,d.useMemo)(()=>{let t=e.timeSeries[e.timeSeries.length-1];return t?Object.values(t.values).reduce((e,t)=>e+t,0):0},[e.timeSeries]),G=(0,d.useMemo)(()=>_g({repositoryCount:ae}),[ae]),oe=(0,d.useMemo)(()=>vg({repositoryCount:ae}),[ae]),se=(0,d.useMemo)(()=>{let e=o-re.top-re.bottom;return Math.round(e*.9)},[o,re]),ce=(0,d.useMemo)(()=>e.events?e.events.map(e=>({timestamp:e.timestamp,label:e.eventName,color:typeof e.color==`string`?e.color:`#2F42FF`})):[],[e.events]),le=(0,d.useCallback)(t=>{if(t){let n=e.categories.find(e=>e.label===t.label);P(n?.id??null)}else P(null)},[e.categories]),K=(0,d.useCallback)(e=>{I(!e),T&&T(e)},[T]);return(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsx)(u.Box,{sx:{position:`relative`,width:`100%`},children:(0,f.jsx)(hg,{data:W.data,categories:W.categories,mode:z===`point-in-time`?`parliament`:`stacked-area`,paletteMode:M,width:a,height:o,timeRange:te,onTimeRangeChange:ne,minAllowedTime:l,maxAllowedTime:p,enableBrush:m,showGrid:_,showAxes:!0,axisLabelColor:v,axisLabelSize:y,margin:re,markers:ce,formatDate:C,formatValue:w,animationDuration:x,onAnimationStateChange:K,onTimelineReady:E,onAnimationProgress:D,onHoveredDataChange:le,hoveredCategory:N,arcAngle:G,parliamentRadius:se,seatSize:oe,parliamentTimestamp:B,timelineEvents:e.events??[],showTimeline:z===`historical`&&!S,brushColor:O,showCrosshair:k,crosshairColor:A,crosshairDashArray:j})}),(0,f.jsx)(Sg,{categories:ie,activeCategory:N,onCategoryHover:P,mode:z,visible:F})]})},Og=20,kg=({visible:e,x:t,y:n,containerRef:r,viewBoxWidth:i,viewBoxHeight:a,usePortal:o=!1,scale:s=1,flipThreshold:c,anchorPosition:l=`cursor`,chartTopMargin:p=20,children:m})=>{let h=(0,d.useRef)(null),[g,_]=(0,d.useState)(0),[v,y]=(0,d.useState)(null),b=(0,d.useCallback)(()=>{if(r.current){let e=r.current.getBoundingClientRect();y({width:e.width,height:e.height,left:e.left,top:e.top})}},[r]);if((0,d.useLayoutEffect)(()=>{b();let e=()=>b();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[b]),(0,d.useLayoutEffect)(()=>{e&&b()},[e,b]),(0,d.useLayoutEffect)(()=>{h.current&&e&&_(h.current.offsetWidth)},[e]),!e||!v)return null;let x=v.width/i,S=v.height/a,C=t*x,w=n*S,T={pointerEvents:`none`,zIndex:1e3,p:2*s,whiteSpace:`nowrap`};if(o){let e=v.left+C,t=v.top+w;if(l===`top`){let t=v.top+p*S,n=(g>0?g:400)/2,r=e+n>window.innerWidth-Og,i=e-n<Og,a=`translateX(-50%)`;return r&&!i?a=`translateX(-50%) translateX(-${e+n-window.innerWidth+Og}px)`:i&&!r&&(a=`translateX(-50%) translateX(${Og-(e-n)}px)`),(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:e,top:t,transform:`${a} translateY(-100%) translateY(-10px)`},children:m})})}if(l===`bottom-corner`){let n=g>0?g:400,r=e+10+n,i=e-10-n,a=r>window.innerWidth-Og,o=i<Og,s,c;return a?o?(s=window.innerWidth-Og-n,c=`none`):(s=e-10,c=`translateX(-100%)`):(s=e+10,c=`none`),(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:s,top:t+10,transform:c},children:m})})}let n=g>0?g:450,r=e+10+n>window.innerWidth-Og,i=e>window.innerWidth-500,a=c===void 0?void 0:c*x,o=r||i||a!==void 0&&C>a?`translateX(-100%) translateX(-20px)`:`none`;return(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:e+10,top:t-10,transform:o},children:m})})}if(l===`top`){let e=p*S;return(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:C,top:e,transform:`translateX(-50%) translateY(-100%) translateY(-10px)`},children:m})}if(l===`bottom-corner`){let e=g>0?g:400,t=C+10+e,n=C-10-e,r=t>v.width,i=n<0,a,o;return r?i?(a=v.width-e,o=`none`):(a=C-10,o=`translateX(-100%)`):(a=C+10,o=`none`),(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:a,top:w+10,transform:o},children:m})}let E=c===void 0?void 0:c*x,D=E!==void 0&&C>E?`translateX(-100%) translateX(-20px)`:`none`;return(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:C+10,top:w-10,transform:D},children:m})},Ag=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:o,showGrid:s=!0,showXAxis:c=!0,showYAxis:l=!0,enableBrush:u=!1,zoomToSelection:f=!1,onTimeRangeChange:p,formatDate:m,formatValue:h,markers:g=[],markerVisibilityMode:_=`hover`,onMarkerHoverChange:v,brushColor:y=`#69b3a2`,showCrosshair:b=!1,onHoveredAreaChange:x,onCrosshairMove:S})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=Y(e.current),C=r-a.left-a.right,w=i-a.top-a.bottom;d.selectAll(`*`).remove();let T=d.append(`g`).attr(`transform`,`translate(${a.left},${a.top})`),E=`d3-chart-clip-${Math.random().toString(36).substr(2,9)}`;d.append(`defs`).append(`clipPath`).attr(`id`,E).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,C).attr(`height`,w);let D=T.append(`g`).attr(`clip-path`,`url(#${E})`),O=[...t].sort((e,t)=>e.timestamp-t.timestamp),k=n.map(e=>e.dataKey),A=Si().keys(k),j=A(O),M=t.map(e=>e.timestamp),N=o?o[0]:Math.min(...M),P=o?o[1]:Math.max(...M),F=Qr().domain([new Date(N),new Date(P)]).range([0,C]),I=A(O.filter(e=>e.timestamp>=N&&e.timestamp<=P)),L=I.length>0?Math.max(...I[I.length-1].map(e=>e[1]??0)):0,R=Nt().domain([0,L*1.1]).range([w,0]).nice();s&&(D.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(to(F).ticks(6).tickSize(w).tickFormat(()=>``)),D.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(no(R).ticks(5).tickSize(-C).tickFormat(()=>``)));let z=hi().x(e=>F(new Date(e.data.timestamp))).y0(e=>R(e[0])).y1(e=>R(e[1])).curve(di),B=D.append(`g`).attr(`class`,`areas`);if(j.forEach((e,t)=>{let r=n[t];if(!r)return;let i=B.append(`path`).datum(e).attr(`class`,`area area-${r.dataKey}`).attr(`fill`,r.color).attr(`fill-opacity`,r.fillOpacity??.7).attr(`stroke`,r.color).attr(`stroke-width`,r.strokeWidth??1.5).attr(`d`,z).attr(`pointer-events`,`none`);r.strokeDasharray&&i.attr(`stroke-dasharray`,r.strokeDasharray)}),g.length>0){let e=D.append(`g`).attr(`class`,`markers`),t=_===`hover`?0:.6,n=g.filter(e=>e.timestamp>=N&&e.timestamp<=P).map(e=>({...e,x:F(new Date(e.timestamp))}));if(n.forEach(n=>{let r=e.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,n.timestamp).attr(`x1`,n.x).attr(`x2`,n.x).attr(`y1`,0).attr(`y2`,w).attr(`stroke`,n.color??`#131E7A`).attr(`stroke-width`,2).attr(`opacity`,t);n.strokeDasharray&&r.attr(`stroke-dasharray`,n.strokeDasharray),n.label&&e.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,n.timestamp).attr(`x`,n.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,n.color??`#131E7A`).attr(`opacity`,t).text(n.label)}),_===`hover`&&n.length>0){let t=d.append(`g`).attr(`class`,`marker-tooltip`).attr(`transform`,`translate(${a.left},${a.top})`).style(`pointer-events`,`none`).style(`display`,`none`),r=t.append(`rect`).attr(`fill`,`#131E7A`).attr(`rx`,4).attr(`ry`,4).attr(`filter`,`drop-shadow(0px 2px 4px rgba(0,0,0,0.2))`),i=t.append(`text`).attr(`fill`,`white`).attr(`font-size`,12).attr(`font-weight`,500).attr(`text-anchor`,`middle`),o=null,s=D.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,C).attr(`height`,w).attr(`fill`,`none`).attr(`pointer-events`,`all`),c=s=>{let c=null,l=1/0;if(n.forEach(e=>{let t=Math.abs(s-e.x);t<l&&(l=t,c=e)}),!c||l>50)return o!==null&&(o=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),t.style(`display`,`none`),v?.(!1)),!1;let u=c;if(o===null&&v?.(!0),o===u.timestamp)return!0;o=u.timestamp,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),e.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(u.timestamp)}).attr(`opacity`,.6),e.selectAll(`.marker-label`).filter(function(){return Y(this).attr(`data-timestamp`)===String(u.timestamp)}).attr(`opacity`,1);let d=new Date(u.timestamp),f=m?m(u.timestamp):d.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}),p=u.label?`${u.label}: ${f}`:f;i.text(p);let h=i.node().getBBox(),g=h.width+16,_=h.height+16;r.attr(`width`,g).attr(`height`,_);let y=u.x-g/2;return y<0?y=0:y+g>C&&(y=C-g),t.attr(`transform`,`translate(${a.left+y},${a.top+10})`),i.attr(`x`,g/2).attr(`y`,_/2+4),t.style(`display`,`block`),!0};s.on(`mousemove`,function(e){let[t]=lc(e,this);c(t)&&e.stopPropagation()}),s.on(`mouseleave`,function(){o=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),t.style(`display`,`none`),v?.(!1)})}}if(c){let e=to(F).ticks(6);m&&e.tickFormat(e=>m(+e)),T.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${w})`).call(e).selectAll(`text`).attr(`font-size`,11)}if(l){let e=no(R).ticks(5);h&&e.tickFormat(e=>h(+e)),T.append(`g`).attr(`class`,`axis axis-y`).call(e).selectAll(`text`).attr(`font-size`,11)}let V=(e,t)=>{let r=+F.invert(e),i=-1;for(let e=0;e<O.length-1;e++)if(O[e].timestamp<=r&&O[e+1].timestamp>=r){i=e;break}i===-1&&(i=r<=O[0].timestamp?0:O.length-2);let a=O[i],o=O[i+1];if(!a||!o)return null;let s=o.timestamp-a.timestamp,c=s>0?(r-a.timestamp)/s:0;for(let e=j.length-1;e>=0;e--){let a=j[e],o=n[e];if(!a||!o)continue;let s=a[i],l=a[i+1];if(!s||!l)continue;let u=s[0]+c*(l[0]-s[0]),d=s[1]+c*(l[1]-s[1]),f=R(u);if(t>=R(d)&&t<=f){let e=d-u;return{timestamp:r,category:{label:o.label,color:o.color},value:e}}}return null},H=(e,t)=>{let[n,r]=lc(e,t);b&&S?.({x:n+a.left,y:r+a.top});let i=V(n,r);x?.(i)},U=()=>{S?.(null),x?.(null)};if(!u){let e=D.append(`rect`).attr(`class`,`mouse-overlay`).attr(`width`,C).attr(`height`,w).attr(`fill`,`none`).attr(`pointer-events`,`all`);e.on(`mousemove`,function(e){H(e,this)}),e.on(`mouseleave`,U)}if(u&&p){let e=Eu().extent([[0,0],[C,w]]).on(`brush`,()=>{}).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection;p([+F.invert(n),+F.invert(r)]),f&&d.select(`.brush`).call(e.move,null)}),t=d.append(`g`).attr(`class`,`brush`).attr(`transform`,`translate(${a.left},${a.top})`).call(e);t.select(`.selection`).style(`fill`,y).style(`fill-opacity`,`0.4`).style(`stroke`,y).style(`stroke-width`,`2px`),t.selectAll(`.handle`).style(`fill`,y).style(`fill-opacity`,`0.9`),t.select(`.overlay`).style(`cursor`,`default`),t.select(`.overlay`).on(`mousemove`,function(e){H(e,this)}).on(`mouseleave`,U)}return d.on(`mouseleave`,()=>{S?.(null),x?.(null)}),()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S])},jg=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:o=!0,width:s=800,height:c=400,margin:l={top:20,right:30,bottom:40,left:60},timeRange:p,showGrid:m=!0,showAxes:h=!0,showXAxis:g,showYAxis:_,formatDate:v,formatValue:y,onTimeRangeChange:b,enableBrush:x=!1,zoomToSelection:S=!1,markers:C=[],markerVisibilityMode:w=`hover`,brushColor:T=`#69b3a2`,showCrosshair:E=!1,crosshairColor:D=`#666`,crosshairDashArray:O=`4,4`,tooltipScale:k=1,usePortalTooltip:A=!1})=>{let j=(0,d.useRef)(null),M=(0,d.useRef)(null),[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(null),[L,R]=(0,d.useState)(!1),z=(0,d.useCallback)(e=>{L||P(e)},[L]),B=(0,d.useCallback)(e=>{L||I(e)},[L]),V=(0,d.useCallback)(e=>{R(e),e&&(P(null),I(null))},[]);return Ag({containerRef:j,data:e,categories:t,width:s,height:c,margin:l,timeRange:p,showGrid:m,showXAxis:g===void 0?h:g,showYAxis:_===void 0?h:_,enableBrush:x,zoomToSelection:S,onTimeRangeChange:b,formatDate:v,formatValue:y,markers:C,markerVisibilityMode:w,onMarkerHoverChange:V,brushColor:T,showCrosshair:E,onHoveredAreaChange:z,onCrosshairMove:B}),(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsxs)(u.Box,{ref:M,sx:{width:`100%`,display:`flex`,justifyContent:`center`,alignItems:`flex-start`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:j,viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,display:`block`}}),E&&F&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,right:0,width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,pointerEvents:`none`,margin:`0 auto`},children:[(0,f.jsx)(`line`,{x1:F.x,y1:l.top,x2:F.x,y2:c-l.bottom,stroke:D,strokeDasharray:O,strokeWidth:1}),(0,f.jsx)(`line`,{x1:l.left,y1:F.y,x2:s-l.right,y2:F.y,stroke:D,strokeDasharray:O,strokeWidth:1})]}),o&&N&&F&&(0,f.jsxs)(kg,{visible:!0,x:F.x,y:F.y,containerRef:M,viewBoxWidth:s,viewBoxHeight:c,usePortal:A,scale:k,flipThreshold:s/2,children:[(0,f.jsx)(u.Typography,{sx:{fontFamily:`monospace`,fontSize:`${.875*k}rem`,color:`text.secondary`,mb:1.5*k},children:(e=>v?v(e):new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}))(N.timestamp)}),(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1.5*k,children:[(0,f.jsx)(u.Box,{sx:{width:5*k,backgroundColor:N.category.color,borderRadius:1,flexShrink:0}}),(0,f.jsxs)(u.Stack,{children:[(0,f.jsx)(u.Typography,{sx:{fontWeight:700,fontSize:`${1.125*k}rem`,lineHeight:1.3},children:N.category.label}),(0,f.jsx)(u.Typography,{sx:{fontSize:`${1*k}rem`,color:`text.primary`,textDecoration:`underline`,textDecorationColor:`rgba(0,0,0,0.2)`,textUnderlineOffset:`3px`},children:y?y(N.value):N.value.toLocaleString()})]})]})]})]}),a&&(0,f.jsx)(u.Stack,{direction:`row`,spacing:3,sx:{flexWrap:`wrap`,justifyContent:`center`,gap:2},children:t.map(e=>(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1,alignItems:`center`,sx:{cursor:`pointer`,"&:hover":{opacity:.7}},children:[(0,f.jsx)(u.Box,{sx:{width:16,height:16,backgroundColor:e.color,opacity:e.fillOpacity??.7,border:`2px solid ${e.color}`,borderRadius:`2px`,...e.strokeDasharray&&{backgroundImage:`repeating-linear-gradient(
|
|
2
2
|
45deg,
|
|
3
3
|
transparent,
|
|
4
4
|
transparent 4px,
|
|
5
5
|
${e.color} 4px,
|
|
6
6
|
${e.color} 8px
|
|
7
|
-
)`}}}),(0,f.jsx)(u.Typography,{variant:`body2`,children:e.label})]},e.dataKey))})]})},Fg=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:o,showGrid:s=!0,showXAxis:c=!0,showYAxis:l=!0,enableBrush:u=!1,zoomToSelection:f=!1,onTimeRangeChange:p,formatDate:m,formatValue:h,showCrosshair:g=!0,brushColor:_=`#69b3a2`,onTooltipChange:v,minBarWidth:y,onCrosshairPositionChange:b})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=Y(e.current),x=r-a.left-a.right,S=i-a.top-a.bottom;d.selectAll(`*`).remove();let C=d.append(`g`).attr(`transform`,`translate(${a.left},${a.top})`),w=`d3-bar-clip-${Math.random().toString(36).substr(2,9)}`;d.append(`defs`).append(`clipPath`).attr(`id`,w).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,x).attr(`height`,S);let T=C.append(`g`).attr(`clip-path`,`url(#${w})`),E=[...t].sort((e,t)=>e.timestamp-t.timestamp),D=n.map(e=>e.dataKey),O=Ci().keys(D),k=O(E),A=t.map(e=>e.timestamp),j=o?o[0]:Math.min(...A),M=o?o[1]:Math.max(...A),N=Qr().domain([new Date(j),new Date(M)]).range([0,x]),P=O(E.filter(e=>e.timestamp>=j&&e.timestamp<=M)),F=P.length>0?Math.max(...P[P.length-1].map(e=>e[1]??0)):0,I=Nt().domain([0,F*1.1]).range([S,0]).nice();s&&(T.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(ro(N).ticks(6).tickSize(S).tickFormat(()=>``)),T.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(io(I).ticks(5).tickSize(-x).tickFormat(()=>``)));let L=T.append(`g`).attr(`class`,`bars`),R=[];k.forEach((e,t)=>{let r=n[t];r&&e.forEach((e,n)=>{let i=E[n];if(!i)return;let a=i.timestamp,o=E[n+1],s=o?o.timestamp:M;if(s<j||a>M)return;let c=Math.max(a,j),l=Math.min(s,M),u=N(new Date(c)),d=N(new Date(l))-u;if(d<=0)return;let f=I(e[0]),p=I(e[1]),m=f-p;if(m<=0)return;let h=e[1]-e[0];R.push({barIndex:n,categoryIndex:t,category:r,x:u,width:d,y:p,height:m,value:h,startTime:a,endTime:s})})});let z=M-j>2160*60*60*1e3?2:0,B=y===void 0?z:y;L.selectAll(`.bar-segment`).data(R).enter().append(`rect`).attr(`class`,`bar-segment`).attr(`data-bar-index`,e=>e.barIndex).attr(`data-category-index`,e=>e.categoryIndex).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>Math.max(B,e.width-1)).attr(`height`,e=>e.height).attr(`fill`,e=>e.category.color).attr(`fill-opacity`,e=>e.category.fillOpacity??.8).attr(`pointer-events`,`none`);let V=(e,t)=>{let[n,r]=dc(e,t);g&&b&&b({x:n+a.left,y:r+a.top});let i=R.find(e=>n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height);i&&v?v({visible:!0,x:n+a.left,y:r+a.top,category:{label:i.category.label,color:i.category.color},value:i.value,startTime:i.startTime,endTime:i.endTime}):v&&v(null)},H=()=>{b&&b(null),v&&v(null)};if(u&&p){let e=Ou().extent([[0,0],[x,S]]).on(`brush`,()=>{}).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection;p([+N.invert(n),+N.invert(r)]),f&&d.select(`.brush`).call(e.move,null)}),t=C.append(`g`).attr(`class`,`brush`).call(e);t.selectAll(`.selection`).attr(`fill`,_).attr(`fill-opacity`,.3).attr(`stroke`,_).attr(`stroke-width`,2),t.selectAll(`.handle`).attr(`fill`,_).attr(`fill-opacity`,.8),t.select(`.overlay`).style(`cursor`,`default`),t.select(`.overlay`).on(`mousemove`,function(e){V(e,this)}).on(`mouseleave`,H)}else{let e=T.append(`rect`).attr(`class`,`mouse-overlay`).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`pointer-events`,`all`);e.on(`mousemove`,function(e){V(e,this)}),e.on(`mouseleave`,H)}if(d.on(`mouseleave`,()=>{b&&b(null),v&&v(null)}),c){let e=ro(N).ticks(6);m&&e.tickFormat(e=>m(+e)),C.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${S})`).call(e).selectAll(`text`).attr(`font-size`,11)}if(l){let e=io(I).ticks(5);h&&e.tickFormat(e=>h(+e)),C.append(`g`).attr(`class`,`axis axis-y`).call(e).selectAll(`text`).attr(`font-size`,11)}return()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b])},Ig=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:o=!0,width:s=800,height:c=400,margin:l={top:20,right:30,bottom:40,left:60},timeRange:p,showGrid:m=!0,showAxes:h=!0,showXAxis:g,showYAxis:_,formatDate:v,formatValue:y,onTimeRangeChange:b,enableBrush:x=!1,zoomToSelection:S=!1,brushColor:C=`#69b3a2`,showCrosshair:w=!0,crosshairColor:T=`#666`,crosshairDashArray:E=`4,4`,minBarWidth:D,tooltipScale:O=1,usePortalTooltip:k=!1,tooltipAnchor:A=`cursor`})=>{let j=(0,d.useRef)(null),M=(0,d.useRef)(null),[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(null);return Fg({containerRef:j,data:e,categories:t,width:s,height:c,margin:l,timeRange:p,showGrid:m,showXAxis:g===void 0?h:g,showYAxis:_===void 0?h:_,enableBrush:x,zoomToSelection:S,onTimeRangeChange:b,formatDate:v,formatValue:y,showCrosshair:w,brushColor:C,onTooltipChange:o?P:void 0,minBarWidth:D,onCrosshairPositionChange:w?I:void 0}),(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsxs)(u.Box,{ref:M,sx:{width:`100%`,display:`flex`,justifyContent:`center`,alignItems:`flex-start`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:j,viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,display:`block`}}),w&&F&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,right:0,width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,pointerEvents:`none`,margin:`0 auto`},children:[(0,f.jsx)(`line`,{x1:F.x,y1:l.top,x2:F.x,y2:c-l.bottom,stroke:T,strokeDasharray:E,strokeWidth:1}),(0,f.jsx)(`line`,{x1:l.left,y1:F.y,x2:s-l.right,y2:F.y,stroke:T,strokeDasharray:E,strokeWidth:1})]}),o&&N&&(0,f.jsxs)(Mg,{visible:N.visible,x:N.x,y:N.y,containerRef:M,viewBoxWidth:s,viewBoxHeight:c,usePortal:k,scale:O,flipThreshold:s/2,anchorPosition:A,chartTopMargin:l.top,children:[(0,f.jsx)(u.Typography,{sx:{fontFamily:`monospace`,fontSize:`${.875*O}rem`,color:`text.secondary`,mb:1.5*O},children:(e=>{if(v)return v(e);let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`})(N.startTime)}),(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1.5*O,children:[(0,f.jsx)(u.Box,{sx:{width:5*O,backgroundColor:N.category.color,borderRadius:1,flexShrink:0}}),(0,f.jsxs)(u.Stack,{children:[(0,f.jsx)(u.Typography,{sx:{fontWeight:700,fontSize:`${1.125*O}rem`,lineHeight:1.3},children:N.category.label}),(0,f.jsx)(u.Typography,{sx:{fontSize:`${1*O}rem`,color:`text.primary`,textDecoration:`underline`,textDecorationColor:`rgba(0,0,0,0.2)`,textUnderlineOffset:`3px`},children:y?y(N.value):N.value.toLocaleString()})]})]})]})]}),a&&(0,f.jsx)(u.Stack,{direction:`row`,spacing:3,sx:{flexWrap:`wrap`,justifyContent:`center`,gap:2},children:t.map(e=>(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1,alignItems:`center`,sx:{cursor:`pointer`,"&:hover":{opacity:.7}},children:[(0,f.jsx)(u.Box,{sx:{width:16,height:16,backgroundColor:e.color,opacity:e.fillOpacity??.8,border:`1px solid ${e.color}`,borderRadius:`2px`}}),(0,f.jsx)(u.Typography,{variant:`body2`,children:e.label})]},e.dataKey))})]})},Lg=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Rg=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Rg.prototype.normal={},Rg.prototype.property={},Rg.prototype.space=void 0;function zg(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Rg(n,r,t)}function Bg(e){return e.toLowerCase()}var Vg=class{constructor(e,t){this.attribute=t,this.property=e}};Vg.prototype.attribute=``,Vg.prototype.booleanish=!1,Vg.prototype.boolean=!1,Vg.prototype.commaOrSpaceSeparated=!1,Vg.prototype.commaSeparated=!1,Vg.prototype.defined=!1,Vg.prototype.mustUseProperty=!1,Vg.prototype.number=!1,Vg.prototype.overloadedBoolean=!1,Vg.prototype.property=``,Vg.prototype.spaceSeparated=!1,Vg.prototype.space=void 0;var Hg=s({boolean:()=>Z,booleanish:()=>Wg,commaOrSpaceSeparated:()=>qg,commaSeparated:()=>Kg,number:()=>Q,overloadedBoolean:()=>Gg,spaceSeparated:()=>$}),Ug=0,Z=Jg(),Wg=Jg(),Gg=Jg(),Q=Jg(),$=Jg(),Kg=Jg(),qg=Jg();function Jg(){return 2**++Ug}var Yg=Object.keys(Hg),Xg=class extends Vg{constructor(e,t,n,r){let i=-1;if(super(e,t),Zg(this,`space`,r),typeof n==`number`)for(;++i<Yg.length;){let e=Yg[i];Zg(this,Yg[i],(n&Hg[e])===Hg[e])}}};Xg.prototype.defined=!0;function Zg(e,t,n){n&&(e[t]=n)}function Qg(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Xg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Bg(r)]=r,n[Bg(a.attribute)]=r}return new Rg(t,n,e.space)}var $g=Qg({properties:{ariaActiveDescendant:null,ariaAtomic:Wg,ariaAutoComplete:null,ariaBusy:Wg,ariaChecked:Wg,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:Wg,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:Wg,ariaFlowTo:$,ariaGrabbed:Wg,ariaHasPopup:null,ariaHidden:Wg,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:Q,ariaLive:null,ariaModal:Wg,ariaMultiLine:Wg,ariaMultiSelectable:Wg,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Wg,ariaReadOnly:Wg,ariaRelevant:null,ariaRequired:Wg,ariaRoleDescription:$,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Wg,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function e_(e,t){return t in e?e[t]:t}function t_(e,t){return e_(e,t.toLowerCase())}var n_=Qg({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Kg,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:$,autoFocus:Z,autoPlay:Z,blocking:$,capture:null,charSet:null,checked:Z,cite:null,className:$,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:Wg,controls:Z,controlsList:$,coords:Q|Kg,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Gg,draggable:Wg,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:$,height:Q,hidden:Gg,high:Q,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:$,itemRef:$,itemScope:Z,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:$,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:$,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:$,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Wg,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:Wg,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Wg,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:Kg,part:$,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:t_}),r_=Qg({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:qg,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:$,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Kg,g2:Kg,glyphName:Kg,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:qg,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qg,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qg,rev:qg,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qg,requiredFeatures:qg,requiredFonts:qg,requiredFormats:qg,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:qg,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qg,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qg,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:e_}),i_=Qg({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),a_=Qg({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:t_}),o_=Qg({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),s_=/[A-Z]/g,c_=/-[a-z]/g,l_=/^data[-\w.:]+$/i;function u_(e,t){let n=Bg(t),r=t,i=Vg;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&l_.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(c_,f_);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!c_.test(e)){let n=e.replace(s_,d_);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Xg}return new i(r,t)}function d_(e){return`-`+e.toLowerCase()}function f_(e){return e.charAt(1).toUpperCase()}var p_=zg([$g,n_,i_,a_,o_],`html`),m_=zg([$g,r_,i_,a_,o_],`svg`),h_={}.hasOwnProperty;function g_(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&h_.call(t,e)){let n=String(t[e]);i=h_.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var __=/["&'<>`]/g,v_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y_=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,b_=/[|\\{}()[\]^$+*?.]/g,x_=new WeakMap;function S_(e,t){if(e=e.replace(t.subset?C_(t.subset):__,r),t.subset||t.escapeOnly)return e;return e.replace(v_,n).replace(y_,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function C_(e){let t=x_.get(e);return t||(t=w_(e),x_.set(e,t)),t}function w_(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(b_,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var T_=/[\dA-Fa-f]/;function E_(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!T_.test(String.fromCharCode(t))?r:r+`;`}var D_=/\d/;function O_(e,t,n){let r=`&#`+String(e);return n&&t&&!D_.test(String.fromCharCode(t))?r:r+`;`}var k_=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),A_={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},j_=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],M_={}.hasOwnProperty,N_={},P_;for(P_ in A_)M_.call(A_,P_)&&(N_[A_[P_]]=P_);var F_=/[^\dA-Za-z]/;function I_(e,t,n,r){let i=String.fromCharCode(e);if(M_.call(N_,i)){let e=N_[i],a=`&`+e;return n&&k_.includes(e)&&!j_.includes(e)&&(!r||t&&t!==61&&F_.test(String.fromCharCode(t)))?a:a+`;`}return``}function L_(e,t,n){let r=E_(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=I_(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=O_(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function R_(e,t){return S_(e,Object.assign({format:L_},t))}var z_=/^>|^->|<!--|-->|--!>|<!-$/g,B_=[`>`],V_=[`<`,`>`];function H_(e,t,n,r){return r.settings.bogusComments?`<?`+R_(e.value,Object.assign({},r.settings.characterReferences,{subset:B_}))+`>`:`<!--`+e.value.replace(z_,i)+`-->`;function i(e){return R_(e,Object.assign({},r.settings.characterReferences,{subset:V_}))}}function U_(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function W_(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function G_(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function K_(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function q_(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function J_(e){return e.join(` `).trim()}var Y_=/[ \t\n\f\r]/g;function X_(e){return typeof e==`object`?e.type===`text`&&Z_(e.value):Z_(e)}function Z_(e){return e.replace(Y_,``)===``}var Q_=tv(1),$_=tv(-1),ev=[];function tv(e){return t;function t(t,n,r){let i=t?t.children:ev,a=(n||0)+e,o=i[a];if(!r)for(;o&&X_(o);)a+=e,o=i[a];return o}}var nv={}.hasOwnProperty;function rv(e){return t;function t(t,n,r){return nv.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var iv=rv({body:sv,caption:av,colgroup:av,dd:dv,dt:uv,head:av,html:ov,li:lv,optgroup:pv,option:mv,p:cv,rp:fv,rt:fv,tbody:gv,td:yv,tfoot:_v,th:yv,thead:hv,tr:vv});function av(e,t,n){let r=Q_(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&X_(r.value.charAt(0)))}function ov(e,t,n){let r=Q_(n,t);return!r||r.type!==`comment`}function sv(e,t,n){let r=Q_(n,t);return!r||r.type!==`comment`}function cv(e,t,n){let r=Q_(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function lv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&r.tagName===`li`}function uv(e,t,n){let r=Q_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function dv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function fv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function pv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function mv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function hv(e,t,n){let r=Q_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function gv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function _v(e,t,n){return!Q_(n,t)}function vv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function yv(e,t,n){let r=Q_(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var bv=rv({body:Cv,colgroup:wv,head:Sv,html:xv,tbody:Tv});function xv(e){let t=Q_(e,-1);return!t||t.type!==`comment`}function Sv(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Cv(e){let t=Q_(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&X_(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function wv(e,t,n){let r=$_(n,t),i=Q_(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&iv(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Tv(e,t,n){let r=$_(n,t),i=Q_(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&iv(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Ev={name:[[`
|
|
7
|
+
)`}}}),(0,f.jsx)(u.Typography,{variant:`body2`,children:e.label})]},e.dataKey))})]})},Mg=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:o,showGrid:s=!0,showXAxis:c=!0,showYAxis:l=!0,enableBrush:u=!1,zoomToSelection:f=!1,onTimeRangeChange:p,formatDate:m,formatValue:h,showCrosshair:g=!0,brushColor:_=`#69b3a2`,onTooltipChange:v,minBarWidth:y,onCrosshairPositionChange:b})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=Y(e.current),x=r-a.left-a.right,S=i-a.top-a.bottom;d.selectAll(`*`).remove();let C=d.append(`g`).attr(`transform`,`translate(${a.left},${a.top})`),w=`d3-bar-clip-${Math.random().toString(36).substr(2,9)}`;d.append(`defs`).append(`clipPath`).attr(`id`,w).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,x).attr(`height`,S);let T=C.append(`g`).attr(`clip-path`,`url(#${w})`),E=[...t].sort((e,t)=>e.timestamp-t.timestamp),D=n.map(e=>e.dataKey),O=Si().keys(D),k=O(E),A=t.map(e=>e.timestamp),j=o?o[0]:Math.min(...A),M=o?o[1]:Math.max(...A),N=Qr().domain([new Date(j),new Date(M)]).range([0,x]),P=O(E.filter(e=>e.timestamp>=j&&e.timestamp<=M)),F=P.length>0?Math.max(...P[P.length-1].map(e=>e[1]??0)):0,I=Nt().domain([0,F*1.1]).range([S,0]).nice();s&&(T.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(to(N).ticks(6).tickSize(S).tickFormat(()=>``)),T.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(no(I).ticks(5).tickSize(-x).tickFormat(()=>``)));let L=T.append(`g`).attr(`class`,`bars`),R=[];k.forEach((e,t)=>{let r=n[t];r&&e.forEach((e,n)=>{let i=E[n];if(!i)return;let a=i.timestamp,o=E[n+1],s=o?o.timestamp:M;if(s<j||a>M)return;let c=Math.max(a,j),l=Math.min(s,M),u=N(new Date(c)),d=N(new Date(l))-u;if(d<=0)return;let f=I(e[0]),p=I(e[1]),m=f-p;if(m<=0)return;let h=e[1]-e[0];R.push({barIndex:n,categoryIndex:t,category:r,x:u,width:d,y:p,height:m,value:h,startTime:a,endTime:s})})});let z=M-j>7776e6?2:0,B=y===void 0?z:y;L.selectAll(`.bar-segment`).data(R).enter().append(`rect`).attr(`class`,`bar-segment`).attr(`data-bar-index`,e=>e.barIndex).attr(`data-category-index`,e=>e.categoryIndex).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>Math.max(B,e.width-1)).attr(`height`,e=>e.height).attr(`fill`,e=>e.category.color).attr(`fill-opacity`,e=>e.category.fillOpacity??.8).attr(`pointer-events`,`none`);let V=(e,t)=>{let[n,r]=lc(e,t);g&&b&&b({x:n+a.left,y:r+a.top});let i=R.find(e=>n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height);i&&v?v({visible:!0,x:n+a.left,y:r+a.top,category:{label:i.category.label,color:i.category.color},value:i.value,startTime:i.startTime,endTime:i.endTime}):v&&v(null)},H=()=>{b&&b(null),v&&v(null)};if(u&&p){let e=Eu().extent([[0,0],[x,S]]).on(`brush`,()=>{}).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection;p([+N.invert(n),+N.invert(r)]),f&&d.select(`.brush`).call(e.move,null)}),t=C.append(`g`).attr(`class`,`brush`).call(e);t.selectAll(`.selection`).attr(`fill`,_).attr(`fill-opacity`,.3).attr(`stroke`,_).attr(`stroke-width`,2),t.selectAll(`.handle`).attr(`fill`,_).attr(`fill-opacity`,.8),t.select(`.overlay`).style(`cursor`,`default`),t.select(`.overlay`).on(`mousemove`,function(e){V(e,this)}).on(`mouseleave`,H)}else{let e=T.append(`rect`).attr(`class`,`mouse-overlay`).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`pointer-events`,`all`);e.on(`mousemove`,function(e){V(e,this)}),e.on(`mouseleave`,H)}if(d.on(`mouseleave`,()=>{b&&b(null),v&&v(null)}),c){let e=to(N).ticks(6);m&&e.tickFormat(e=>m(+e)),C.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${S})`).call(e).selectAll(`text`).attr(`font-size`,11)}if(l){let e=no(I).ticks(5);h&&e.tickFormat(e=>h(+e)),C.append(`g`).attr(`class`,`axis axis-y`).call(e).selectAll(`text`).attr(`font-size`,11)}return()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b])},Ng=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:o=!0,width:s=800,height:c=400,margin:l={top:20,right:30,bottom:40,left:60},timeRange:p,showGrid:m=!0,showAxes:h=!0,showXAxis:g,showYAxis:_,formatDate:v,formatValue:y,onTimeRangeChange:b,enableBrush:x=!1,zoomToSelection:S=!1,brushColor:C=`#69b3a2`,showCrosshair:w=!0,crosshairColor:T=`#666`,crosshairDashArray:E=`4,4`,minBarWidth:D,tooltipScale:O=1,usePortalTooltip:k=!1,tooltipAnchor:A=`cursor`})=>{let j=(0,d.useRef)(null),M=(0,d.useRef)(null),[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(null);return Mg({containerRef:j,data:e,categories:t,width:s,height:c,margin:l,timeRange:p,showGrid:m,showXAxis:g===void 0?h:g,showYAxis:_===void 0?h:_,enableBrush:x,zoomToSelection:S,onTimeRangeChange:b,formatDate:v,formatValue:y,showCrosshair:w,brushColor:C,onTooltipChange:o?P:void 0,minBarWidth:D,onCrosshairPositionChange:w?I:void 0}),(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsxs)(u.Box,{ref:M,sx:{width:`100%`,display:`flex`,justifyContent:`center`,alignItems:`flex-start`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:j,viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,display:`block`}}),w&&F&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,right:0,width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,pointerEvents:`none`,margin:`0 auto`},children:[(0,f.jsx)(`line`,{x1:F.x,y1:l.top,x2:F.x,y2:c-l.bottom,stroke:T,strokeDasharray:E,strokeWidth:1}),(0,f.jsx)(`line`,{x1:l.left,y1:F.y,x2:s-l.right,y2:F.y,stroke:T,strokeDasharray:E,strokeWidth:1})]}),o&&N&&(0,f.jsxs)(kg,{visible:N.visible,x:N.x,y:N.y,containerRef:M,viewBoxWidth:s,viewBoxHeight:c,usePortal:k,scale:O,flipThreshold:s/2,anchorPosition:A,chartTopMargin:l.top,children:[(0,f.jsx)(u.Typography,{sx:{fontFamily:`monospace`,fontSize:`${.875*O}rem`,color:`text.secondary`,mb:1.5*O},children:(e=>{if(v)return v(e);let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`})(N.startTime)}),(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1.5*O,children:[(0,f.jsx)(u.Box,{sx:{width:5*O,backgroundColor:N.category.color,borderRadius:1,flexShrink:0}}),(0,f.jsxs)(u.Stack,{children:[(0,f.jsx)(u.Typography,{sx:{fontWeight:700,fontSize:`${1.125*O}rem`,lineHeight:1.3},children:N.category.label}),(0,f.jsx)(u.Typography,{sx:{fontSize:`${1*O}rem`,color:`text.primary`,textDecoration:`underline`,textDecorationColor:`rgba(0,0,0,0.2)`,textUnderlineOffset:`3px`},children:y?y(N.value):N.value.toLocaleString()})]})]})]})]}),a&&(0,f.jsx)(u.Stack,{direction:`row`,spacing:3,sx:{flexWrap:`wrap`,justifyContent:`center`,gap:2},children:t.map(e=>(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1,alignItems:`center`,sx:{cursor:`pointer`,"&:hover":{opacity:.7}},children:[(0,f.jsx)(u.Box,{sx:{width:16,height:16,backgroundColor:e.color,opacity:e.fillOpacity??.8,border:`1px solid ${e.color}`,borderRadius:`2px`}}),(0,f.jsx)(u.Typography,{variant:`body2`,children:e.label})]},e.dataKey))})]})},Pg=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Fg=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Fg.prototype.normal={},Fg.prototype.property={},Fg.prototype.space=void 0;function Ig(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Fg(n,r,t)}function Lg(e){return e.toLowerCase()}var Rg=class{constructor(e,t){this.attribute=t,this.property=e}};Rg.prototype.attribute=``,Rg.prototype.booleanish=!1,Rg.prototype.boolean=!1,Rg.prototype.commaOrSpaceSeparated=!1,Rg.prototype.commaSeparated=!1,Rg.prototype.defined=!1,Rg.prototype.mustUseProperty=!1,Rg.prototype.number=!1,Rg.prototype.overloadedBoolean=!1,Rg.prototype.property=``,Rg.prototype.spaceSeparated=!1,Rg.prototype.space=void 0;var zg=s({boolean:()=>Q,booleanish:()=>Vg,commaOrSpaceSeparated:()=>Gg,commaSeparated:()=>Wg,number:()=>$,overloadedBoolean:()=>Hg,spaceSeparated:()=>Ug}),Bg=0,Q=Kg(),Vg=Kg(),Hg=Kg(),$=Kg(),Ug=Kg(),Wg=Kg(),Gg=Kg();function Kg(){return 2**++Bg}var qg=Object.keys(zg),Jg=class extends Rg{constructor(e,t,n,r){let i=-1;if(super(e,t),Yg(this,`space`,r),typeof n==`number`)for(;++i<qg.length;){let e=qg[i];Yg(this,qg[i],(n&zg[e])===zg[e])}}};Jg.prototype.defined=!0;function Yg(e,t,n){n&&(e[t]=n)}function Xg(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Jg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Lg(r)]=r,n[Lg(a.attribute)]=r}return new Fg(t,n,e.space)}var Zg=Xg({properties:{ariaActiveDescendant:null,ariaAtomic:Vg,ariaAutoComplete:null,ariaBusy:Vg,ariaChecked:Vg,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Ug,ariaCurrent:null,ariaDescribedBy:Ug,ariaDetails:null,ariaDisabled:Vg,ariaDropEffect:Ug,ariaErrorMessage:null,ariaExpanded:Vg,ariaFlowTo:Ug,ariaGrabbed:Vg,ariaHasPopup:null,ariaHidden:Vg,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ug,ariaLevel:$,ariaLive:null,ariaModal:Vg,ariaMultiLine:Vg,ariaMultiSelectable:Vg,ariaOrientation:null,ariaOwns:Ug,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Vg,ariaReadOnly:Vg,ariaRelevant:null,ariaRequired:Vg,ariaRoleDescription:Ug,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Vg,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Qg(e,t){return t in e?e[t]:t}function $g(e,t){return Qg(e,t.toLowerCase())}var e_=Xg({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Wg,acceptCharset:Ug,accessKey:Ug,action:null,allow:null,allowFullScreen:Q,allowPaymentRequest:Q,allowUserMedia:Q,alpha:Q,alt:null,as:null,async:Q,autoCapitalize:null,autoComplete:Ug,autoFocus:Q,autoPlay:Q,blocking:Ug,capture:null,charSet:null,checked:Q,cite:null,className:Ug,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:Vg,controls:Q,controlsList:Ug,coords:$|Wg,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Q,defer:Q,dir:null,dirName:null,disabled:Q,download:Hg,draggable:Vg,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Q,formTarget:null,headers:Ug,height:$,hidden:Hg,high:$,href:null,hrefLang:null,htmlFor:Ug,httpEquiv:Ug,id:null,imageSizes:null,imageSrcSet:null,inert:Q,inputMode:null,integrity:null,is:null,isMap:Q,itemId:null,itemProp:Ug,itemRef:Ug,itemScope:Q,itemType:Ug,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Q,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:Q,muted:Q,name:null,nonce:null,noModule:Q,noValidate:Q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Q,optimum:$,pattern:null,ping:Ug,placeholder:null,playsInline:Q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Q,referrerPolicy:null,rel:Ug,required:Q,reversed:Q,rows:$,rowSpan:$,sandbox:Ug,scope:null,scoped:Q,seamless:Q,selected:Q,shadowRootClonable:Q,shadowRootCustomElementRegistry:Q,shadowRootDelegatesFocus:Q,shadowRootMode:null,shadowRootSerializable:Q,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Vg,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:Q,useMap:null,value:Vg,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ug,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Q,declare:Q,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:Q,noHref:Q,noShade:Q,noWrap:Q,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Vg,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Q,disablePictureInPicture:Q,disableRemotePlayback:Q,exportParts:Wg,part:Ug,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:$g}),t_=Xg({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Gg,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Ug,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:Q,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wg,g2:Wg,glyphName:Wg,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Gg,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ug,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gg,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gg,rev:Gg,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gg,requiredFeatures:Gg,requiredFonts:Gg,requiredFormats:Gg,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Gg,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gg,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gg,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Qg}),n_=Xg({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),r_=Xg({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:$g}),i_=Xg({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),a_=/[A-Z]/g,o_=/-[a-z]/g,s_=/^data[-\w.:]+$/i;function c_(e,t){let n=Lg(t),r=t,i=Rg;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&s_.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(o_,u_);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!o_.test(e)){let n=e.replace(a_,l_);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Jg}return new i(r,t)}function l_(e){return`-`+e.toLowerCase()}function u_(e){return e.charAt(1).toUpperCase()}var d_=Ig([Zg,e_,n_,r_,i_],`html`),f_=Ig([Zg,t_,n_,r_,i_],`svg`),p_={}.hasOwnProperty;function m_(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&p_.call(t,e)){let n=String(t[e]);i=p_.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var h_=/["&'<>`]/g,g_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,__=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,v_=/[|\\{}()[\]^$+*?.]/g,y_=new WeakMap;function b_(e,t){if(e=e.replace(t.subset?x_(t.subset):h_,r),t.subset||t.escapeOnly)return e;return e.replace(g_,n).replace(__,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function x_(e){let t=y_.get(e);return t||(t=S_(e),y_.set(e,t)),t}function S_(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(v_,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var C_=/[\dA-Fa-f]/;function w_(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!C_.test(String.fromCharCode(t))?r:r+`;`}var T_=/\d/;function E_(e,t,n){let r=`&#`+String(e);return n&&t&&!T_.test(String.fromCharCode(t))?r:r+`;`}var D_=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),O_={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},k_=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],A_={}.hasOwnProperty,j_={},M_;for(M_ in O_)A_.call(O_,M_)&&(j_[O_[M_]]=M_);var N_=/[^\dA-Za-z]/;function P_(e,t,n,r){let i=String.fromCharCode(e);if(A_.call(j_,i)){let e=j_[i],a=`&`+e;return n&&D_.includes(e)&&!k_.includes(e)&&(!r||t&&t!==61&&N_.test(String.fromCharCode(t)))?a:a+`;`}return``}function F_(e,t,n){let r=w_(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=P_(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=E_(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function I_(e,t){return b_(e,Object.assign({format:F_},t))}var L_=/^>|^->|<!--|-->|--!>|<!-$/g,R_=[`>`],z_=[`<`,`>`];function B_(e,t,n,r){return r.settings.bogusComments?`<?`+I_(e.value,Object.assign({},r.settings.characterReferences,{subset:R_}))+`>`:`<!--`+e.value.replace(L_,i)+`-->`;function i(e){return I_(e,Object.assign({},r.settings.characterReferences,{subset:z_}))}}function V_(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function H_(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function U_(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function W_(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function G_(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function K_(e){return e.join(` `).trim()}var q_=/[ \t\n\f\r]/g;function J_(e){return typeof e==`object`?e.type===`text`&&Y_(e.value):Y_(e)}function Y_(e){return e.replace(q_,``)===``}var X_=$_(1),Z_=$_(-1),Q_=[];function $_(e){return t;function t(t,n,r){let i=t?t.children:Q_,a=(n||0)+e,o=i[a];if(!r)for(;o&&J_(o);)a+=e,o=i[a];return o}}var ev={}.hasOwnProperty;function tv(e){return t;function t(t,n,r){return ev.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var nv=tv({body:av,caption:rv,colgroup:rv,dd:lv,dt:cv,head:rv,html:iv,li:sv,optgroup:dv,option:fv,p:ov,rp:uv,rt:uv,tbody:mv,td:_v,tfoot:hv,th:_v,thead:pv,tr:gv});function rv(e,t,n){let r=X_(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&J_(r.value.charAt(0)))}function iv(e,t,n){let r=X_(n,t);return!r||r.type!==`comment`}function av(e,t,n){let r=X_(n,t);return!r||r.type!==`comment`}function ov(e,t,n){let r=X_(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function sv(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&r.tagName===`li`}function cv(e,t,n){let r=X_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function lv(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function uv(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function dv(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function fv(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function pv(e,t,n){let r=X_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function mv(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function hv(e,t,n){return!X_(n,t)}function gv(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function _v(e,t,n){let r=X_(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var vv=tv({body:xv,colgroup:Sv,head:bv,html:yv,tbody:Cv});function yv(e){let t=X_(e,-1);return!t||t.type!==`comment`}function bv(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function xv(e){let t=X_(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&J_(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Sv(e,t,n){let r=Z_(n,t),i=X_(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&nv(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Cv(e,t,n){let r=Z_(n,t),i=X_(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&nv(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var wv={name:[[`
|
|
8
8
|
\f\r &/=>`.split(``),`
|
|
9
9
|
\f\r "&'/=>\``.split(``)],[`\0
|
|
10
10
|
\f\r "&'/<=>`.split(``),`\0
|
|
@@ -12,4 +12,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
12
12
|
\f\r &>`.split(``),`\0
|
|
13
13
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
14
14
|
\f\r "&'<=>\``.split(``),`\0
|
|
15
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Dv(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=m_);let l=Ov(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!bv(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!iv(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Ov(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=kv(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function kv(e,t,n){let r=u_(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=R_(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Ev.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?K_:J_)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=R_(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Ev.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&W_(n,o)>W_(n,e.alternative)&&(o=e.alternative),s=o+R_(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Ev.single:Ev.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Av=[`<`,`&`];function jv(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:R_(e.value,Object.assign({},r.settings.characterReferences,{subset:Av}))}function Mv(e,t,n,r){return r.settings.allowDangerousHtml?e.value:jv(e,t,n,r)}function Nv(e,t,n,r){return r.all(e)}var Pv=g_(`type`,{invalid:Fv,unknown:Iv,handlers:{comment:H_,doctype:U_,element:Dv,raw:Mv,root:Nv,text:jv}});function Fv(e){throw Error("Expected node, not `"+e+"`")}function Iv(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Lv={},Rv={},zv=[];function Bv(e,t){let n=t||Lv,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Vv,all:Hv,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Lg,characterReferences:n.characterReferences||Rv,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?m_:p_,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Vv(e,t,n){return Pv(e,t,n,this)}function Hv(e){let t=[],n=e&&e.children||zv,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function Uv(e,t,n,r=`left-to-right`,i=900,a){Y.prototype.transition=Yl;let o=t*Math.PI/180,s=-o/2-Math.PI/2,c=o/2-Math.PI/2,l=e.querySelector(`defs`);l||(l=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`),e.appendChild(l));let u=`arc-sweep-clip`,d=l.querySelector(`#${u}`);d||(d=document.createElementNS(`http://www.w3.org/2000/svg`,`clipPath`),d.setAttribute(`id`,u),l.appendChild(d));let f=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);d.innerHTML=``,d.appendChild(f);let p=e.querySelector(`.arc-container`),m=e.querySelector(`.points-container`);if(m&&p)if(m.setAttribute(`clip-path`,`url(#${u})`),r===`left-to-right`){let e=e=>{let t=n*1.5,r=Math.cos(e)*t,i=Math.sin(e)*t,a=Math.cos(c)*t,o=Math.sin(c)*t;return`M 0,0 L ${r},${i} A ${t},${t} 0 ${+(c-e>Math.PI)},1 ${a},${o} Z`};f.setAttribute(`d`,e(s)),Y(f).transition().duration(i).ease(e=>1-(1-e)**3).tween(`arc-sweep`,()=>t=>{let n=s+(c-s)*t;f.setAttribute(`d`,e(n))}).on(`end`,()=>{a&&a(),setTimeout(()=>{m.removeAttribute(`clip-path`)},50)})}else{let e=e=>{let t=n*1.5,r=Math.cos(e)*t,i=Math.sin(e)*t,a=Math.cos(c)*t,o=Math.sin(c)*t;return`M 0,0 L ${r},${i} A ${t},${t} 0 ${+(c-e>Math.PI)},1 ${a},${o} Z`};f.setAttribute(`d`,e(c)),Y(f).transition().duration(i).ease(e=>1-(1-e)**3).tween(`arc-sweep`,()=>t=>{let n=c-(c-s)*t;f.setAttribute(`d`,e(n))}).on(`end`,()=>{m.removeAttribute(`clip-path`),a&&a()})}}var Wv=/[#.]/g;function Gv(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Wv.lastIndex=i;let e=Wv.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Kv(e,t,n){let r=n?Qv(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Gv(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,qv(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Jv(e,o.properties,t,n)}for(let e of a)Yv(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function qv(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Jv(e,t,n,r){let i=u_(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?q_(r):i.commaSeparated?G_(r):i.commaOrSpaceSeparated?q_(G_(r).join(` `)):Xv(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Zv(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Xv(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Yv(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Yv(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Yv(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Xv(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Bg(n)===Bg(t)))return!0}return n}function Zv(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Qv(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var $v=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`);Kv(p_,`div`);var ey=Kv(m_,`g`,$v),ty=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),ny=o(((e,t)=>{var n=ty(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),ry=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),iy=o(((e,t)=>{var n=ry(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),ay=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),oy=o(((e,t)=>{t.exports=ny().Symbol})),sy=o(((e,t)=>{var n=oy(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),cy=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),ly=o(((e,t)=>{var n=oy(),r=sy(),i=cy(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),uy=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),dy=o(((e,t)=>{var n=ly(),r=uy(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),fy=o(((e,t)=>{var n=iy(),r=ay(),i=dy(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),py=o(((e,t)=>{var n=fy(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),my=o(((e,t)=>{var n=py();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),hy=o(((e,t)=>{function n(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}t.exports=n})),gy=o(((e,t)=>{t.exports=Array.isArray})),_y=o(((e,t)=>{var n=oy(),r=hy(),i=gy(),a=dy(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),vy=o(((e,t)=>{var n=_y();function r(e){return e==null?``:n(e)}t.exports=r})),yy=o(((e,t)=>{var n=ny(),r=my(),i=fy(),a=vy(),o=n.isFinite,s=Math.min;function c(e){var t=Math[e];return function(e,n){if(e=i(e),n=n==null?0:s(r(n),292),n&&o(e)){var c=(a(e)+`e`).split(`e`);return c=(a(t(c[0]+`e`+(+c[1]+n)))+`e`).split(`e`),+(c[0]+`e`+(+c[1]-n))}return t(e)}}t.exports=c})),by=o(((e,t)=>{t.exports=yy()(`round`)})),xy=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),Sy=o(((e,t)=>{var n=ly(),r=uy(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),Cy=o(((e,t)=>{var n=Sy(),r=uy(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),wy=o(((e,t)=>{var n=oy(),r=Cy(),i=gy(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),Ty=o(((e,t)=>{var n=xy(),r=wy();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),Ey=o(((e,t)=>{var n=gy(),r=dy(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),Dy=o(((e,t)=>{var n=ly(),r=ay(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Oy=o(((e,t)=>{t.exports=ny()[`__core-js_shared__`]})),ky=o(((e,t)=>{var n=Oy(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Ay=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),jy=o(((e,t)=>{var n=Dy(),r=ky(),i=ay(),a=Ay(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),My=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Ny=o(((e,t)=>{var n=jy(),r=My();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Py=o(((e,t)=>{t.exports=Ny()(Object,`create`)})),Fy=o(((e,t)=>{var n=Py();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Iy=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Ly=o(((e,t)=>{var n=Py(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Ry=o(((e,t)=>{var n=Py(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),zy=o(((e,t)=>{var n=Py(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),By=o(((e,t)=>{var n=Fy(),r=Iy(),i=Ly(),a=Ry(),o=zy();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Vy=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),Hy=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Uy=o(((e,t)=>{var n=Hy();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Wy=o(((e,t)=>{var n=Uy(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),Gy=o(((e,t)=>{var n=Uy();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Ky=o(((e,t)=>{var n=Uy();function r(e){return n(this.__data__,e)>-1}t.exports=r})),qy=o(((e,t)=>{var n=Uy();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),Jy=o(((e,t)=>{var n=Vy(),r=Wy(),i=Gy(),a=Ky(),o=qy();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Yy=o(((e,t)=>{t.exports=Ny()(ny(),`Map`)})),Xy=o(((e,t)=>{var n=By(),r=Jy(),i=Yy();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),Zy=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Qy=o(((e,t)=>{var n=Zy();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),$y=o(((e,t)=>{var n=Qy();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),eb=o(((e,t)=>{var n=Qy();function r(e){return n(this,e).get(e)}t.exports=r})),tb=o(((e,t)=>{var n=Qy();function r(e){return n(this,e).has(e)}t.exports=r})),nb=o(((e,t)=>{var n=Qy();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),rb=o(((e,t)=>{var n=Xy(),r=$y(),i=eb(),a=tb(),o=nb();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ib=o(((e,t)=>{var n=rb(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),ab=o(((e,t)=>{var n=ib(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),ob=o(((e,t)=>{var n=ab(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),sb=o(((e,t)=>{var n=gy(),r=Ey(),i=ob(),a=vy();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),cb=o(((e,t)=>{var n=dy(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),lb=o(((e,t)=>{var n=sb(),r=cb();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),ub=o(((e,t)=>{var n=Jy();function r(){this.__data__=new n,this.size=0}t.exports=r})),db=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),fb=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),pb=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),mb=o(((e,t)=>{var n=Jy(),r=Yy(),i=rb(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),hb=o(((e,t)=>{var n=Jy(),r=ub(),i=db(),a=fb(),o=pb(),s=mb();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),gb=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),_b=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),vb=o(((e,t)=>{var n=rb(),r=gb(),i=_b();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),yb=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),bb=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),xb=o(((e,t)=>{var n=vb(),r=yb(),i=bb(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),Sb=o(((e,t)=>{t.exports=ny().Uint8Array})),Cb=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),wb=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),Tb=o(((e,t)=>{var n=oy(),r=Sb(),i=Hy(),a=xb(),o=Cb(),s=wb(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),Eb=o(((e,t)=>{var n=xy(),r=gy();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Db=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Ob=o(((e,t)=>{function n(){return[]}t.exports=n})),kb=o(((e,t)=>{var n=Db(),r=Ob(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Ab=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),jb=o(((e,t)=>{function n(){return!1}t.exports=n})),Mb=o(((e,t)=>{var n=ny(),r=jb(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Nb=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Pb=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Fb=o(((e,t)=>{var n=ly(),r=Pb(),i=uy(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),Ib=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Lb=o(((e,t)=>{var n=ty(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Rb=o(((e,t)=>{var n=Fb(),r=Ib(),i=Lb(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),zb=o(((e,t)=>{var n=Ab(),r=Cy(),i=gy(),a=Mb(),o=Nb(),s=Rb(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),Bb=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Vb=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Hb=o(((e,t)=>{t.exports=Vb()(Object.keys,Object)})),Ub=o(((e,t)=>{var n=Bb(),r=Hb(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),Wb=o(((e,t)=>{var n=Dy(),r=Pb();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Gb=o(((e,t)=>{var n=zb(),r=Ub(),i=Wb();function a(e){return i(e)?n(e):r(e)}t.exports=a})),Kb=o(((e,t)=>{var n=Eb(),r=kb(),i=Gb();function a(e){return n(e,i,r)}t.exports=a})),qb=o(((e,t)=>{var n=Kb(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){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 c.delete(e),c.delete(t),g}t.exports=a})),Jb=o(((e,t)=>{t.exports=Ny()(ny(),`DataView`)})),Yb=o(((e,t)=>{t.exports=Ny()(ny(),`Promise`)})),Xb=o(((e,t)=>{t.exports=Ny()(ny(),`Set`)})),Zb=o(((e,t)=>{t.exports=Ny()(ny(),`WeakMap`)})),Qb=o(((e,t)=>{var n=Jb(),r=Yy(),i=Yb(),a=Xb(),o=Zb(),s=ly(),c=Ay(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),$b=o(((e,t)=>{var n=hb(),r=xb(),i=Tb(),a=qb(),o=Qb(),s=gy(),c=Mb(),l=Rb(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),ex=o(((e,t)=>{var n=$b(),r=uy();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),tx=o(((e,t)=>{var n=hb(),r=ex(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),nx=o(((e,t)=>{var n=ay();function r(e){return e===e&&!n(e)}t.exports=r})),rx=o(((e,t)=>{var n=nx(),r=Gb();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),ix=o(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),ax=o(((e,t)=>{var n=tx(),r=rx(),i=ix();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),ox=o(((e,t)=>{var n=lb();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),sx=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),cx=o(((e,t)=>{var n=sb(),r=Cy(),i=gy(),a=Nb(),o=Pb(),s=cb();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),lx=o(((e,t)=>{var n=sx(),r=cx();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),ux=o(((e,t)=>{var n=ex(),r=ox(),i=lx(),a=Ey(),o=nx(),s=ix(),c=cb(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),dx=o(((e,t)=>{function n(e){return e}t.exports=n})),fx=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),px=o(((e,t)=>{var n=lb();function r(e){return function(t){return n(t,e)}}t.exports=r})),mx=o(((e,t)=>{var n=fx(),r=px(),i=Ey(),a=cb();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),hx=o(((e,t)=>{var n=ax(),r=ux(),i=dx(),a=gy(),o=mx();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),gx=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),_x=o(((e,t)=>{t.exports=gx()()})),vx=o(((e,t)=>{var n=_x(),r=Gb();function i(e,t){return e&&n(e,t,r)}t.exports=i})),yx=o(((e,t)=>{var n=Wb();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),bx=o(((e,t)=>{var n=vx();t.exports=yx()(n)})),xx=o(((e,t)=>{var n=bx(),r=Wb();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),Sx=o(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),Cx=o(((e,t)=>{var n=dy();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),wx=o(((e,t)=>{var n=Cx();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),Tx=o(((e,t)=>{var n=hy(),r=lb(),i=hx(),a=xx(),o=Sx(),s=Ib(),c=wx(),l=dx(),u=gy();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),Ex=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),Dx=o(((e,t)=>{var n=Ex(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),Ox=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),kx=o(((e,t)=>{var n=Ny();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Ax=o(((e,t)=>{var n=Ox(),r=kx(),i=dx();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),jx=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),Mx=o(((e,t)=>{var n=Ax();t.exports=jx()(n)})),Nx=o(((e,t)=>{var n=dx(),r=Dx(),i=Mx();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),Px=o(((e,t)=>{var n=Hy(),r=Wb(),i=Nb(),a=ay();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),Fx=o(((e,t)=>{var n=Ty(),r=Tx(),i=Nx(),a=Px();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})})),Ix=o(((e,t)=>{var n=kx();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Lx=o(((e,t)=>{var n=Ix();function r(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var a=e[t];n(i,a[0],a[1])}return i}t.exports=r})),Rx=o(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),zx=o(((e,t)=>{var n=Rx(),r=Px(),i=py();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),Bx=o(((e,t)=>{t.exports=zx()()})),Vx=o(((e,t)=>{var n=hy(),r=hx(),i=xx(),a=gy();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),Hx=o(((e,t)=>{var n=Ty(),r=Vx();function i(e,t){return n(r(e,t),1)}t.exports=i})),Ux=o(((e,t)=>{function n(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}t.exports=n})),Wx=o(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),Gx=o(((e,t)=>{var n=Math.floor,r=Math.random;function i(e,t){return e+n(r()*(t-e+1))}t.exports=i})),Kx=o(((e,t)=>{var n=Gx();function r(e,t){var r=-1,i=e.length,a=i-1;for(t=t===void 0?i:t;++r<t;){var o=n(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}t.exports=r})),qx=o(((e,t)=>{var n=Ux(),r=Wx(),i=Kx();function a(e,t){return i(r(e),n(t,0,e.length))}t.exports=a})),Jx=o(((e,t)=>{var n=hy();function r(e,t){return n(t,function(t){return e[t]})}t.exports=r})),Yx=o(((e,t)=>{var n=Jx(),r=Gb();function i(e){return e==null?[]:n(e,r(e))}t.exports=i})),Xx=o(((e,t)=>{var n=Ux(),r=Kx(),i=Yx();function a(e,t){var a=i(e);return r(a,n(t,0,a.length))}t.exports=a})),Zx=o(((e,t)=>{var n=qx(),r=Xx(),i=gy(),a=Px(),o=my();function s(e,t,s){return t=(s?a(e,t,s):t===void 0)?1:o(t),(i(e)?n:r)(e,t)}t.exports=s})),Qx=l(by(),1),$x=l(Fx(),1),eS=l(Lx(),1),tS=l(Bx(),1),nS=l(Hx(),1),rS=l(Zx(),1),iS=e=>(0,Qx.default)(e,14),aS=e=>Object.values(e).reduce((e,t)=>e+t,0),oS=(e,t,n={})=>{let r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw Error(`vote distribution must contain at least one party`);if(!Object.values(e).every(e=>typeof e==`number`&&e>=0))throw Error(`party vote counts must be non-negative integers`);if(!Number.isInteger(t)||t<=0)throw Error(`seats must be a positive integer`);if(typeof r.draw!=`boolean`)throw Error(`opt.draw must be a boolean`);let i=aS(e),a=(0,eS.default)(Object.entries(e).map(([n,r])=>{let a=Math.max(t-Object.keys(e).length,0);return[n,Math.round(a*r/i)]})),o=(0,eS.default)(Object.entries(e).map(([n,r])=>{let a=t+Object.keys(e).length;return[n,Math.min(Math.round(a*r/i),t)]})),s=(0,nS.default)(Object.entries(e).map(([e,t])=>{let n=a[e],r=o[e];return(0,tS.default)(n,r).map(n=>({party:e,quotient:iS(t/(n+.5))}))})),c=t-aS(a),l=(0,$x.default)(s,({quotient:e})=>-e),u=l[c-1].quotient,d=l.filter(({quotient:e})=>e>u),f=l.filter(({quotient:e})=>e===u);if(d.length+f.length===c)d.push(...f);else{if(!r.draw)throw Error(`result is ambiguous, a draw would need to be made, but opt.draw is disabled`);d.push(...(0,rS.default)(f,c-d.length))}return d.reduce((e,{party:t})=>(e[t]+=1,e),a)},sS=(e=ey)=>e(`pattern`,{id:`greyHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:Da.neoGrey[200]}),e(`path`,{d:`M0,2 L8,2`,stroke:Da.neoGrey[400],"stroke-width":.5}),e(`path`,{d:`M0,6 L8,6`,stroke:Da.neoGrey[400],"stroke-width":.5})]),cS=(e=ey)=>e(`pattern`,{id:`dataMissingHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:`#FFF3CC`}),e(`path`,{d:`M0,8 L8,0`,stroke:`#FFB800`,"stroke-width":.5}),e(`path`,{d:`M-2,2 L2,-2`,stroke:`#FFB800`,"stroke-width":.5}),e(`path`,{d:`M6,10 L10,6`,stroke:`#FFB800`,"stroke-width":.5})]),lS=(e=ey)=>e(`pattern`,{id:`noLstHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:`#FFE5E5`}),e(`path`,{d:`M0,0 L8,8`,stroke:`#ED4134`,"stroke-width":.5}),e(`path`,{d:`M-2,6 L2,10`,stroke:`#ED4134`,"stroke-width":.5}),e(`path`,{d:`M6,-2 L10,2`,stroke:`#ED4134`,"stroke-width":.5})]),uS=e=>Math.round(e*1e10)/1e10,dS=e=>e.reduce((e,t)=>e+t.seats,0),fS=e=>e.flat(),pS=(e,t,n)=>{let r=(Math.PI-n)/2,i=t/e+r-Math.PI;return{x:uS(e*Math.cos(i)),y:uS(e*Math.sin(i))}},mS=(e,t,n,r)=>r*t*n/(e-t)/(1+r*(t-1)*t/2/(e-t)),hS=(e,t,n,r)=>{let i=r/Math.PI*(5/7);return Math.abs(mS(e,t,n,r)*t/n-i)},gS=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,i=hS(e,r,t,n),a=0;for(hS(e,r+1,t,n)<i&&(a=1),hS(e,r-1,t,n)<i&&r>1&&(a=-1);hS(e,r+a,t,n)<i&&r>0;)i=hS(e,r+a,t,n),r+=a;return r},_S=(e,t)=>{let n,r;for(let i=0;i<e.length;i++)r=uS((t[i]||0)/(e[i]?.length??1)),(!n||r<n)&&(n=r);for(let i=0;i<e.length;i++)if(r=uS((t[i]||0)/(e[i]?.length??1)),r===n)return i;return 0},vS=(e,t,n)=>{let r=dS(e),i=gS(r,t,n),a=mS(r,i,t,n),o={};for(let e=1;e<=i;e++)o[e]=t-(e-1)*a;o=oS(o,r);let s=[],c,l,u;for(let e=1;e<=i;e++){let r=[];c=t-(e-1)*a,l=n*c/((o[e]??1)-1||1);for(let t=0;t<=(o[e]??1)-1;t++)u={...pS(c,t*l,n),r:.4*a},r.push(u);s.push(r)}let d=Array(s.length).fill(0);for(let t of e)for(let e=0;e<t.seats;e++){let e=_S(s,d),n=s[e],r=d[e]??0,i=n?.[r];i&&(i.fill=t.colour,i.party=String(t.id)),d[e]=r+1}return fS(s)},yS=e=>t=>e(`circle`,{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),bS={seatCount:!1,arcAngle:180,hFunction:ey},xS=(e,t={})=>{let{seatCount:n,arcAngle:r,hFunction:i}=Object.assign({},bS,t);if(typeof n!=`boolean`)throw Error("`seatCount` option must be a boolean");if(typeof i!=`function`)throw Error("`hFunction` option must be a function");if(typeof r!=`number`||r<=0||r>360)throw Error("`arcAngle` option must be a number between 0 and 360");let a=r*Math.PI/180,o=vS(e,20,a),s=(o[0]?.r??0)/.4||0,c=o.map(yS(i));n&&c.push(i(`text`,{x:0,y:0,"text-anchor":`middle`,style:{"font-family":`Helvetica`,"font-size":`5px`},class:`seatNumber`},String(c.length)));let l=r<=180?20+s:20*(1+Math.sin((a-Math.PI)/2))+s,u=20+s,d=Math.max(l,u),f=r<=180?-20-s/2:-20*(1+Math.sin((a-Math.PI)/2))-s/2,p=i(`defs`,[sS(i),cS(i),lS(i)]);return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:[-20-s/2,f,40+s,d].join(`,`)},[p,...c])},SS={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:ey},CS=(e,t={})=>{let{arcAngle:n,arcAngleFlexibility:r,radius:i,seatSize:a,minSeatSize:o,maxSeatSize:s,spacing:c,innerRadiusRatio:l,showLabels:u,hFunction:d}={...SS,...t},f=i*l,p=e.reduce((e,t)=>e+t.seats,0),m={seatSize:a,arcAngle:n,rings:0,score:-1},h=n-r,g=n+r;for(let e=h;e<=g;e+=2.5){let t=e*Math.PI/180;for(let a=s;a>=o;a-=.1){let l=a*2,u=l*c,d=Math.floor((i-f)/u);for(let i=1;i<=Math.min(d,10);i++){let d=0,h=1/0;for(let e=0;e<i;e++){let n=f+(e+.5)*u,r=l*c/n,i=Math.floor(t/r);d+=i,h=Math.min(h,i)}if(d>=p){let t=p/d,c=(a-o)/(s-o),l=(d-p)/p,u=l<.15?1:l<.3?.7:l<.5?.4:.1,f=1-Math.abs(e-n)/r,h=u*.5+c*.3+t*.15+f*.05;h>m.score&&(m={seatSize:a,arcAngle:e,rings:i,score:h})}}}}let _=m.seatSize,v=m.arcAngle,y=v*Math.PI/180,b=_*2,x=b*c,S=Math.floor((i-f)/x),C=[],w=-y/2-Math.PI/2,T=0,E=[],D=0,O=[],k=0;for(let e=1;e<=S;e++){let t=0,n=[];for(let r=0;r<e;r++){let e=f+(r+.5)*x,i=b*c/e,a=Math.floor(y/i);n.push(a),t+=a}if(t>=p){D=e,O=n,k=t;break}}if(D>0)E.push(...O),T=k;else for(let e=0;e<S;e++){let t=f+(e+.5)*x,n=b*c/t,r=Math.floor(y/n);E.push(r),T+=r}for(let e=0;e<E.length;e++){let t=f+(e+.5)*x,n=E[e]??0;if(n>0){let r=y/n;for(let i=0;i<n;i++){let n=w+(i+.5)*r,a=Math.cos(n)*t,o=Math.sin(n)*t;C.push({ring:e,index:i,angle:n,x:a,y:o})}}}C.sort((e,t)=>{let n=e.angle-t.angle;return Math.abs(n)>.001?n:e.ring-t.ring});let A=[],j=0;e.forEach(e=>{let t=[],n=Math.min(e.seats,C.length-j),r=!!e.dashed,i=e.colour,a=e.borderColour??e.colour,o=Math.max(.5,_*(r?.24:.3)),s=r?`${(_*.48).toFixed(2)} ${(_*.38).toFixed(2)}`:void 0,c=1/0,l=-1/0,u=1/0,f=-1/0,p=[];for(let r=0;r<n&&j<C.length;r++){let n=C[j++];if(!n)continue;p.push(n),c=Math.min(c,n.angle),l=Math.max(l,n.angle);let r=Math.sqrt(n.x*n.x+n.y*n.y);u=Math.min(u,r),f=Math.max(f,r),t.push(d(`circle`,{fill:i,stroke:a,"stroke-width":o,...s?{"stroke-dasharray":s}:{},className:`circle seat-visual seat-hover-zone`,transform:`translate(${n.x}, ${n.y})`,r:_,"data-party":e.name,"data-party-id":String(e.id),style:`pointer-events: all; cursor: pointer;`}))}let m=t;A.push(d(`g`,{className:`party-group`,"data-party":e.name,style:`opacity: 1; outline: none;`},m))});let M=d(`g`,{className:`arc-bg`},[d(`circle`,{className:`outer`,cx:0,cy:0,fill:`transparent`,r:i}),d(`circle`,{className:`inner`,cx:0,cy:0,fill:`transparent`,r:f})]),N=d(`g`,{className:`points-container`},A),P=u?d(`g`,{className:`label-container`,mask:`url(#label-clip)`,style:`pointer-events: none;`},[d(`text`,{className:`party_count`,dy:`-0.05em`,style:`font-size: 24vw; font-weight: bold; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);`}),d(`text`,{className:`party_name`,y:0,dy:`1em`,style:`font-size: 6vw; font-weight: normal; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);`})]):null,F=d(`defs`,[d(`radialGradient`,{id:`label-gradient`},[d(`stop`,{offset:`0%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 1;`}),d(`stop`,{offset:`80%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 1;`}),d(`stop`,{offset:`90%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 0.1;`}),d(`stop`,{offset:`100%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 0;`})]),d(`mask`,{id:`label-clip`},[d(`circle`,{fill:`url(#label-gradient)`,r:f})])]),I=d(`g`,{className:`arc-container`,transform:`translate(${i}, ${i})`},[M,N,P].filter(Boolean)),L=y/2,R;if(v<=180)R=i*Math.sin(L)+_;else{let e=L-Math.PI/2;R=i*(1+Math.sin(e))+_}let z=i+_;return d(`svg`,{id:`chart-container`,"font-family":`Canva Sans Variable`,viewBox:`0 0 ${i*2} ${Math.max(R,z)}`,preserveAspectRatio:`xMidYMid meet`,xmlns:`http://www.w3.org/2000/svg`},[I,F])};function wS(e){return!e||!e.color?`#cccccc`:e.color===`url(#hatchPattern)`?Pa.COMPLETED:e.color}function TS(e,t){if(!e)return;let n=e.querySelectorAll(`.party-group`);n&&n.length>0&&n.forEach(e=>{if(!e)return;let n=e,r=n.getAttribute(`data-party`);t?r===t?n.style.opacity=Na.animation.hoverOpacity.active:n.style.opacity=Na.animation.hoverOpacity.dimmed:n.style.opacity=`1`})}function ES(e,t){e.forEach(e=>{let n=e,r=e.getAttribute(`class`)||``;t?r===t?(n.setAttribute(`fill-opacity`,`1`),n.setAttribute(`stroke-opacity`,`1`)):(n.setAttribute(`fill-opacity`,Na.animation.hoverOpacity.dimmed),n.setAttribute(`stroke-opacity`,`0.2`)):(n.setAttribute(`fill-opacity`,`1`),n.setAttribute(`stroke-opacity`,`1`))})}var DS=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:i,maxSeats:a,setHoveredData:o,activePartyName:s,setActivePartyName:c,chartConfig:l,seatSize:u,paletteMode:f,shouldAnimate:p=!1,animationDirection:m=`left-to-right`,onAnimationComplete:h})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);let d=n<=a?1:a/n,g=t.filter(e=>e.value>0).map(e=>{let t=n<=a?e.value:Math.max(1,Math.floor(e.value*d)),{fill:r,stroke:i,dashed:o}=Va(e.color===`url(#hatchPattern)`?Pa.COMPLETED:e.color,void 0,{paletteMode:f,label:e.label});return{id:String(e.id),name:e.label,seats:t,colour:r,borderColour:i,dashed:o}}),_=i?CS(g,{arcAngle:r,arcAngleFlexibility:l.arcAngleFlexibility,radius:l.radius,seatSize:u,minSeatSize:l.minSeatSize,maxSeatSize:l.maxSeatSize,spacing:l.spacing,innerRadiusRatio:l.innerRadiusRatio,showLabels:!0}):xS(g,{arcAngle:r});_.properties&&(_.properties.width=`100%`,_.properties.height=`100%`,_.properties.style=`display: block; width: 100%; max-width: 100%; height: auto;`,_.properties.preserveAspectRatio=`xMidYMid meet`);let v=Bv(_),y=new DOMParser().parseFromString(v,`image/svg+xml`).documentElement;if(!y)return;y.setAttribute(`width`,`100%`),y.setAttribute(`height`,`100%`),y.style.width=`100%`,y.style.height=`auto`,y.style.display=`block`,i?OS(y,g,t,o,s,c):kS(y,g,t,o,s,c);let b=()=>{o(null),c(null),i?TS(y,null):ES(y.querySelectorAll(`circle`),null)};return y&&y.addEventListener(`mouseleave`,b),e.current.appendChild(y),p&&y&&Uv(y,r,l.radius,m,900,h),()=>{if(y&&y.removeEventListener(`mouseleave`,b),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,i,a,o,s,c,e,l,u,f,p,m,h])};function OS(e,t,n,r,i,a){if(!e)return;let o=e.querySelectorAll(`.seat-hover-zone`),s=e.querySelectorAll(`.party-group circle.seat-visual`);s&&s.length>0&&s.forEach(e=>{if(e){let t=e;t.setAttribute(`fill-opacity`,`1`),t.style.transition=`fill-opacity ${Na.animation.transitionDuration} ease, stroke-opacity ${Na.animation.transitionDuration} ease`}}),o&&o.length>0&&o.forEach(o=>{if(!o)return;let s=o.getAttribute(`data-party`),c=o.getAttribute(`data-party-id`);o.addEventListener(`mouseenter`,()=>{if(s&&s!==i){let i=t.find(e=>e.name===s||String(e.id)===c);if(i){let t=n.find(e=>e.label===i.name||String(e.id)===i.id);if(t){let n=wS(t);r({label:t.label||`Unknown`,value:t.value||0,color:n}),a(i.name),TS(e,i.name)}}}})}),i&&TS(e,i)}function kS(e,t,n,r,i,a){if(!e)return;let o=e.querySelectorAll(`circle`);if(o&&o.length>0&&(o.forEach(e=>{if(e){let t=e;t.style.cursor=`pointer`,t.setAttribute(`fill-opacity`,`1`),t.style.transition=`fill-opacity ${Na.animation.transitionDuration} ease, stroke-opacity ${Na.animation.transitionDuration} ease`}}),o.forEach(e=>{if(!e)return;let s=e.getAttribute(`class`)||``,c=t[parseInt(s,10)];e.addEventListener(`mouseenter`,()=>{if(c){let e=c.name;if(e&&e!==i){let t=n.find(e=>e.label===c.name||String(e.id)===c.id);if(t){let n=wS(t);r({label:t.label||`Unknown`,value:t.value||0,color:n}),a(e),ES(o,s)}}}})})),i){let e=t.find(e=>e.name===i);if(e){let n=t.indexOf(e);ES(o,String(n))}}}var AS=Oa,jS={"N/A":Pa.NOT_APPLICABLE,[Ua]:Pa.NO_LST,[Wa]:Pa.DATA_MISSING},MS=(e,t,n)=>{if(e in jS)return jS[e];let r=n-1-t,i=AS.length,a=Math.floor(r/Math.max(1,n-1)*(i-1));return AS[Math.min(Math.max(0,a),i-1)]??AS[0]??`#000000`},NS=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{let{special:i,regular:a}=e.reduce((e,t,n)=>([`N/A`,`No LST`,`Data Missing`].includes(t.label)?e.special.push({...t,originalIndex:n}):e.regular.push({...t,originalIndex:n}),e),{special:[],regular:[]}),o=a.reverse().map((e,t)=>({id:`measure-${t}`,label:e.label,value:e.value,color:MS(e.label,a.length-1-t,a.length)})),s=i.map((e,t)=>({id:e.label.toLowerCase().replace(` `,`-`),label:e.label,value:e.value,color:MS(e.label,t,i.length)})),c=r,l={id:`no-lst`,label:Ua,value:n,color:MS(Ua,0,1)},u={id:`data-missing`,label:Wa,value:c,color:MS(Wa,0,1)},d={id:`n/a`,label:`N/A`,value:t,color:MS(`N/A`,0,1)},f=[];return d.value>0&&f.push(d),l.value>0&&f.push(l),u.value>0&&f.push(u),f.push(...s),f.push(...o),f},PS={"N/A":`Repos that aren't applicable to this migration.`,"No LST":`There are no LSTs for these repos.`,"Data Missing":`There is data missing in the LSTs.`},FS=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i,arcAngle:a,useEnhanced:o=Na.useEnhanced,showTable:s=!0,shouldAnimate:c=!1,animationDirection:l=`left-to-right`,onAnimationComplete:m})=>{let h=(0,u.useTheme)().palette.mode,g=(0,d.useRef)(null),[_,v]=(0,d.useState)(null),[y,b]=(0,d.useState)(null),x=NS({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,totalRepositories:t,unavailableRepositories:i}).map(e=>{let t=typeof e.color==`function`?e.color(`arc`):e.color,n=typeof e.label==`function`?e.label(`arc`):e.label;return{...e,color:t,label:n}}),S=a??bg({repositoryCount:t}),C=xg({repositoryCount:t});DS({containerRef:g,processedData:x,totalRepositories:t,arcAngle:S,useEnhanced:o,maxSeats:Na.maxSeats,setHoveredData:v,activePartyName:y,setActivePartyName:b,chartConfig:Na.chartConfig,seatSize:C,paletteMode:h,shouldAnimate:c,animationDirection:l,onAnimationComplete:m});let w=x.map(e=>{let n=t>0?e.value/t*100:0,r=n>0&&n<1?`< 1`:n.toFixed(0);return{id:String(e.id),label:e.label,value:e.value,percentage:r,color:e.color}}),T=t>Na.maxSeats,E=T?Math.round(t/Na.maxSeats):1;return(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:{xs:.5,sm:.75,md:1,lg:1},py:0,"@media (min-width: 1024px) and (max-width: 1225px)":{gap:.25}},children:[(0,f.jsxs)(u.Box,{className:`parliament-chart-container`,sx:{position:`relative`,width:`100%`,minHeight:`200px`,mb:{xs:.5,sm:.75,md:1},"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:`250px`,mb:.25}},children:[(0,f.jsx)(u.Box,{className:`parliament-chart-svg-container`,ref:g,sx:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,justifyContent:`center`,alignItems:`center`,"& svg":{width:`100%`,height:`100%`,maxWidth:`100%`,"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:`230px`}}}}),(0,f.jsxs)(u.Box,{className:`parliament-chart-tooltip`,sx:{position:`absolute`,bottom:`0%`,left:`50%`,transform:`translate(-50%, 0%)`,pointerEvents:`none`,textAlign:`center`,zIndex:10,"@media (min-width: 1024px) and (max-width: 1225px)":{bottom:`5%`}},children:[_&&(0,f.jsxs)(d.default.Fragment,{children:[(0,f.jsx)(u.Typography,{sx:{color:`var(--rc-muted-text, #6b7280)`,mb:.3,fontSize:`clamp(0.75rem, 1.5vw, 0.85rem)`,display:`block`,"@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:`0.7rem`,mb:.2}},children:_.label}),(0,f.jsxs)(u.Typography,{sx:{fontWeight:`bold`,color:_.color,lineHeight:1,fontSize:`clamp(1.1rem, 2.2vw, 1.3rem)`,"@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:`1rem`}},children:[_.value,` `,_.value>1?`repos`:`repo`]})]}),T&&(0,f.jsxs)(u.Box,{className:`parliament-chart-scaled-indicator`,sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:.5,mt:_?.5:0,color:`var(--rc-muted-text, #6b7280)`,fontSize:`clamp(0.65rem, 1.2vw, 0.72rem)`},children:[(0,f.jsx)(u.Box,{className:`parliament-chart-scaled-indicator-dot`,sx:{width:8,height:8,borderRadius:`50%`,backgroundColor:`#888888`,flexShrink:0}}),(0,f.jsxs)(u.Typography,{variant:`caption`,sx:{fontSize:`inherit`,fontStyle:`italic`},children:[`= ~`,E,` repos`]})]})]})]}),s&&(0,f.jsx)(u.Box,{className:`parliament-chart-data-table`,sx:{width:`100%`,display:`flex`,justifyContent:`center`,"@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:`auto`,maxWidth:`100%`}},onMouseLeave:()=>{v(null),b(null)},children:(0,f.jsxs)(u.Table,{"aria-label":`Repository categories summary`,className:`parliament-chart-table`,size:`small`,sx:{maxWidth:{xs:`clamp(360px, 90%, 400px)`,sm:`clamp(360px, 90%, 400px)`,md:`clamp(360px, 85%, 420px)`,lg:`clamp(360px, 90%, 400px)`},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:`360px`,"& .MuiTableCell-root":{padding:`1px 4px`,fontSize:`9.5px`}},"& .MuiTableCell-root":{paddingTop:`1px`,paddingBottom:`1px`,paddingLeft:0,paddingRight:`4px`,borderBottom:`none`,fontSize:`clamp(10px, 1.8vw, 12px)`},"& tbody .MuiTableRow-root:first-of-type .MuiTableCell-root":{paddingTop:`2px`}},children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(u.TableRow,{sx:e=>({"& .MuiTableCell-root":{borderBottom:`1px solid`,borderColor:`var(--rc-table-border, ${e.palette.divider})`,pb:`2px`}}),children:[(0,f.jsx)(u.TableCell,{colSpan:2,sx:{fontWeight:500},children:`Category`}),(0,f.jsx)(u.TableCell,{align:`right`,sx:{fontWeight:500},children:`# of repositories`}),(0,f.jsx)(u.TableCell,{align:`right`,sx:{fontWeight:500},children:`Percentage`})]})}),(0,f.jsx)(`tbody`,{children:w.map(e=>{let t=e.color,{fill:n,stroke:r,dashed:i}=Va(e.color,void 0,{paletteMode:h,label:e.label});return(0,f.jsxs)(u.TableRow,{onMouseEnter:()=>{b(e.label),v({label:e.label,value:e.value,color:e.color})},sx:{cursor:`pointer`,transition:`background-color 0.15s ease`,backgroundColor:y===e.label?`${t}15`:`transparent`,"&:hover":{backgroundColor:`${t}15`}},children:[(0,f.jsx)(u.TableCell,{align:`center`,sx:{width:20},children:(0,f.jsx)(u.Box,{sx:{width:12,height:12,boxSizing:`border-box`,borderRadius:`50%`,backgroundColor:n,border:`1.5px ${i?`dashed`:`solid`} ${r}`,transition:`transform 0.15s ease`,transform:y===e.label?`scale(1.2)`:`scale(1)`}})}),(0,f.jsx)(u.TableCell,{children:(0,f.jsxs)(u.Stack,{direction:`row`,alignItems:`center`,gap:.5,children:[(0,f.jsx)(`span`,{children:e.label}),PS[e.label]&&(0,f.jsx)(u.Tooltip,{title:PS[e.label],placement:`right`,arrow:!0,children:(0,f.jsx)(p.InfoOutlined,{sx:{fontSize:`.875rem`,color:`var(--rc-muted-text, #6b7280)`}})})]})}),(0,f.jsx)(u.TableCell,{align:`right`,children:e.value}),(0,f.jsxs)(u.TableCell,{align:`right`,children:[e.percentage,`%`]})]},e.id)})})]})})]})},IS=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timelineEvents:o=[],showTimeline:s=!0,timelineHeight:c=40,timelineOffset:l=35,timeRange:u,showGrid:f=!0,showAxes:p=!0,axisLabelColor:m,axisLabelSize:h=14,enableBrush:g=!1,onTimeRangeChange:_,minAllowedTime:v,maxAllowedTime:y,brushColor:b=`#69b3a2`,formatDate:x,formatValue:S,markers:C=[],onHoveredDataChange:w,hoveredCategory:T,onTimelineEventHover:E})=>{let[D,O]=(0,d.useState)(null),[k,A]=(0,d.useState)(null),[j,M]=(0,d.useState)([]),N=(0,d.useRef)(`sawt-${Math.random().toString(36).substr(2,9)}`),P=(0,d.useCallback)(e=>{O(e),E?.(e)},[E]);return(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=Y(e.current),E=r-a.left-a.right,D=i-a.top-a.bottom,O=N.current;d.selectAll(`*`).remove();let k=`main-chart-group main-chart-group-${O}`,j=d.append(`g`).attr(`class`,k).attr(`transform`,`translate(${a.left},${a.top})`),F=`sawt-clip-${O}`;d.append(`defs`).append(`clipPath`).attr(`id`,F).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,E).attr(`height`,D);let I=j.append(`g`).attr(`clip-path`,`url(#${F})`),L=[...t.map(e=>({timestamp:e.timestamp,...e.values}))].sort((e,t)=>e.timestamp-t.timestamp),R=n.map(e=>e.dataKey),z=Ci().keys(R),B=z(L),V=t.map(e=>e.timestamp),H=u?u[0]:Math.min(...V),U=u?u[1]:Math.max(...V),ee=Qr().domain([new Date(H),new Date(U)]).range([0,E]),te=L.filter(e=>e.timestamp>=H&&e.timestamp<=U),ne=z(te),re=ne.length>0?Math.max(...ne[ne.length-1].map(e=>e[1]??0)):0,W=Nt().domain([0,re*1.1]).range([D,0]).nice();f&&(I.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(ro(ee).ticks(6).tickSize(D).tickFormat(()=>``)),I.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(io(W).ticks(5).tickSize(-E).tickFormat(()=>``)));let ie=gi().x(e=>ee(new Date(e.data.timestamp))).y0(e=>W(e[0])).y1(e=>W(e[1])).curve(fi),ae=I.append(`g`).attr(`class`,`areas`);B.forEach((e,t)=>{let r=n[t];if(!r)return;let i=T===r.dataKey,a=T!=null;ae.append(`path`).datum(e).attr(`class`,`area area-${r.dataKey}`).attr(`fill`,r.color).attr(`fill-opacity`,a?i?.9:.3:.7).attr(`stroke`,r.color).attr(`stroke-width`,i?2:1.5).attr(`d`,ie).on(`mouseenter`,()=>{let e=te[te.length-1],t=e?e[r.dataKey]??0:0;w?.({label:r.label,value:t,color:r.color})}).on(`mouseleave`,()=>{w?.(null)})});let G=C.filter(e=>e.timestamp>=H&&e.timestamp<=U).map(e=>({...e,x:ee(new Date(e.timestamp))}));M(e=>e.length!==G.length||e.some((e,t)=>e.timestamp!==G[t]?.timestamp||e.x!==G[t]?.x)?G:e);let oe=null;if(G.length>0&&(oe=I.append(`g`).attr(`class`,`markers`),G.forEach(e=>{oe.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,e.timestamp).attr(`x1`,e.x).attr(`x2`,e.x).attr(`y1`,0).attr(`y2`,D).attr(`stroke`,e.color??`#131E7A`).attr(`stroke-width`,2).attr(`opacity`,0)})),p){let e=ro(ee).ticks(6).tickPadding(12);x&&e.tickFormat(e=>x(+e)),j.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${D})`).call(e).selectAll(`text`).attr(`font-size`,h).attr(`fill`,m??null);let t=io(W).ticks(5);t.tickFormat(e=>+e==0?``:S?S(+e):String(e)),j.append(`g`).attr(`class`,`axis axis-y`).call(t).selectAll(`text`).attr(`font-size`,h).attr(`fill`,m??null)}if(g&&_){let e=Ou().extent([[0,0],[E,D]]).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection,i=[+ee.invert(n),+ee.invert(r)];v!==void 0&&(i[0]=Math.max(i[0],v)),y!==void 0&&(i[1]=Math.min(i[1],y)),_(i),d.select(`.brush`).call(e.move,null)}),t=I.append(`g`).attr(`class`,`brush`).call(e);t.selectAll(`.selection`).attr(`fill`,b).attr(`fill-opacity`,.2).attr(`stroke`,b).attr(`stroke-width`,1),t.selectAll(`.handle`).attr(`fill`,b).attr(`fill-opacity`,.8),t.select(`.overlay`).style(`cursor`,`default`)}if(s&&Uh({svg:d,events:o,xScale:ee,chartHeight:D,chartWidth:E,timelineHeight:c,timelineOffset:l,instanceId:O,setHoveredTimelineEvent:P,enableBrush:g,onTimeRangeChange:_,minAllowedTime:v,maxAllowedTime:y,brushColor:b,mainGroupSelector:`.main-chart-group-${O}`}),G.length>0&&oe){let e=null,t;t=g?I.select(`.brush .overlay`):j.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,E).attr(`height`,D).attr(`fill`,`none`).attr(`pointer-events`,`all`);let n=oe,r=t=>{let r=null,i=1/0;if(G.forEach(e=>{let n=Math.abs(t-e.x);n<i&&(i=n,r=e)}),!r||i>50)return e!==null&&(e=null,n.selectAll(`.marker-line`).attr(`opacity`,0),A(null)),!1;let a=r;return e===a.timestamp?!0:(e=a.timestamp,n.selectAll(`.marker-line`).attr(`opacity`,0),n.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,.6),A(a),!0)},i=function(e){let[t]=dc(e,this);r(t)};t.on(`mouseenter`,i),t.on(`mousemove`,i),t.on(`mouseleave`,function(){e=null,n.selectAll(`.marker-line`).attr(`opacity`,0),A(null)})}return()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,P]),{hoveredTimelineEvent:D,hoveredMarker:k,visibleMarkers:j}},LS=({data:e,categories:t,timelineEvents:n=[],showTimeline:r=!0,timelineHeight:i=40,timelineOffset:a,width:o=900,height:s=400,margin:c={top:10,right:30,bottom:40,left:60},showGrid:l=!0,showAxes:p=!0,axisLabelColor:m,axisLabelSize:h=14,formatDate:g,formatValue:_,timeRange:v,enableBrush:y=!1,onTimeRangeChange:b,minAllowedTime:x,maxAllowedTime:S,brushColor:C=`#69b3a2`,markers:w=[],onHoveredDataChange:T,hoveredCategory:E,onTimelineEventHover:D})=>{let O=(0,d.useRef)(null),k=a??18+h+12,A=r?s+i+k:s,{hoveredTimelineEvent:j,hoveredMarker:M,visibleMarkers:N}=IS({containerRef:O,data:e,categories:t,width:o,height:s,margin:c,timelineEvents:n,showTimeline:r,timelineHeight:i,timelineOffset:k,timeRange:v,showGrid:l,showAxes:p,axisLabelColor:m,axisLabelSize:h,enableBrush:y,onTimeRangeChange:b,minAllowedTime:x,maxAllowedTime:S,brushColor:C,formatDate:g,formatValue:_,markers:w,onHoveredDataChange:T,hoveredCategory:E,onTimelineEventHover:D});return(0,f.jsxs)(u.Box,{sx:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:O,viewBox:`0 0 ${o} ${A}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,height:`auto`,display:`block`}}),N.map(e=>{let t=(e.x+c.left)/o*100,n=c.top/A*100,r=new Date(e.timestamp),i=g?g(e.timestamp):r.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0});return(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:e.label?.5:0},children:i}),e.label&&(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:e.label})]}),open:M?.timestamp===e.timestamp,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${t}%`,top:`${n}%`,width:`1px`,height:`${(s-c.top-c.bottom)/A*100}%`,pointerEvents:`none`}})},e.timestamp)}),j&&r&&!M&&(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:.5},children:g?g(j.timestamp):new Date(j.timestamp).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}),(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:j.eventName})]}),open:!0,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${(j.x+c.left)/o*100}%`,top:`${(s+k+i/2)/A*100}%`,width:`1px`,height:`1px`,pointerEvents:`none`}})})]})},RS={colors:{primary:`#992FB9`,background:`#FFFFFF`,border:`#9CA3AF`,highlightBackground:`rgba(31, 41, 55, 0.14)`,monthLabel:`#9ca3af`,tooltipText:`#6b7280`},dimensions:{height:32,eventWidth:2}},zS=(e=`#4B5563`)=>({startHandle:{sx:{position:`absolute`,left:`-6px`,top:`-10px`,width:`14px`,height:`calc(100% + 10px)`,zIndex:3,display:`flex`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`,borderTop:`8px solid ${e}`,transition:`border-top-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`8px`,left:`50%`,transform:`translateX(-50%)`,width:`2px`,height:`calc(100% - 8px)`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}},endHandle:{sx:{position:`absolute`,right:`-6px`,top:`-10px`,width:`14px`,height:`calc(100% + 10px)`,zIndex:3,display:`flex`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`,borderTop:`8px solid ${e}`,transition:`border-top-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`8px`,left:`50%`,transform:`translateX(-50%)`,width:`2px`,height:`calc(100% - 8px)`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}}}),BS={header:{sx:{}},title:{sx:{m:0}},instructions:{sx:{color:`text.secondary`,minHeight:`40px`,display:`flex`,alignItems:`center`}},monthLabelsContainer:{sx:{justifyContent:`space-between`,px:1.25,height:`20px`,fontSize:`11px`,color:RS.colors.monthLabel,mb:1}},monthLabel:{sx:{fontSize:`11px`}},timeline:{sx:{position:`relative`,height:`${RS.dimensions.height}px`,backgroundColor:RS.colors.background,borderRadius:0,overflow:`visible`,border:`1px solid ${RS.colors.border}`}},event:{sx:{position:`absolute`,top:0,width:`${RS.dimensions.eventWidth}px`,height:`100%`,backgroundColor:RS.colors.primary,cursor:`pointer`,transition:`transform 0.2s`,transformOrigin:`center`}},selection:{sx:{position:`absolute`,top:0,height:`100%`,backgroundColor:RS.colors.highlightBackground,pointerEvents:`none`}},startHandle:{},endHandle:{},tooltip:{sx:{position:`absolute`,bottom:`-40px`,backgroundColor:`white`,p:`6px 10px`,borderRadius:.5,boxShadow:`0 2px 8px rgba(0,0,0,0.15)`,whiteSpace:`nowrap`,pointerEvents:`none`,zIndex:10,border:`1px solid ${RS.colors.border}`}},tooltipEventName:{sx:{fontWeight:600}},tooltipDate:{sx:{color:RS.colors.tooltipText,fontSize:`11px`}}},VS=(e=`#9CA3AF`)=>({startHandle:{sx:{position:`absolute`,left:`-8px`,top:0,width:`20px`,height:`100%`,zIndex:3,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:`1px`,height:`100%`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:`9px`,height:`16px`,backgroundColor:`#F9FAFB`,border:`1px solid ${e}`,transition:`border-color 0.2s, background-color 0.2s`,pointerEvents:`none`,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:`35% center, 65% center`,backgroundSize:`1px 50%, 1px 50%`,backgroundRepeat:`no-repeat`},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}},endHandle:{sx:{position:`absolute`,right:`-8px`,top:0,width:`20px`,height:`100%`,zIndex:3,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:`1px`,height:`100%`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:`9px`,height:`16px`,backgroundColor:`#F9FAFB`,border:`1px solid ${e}`,transition:`border-color 0.2s, background-color 0.2s`,pointerEvents:`none`,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:`35% center, 65% center`,backgroundSize:`1px 50%, 1px 50%`,backgroundRepeat:`no-repeat`},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}}}),HS=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}},US=({events:e,selectedRange:t,onSelectionChange:n,enableZoom:r,zoomToSelection:i,visibleRange:a,onVisibleRangeChange:o})=>{HS()&&e.length>1&&(e.every((t,n)=>n===0||t.timestamp>=e[n-1].timestamp)||console.warn(`TimelineChart: events array should be sorted by timestamp for optimal performance and correct behavior.`));let[s,c]=(0,d.useState)(!1),[l,u]=(0,d.useState)(null),[f,p]=(0,d.useState)(null),[m,h]=(0,d.useState)({start:null,end:null}),[g,_]=(0,d.useState)({start:null,end:null}),[v,y]=(0,d.useState)(null),b=(0,d.useRef)(null),x=t??m,S=a??g,C=(0,d.useMemo)(()=>e.length>0?e[0]?.timestamp??0:0,[e]),w=(0,d.useMemo)(()=>e.length>0?e[e.length-1]?.timestamp??0:0,[e]),T=(0,d.useMemo)(()=>i&&S.start&&S.end?S.start:C,[i,S,C]),E=(0,d.useMemo)(()=>i&&S.start&&S.end?S.end:w,[i,S,w]),D=(0,d.useMemo)(()=>E-T,[E,T]),O=(0,d.useMemo)(()=>!r&&x.start!==null&&x.end!==null,[r,x]),k=(0,d.useCallback)(e=>D===0?0:(e-T)/D*100,[T,D]),A=(0,d.useCallback)((e,t)=>{let n=e/t*100;return T+n/100*D},[T,D]),j=(0,d.useCallback)(e=>{t===void 0&&h(e),n?.(e)},[t,n]),M=(0,d.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=A(n,t.width);c(!0),u(r),j({start:r,end:r})},[A,j]),N=(0,d.useCallback)(e=>{if(!s||l===null)return;let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=A(n,t.width);if(f===`start`){let e=Math.min(r,x.end-D*.01);j({start:Math.max(e,T),end:x.end})}else if(f===`end`){let e=Math.max(r,x.start+D*.01);j({start:x.start,end:Math.min(e,E)})}else if(f===`body`){let e=r-l,t=x.end-x.start,n=x.start+e,i=x.end+e;n<T&&(n=T,i=T+t),i>E&&(i=E,n=E-t),j({start:n,end:i}),u(r)}else j({start:Math.min(l,r),end:Math.max(l,r)})},[s,l,f,x,D,T,E,A,j]),P=(0,d.useCallback)(()=>{let e=s;if(c(!1),p(null),e&&i&&x.start&&x.end&&x.start!==x.end){let e={start:x.start,end:x.end};a===void 0&&_(e),o?.(e)}},[s,i,x,a,o]);(0,d.useEffect)(()=>{if(!s||l===null||!b.current)return;let e=e=>{let t=b.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=A(r,n.width);if(f===`start`){let e=Math.min(i,x.end-D*.01);j({start:Math.max(e,T),end:x.end})}else if(f===`end`){let e=Math.max(i,x.start+D*.01);j({start:x.start,end:Math.min(e,E)})}else if(f===`body`){let e=i-l,t=x.end-x.start,n=x.start+e,r=x.end+e;n<T&&(n=T,r=T+t),r>E&&(r=E,n=E-t),j({start:n,end:r}),u(i)}else j({start:Math.min(l,i),end:Math.max(l,i)})},t=()=>{P()};return document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)}},[s,l,f,x,D,T,E,A,j,P]);let F=(0,d.useCallback)(e=>{e.stopPropagation(),x.start!==null&&(c(!0),u(x.start),p(`start`))},[x]),I=(0,d.useCallback)(e=>{e.stopPropagation(),x.end!==null&&(c(!0),u(x.end),p(`end`))},[x]),L=(0,d.useCallback)(e=>{e.stopPropagation();let t=b.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=A(r,n.width);c(!0),u(i),p(`body`)},[A]),R=(0,d.useCallback)(e=>{if(e.cancelable&&r&&e.preventDefault(),!r||!x.start||!x.end||D===0)return;let t=(x.start+x.end)/2,n=x.end-x.start,i=e.deltaY>0?1.1:.9,a=Math.max(n*i,D*.01),o=D*1.5,s=Math.min(a,o),c=t-s/2,l=t+s/2;c<T&&(c=T,l=Math.min(T+s,E)),l>E&&(l=E,c=Math.max(E-s,T)),j({start:c,end:l})},[r,x,D,T,E,j]),z=(0,d.useCallback)(()=>!x.start||!x.end?[]:e.filter(e=>e.timestamp>=x.start&&e.timestamp<=x.end),[e,x]),B=(0,d.useCallback)(()=>{let e={start:C,end:w};a===void 0&&_({start:null,end:null}),o?.(e)},[C,w,a,o]);return{isDragging:s,dragStart:l,dragHandleType:f,internalSelectedRange:x,internalVisibleRange:S,hoveredEvent:v,minDate:T,maxDate:E,timeSpan:D,timelineContainerRef:b,getPositionFromTimestamp:k,getTimestampFromPosition:A,handleMouseDown:M,handleMouseMove:N,handleMouseUp:P,handleWheel:R,handleDoubleClick:(0,d.useCallback)(()=>{i&&B()},[i,B]),handleStartHandleMouseDown:F,handleEndHandleMouseDown:I,handleSelectionBodyMouseDown:L,setHoveredEvent:y,getEventsInRange:z,resetZoom:B,showHandles:O}},WS=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),GS=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`}),KS=e=>{let t=e/(1e3*60*60*24);return t>60?e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`}):t>7?e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,hour12:!0})},qS=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}},JS=(e,t=`arrow`,n)=>{let r=t===`grip`?VS(n||`#9CA3AF`):zS(n||`#4B5563`);return{header:{...BS.header,...e?.header},title:{...BS.title,...e?.title},instructions:{...BS.instructions,...e?.instructions},monthLabelsContainer:{...BS.monthLabelsContainer,...e?.monthLabelsContainer},monthLabel:{...BS.monthLabel,...e?.monthLabel},timeline:{...BS.timeline,...e?.timeline},event:{...BS.event,...e?.event},selection:{...BS.selection,...e?.selection},startHandle:{...r.startHandle,...e?.startHandle},endHandle:{...r.endHandle,...e?.endHandle},tooltip:{...BS.tooltip,...e?.tooltip},tooltipEventName:{...BS.tooltipEventName,...e?.tooltipEventName},tooltipDate:{...BS.tooltipDate,...e?.tooltipDate}}},YS=({events:e,onSelectionChange:t,selectedRange:n,height:r=RS.dimensions.height,margin:i={top:0,right:0,bottom:0,left:0},formatDate:a=WS,formatMonthYear:o=GS,showMonthLabels:s=!0,monthLabelCount:c=6,enableZoom:l=!0,dragHandleVariant:p=`arrow`,dragHandleColor:m,showHeader:h=!0,title:g=`Event Timeline Selector`,zoomToSelection:_=!1,visibleRange:v,onVisibleRangeChange:y,timeRange:b,onTimeRangeChange:x,slotProps:S})=>{let C=b?{start:b[0],end:b[1]}:v,w=x?e=>{e.start!==null&&e.end!==null&&x([e.start,e.end])}:y;qS()&&e.length>500&&console.warn(`TimelineChart: Rendering ${e.length} events may impact performance. Consider implementing virtualization or canvas rendering for datasets larger than 500 events.`);let T=(0,d.useMemo)(()=>JS(S,p,m),[S,p,m]),{isDragging:E,dragHandleType:D,internalSelectedRange:O,hoveredEvent:k,minDate:A,timeSpan:j,timelineContainerRef:M,getPositionFromTimestamp:N,handleMouseDown:P,handleWheel:F,handleDoubleClick:I,handleStartHandleMouseDown:L,handleEndHandleMouseDown:R,handleSelectionBodyMouseDown:z,setHoveredEvent:B,getEventsInRange:V,showHandles:H}=US({events:e,selectedRange:n,onSelectionChange:t,enableZoom:l,zoomToSelection:_,visibleRange:C,onVisibleRangeChange:w}),U=O.start&&O.end?`Selected: ${a(O.start)} - ${a(O.end)} (${V().length} events)`:`Click and drag on the timeline below to select a date range. Use mouse wheel to zoom in/out.`;return(0,f.jsxs)(u.Stack,{sx:{width:`100%`},children:[h&&(0,f.jsxs)(u.Stack,{spacing:1,sx:{mb:3},...T.header,children:[(0,f.jsx)(u.Typography,{variant:`h5`,...T.title,children:g}),(0,f.jsx)(u.Typography,{variant:`body2`,...T.instructions,children:U})]}),s&&(0,f.jsx)(u.Stack,{direction:`row`,...T.monthLabelsContainer,sx:{...T.monthLabelsContainer.sx,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:Array.from({length:c},(e,t)=>{let n=A+j/(c-1)*t,r=KS(j);return(0,f.jsx)(u.Typography,{variant:`caption`,...T.monthLabel,children:r(n)},t)})}),(0,f.jsxs)(u.Box,{...T.timeline,sx:{...T.timeline.sx,height:`${r}px`,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:[(0,f.jsx)(u.Box,{sx:{position:`absolute`,top:i.top,left:0,right:0,bottom:i.bottom},children:e.map((e,t)=>{let n=N(e.timestamp);return(0,f.jsx)(u.Box,{onMouseEnter:()=>B(e),onMouseLeave:()=>B(null),"aria-label":`Event: ${e.eventName} at ${a(e.timestamp)}`,...T.event,sx:{...T.event.sx,left:`${n}%`,transform:k?.timestamp===e.timestamp?`scaleX(2)`:`scaleX(1)`}},`${e.timestamp}-${t}`)})}),O.start&&O.end&&(!_||E)&&(0,f.jsx)(u.Box,{...T.selection,onMouseDown:H&&!E?z:void 0,sx:{...T.selection.sx,left:`${N(O.start)}%`,width:`${N(O.end)-N(O.start)}%`,pointerEvents:H?`all`:`none`,zIndex:2,cursor:H&&!E?D===`body`?`grabbing`:`grab`:`default`},children:H&&!(E&&D===null)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Box,{...T.startHandle,onMouseDown:L,sx:{...T.startHandle.sx,cursor:`ew-resize`,opacity:E&&D!==`start`?.5:1},"aria-label":`Drag to adjust start of selection`}),(0,f.jsx)(u.Box,{...T.endHandle,onMouseDown:R,sx:{...T.endHandle.sx,cursor:`ew-resize`,opacity:E&&D!==`end`?.5:1},"aria-label":`Drag to adjust end of selection`})]})}),(0,f.jsx)(u.Box,{ref:M,role:`application`,"aria-label":`Interactive timeline - click and drag to select date range`,"aria-describedby":h?void 0:`timeline-instructions`,tabIndex:0,sx:{position:`absolute`,top:0,left:0,right:0,height:`100%`,cursor:`crosshair`,pointerEvents:`all`,zIndex:1},onMouseDown:P,onWheel:F,onDoubleClick:I}),!h&&(0,f.jsx)(`span`,{id:`timeline-instructions`,style:{display:`none`},children:U}),k&&(0,f.jsxs)(u.Box,{role:`tooltip`,"aria-live":`polite`,...T.tooltip,sx:{...T.tooltip.sx,left:`${N(k.timestamp)}%`,transform:`translateX(-50%)`},children:[(0,f.jsx)(u.Typography,{variant:`body2`,...T.tooltipEventName,children:k.eventName}),(0,f.jsx)(u.Typography,{variant:`caption`,...T.tooltipDate,children:a(k.timestamp)})]})]})]})},XS=`#8b5cf6`,ZS=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),QS=({events:e,title:t=`Events in Selected Range`,maxHeight:n=`200px`,formatDate:r=ZS,primaryColor:i=XS})=>e.length===0?null:(0,f.jsxs)(`div`,{style:{marginTop:`24px`,padding:`20px`,backgroundColor:`#f9fafb`,borderRadius:`8px`,border:`1px solid #e5e7eb`},children:[(0,f.jsxs)(`h3`,{style:{margin:`0 0 12px 0`,fontSize:`16px`,color:`#374151`},children:[t,` (`,e.length,`)`]}),(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,gap:`8px`,maxHeight:n,overflowY:`auto`},children:e.map((e,t)=>(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,backgroundColor:`white`,borderRadius:`4px`,fontSize:`13px`,border:`1px solid #e5e7eb`},children:[(0,f.jsx)(`div`,{style:{fontWeight:500,color:i},children:e.eventName}),(0,f.jsx)(`div`,{style:{color:`#6b7280`,fontSize:`12px`,marginTop:`2px`},children:r(e.timestamp)})]},`${e.timestamp}-${t}`))})]});function $S(e,t){let n=t-1-e,r=Oa.length,i=Math.floor(n/Math.max(1,t-1)*(r-1));return Oa[Math.min(Math.max(0,i),r-1)]??Oa[0]??`#000000`}function eC(e){return Array.from({length:e},(t,n)=>$S(n,e))}var tC=eC(5),nC={critical:`#dc3545`,high:`#fd7e14`,medium:`#ffc107`,low:`#17a2b8`,complete:Da.neoDigitalGreen[600],inProgress:`#007bff`,farthest:tC[0],far:tC[1],close:tC[2],closest:tC[3],completed:tC[4],primary:`#007bff`,secondary:`#6c757d`,success:Da.neoDigitalGreen[600],danger:`#dc3545`,warning:`#ffc107`,info:`#17a2b8`,light:Da.neoGrey[200],dark:`#343a40`},rC={migration:tC,severity:[nC.critical,nC.high,nC.medium,nC.low,nC.info],status:[nC.danger,nC.warning,nC.success],extended:[`#e74c3c`,`#e67e22`,`#f39c12`,`#2ecc71`,`#3498db`,`#9b59b6`,`#1abc9c`,`#95a5a6`],colorblindSafe:[`#0173B2`,`#DE8F05`,`#029E73`,`#CC78BC`,`#CA9161`,`#FBAFE4`,`#949494`,`#ECE133`]},iC={FARTHEST:`Farthest`,FAR:`Far`,CLOSE:`Close`,CLOSEST:`Closest`,COMPLETE:`Complete`,CRITICAL:`Critical`,HIGH:`High`,MEDIUM:`Medium`,LOW:`Low`,INFO:`Info`,NOT_APPLICABLE:`N/A`,NO_LST:`No LST`,DATA_MISSING:`Data Missing`};exports.CAMPAIGN_DATA_MISSING=Wa,exports.CAMPAIGN_NOT_APPLICABLE=Ha,exports.CAMPAIGN_NO_LST=Ua,exports.CATEGORY_LABELS=iC,exports.CampaignTimeline=Ea,exports.ChronoChart=Ag,exports.ChronoPerspectiveChart=Ag,exports.D3StackedAreaChart=Pg,exports.D3StackedBarChart=Ig,exports.DEFAULT_CHART_COLORS=Da,exports.DEFAULT_CHART_CONFIG=Na,exports.DEFAULT_STACKED_AREA_COLORS=nC,exports.MEASURE_GRADIENT_COLORS=Oa,exports.MODERNE_VULNERABILITY_COLORS=Pa,exports.MorphChart=vg,exports.ParliamentChart=FS,exports.STACKED_AREA_PALETTES=rC,exports.StackedAreaWithTimeline=LS,exports.TimelineChart=YS,exports.TimelineSelectedEvents=QS,exports.calculateDataSeries=NS,exports.calculateOptimalArcAngle=bg,exports.calculateOptimalSeatSize=xg,exports.generateMeasureGradient=eC;
|
|
15
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Tv(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=f_);let l=Ev(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!vv(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!nv(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Ev(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Dv(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Dv(e,t,n){let r=c_(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=I_(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wv.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?W_:K_)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=I_(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wv.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&H_(n,o)>H_(n,e.alternative)&&(o=e.alternative),s=o+I_(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?wv.single:wv.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Ov=[`<`,`&`];function kv(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:I_(e.value,Object.assign({},r.settings.characterReferences,{subset:Ov}))}function Av(e,t,n,r){return r.settings.allowDangerousHtml?e.value:kv(e,t,n,r)}function jv(e,t,n,r){return r.all(e)}var Mv=m_(`type`,{invalid:Nv,unknown:Pv,handlers:{comment:B_,doctype:V_,element:Tv,raw:Av,root:jv,text:kv}});function Nv(e){throw Error("Expected node, not `"+e+"`")}function Pv(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Fv={},Iv={},Lv=[];function Rv(e,t){let n=t||Fv,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:zv,all:Bv,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Pg,characterReferences:n.characterReferences||Iv,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?f_:d_,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function zv(e,t,n){return Mv(e,t,n,this)}function Bv(e){let t=[],n=e&&e.children||Lv,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function Vv(e,t,n,r=`left-to-right`,i=900,a){Y.prototype.transition=ql;let o=t*Math.PI/180,s=-o/2-Math.PI/2,c=o/2-Math.PI/2,l=e.querySelector(`defs`);l||(l=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`),e.appendChild(l));let u=`arc-sweep-clip`,d=l.querySelector(`#${u}`);d||(d=document.createElementNS(`http://www.w3.org/2000/svg`,`clipPath`),d.setAttribute(`id`,u),l.appendChild(d));let f=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);d.innerHTML=``,d.appendChild(f);let p=e.querySelector(`.arc-container`),m=e.querySelector(`.points-container`);if(m&&p){if(m.setAttribute(`clip-path`,`url(#${u})`),r===`left-to-right`){let e=e=>{let t=n*1.5,r=Math.cos(e)*t,i=Math.sin(e)*t,a=Math.cos(c)*t,o=Math.sin(c)*t;return`M 0,0 L ${r},${i} A ${t},${t} 0 ${+(c-e>Math.PI)},1 ${a},${o} Z`};f.setAttribute(`d`,e(s)),Y(f).transition().duration(i).ease(e=>1-(1-e)**3).tween(`arc-sweep`,()=>t=>{let n=s+(c-s)*t;f.setAttribute(`d`,e(n))}).on(`end`,()=>{a&&a(),setTimeout(()=>{m.removeAttribute(`clip-path`)},50)})}else{let e=e=>{let t=n*1.5,r=Math.cos(e)*t,i=Math.sin(e)*t,a=Math.cos(c)*t,o=Math.sin(c)*t;return`M 0,0 L ${r},${i} A ${t},${t} 0 ${+(c-e>Math.PI)},1 ${a},${o} Z`};f.setAttribute(`d`,e(c)),Y(f).transition().duration(i).ease(e=>1-(1-e)**3).tween(`arc-sweep`,()=>t=>{let n=c-(c-s)*t;f.setAttribute(`d`,e(n))}).on(`end`,()=>{m.removeAttribute(`clip-path`),a&&a()})}}}var Hv=/[#.]/g;function Uv(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Hv.lastIndex=i;let e=Hv.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Wv(e,t,n){let r=n?Xv(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Uv(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Gv(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Kv(e,o.properties,t,n)}for(let e of a)qv(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Gv(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Kv(e,t,n,r){let i=c_(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?G_(r):i.commaSeparated?U_(r):i.commaOrSpaceSeparated?G_(U_(r).join(` `)):Jv(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Yv(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Jv(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function qv(e,t){if(t!=null){if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)qv(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?qv(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}}function Jv(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Lg(n)===Lg(t)))return!0}return n}function Yv(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Xv(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Zv=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`);Wv(d_,`div`);var Qv=Wv(f_,`g`,Zv),$v=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),ey=o(((e,t)=>{var n=$v(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),ty=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),ny=o(((e,t)=>{var n=ty(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),ry=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),iy=o(((e,t)=>{t.exports=ey().Symbol})),ay=o(((e,t)=>{var n=iy(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),oy=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),sy=o(((e,t)=>{var n=iy(),r=ay(),i=oy(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),cy=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),ly=o(((e,t)=>{var n=sy(),r=cy(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),uy=o(((e,t)=>{var n=ny(),r=ry(),i=ly(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),dy=o(((e,t)=>{var n=uy(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),fy=o(((e,t)=>{var n=dy();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),py=o(((e,t)=>{function n(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}t.exports=n})),my=o(((e,t)=>{t.exports=Array.isArray})),hy=o(((e,t)=>{var n=iy(),r=py(),i=my(),a=ly(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),gy=o(((e,t)=>{var n=hy();function r(e){return e==null?``:n(e)}t.exports=r})),_y=o(((e,t)=>{var n=ey(),r=fy(),i=uy(),a=gy(),o=n.isFinite,s=Math.min;function c(e){var t=Math[e];return function(e,n){if(e=i(e),n=n==null?0:s(r(n),292),n&&o(e)){var c=(a(e)+`e`).split(`e`);return c=(a(t(c[0]+`e`+(+c[1]+n)))+`e`).split(`e`),+(c[0]+`e`+(+c[1]-n))}return t(e)}}t.exports=c})),vy=o(((e,t)=>{t.exports=_y()(`round`)})),yy=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),by=o(((e,t)=>{var n=sy(),r=cy(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),xy=o(((e,t)=>{var n=by(),r=cy(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Sy=o(((e,t)=>{var n=iy(),r=xy(),i=my(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),Cy=o(((e,t)=>{var n=yy(),r=Sy();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),wy=o(((e,t)=>{var n=my(),r=ly(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),Ty=o(((e,t)=>{var n=sy(),r=ry(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Ey=o(((e,t)=>{t.exports=ey()[`__core-js_shared__`]})),Dy=o(((e,t)=>{var n=Ey(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Oy=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),ky=o(((e,t)=>{var n=Ty(),r=Dy(),i=ry(),a=Oy(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),Ay=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),jy=o(((e,t)=>{var n=ky(),r=Ay();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),My=o(((e,t)=>{t.exports=jy()(Object,`create`)})),Ny=o(((e,t)=>{var n=My();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Py=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Fy=o(((e,t)=>{var n=My(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Iy=o(((e,t)=>{var n=My(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Ly=o(((e,t)=>{var n=My(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),Ry=o(((e,t)=>{var n=Ny(),r=Py(),i=Fy(),a=Iy(),o=Ly();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),zy=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),By=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Vy=o(((e,t)=>{var n=By();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Hy=o(((e,t)=>{var n=Vy(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),Uy=o(((e,t)=>{var n=Vy();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Wy=o(((e,t)=>{var n=Vy();function r(e){return n(this.__data__,e)>-1}t.exports=r})),Gy=o(((e,t)=>{var n=Vy();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),Ky=o(((e,t)=>{var n=zy(),r=Hy(),i=Uy(),a=Wy(),o=Gy();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),qy=o(((e,t)=>{t.exports=jy()(ey(),`Map`)})),Jy=o(((e,t)=>{var n=Ry(),r=Ky(),i=qy();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),Yy=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Xy=o(((e,t)=>{var n=Yy();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),Zy=o(((e,t)=>{var n=Xy();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),Qy=o(((e,t)=>{var n=Xy();function r(e){return n(this,e).get(e)}t.exports=r})),$y=o(((e,t)=>{var n=Xy();function r(e){return n(this,e).has(e)}t.exports=r})),eb=o(((e,t)=>{var n=Xy();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),tb=o(((e,t)=>{var n=Jy(),r=Zy(),i=Qy(),a=$y(),o=eb();function s(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])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),nb=o(((e,t)=>{var n=tb(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),rb=o(((e,t)=>{var n=nb(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),ib=o(((e,t)=>{var n=rb(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),ab=o(((e,t)=>{var n=my(),r=wy(),i=ib(),a=gy();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),ob=o(((e,t)=>{var n=ly(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),sb=o(((e,t)=>{var n=ab(),r=ob();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),cb=o(((e,t)=>{var n=Ky();function r(){this.__data__=new n,this.size=0}t.exports=r})),lb=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),ub=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),db=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),fb=o(((e,t)=>{var n=Ky(),r=qy(),i=tb(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),pb=o(((e,t)=>{var n=Ky(),r=cb(),i=lb(),a=ub(),o=db(),s=fb();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),mb=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),hb=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),gb=o(((e,t)=>{var n=tb(),r=mb(),i=hb();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),_b=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),vb=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),yb=o(((e,t)=>{var n=gb(),r=_b(),i=vb(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),bb=o(((e,t)=>{t.exports=ey().Uint8Array})),xb=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),Sb=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),Cb=o(((e,t)=>{var n=iy(),r=bb(),i=By(),a=yb(),o=xb(),s=Sb(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),wb=o(((e,t)=>{var n=yy(),r=my();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Tb=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Eb=o(((e,t)=>{function n(){return[]}t.exports=n})),Db=o(((e,t)=>{var n=Tb(),r=Eb(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Ob=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),kb=o(((e,t)=>{function n(){return!1}t.exports=n})),Ab=o(((e,t)=>{var n=ey(),r=kb(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),jb=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Mb=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Nb=o(((e,t)=>{var n=sy(),r=Mb(),i=cy(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),Pb=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Fb=o(((e,t)=>{var n=$v(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Ib=o(((e,t)=>{var n=Nb(),r=Pb(),i=Fb(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Lb=o(((e,t)=>{var n=Ob(),r=xy(),i=my(),a=Ab(),o=jb(),s=Ib(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),Rb=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),zb=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Bb=o(((e,t)=>{t.exports=zb()(Object.keys,Object)})),Vb=o(((e,t)=>{var n=Rb(),r=Bb(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),Hb=o(((e,t)=>{var n=Ty(),r=Mb();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Ub=o(((e,t)=>{var n=Lb(),r=Vb(),i=Hb();function a(e){return i(e)?n(e):r(e)}t.exports=a})),Wb=o(((e,t)=>{var n=wb(),r=Db(),i=Ub();function a(e){return n(e,i,r)}t.exports=a})),Gb=o(((e,t)=>{var n=Wb(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){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 c.delete(e),c.delete(t),g}t.exports=a})),Kb=o(((e,t)=>{t.exports=jy()(ey(),`DataView`)})),qb=o(((e,t)=>{t.exports=jy()(ey(),`Promise`)})),Jb=o(((e,t)=>{t.exports=jy()(ey(),`Set`)})),Yb=o(((e,t)=>{t.exports=jy()(ey(),`WeakMap`)})),Xb=o(((e,t)=>{var n=Kb(),r=qy(),i=qb(),a=Jb(),o=Yb(),s=sy(),c=Oy(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),Zb=o(((e,t)=>{var n=pb(),r=yb(),i=Cb(),a=Gb(),o=Xb(),s=my(),c=Ab(),l=Ib(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),Qb=o(((e,t)=>{var n=Zb(),r=cy();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),$b=o(((e,t)=>{var n=pb(),r=Qb(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),ex=o(((e,t)=>{var n=ry();function r(e){return e===e&&!n(e)}t.exports=r})),tx=o(((e,t)=>{var n=ex(),r=Ub();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),nx=o(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),rx=o(((e,t)=>{var n=$b(),r=tx(),i=nx();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),ix=o(((e,t)=>{var n=sb();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),ax=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),ox=o(((e,t)=>{var n=ab(),r=xy(),i=my(),a=jb(),o=Mb(),s=ob();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),sx=o(((e,t)=>{var n=ax(),r=ox();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),cx=o(((e,t)=>{var n=Qb(),r=ix(),i=sx(),a=wy(),o=ex(),s=nx(),c=ob(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),lx=o(((e,t)=>{function n(e){return e}t.exports=n})),ux=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),dx=o(((e,t)=>{var n=sb();function r(e){return function(t){return n(t,e)}}t.exports=r})),fx=o(((e,t)=>{var n=ux(),r=dx(),i=wy(),a=ob();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),px=o(((e,t)=>{var n=rx(),r=cx(),i=lx(),a=my(),o=fx();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),mx=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),hx=o(((e,t)=>{t.exports=mx()()})),gx=o(((e,t)=>{var n=hx(),r=Ub();function i(e,t){return e&&n(e,t,r)}t.exports=i})),_x=o(((e,t)=>{var n=Hb();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),vx=o(((e,t)=>{var n=gx();t.exports=_x()(n)})),yx=o(((e,t)=>{var n=vx(),r=Hb();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),bx=o(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),xx=o(((e,t)=>{var n=ly();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),Sx=o(((e,t)=>{var n=xx();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),Cx=o(((e,t)=>{var n=py(),r=sb(),i=px(),a=yx(),o=bx(),s=Pb(),c=Sx(),l=lx(),u=my();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),wx=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),Tx=o(((e,t)=>{var n=wx(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),Ex=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),Dx=o(((e,t)=>{var n=jy();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Ox=o(((e,t)=>{var n=Ex(),r=Dx(),i=lx();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),kx=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),Ax=o(((e,t)=>{var n=Ox();t.exports=kx()(n)})),jx=o(((e,t)=>{var n=lx(),r=Tx(),i=Ax();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),Mx=o(((e,t)=>{var n=By(),r=Hb(),i=jb(),a=ry();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),Nx=o(((e,t)=>{var n=Cy(),r=Cx(),i=jx(),a=Mx();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})})),Px=o(((e,t)=>{var n=Dx();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Fx=o(((e,t)=>{var n=Px();function r(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var a=e[t];n(i,a[0],a[1])}return i}t.exports=r})),Ix=o(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),Lx=o(((e,t)=>{var n=Ix(),r=Mx(),i=dy();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),Rx=o(((e,t)=>{t.exports=Lx()()})),zx=o(((e,t)=>{var n=py(),r=px(),i=yx(),a=my();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),Bx=o(((e,t)=>{var n=Cy(),r=zx();function i(e,t){return n(r(e,t),1)}t.exports=i})),Vx=o(((e,t)=>{function n(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}t.exports=n})),Hx=o(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),Ux=o(((e,t)=>{var n=Math.floor,r=Math.random;function i(e,t){return e+n(r()*(t-e+1))}t.exports=i})),Wx=o(((e,t)=>{var n=Ux();function r(e,t){var r=-1,i=e.length,a=i-1;for(t=t===void 0?i:t;++r<t;){var o=n(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}t.exports=r})),Gx=o(((e,t)=>{var n=Vx(),r=Hx(),i=Wx();function a(e,t){return i(r(e),n(t,0,e.length))}t.exports=a})),Kx=o(((e,t)=>{var n=py();function r(e,t){return n(t,function(t){return e[t]})}t.exports=r})),qx=o(((e,t)=>{var n=Kx(),r=Ub();function i(e){return e==null?[]:n(e,r(e))}t.exports=i})),Jx=o(((e,t)=>{var n=Vx(),r=Wx(),i=qx();function a(e,t){var a=i(e);return r(a,n(t,0,a.length))}t.exports=a})),Yx=o(((e,t)=>{var n=Gx(),r=Jx(),i=my(),a=Mx(),o=fy();function s(e,t,s){return t=(s?a(e,t,s):t===void 0)?1:o(t),(i(e)?n:r)(e,t)}t.exports=s})),Xx=l(vy(),1),Zx=l(Nx(),1),Qx=l(Fx(),1),$x=l(Rx(),1),eS=l(Bx(),1),tS=l(Yx(),1),nS=e=>(0,Xx.default)(e,14),rS=e=>Object.values(e).reduce((e,t)=>e+t,0),iS=(e,t,n={})=>{let r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw Error(`vote distribution must contain at least one party`);if(!Object.values(e).every(e=>typeof e==`number`&&e>=0))throw Error(`party vote counts must be non-negative integers`);if(!Number.isInteger(t)||t<=0)throw Error(`seats must be a positive integer`);if(typeof r.draw!=`boolean`)throw Error(`opt.draw must be a boolean`);let i=rS(e),a=(0,Qx.default)(Object.entries(e).map(([n,r])=>{let a=Math.max(t-Object.keys(e).length,0);return[n,Math.round(a*r/i)]})),o=(0,Qx.default)(Object.entries(e).map(([n,r])=>{let a=t+Object.keys(e).length;return[n,Math.min(Math.round(a*r/i),t)]})),s=(0,eS.default)(Object.entries(e).map(([e,t])=>{let n=a[e],r=o[e];return(0,$x.default)(n,r).map(n=>({party:e,quotient:nS(t/(n+.5))}))})),c=t-rS(a),l=(0,Zx.default)(s,({quotient:e})=>-e),u=l[c-1].quotient,d=l.filter(({quotient:e})=>e>u),f=l.filter(({quotient:e})=>e===u);if(d.length+f.length===c)d.push(...f);else{if(!r.draw)throw Error(`result is ambiguous, a draw would need to be made, but opt.draw is disabled`);d.push(...(0,tS.default)(f,c-d.length))}return d.reduce((e,{party:t})=>(e[t]+=1,e),a)},aS=(e=Qv)=>e(`pattern`,{id:`greyHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:Ta.neoGrey[200]}),e(`path`,{d:`M0,2 L8,2`,stroke:Ta.neoGrey[400],"stroke-width":.5}),e(`path`,{d:`M0,6 L8,6`,stroke:Ta.neoGrey[400],"stroke-width":.5})]),oS=(e=Qv)=>e(`pattern`,{id:`dataMissingHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:`#FFF3CC`}),e(`path`,{d:`M0,8 L8,0`,stroke:`#FFB800`,"stroke-width":.5}),e(`path`,{d:`M-2,2 L2,-2`,stroke:`#FFB800`,"stroke-width":.5}),e(`path`,{d:`M6,10 L10,6`,stroke:`#FFB800`,"stroke-width":.5})]),sS=(e=Qv)=>e(`pattern`,{id:`noLstHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:`#FFE5E5`}),e(`path`,{d:`M0,0 L8,8`,stroke:`#ED4134`,"stroke-width":.5}),e(`path`,{d:`M-2,6 L2,10`,stroke:`#ED4134`,"stroke-width":.5}),e(`path`,{d:`M6,-2 L10,2`,stroke:`#ED4134`,"stroke-width":.5})]),cS=e=>Math.round(e*1e10)/1e10,lS=e=>e.reduce((e,t)=>e+t.seats,0),uS=e=>e.flat(),dS=(e,t,n)=>{let r=(Math.PI-n)/2,i=t/e+r-Math.PI;return{x:cS(e*Math.cos(i)),y:cS(e*Math.sin(i))}},fS=(e,t,n,r)=>r*t*n/(e-t)/(1+r*(t-1)*t/2/(e-t)),pS=(e,t,n,r)=>{let i=r/Math.PI*(5/7);return Math.abs(fS(e,t,n,r)*t/n-i)},mS=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,i=pS(e,r,t,n),a=0;for(pS(e,r+1,t,n)<i&&(a=1),pS(e,r-1,t,n)<i&&r>1&&(a=-1);pS(e,r+a,t,n)<i&&r>0;)i=pS(e,r+a,t,n),r+=a;return r},hS=(e,t)=>{let n,r;for(let i=0;i<e.length;i++)r=cS((t[i]||0)/(e[i]?.length??1)),(!n||r<n)&&(n=r);for(let i=0;i<e.length;i++)if(r=cS((t[i]||0)/(e[i]?.length??1)),r===n)return i;return 0},gS=(e,t,n)=>{let r=lS(e),i=mS(r,t,n),a=fS(r,i,t,n),o={};for(let e=1;e<=i;e++)o[e]=t-(e-1)*a;o=iS(o,r);let s=[],c,l,u;for(let e=1;e<=i;e++){let r=[];c=t-(e-1)*a,l=n*c/((o[e]??1)-1||1);for(let t=0;t<=(o[e]??1)-1;t++)u={...dS(c,t*l,n),r:.4*a},r.push(u);s.push(r)}let d=Array(s.length).fill(0);for(let t of e)for(let e=0;e<t.seats;e++){let e=hS(s,d),n=s[e],r=d[e]??0,i=n?.[r];i&&(i.fill=t.colour,i.party=String(t.id)),d[e]=r+1}return uS(s)},_S=e=>t=>e(`circle`,{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),vS={seatCount:!1,arcAngle:180,hFunction:Qv},yS=(e,t={})=>{let{seatCount:n,arcAngle:r,hFunction:i}=Object.assign({},vS,t);if(typeof n!=`boolean`)throw Error("`seatCount` option must be a boolean");if(typeof i!=`function`)throw Error("`hFunction` option must be a function");if(typeof r!=`number`||r<=0||r>360)throw Error("`arcAngle` option must be a number between 0 and 360");let a=r*Math.PI/180,o=gS(e,20,a),s=(o[0]?.r??0)/.4||0,c=o.map(_S(i));n&&c.push(i(`text`,{x:0,y:0,"text-anchor":`middle`,style:{"font-family":`Helvetica`,"font-size":`5px`},class:`seatNumber`},String(c.length)));let l=r<=180?20+s:20*(1+Math.sin((a-Math.PI)/2))+s,u=20+s,d=Math.max(l,u),f=r<=180?-20-s/2:-20*(1+Math.sin((a-Math.PI)/2))-s/2,p=i(`defs`,[aS(i),oS(i),sS(i)]);return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:[-20-s/2,f,40+s,d].join(`,`)},[p,...c])},bS={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:Qv},xS=(e,t={})=>{let{arcAngle:n,arcAngleFlexibility:r,radius:i,seatSize:a,minSeatSize:o,maxSeatSize:s,spacing:c,innerRadiusRatio:l,showLabels:u,hFunction:d}={...bS,...t},f=i*l,p=e.reduce((e,t)=>e+t.seats,0),m={seatSize:a,arcAngle:n,rings:0,score:-1},h=n-r,g=n+r;for(let e=h;e<=g;e+=2.5){let t=e*Math.PI/180;for(let a=s;a>=o;a-=.1){let l=a*2,u=l*c,d=Math.floor((i-f)/u);for(let i=1;i<=Math.min(d,10);i++){let d=0,h=1/0;for(let e=0;e<i;e++){let n=f+(e+.5)*u,r=l*c/n,i=Math.floor(t/r);d+=i,h=Math.min(h,i)}if(d>=p){let t=p/d,c=(a-o)/(s-o),l=(d-p)/p,u=l<.15?1:l<.3?.7:l<.5?.4:.1,f=1-Math.abs(e-n)/r,h=u*.5+c*.3+t*.15+f*.05;h>m.score&&(m={seatSize:a,arcAngle:e,rings:i,score:h})}}}}let _=m.seatSize,v=m.arcAngle,y=v*Math.PI/180,b=_*2,x=b*c,S=Math.floor((i-f)/x),C=[],w=-y/2-Math.PI/2,T=0,E=[],D=0,O=[],k=0;for(let e=1;e<=S;e++){let t=0,n=[];for(let r=0;r<e;r++){let e=f+(r+.5)*x,i=b*c/e,a=Math.floor(y/i);n.push(a),t+=a}if(t>=p){D=e,O=n,k=t;break}}if(D>0)E.push(...O),T=k;else for(let e=0;e<S;e++){let t=f+(e+.5)*x,n=b*c/t,r=Math.floor(y/n);E.push(r),T+=r}for(let e=0;e<E.length;e++){let t=f+(e+.5)*x,n=E[e]??0;if(n>0){let r=y/n;for(let i=0;i<n;i++){let n=w+(i+.5)*r,a=Math.cos(n)*t,o=Math.sin(n)*t;C.push({ring:e,index:i,angle:n,x:a,y:o})}}}C.sort((e,t)=>{let n=e.angle-t.angle;return Math.abs(n)>.001?n:e.ring-t.ring});let A=[],j=0;e.forEach(e=>{let t=[],n=Math.min(e.seats,C.length-j),r=!!e.dashed,i=e.colour,a=e.borderColour??e.colour,o=Math.max(.5,_*(r?.24:.3)),s=r?`${(_*.48).toFixed(2)} ${(_*.38).toFixed(2)}`:void 0,c=1/0,l=-1/0,u=1/0,f=-1/0,p=[];for(let r=0;r<n&&j<C.length;r++){let n=C[j++];if(!n)continue;p.push(n),c=Math.min(c,n.angle),l=Math.max(l,n.angle);let r=Math.sqrt(n.x*n.x+n.y*n.y);u=Math.min(u,r),f=Math.max(f,r),t.push(d(`circle`,{fill:i,stroke:a,"stroke-width":o,...s?{"stroke-dasharray":s}:{},className:`circle seat-visual seat-hover-zone`,transform:`translate(${n.x}, ${n.y})`,r:_,"data-party":e.name,"data-party-id":String(e.id),style:`pointer-events: all; cursor: pointer;`}))}let m=t;A.push(d(`g`,{className:`party-group`,"data-party":e.name,style:`opacity: 1; outline: none;`},m))});let M=d(`g`,{className:`arc-bg`},[d(`circle`,{className:`outer`,cx:0,cy:0,fill:`transparent`,r:i}),d(`circle`,{className:`inner`,cx:0,cy:0,fill:`transparent`,r:f})]),N=d(`g`,{className:`points-container`},A),P=u?d(`g`,{className:`label-container`,mask:`url(#label-clip)`,style:`pointer-events: none;`},[d(`text`,{className:`party_count`,dy:`-0.05em`,style:`font-size: 24vw; font-weight: bold; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);`}),d(`text`,{className:`party_name`,y:0,dy:`1em`,style:`font-size: 6vw; font-weight: normal; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);`})]):null,F=d(`defs`,[d(`radialGradient`,{id:`label-gradient`},[d(`stop`,{offset:`0%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 1;`}),d(`stop`,{offset:`80%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 1;`}),d(`stop`,{offset:`90%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 0.1;`}),d(`stop`,{offset:`100%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 0;`})]),d(`mask`,{id:`label-clip`},[d(`circle`,{fill:`url(#label-gradient)`,r:f})])]),I=d(`g`,{className:`arc-container`,transform:`translate(${i}, ${i})`},[M,N,P].filter(Boolean)),L=y/2,R;if(v<=180)R=i*Math.sin(L)+_;else{let e=L-Math.PI/2;R=i*(1+Math.sin(e))+_}let z=i+_;return d(`svg`,{id:`chart-container`,"font-family":`Canva Sans Variable`,viewBox:`0 0 ${i*2} ${Math.max(R,z)}`,preserveAspectRatio:`xMidYMid meet`,xmlns:`http://www.w3.org/2000/svg`},[I,F])};function SS(e){return!e||!e.color?`#cccccc`:e.color===`url(#hatchPattern)`?Ma.COMPLETED:e.color}function CS(e,t){if(!e)return;let n=e.querySelectorAll(`.party-group`);n&&n.length>0&&n.forEach(e=>{if(!e)return;let n=e,r=n.getAttribute(`data-party`);t?r===t?n.style.opacity=ja.animation.hoverOpacity.active:n.style.opacity=ja.animation.hoverOpacity.dimmed:n.style.opacity=`1`})}function wS(e,t){e.forEach(e=>{let n=e,r=e.getAttribute(`class`)||``;t?r===t?(n.setAttribute(`fill-opacity`,`1`),n.setAttribute(`stroke-opacity`,`1`)):(n.setAttribute(`fill-opacity`,ja.animation.hoverOpacity.dimmed),n.setAttribute(`stroke-opacity`,`0.2`)):(n.setAttribute(`fill-opacity`,`1`),n.setAttribute(`stroke-opacity`,`1`))})}var TS=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:i,maxSeats:a,setHoveredData:o,activePartyName:s,setActivePartyName:c,chartConfig:l,seatSize:u,paletteMode:f,shouldAnimate:p=!1,animationDirection:m=`left-to-right`,onAnimationComplete:h})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);let d=n<=a?1:a/n,g=t.filter(e=>e.value>0).map(e=>{let t=n<=a?e.value:Math.max(1,Math.floor(e.value*d)),{fill:r,stroke:i,dashed:o}=za(e.color===`url(#hatchPattern)`?Ma.COMPLETED:e.color,void 0,{paletteMode:f,label:e.label});return{id:String(e.id),name:e.label,seats:t,colour:r,borderColour:i,dashed:o}}),_=i?xS(g,{arcAngle:r,arcAngleFlexibility:l.arcAngleFlexibility,radius:l.radius,seatSize:u,minSeatSize:l.minSeatSize,maxSeatSize:l.maxSeatSize,spacing:l.spacing,innerRadiusRatio:l.innerRadiusRatio,showLabels:!0}):yS(g,{arcAngle:r});_.properties&&(_.properties.width=`100%`,_.properties.height=`100%`,_.properties.style=`display: block; width: 100%; max-width: 100%; height: auto;`,_.properties.preserveAspectRatio=`xMidYMid meet`);let v=Rv(_),y=new DOMParser().parseFromString(v,`image/svg+xml`).documentElement;if(!y)return;y.setAttribute(`width`,`100%`),y.setAttribute(`height`,`100%`),y.style.width=`100%`,y.style.height=`auto`,y.style.display=`block`,i?ES(y,g,t,o,s,c):DS(y,g,t,o,s,c);let b=()=>{o(null),c(null),i?CS(y,null):wS(y.querySelectorAll(`circle`),null)};return y&&y.addEventListener(`mouseleave`,b),e.current.appendChild(y),p&&y&&Vv(y,r,l.radius,m,900,h),()=>{if(y&&y.removeEventListener(`mouseleave`,b),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,i,a,o,s,c,e,l,u,f,p,m,h])};function ES(e,t,n,r,i,a){if(!e)return;let o=e.querySelectorAll(`.seat-hover-zone`),s=e.querySelectorAll(`.party-group circle.seat-visual`);s&&s.length>0&&s.forEach(e=>{if(e){let t=e;t.setAttribute(`fill-opacity`,`1`),t.style.transition=`fill-opacity ${ja.animation.transitionDuration} ease, stroke-opacity ${ja.animation.transitionDuration} ease`}}),o&&o.length>0&&o.forEach(o=>{if(!o)return;let s=o.getAttribute(`data-party`),c=o.getAttribute(`data-party-id`);o.addEventListener(`mouseenter`,()=>{if(s&&s!==i){let i=t.find(e=>e.name===s||String(e.id)===c);if(i){let t=n.find(e=>e.label===i.name||String(e.id)===i.id);if(t){let n=SS(t);r({label:t.label||`Unknown`,value:t.value||0,color:n}),a(i.name),CS(e,i.name)}}}})}),i&&CS(e,i)}function DS(e,t,n,r,i,a){if(!e)return;let o=e.querySelectorAll(`circle`);if(o&&o.length>0&&(o.forEach(e=>{if(e){let t=e;t.style.cursor=`pointer`,t.setAttribute(`fill-opacity`,`1`),t.style.transition=`fill-opacity ${ja.animation.transitionDuration} ease, stroke-opacity ${ja.animation.transitionDuration} ease`}}),o.forEach(e=>{if(!e)return;let s=e.getAttribute(`class`)||``,c=t[parseInt(s,10)];e.addEventListener(`mouseenter`,()=>{if(c){let e=c.name;if(e&&e!==i){let t=n.find(e=>e.label===c.name||String(e.id)===c.id);if(t){let n=SS(t);r({label:t.label||`Unknown`,value:t.value||0,color:n}),a(e),wS(o,s)}}}})})),i){let e=t.find(e=>e.name===i);if(e){let n=t.indexOf(e);wS(o,String(n))}}}var OS=Ea,kS={"N/A":Ma.NOT_APPLICABLE,[Va]:Ma.NO_LST,[Ha]:Ma.DATA_MISSING},AS=(e,t,n)=>{if(e in kS)return kS[e];let r=n-1-t,i=OS.length,a=Math.floor(r/Math.max(1,n-1)*(i-1));return OS[Math.min(Math.max(0,a),i-1)]??OS[0]??`#000000`},jS=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{let{special:i,regular:a}=e.reduce((e,t,n)=>([`N/A`,`No LST`,`Data Missing`].includes(t.label)?e.special.push({...t,originalIndex:n}):e.regular.push({...t,originalIndex:n}),e),{special:[],regular:[]}),o=a.reverse().map((e,t)=>({id:`measure-${t}`,label:e.label,value:e.value,color:AS(e.label,a.length-1-t,a.length)})),s=i.map((e,t)=>({id:e.label.toLowerCase().replace(` `,`-`),label:e.label,value:e.value,color:AS(e.label,t,i.length)})),c=r,l={id:`no-lst`,label:Va,value:n,color:AS(Va,0,1)},u={id:`data-missing`,label:Ha,value:c,color:AS(Ha,0,1)},d={id:`n/a`,label:`N/A`,value:t,color:AS(`N/A`,0,1)},f=[];return d.value>0&&f.push(d),l.value>0&&f.push(l),u.value>0&&f.push(u),f.push(...s),f.push(...o),f},MS={"N/A":`Repos that aren't applicable to this migration.`,"No LST":`There are no LSTs for these repos.`,"Data Missing":`There is data missing in the LSTs.`},NS=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i,arcAngle:a,useEnhanced:o=ja.useEnhanced,showTable:s=!0,shouldAnimate:c=!1,animationDirection:l=`left-to-right`,onAnimationComplete:m})=>{let h=(0,u.useTheme)().palette.mode,g=(0,d.useRef)(null),[_,v]=(0,d.useState)(null),[y,b]=(0,d.useState)(null),x=jS({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,totalRepositories:t,unavailableRepositories:i}).map(e=>{let t=typeof e.color==`function`?e.color(`arc`):e.color,n=typeof e.label==`function`?e.label(`arc`):e.label;return{...e,color:t,label:n}}),S=a??_g({repositoryCount:t}),C=vg({repositoryCount:t});TS({containerRef:g,processedData:x,totalRepositories:t,arcAngle:S,useEnhanced:o,maxSeats:ja.maxSeats,setHoveredData:v,activePartyName:y,setActivePartyName:b,chartConfig:ja.chartConfig,seatSize:C,paletteMode:h,shouldAnimate:c,animationDirection:l,onAnimationComplete:m});let w=x.map(e=>{let n=t>0?e.value/t*100:0,r=n>0&&n<1?`< 1`:n.toFixed(0);return{id:String(e.id),label:e.label,value:e.value,percentage:r,color:e.color}}),T=t>ja.maxSeats,E=T?Math.round(t/ja.maxSeats):1;return(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:{xs:.5,sm:.75,md:1,lg:1},py:0,"@media (min-width: 1024px) and (max-width: 1225px)":{gap:.25}},children:[(0,f.jsxs)(u.Box,{className:`parliament-chart-container`,sx:{position:`relative`,width:`100%`,minHeight:`200px`,mb:{xs:.5,sm:.75,md:1},"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:`250px`,mb:.25}},children:[(0,f.jsx)(u.Box,{className:`parliament-chart-svg-container`,ref:g,sx:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,justifyContent:`center`,alignItems:`center`,"& svg":{width:`100%`,height:`100%`,maxWidth:`100%`,"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:`230px`}}}}),(0,f.jsxs)(u.Box,{className:`parliament-chart-tooltip`,sx:{position:`absolute`,bottom:`0%`,left:`50%`,transform:`translate(-50%, 0%)`,pointerEvents:`none`,textAlign:`center`,zIndex:10,"@media (min-width: 1024px) and (max-width: 1225px)":{bottom:`5%`}},children:[_&&(0,f.jsxs)(d.default.Fragment,{children:[(0,f.jsx)(u.Typography,{sx:{color:`var(--rc-muted-text, #6b7280)`,mb:.3,fontSize:`clamp(0.75rem, 1.5vw, 0.85rem)`,display:`block`,"@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:`0.7rem`,mb:.2}},children:_.label}),(0,f.jsxs)(u.Typography,{sx:{fontWeight:`bold`,color:_.color,lineHeight:1,fontSize:`clamp(1.1rem, 2.2vw, 1.3rem)`,"@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:`1rem`}},children:[_.value,` `,_.value>1?`repos`:`repo`]})]}),T&&(0,f.jsxs)(u.Box,{className:`parliament-chart-scaled-indicator`,sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:.5,mt:_?.5:0,color:`var(--rc-muted-text, #6b7280)`,fontSize:`clamp(0.65rem, 1.2vw, 0.72rem)`},children:[(0,f.jsx)(u.Box,{className:`parliament-chart-scaled-indicator-dot`,sx:{width:8,height:8,borderRadius:`50%`,backgroundColor:`#888888`,flexShrink:0}}),(0,f.jsxs)(u.Typography,{variant:`caption`,sx:{fontSize:`inherit`,fontStyle:`italic`},children:[`= ~`,E,` repos`]})]})]})]}),s&&(0,f.jsx)(u.Box,{className:`parliament-chart-data-table`,sx:{width:`100%`,display:`flex`,justifyContent:`center`,"@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:`auto`,maxWidth:`100%`}},onMouseLeave:()=>{v(null),b(null)},children:(0,f.jsxs)(u.Table,{"aria-label":`Repository categories summary`,className:`parliament-chart-table`,size:`small`,sx:{maxWidth:{xs:`clamp(360px, 90%, 400px)`,sm:`clamp(360px, 90%, 400px)`,md:`clamp(360px, 85%, 420px)`,lg:`clamp(360px, 90%, 400px)`},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:`360px`,"& .MuiTableCell-root":{padding:`1px 4px`,fontSize:`9.5px`}},"& .MuiTableCell-root":{paddingTop:`1px`,paddingBottom:`1px`,paddingLeft:0,paddingRight:`4px`,borderBottom:`none`,fontSize:`clamp(10px, 1.8vw, 12px)`},"& tbody .MuiTableRow-root:first-of-type .MuiTableCell-root":{paddingTop:`2px`}},children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(u.TableRow,{sx:e=>({"& .MuiTableCell-root":{borderBottom:`1px solid`,borderColor:`var(--rc-table-border, ${e.palette.divider})`,pb:`2px`}}),children:[(0,f.jsx)(u.TableCell,{colSpan:2,sx:{fontWeight:500},children:`Category`}),(0,f.jsx)(u.TableCell,{align:`right`,sx:{fontWeight:500},children:`# of repositories`}),(0,f.jsx)(u.TableCell,{align:`right`,sx:{fontWeight:500},children:`Percentage`})]})}),(0,f.jsx)(`tbody`,{children:w.map(e=>{let t=e.color,{fill:n,stroke:r,dashed:i}=za(e.color,void 0,{paletteMode:h,label:e.label});return(0,f.jsxs)(u.TableRow,{onMouseEnter:()=>{b(e.label),v({label:e.label,value:e.value,color:e.color})},sx:{cursor:`pointer`,transition:`background-color 0.15s ease`,backgroundColor:y===e.label?`${t}15`:`transparent`,"&:hover":{backgroundColor:`${t}15`}},children:[(0,f.jsx)(u.TableCell,{align:`center`,sx:{width:20},children:(0,f.jsx)(u.Box,{sx:{width:12,height:12,boxSizing:`border-box`,borderRadius:`50%`,backgroundColor:n,border:`1.5px ${i?`dashed`:`solid`} ${r}`,transition:`transform 0.15s ease`,transform:y===e.label?`scale(1.2)`:`scale(1)`}})}),(0,f.jsx)(u.TableCell,{children:(0,f.jsxs)(u.Stack,{direction:`row`,alignItems:`center`,gap:.5,children:[(0,f.jsx)(`span`,{children:e.label}),MS[e.label]&&(0,f.jsx)(u.Tooltip,{title:MS[e.label],placement:`right`,arrow:!0,children:(0,f.jsx)(p.InfoOutlined,{sx:{fontSize:`.875rem`,color:`var(--rc-muted-text, #6b7280)`}})})]})}),(0,f.jsx)(u.TableCell,{align:`right`,children:e.value}),(0,f.jsxs)(u.TableCell,{align:`right`,children:[e.percentage,`%`]})]},e.id)})})]})})]})},PS=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timelineEvents:o=[],showTimeline:s=!0,timelineHeight:c=40,timelineOffset:l=35,timeRange:u,showGrid:f=!0,showAxes:p=!0,axisLabelColor:m,axisLabelSize:h=14,enableBrush:g=!1,onTimeRangeChange:_,minAllowedTime:v,maxAllowedTime:y,brushColor:b=`#69b3a2`,formatDate:x,formatValue:S,markers:C=[],onHoveredDataChange:w,hoveredCategory:T,onTimelineEventHover:E})=>{let[D,O]=(0,d.useState)(null),[k,A]=(0,d.useState)(null),[j,M]=(0,d.useState)([]),N=(0,d.useRef)(`sawt-${Math.random().toString(36).substr(2,9)}`),P=(0,d.useCallback)(e=>{O(e),E?.(e)},[E]);return(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=Y(e.current),E=r-a.left-a.right,D=i-a.top-a.bottom,O=N.current;d.selectAll(`*`).remove();let k=`main-chart-group main-chart-group-${O}`,j=d.append(`g`).attr(`class`,k).attr(`transform`,`translate(${a.left},${a.top})`),F=`sawt-clip-${O}`;d.append(`defs`).append(`clipPath`).attr(`id`,F).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,E).attr(`height`,D);let I=j.append(`g`).attr(`clip-path`,`url(#${F})`),L=[...t.map(e=>({timestamp:e.timestamp,...e.values}))].sort((e,t)=>e.timestamp-t.timestamp),R=n.map(e=>e.dataKey),z=Si().keys(R),B=z(L),V=t.map(e=>e.timestamp),H=u?u[0]:Math.min(...V),U=u?u[1]:Math.max(...V),ee=Qr().domain([new Date(H),new Date(U)]).range([0,E]),te=L.filter(e=>e.timestamp>=H&&e.timestamp<=U),ne=z(te),re=ne.length>0?Math.max(...ne[ne.length-1].map(e=>e[1]??0)):0,W=Nt().domain([0,re*1.1]).range([D,0]).nice();f&&(I.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(to(ee).ticks(6).tickSize(D).tickFormat(()=>``)),I.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(no(W).ticks(5).tickSize(-E).tickFormat(()=>``)));let ie=hi().x(e=>ee(new Date(e.data.timestamp))).y0(e=>W(e[0])).y1(e=>W(e[1])).curve(di),ae=I.append(`g`).attr(`class`,`areas`);B.forEach((e,t)=>{let r=n[t];if(!r)return;let i=T===r.dataKey,a=T!=null;ae.append(`path`).datum(e).attr(`class`,`area area-${r.dataKey}`).attr(`fill`,r.color).attr(`fill-opacity`,a?i?.9:.3:.7).attr(`stroke`,r.color).attr(`stroke-width`,i?2:1.5).attr(`d`,ie).on(`mouseenter`,()=>{let e=te[te.length-1],t=e?e[r.dataKey]??0:0;w?.({label:r.label,value:t,color:r.color})}).on(`mouseleave`,()=>{w?.(null)})});let G=C.filter(e=>e.timestamp>=H&&e.timestamp<=U).map(e=>({...e,x:ee(new Date(e.timestamp))}));M(e=>e.length!==G.length||e.some((e,t)=>e.timestamp!==G[t]?.timestamp||e.x!==G[t]?.x)?G:e);let oe=null;if(G.length>0&&(oe=I.append(`g`).attr(`class`,`markers`),G.forEach(e=>{oe.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,e.timestamp).attr(`x1`,e.x).attr(`x2`,e.x).attr(`y1`,0).attr(`y2`,D).attr(`stroke`,e.color??`#131E7A`).attr(`stroke-width`,2).attr(`opacity`,0)})),p){let e=to(ee).ticks(6).tickPadding(12);x&&e.tickFormat(e=>x(+e)),j.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${D})`).call(e).selectAll(`text`).attr(`font-size`,h).attr(`fill`,m??null);let t=no(W).ticks(5);t.tickFormat(e=>+e==0?``:S?S(+e):String(e)),j.append(`g`).attr(`class`,`axis axis-y`).call(t).selectAll(`text`).attr(`font-size`,h).attr(`fill`,m??null)}if(g&&_){let e=Eu().extent([[0,0],[E,D]]).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection,i=[+ee.invert(n),+ee.invert(r)];v!==void 0&&(i[0]=Math.max(i[0],v)),y!==void 0&&(i[1]=Math.min(i[1],y)),_(i),d.select(`.brush`).call(e.move,null)}),t=I.append(`g`).attr(`class`,`brush`).call(e);t.selectAll(`.selection`).attr(`fill`,b).attr(`fill-opacity`,.2).attr(`stroke`,b).attr(`stroke-width`,1),t.selectAll(`.handle`).attr(`fill`,b).attr(`fill-opacity`,.8),t.select(`.overlay`).style(`cursor`,`default`)}if(s&&Bh({svg:d,events:o,xScale:ee,chartHeight:D,chartWidth:E,timelineHeight:c,timelineOffset:l,instanceId:O,setHoveredTimelineEvent:P,enableBrush:g,onTimeRangeChange:_,minAllowedTime:v,maxAllowedTime:y,brushColor:b,mainGroupSelector:`.main-chart-group-${O}`}),G.length>0&&oe){let e=null,t;t=g?I.select(`.brush .overlay`):j.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,E).attr(`height`,D).attr(`fill`,`none`).attr(`pointer-events`,`all`);let n=oe,r=t=>{let r=null,i=1/0;if(G.forEach(e=>{let n=Math.abs(t-e.x);n<i&&(i=n,r=e)}),!r||i>50)return e!==null&&(e=null,n.selectAll(`.marker-line`).attr(`opacity`,0),A(null)),!1;let a=r;return e===a.timestamp||(e=a.timestamp,n.selectAll(`.marker-line`).attr(`opacity`,0),n.selectAll(`.marker-line`).filter(function(){return Y(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,.6),A(a),!0)},i=function(e){let[t]=lc(e,this);r(t)};t.on(`mouseenter`,i),t.on(`mousemove`,i),t.on(`mouseleave`,function(){e=null,n.selectAll(`.marker-line`).attr(`opacity`,0),A(null)})}return()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,P]),{hoveredTimelineEvent:D,hoveredMarker:k,visibleMarkers:j}},FS=({data:e,categories:t,timelineEvents:n=[],showTimeline:r=!0,timelineHeight:i=40,timelineOffset:a,width:o=900,height:s=400,margin:c={top:10,right:30,bottom:40,left:60},showGrid:l=!0,showAxes:p=!0,axisLabelColor:m,axisLabelSize:h=14,formatDate:g,formatValue:_,timeRange:v,enableBrush:y=!1,onTimeRangeChange:b,minAllowedTime:x,maxAllowedTime:S,brushColor:C=`#69b3a2`,markers:w=[],onHoveredDataChange:T,hoveredCategory:E,onTimelineEventHover:D})=>{let O=(0,d.useRef)(null),k=a??18+h+12,A=r?s+i+k:s,{hoveredTimelineEvent:j,hoveredMarker:M,visibleMarkers:N}=PS({containerRef:O,data:e,categories:t,width:o,height:s,margin:c,timelineEvents:n,showTimeline:r,timelineHeight:i,timelineOffset:k,timeRange:v,showGrid:l,showAxes:p,axisLabelColor:m,axisLabelSize:h,enableBrush:y,onTimeRangeChange:b,minAllowedTime:x,maxAllowedTime:S,brushColor:C,formatDate:g,formatValue:_,markers:w,onHoveredDataChange:T,hoveredCategory:E,onTimelineEventHover:D});return(0,f.jsxs)(u.Box,{sx:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:O,viewBox:`0 0 ${o} ${A}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,height:`auto`,display:`block`}}),N.map(e=>{let t=(e.x+c.left)/o*100,n=c.top/A*100,r=new Date(e.timestamp),i=g?g(e.timestamp):r.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}),a=(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:e.label?.5:0},children:i}),e.label&&(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:e.label})]});return(0,f.jsx)(u.Tooltip,{title:a,open:M?.timestamp===e.timestamp,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${t}%`,top:`${n}%`,width:`1px`,height:`${(s-c.top-c.bottom)/A*100}%`,pointerEvents:`none`}})},e.timestamp)}),j&&r&&!M&&(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:.5},children:g?g(j.timestamp):new Date(j.timestamp).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}),(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:j.eventName})]}),open:!0,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${(j.x+c.left)/o*100}%`,top:`${(s+k+i/2)/A*100}%`,width:`1px`,height:`1px`,pointerEvents:`none`}})})]})},IS={colors:{primary:`#992FB9`,background:`#FFFFFF`,border:`#9CA3AF`,highlightBackground:`rgba(31, 41, 55, 0.14)`,monthLabel:`#9ca3af`,tooltipText:`#6b7280`},dimensions:{height:32,eventWidth:2}},LS=(e=`#4B5563`)=>({startHandle:{sx:{position:`absolute`,left:`-6px`,top:`-10px`,width:`14px`,height:`calc(100% + 10px)`,zIndex:3,display:`flex`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`,borderTop:`8px solid ${e}`,transition:`border-top-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`8px`,left:`50%`,transform:`translateX(-50%)`,width:`2px`,height:`calc(100% - 8px)`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}},endHandle:{sx:{position:`absolute`,right:`-6px`,top:`-10px`,width:`14px`,height:`calc(100% + 10px)`,zIndex:3,display:`flex`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`,borderTop:`8px solid ${e}`,transition:`border-top-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`8px`,left:`50%`,transform:`translateX(-50%)`,width:`2px`,height:`calc(100% - 8px)`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}}}),RS={header:{sx:{}},title:{sx:{m:0}},instructions:{sx:{color:`text.secondary`,minHeight:`40px`,display:`flex`,alignItems:`center`}},monthLabelsContainer:{sx:{justifyContent:`space-between`,px:1.25,height:`20px`,fontSize:`11px`,color:IS.colors.monthLabel,mb:1}},monthLabel:{sx:{fontSize:`11px`}},timeline:{sx:{position:`relative`,height:`${IS.dimensions.height}px`,backgroundColor:IS.colors.background,borderRadius:0,overflow:`visible`,border:`1px solid ${IS.colors.border}`}},event:{sx:{position:`absolute`,top:0,width:`${IS.dimensions.eventWidth}px`,height:`100%`,backgroundColor:IS.colors.primary,cursor:`pointer`,transition:`transform 0.2s`,transformOrigin:`center`}},selection:{sx:{position:`absolute`,top:0,height:`100%`,backgroundColor:IS.colors.highlightBackground,pointerEvents:`none`}},startHandle:{},endHandle:{},tooltip:{sx:{position:`absolute`,bottom:`-40px`,backgroundColor:`white`,p:`6px 10px`,borderRadius:.5,boxShadow:`0 2px 8px rgba(0,0,0,0.15)`,whiteSpace:`nowrap`,pointerEvents:`none`,zIndex:10,border:`1px solid ${IS.colors.border}`}},tooltipEventName:{sx:{fontWeight:600}},tooltipDate:{sx:{color:IS.colors.tooltipText,fontSize:`11px`}}},zS=(e=`#9CA3AF`)=>({startHandle:{sx:{position:`absolute`,left:`-8px`,top:0,width:`20px`,height:`100%`,zIndex:3,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:`1px`,height:`100%`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:`9px`,height:`16px`,backgroundColor:`#F9FAFB`,border:`1px solid ${e}`,transition:`border-color 0.2s, background-color 0.2s`,pointerEvents:`none`,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:`35% center, 65% center`,backgroundSize:`1px 50%, 1px 50%`,backgroundRepeat:`no-repeat`},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}},endHandle:{sx:{position:`absolute`,right:`-8px`,top:0,width:`20px`,height:`100%`,zIndex:3,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:`1px`,height:`100%`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:`9px`,height:`16px`,backgroundColor:`#F9FAFB`,border:`1px solid ${e}`,transition:`border-color 0.2s, background-color 0.2s`,pointerEvents:`none`,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:`35% center, 65% center`,backgroundSize:`1px 50%, 1px 50%`,backgroundRepeat:`no-repeat`},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}}}),BS=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}},VS=({events:e,selectedRange:t,onSelectionChange:n,enableZoom:r,zoomToSelection:i,visibleRange:a,onVisibleRangeChange:o})=>{BS()&&e.length>1&&(e.every((t,n)=>n===0||t.timestamp>=e[n-1].timestamp)||console.warn(`TimelineChart: events array should be sorted by timestamp for optimal performance and correct behavior.`));let[s,c]=(0,d.useState)(!1),[l,u]=(0,d.useState)(null),[f,p]=(0,d.useState)(null),[m,h]=(0,d.useState)({start:null,end:null}),[g,_]=(0,d.useState)({start:null,end:null}),[v,y]=(0,d.useState)(null),b=(0,d.useRef)(null),x=t??m,S=a??g,C=(0,d.useMemo)(()=>e.length>0?e[0]?.timestamp??0:0,[e]),w=(0,d.useMemo)(()=>e.length>0?e[e.length-1]?.timestamp??0:0,[e]),T=(0,d.useMemo)(()=>i&&S.start&&S.end?S.start:C,[i,S,C]),E=(0,d.useMemo)(()=>i&&S.start&&S.end?S.end:w,[i,S,w]),D=(0,d.useMemo)(()=>E-T,[E,T]),O=(0,d.useMemo)(()=>!r&&x.start!==null&&x.end!==null,[r,x]),k=(0,d.useCallback)(e=>D===0?0:(e-T)/D*100,[T,D]),A=(0,d.useCallback)((e,t)=>{let n=e/t*100;return T+n/100*D},[T,D]),j=(0,d.useCallback)(e=>{t===void 0&&h(e),n?.(e)},[t,n]),M=(0,d.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=A(n,t.width);c(!0),u(r),j({start:r,end:r})},[A,j]),N=(0,d.useCallback)(e=>{if(!s||l===null)return;let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=A(n,t.width);if(f===`start`){let e=Math.min(r,x.end-D*.01);j({start:Math.max(e,T),end:x.end})}else if(f===`end`){let e=Math.max(r,x.start+D*.01);j({start:x.start,end:Math.min(e,E)})}else if(f===`body`){let e=r-l,t=x.end-x.start,n=x.start+e,i=x.end+e;n<T&&(n=T,i=T+t),i>E&&(i=E,n=E-t),j({start:n,end:i}),u(r)}else j({start:Math.min(l,r),end:Math.max(l,r)})},[s,l,f,x,D,T,E,A,j]),P=(0,d.useCallback)(()=>{let e=s;if(c(!1),p(null),e&&i&&x.start&&x.end&&x.start!==x.end){let e={start:x.start,end:x.end};a===void 0&&_(e),o?.(e)}},[s,i,x,a,o]);(0,d.useEffect)(()=>{if(!s||l===null||!b.current)return;let e=e=>{let t=b.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=A(r,n.width);if(f===`start`){let e=Math.min(i,x.end-D*.01);j({start:Math.max(e,T),end:x.end})}else if(f===`end`){let e=Math.max(i,x.start+D*.01);j({start:x.start,end:Math.min(e,E)})}else if(f===`body`){let e=i-l,t=x.end-x.start,n=x.start+e,r=x.end+e;n<T&&(n=T,r=T+t),r>E&&(r=E,n=E-t),j({start:n,end:r}),u(i)}else j({start:Math.min(l,i),end:Math.max(l,i)})},t=()=>{P()};return document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)}},[s,l,f,x,D,T,E,A,j,P]);let F=(0,d.useCallback)(e=>{e.stopPropagation(),x.start!==null&&(c(!0),u(x.start),p(`start`))},[x]),I=(0,d.useCallback)(e=>{e.stopPropagation(),x.end!==null&&(c(!0),u(x.end),p(`end`))},[x]),L=(0,d.useCallback)(e=>{e.stopPropagation();let t=b.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=A(r,n.width);c(!0),u(i),p(`body`)},[A]),R=(0,d.useCallback)(e=>{if(e.cancelable&&r&&e.preventDefault(),!r||!x.start||!x.end||D===0)return;let t=(x.start+x.end)/2,n=x.end-x.start,i=e.deltaY>0?1.1:.9,a=Math.max(n*i,D*.01),o=D*1.5,s=Math.min(a,o),c=t-s/2,l=t+s/2;c<T&&(c=T,l=Math.min(T+s,E)),l>E&&(l=E,c=Math.max(E-s,T)),j({start:c,end:l})},[r,x,D,T,E,j]),z=(0,d.useCallback)(()=>!x.start||!x.end?[]:e.filter(e=>e.timestamp>=x.start&&e.timestamp<=x.end),[e,x]),B=(0,d.useCallback)(()=>{let e={start:C,end:w};a===void 0&&_({start:null,end:null}),o?.(e)},[C,w,a,o]);return{isDragging:s,dragStart:l,dragHandleType:f,internalSelectedRange:x,internalVisibleRange:S,hoveredEvent:v,minDate:T,maxDate:E,timeSpan:D,timelineContainerRef:b,getPositionFromTimestamp:k,getTimestampFromPosition:A,handleMouseDown:M,handleMouseMove:N,handleMouseUp:P,handleWheel:R,handleDoubleClick:(0,d.useCallback)(()=>{i&&B()},[i,B]),handleStartHandleMouseDown:F,handleEndHandleMouseDown:I,handleSelectionBodyMouseDown:L,setHoveredEvent:y,getEventsInRange:z,resetZoom:B,showHandles:O}},HS=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),US=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`}),WS=e=>{let t=e/864e5;return t>60?e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`}):t>7?e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,hour12:!0})},GS=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}},KS=(e,t=`arrow`,n)=>{let r=t===`grip`?zS(n||`#9CA3AF`):LS(n||`#4B5563`);return{header:{...RS.header,...e?.header},title:{...RS.title,...e?.title},instructions:{...RS.instructions,...e?.instructions},monthLabelsContainer:{...RS.monthLabelsContainer,...e?.monthLabelsContainer},monthLabel:{...RS.monthLabel,...e?.monthLabel},timeline:{...RS.timeline,...e?.timeline},event:{...RS.event,...e?.event},selection:{...RS.selection,...e?.selection},startHandle:{...r.startHandle,...e?.startHandle},endHandle:{...r.endHandle,...e?.endHandle},tooltip:{...RS.tooltip,...e?.tooltip},tooltipEventName:{...RS.tooltipEventName,...e?.tooltipEventName},tooltipDate:{...RS.tooltipDate,...e?.tooltipDate}}},qS=({events:e,onSelectionChange:t,selectedRange:n,height:r=IS.dimensions.height,margin:i={top:0,right:0,bottom:0,left:0},formatDate:a=HS,formatMonthYear:o=US,showMonthLabels:s=!0,monthLabelCount:c=6,enableZoom:l=!0,dragHandleVariant:p=`arrow`,dragHandleColor:m,showHeader:h=!0,title:g=`Event Timeline Selector`,zoomToSelection:_=!1,visibleRange:v,onVisibleRangeChange:y,timeRange:b,onTimeRangeChange:x,slotProps:S})=>{let C=b?{start:b[0],end:b[1]}:v,w=x?e=>{e.start!==null&&e.end!==null&&x([e.start,e.end])}:y;GS()&&e.length>500&&console.warn(`TimelineChart: Rendering ${e.length} events may impact performance. Consider implementing virtualization or canvas rendering for datasets larger than 500 events.`);let T=(0,d.useMemo)(()=>KS(S,p,m),[S,p,m]),{isDragging:E,dragHandleType:D,internalSelectedRange:O,hoveredEvent:k,minDate:A,timeSpan:j,timelineContainerRef:M,getPositionFromTimestamp:N,handleMouseDown:P,handleWheel:F,handleDoubleClick:I,handleStartHandleMouseDown:L,handleEndHandleMouseDown:R,handleSelectionBodyMouseDown:z,setHoveredEvent:B,getEventsInRange:V,showHandles:H}=VS({events:e,selectedRange:n,onSelectionChange:t,enableZoom:l,zoomToSelection:_,visibleRange:C,onVisibleRangeChange:w}),U=O.start&&O.end?`Selected: ${a(O.start)} - ${a(O.end)} (${V().length} events)`:`Click and drag on the timeline below to select a date range. Use mouse wheel to zoom in/out.`;return(0,f.jsxs)(u.Stack,{sx:{width:`100%`},children:[h&&(0,f.jsxs)(u.Stack,{spacing:1,sx:{mb:3},...T.header,children:[(0,f.jsx)(u.Typography,{variant:`h5`,...T.title,children:g}),(0,f.jsx)(u.Typography,{variant:`body2`,...T.instructions,children:U})]}),s&&(0,f.jsx)(u.Stack,{direction:`row`,...T.monthLabelsContainer,sx:{...T.monthLabelsContainer.sx,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:Array.from({length:c},(e,t)=>{let n=A+j/(c-1)*t,r=WS(j);return(0,f.jsx)(u.Typography,{variant:`caption`,...T.monthLabel,children:r(n)},t)})}),(0,f.jsxs)(u.Box,{...T.timeline,sx:{...T.timeline.sx,height:`${r}px`,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:[(0,f.jsx)(u.Box,{sx:{position:`absolute`,top:i.top,left:0,right:0,bottom:i.bottom},children:e.map((e,t)=>{let n=N(e.timestamp);return(0,f.jsx)(u.Box,{onMouseEnter:()=>B(e),onMouseLeave:()=>B(null),"aria-label":`Event: ${e.eventName} at ${a(e.timestamp)}`,...T.event,sx:{...T.event.sx,left:`${n}%`,transform:k?.timestamp===e.timestamp?`scaleX(2)`:`scaleX(1)`}},`${e.timestamp}-${t}`)})}),O.start&&O.end&&(!_||E)&&(0,f.jsx)(u.Box,{...T.selection,onMouseDown:H&&!E?z:void 0,sx:{...T.selection.sx,left:`${N(O.start)}%`,width:`${N(O.end)-N(O.start)}%`,pointerEvents:H?`all`:`none`,zIndex:2,cursor:H&&!E?D===`body`?`grabbing`:`grab`:`default`},children:H&&!(E&&D===null)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Box,{...T.startHandle,onMouseDown:L,sx:{...T.startHandle.sx,cursor:`ew-resize`,opacity:E&&D!==`start`?.5:1},"aria-label":`Drag to adjust start of selection`}),(0,f.jsx)(u.Box,{...T.endHandle,onMouseDown:R,sx:{...T.endHandle.sx,cursor:`ew-resize`,opacity:E&&D!==`end`?.5:1},"aria-label":`Drag to adjust end of selection`})]})}),(0,f.jsx)(u.Box,{ref:M,role:`application`,"aria-label":`Interactive timeline - click and drag to select date range`,"aria-describedby":h?void 0:`timeline-instructions`,tabIndex:0,sx:{position:`absolute`,top:0,left:0,right:0,height:`100%`,cursor:`crosshair`,pointerEvents:`all`,zIndex:1},onMouseDown:P,onWheel:F,onDoubleClick:I}),!h&&(0,f.jsx)(`span`,{id:`timeline-instructions`,style:{display:`none`},children:U}),k&&(0,f.jsxs)(u.Box,{role:`tooltip`,"aria-live":`polite`,...T.tooltip,sx:{...T.tooltip.sx,left:`${N(k.timestamp)}%`,transform:`translateX(-50%)`},children:[(0,f.jsx)(u.Typography,{variant:`body2`,...T.tooltipEventName,children:k.eventName}),(0,f.jsx)(u.Typography,{variant:`caption`,...T.tooltipDate,children:a(k.timestamp)})]})]})]})},JS=`#8b5cf6`,YS=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),XS=({events:e,title:t=`Events in Selected Range`,maxHeight:n=`200px`,formatDate:r=YS,primaryColor:i=JS})=>e.length===0?null:(0,f.jsxs)(`div`,{style:{marginTop:`24px`,padding:`20px`,backgroundColor:`#f9fafb`,borderRadius:`8px`,border:`1px solid #e5e7eb`},children:[(0,f.jsxs)(`h3`,{style:{margin:`0 0 12px 0`,fontSize:`16px`,color:`#374151`},children:[t,` (`,e.length,`)`]}),(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,gap:`8px`,maxHeight:n,overflowY:`auto`},children:e.map((e,t)=>(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,backgroundColor:`white`,borderRadius:`4px`,fontSize:`13px`,border:`1px solid #e5e7eb`},children:[(0,f.jsx)(`div`,{style:{fontWeight:500,color:i},children:e.eventName}),(0,f.jsx)(`div`,{style:{color:`#6b7280`,fontSize:`12px`,marginTop:`2px`},children:r(e.timestamp)})]},`${e.timestamp}-${t}`))})]});function ZS(e,t){let n=t-1-e,r=Ea.length,i=Math.floor(n/Math.max(1,t-1)*(r-1));return Ea[Math.min(Math.max(0,i),r-1)]??Ea[0]??`#000000`}function QS(e){return Array.from({length:e},(t,n)=>ZS(n,e))}var $S=QS(5),eC={critical:`#dc3545`,high:`#fd7e14`,medium:`#ffc107`,low:`#17a2b8`,complete:Ta.neoDigitalGreen[600],inProgress:`#007bff`,farthest:$S[0],far:$S[1],close:$S[2],closest:$S[3],completed:$S[4],primary:`#007bff`,secondary:`#6c757d`,success:Ta.neoDigitalGreen[600],danger:`#dc3545`,warning:`#ffc107`,info:`#17a2b8`,light:Ta.neoGrey[200],dark:`#343a40`},tC={migration:$S,severity:[eC.critical,eC.high,eC.medium,eC.low,eC.info],status:[eC.danger,eC.warning,eC.success],extended:[`#e74c3c`,`#e67e22`,`#f39c12`,`#2ecc71`,`#3498db`,`#9b59b6`,`#1abc9c`,`#95a5a6`],colorblindSafe:[`#0173B2`,`#DE8F05`,`#029E73`,`#CC78BC`,`#CA9161`,`#FBAFE4`,`#949494`,`#ECE133`]},nC={FARTHEST:`Farthest`,FAR:`Far`,CLOSE:`Close`,CLOSEST:`Closest`,COMPLETE:`Complete`,CRITICAL:`Critical`,HIGH:`High`,MEDIUM:`Medium`,LOW:`Low`,INFO:`Info`,NOT_APPLICABLE:`N/A`,NO_LST:`No LST`,DATA_MISSING:`Data Missing`};exports.CAMPAIGN_DATA_MISSING=Ha,exports.CAMPAIGN_NOT_APPLICABLE=Ba,exports.CAMPAIGN_NO_LST=Va,exports.CATEGORY_LABELS=nC,exports.CampaignTimeline=wa,exports.ChronoChart=Dg,exports.ChronoPerspectiveChart=Dg,exports.D3StackedAreaChart=jg,exports.D3StackedBarChart=Ng,exports.DEFAULT_CHART_COLORS=Ta,exports.DEFAULT_CHART_CONFIG=ja,exports.DEFAULT_STACKED_AREA_COLORS=eC,exports.MEASURE_GRADIENT_COLORS=Ea,exports.MODERNE_VULNERABILITY_COLORS=Ma,exports.MorphChart=hg,exports.ParliamentChart=NS,exports.STACKED_AREA_PALETTES=tC,exports.StackedAreaWithTimeline=FS,exports.TimelineChart=qS,exports.TimelineSelectedEvents=XS,exports.calculateDataSeries=jS,exports.calculateOptimalArcAngle=_g,exports.calculateOptimalSeatSize=vg,exports.generateMeasureGradient=QS;
|