@moderneinc/react-charts 1.2.0 → 1.3.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/components/chrono-chart/chrono-chart.component.d.ts +10 -0
- package/dist/components/chrono-chart/chrono-chart.types.d.ts +129 -0
- package/dist/components/chrono-chart/components/category-table.component.d.ts +13 -0
- package/dist/components/chrono-chart/components/category-table.types.d.ts +42 -0
- package/dist/components/chrono-chart/utils/data-transformer.d.ts +41 -0
- package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.component.d.ts +7 -0
- package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.types.d.ts +95 -0
- package/dist/components/d3-stacked-area-chart/hooks/use-d3-stacked-area.hook.d.ts +35 -0
- package/dist/components/morph-chart/hooks/shared/computations.d.ts +29 -0
- package/dist/components/morph-chart/hooks/shared/types.d.ts +24 -0
- package/dist/components/morph-chart/hooks/use-morph-chart.hook.d.ts +90 -0
- package/dist/components/morph-chart/morph-chart.component.d.ts +14 -0
- package/dist/components/morph-chart/morph-chart.types.d.ts +175 -0
- package/dist/components/morph-chart/utils/animation-constants.d.ts +23 -0
- package/dist/components/morph-chart/utils/area-renderer.d.ts +24 -0
- package/dist/components/morph-chart/utils/bar-renderer.d.ts +19 -0
- package/dist/components/morph-chart/utils/gsap-orchestrator.d.ts +291 -0
- package/dist/components/morph-chart/utils/parliament-renderer.d.ts +23 -0
- package/dist/components/morph-chart/utils/parliament-seat-extractor.d.ts +33 -0
- package/dist/components/morph-chart/utils/position-mapper.d.ts +48 -0
- package/dist/components/morph-chart/utils/svg-patterns.d.ts +19 -0
- package/dist/components/parliament-chart/hooks/use-parliament-chart.hook.d.ts +5 -1
- package/dist/components/parliament-chart/parliament-chart.types.d.ts +5 -0
- package/dist/components/parliament-chart/utils/parliament-animation.d.ts +13 -0
- package/dist/components/stacked-area-with-timeline/hooks/use-stacked-area-with-timeline.hook.d.ts +53 -0
- package/dist/components/stacked-area-with-timeline/stacked-area-with-timeline.component.d.ts +3 -0
- package/dist/components/stacked-area-with-timeline/stacked-area-with-timeline.types.d.ts +97 -0
- package/dist/components/stacked-area-with-timeline/utils/render-timeline-track.d.ts +46 -0
- package/dist/components/timeline-chart/timeline-chart.types.d.ts +44 -0
- package/dist/index.cjs +49 -11
- package/dist/index.d.ts +11 -1
- package/dist/index.js +13460 -3248
- package/dist/theme/chart-palettes.d.ts +59 -0
- package/dist/theme/default-colors.d.ts +8 -4
- package/dist/theme/timeline-defaults.d.ts +25 -1
- package/package.json +28 -16
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),Cs=require("@mui/icons-material"),T=require("@mui/material"),D=require("react"),qs=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Oe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Oe.prototype.normal={};Oe.prototype.property={};Oe.prototype.space=void 0;function El(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Oe(n,r,t)}function Me(e){return e.toLowerCase()}class W{constructor(t,n){this.attribute=n,this.property=t}}W.prototype.attribute="";W.prototype.booleanish=!1;W.prototype.boolean=!1;W.prototype.commaOrSpaceSeparated=!1;W.prototype.commaSeparated=!1;W.prototype.defined=!1;W.prototype.mustUseProperty=!1;W.prototype.number=!1;W.prototype.overloadedBoolean=!1;W.prototype.property="";W.prototype.spaceSeparated=!1;W.prototype.space=void 0;let Rs=0;const R=se(),k=se(),Jn=se(),g=se(),I=se(),he=se(),X=se();function se(){return 2**++Rs}const Qn=Object.freeze(Object.defineProperty({__proto__:null,boolean:R,booleanish:k,commaOrSpaceSeparated:X,commaSeparated:he,number:g,overloadedBoolean:Jn,spaceSeparated:I},Symbol.toStringTag,{value:"Module"})),Qe=Object.keys(Qn);class aa extends W{constructor(t,n,r,a){let i=-1;if(super(t,n),va(this,"space",a),typeof r=="number")for(;++i<Qe.length;){const o=Qe[i];va(this,Qe[i],(r&Qn[o])===Qn[o])}}}aa.prototype.defined=!0;function va(e,t,n){n&&(e[t]=n)}function me(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new aa(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Me(r)]=r,n[Me(i.attribute)]=r}return new Oe(t,n,e.space)}const Dl=me({properties:{ariaActiveDescendant:null,ariaAtomic:k,ariaAutoComplete:null,ariaBusy:k,ariaChecked:k,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:I,ariaCurrent:null,ariaDescribedBy:I,ariaDetails:null,ariaDisabled:k,ariaDropEffect:I,ariaErrorMessage:null,ariaExpanded:k,ariaFlowTo:I,ariaGrabbed:k,ariaHasPopup:null,ariaHidden:k,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:I,ariaLevel:g,ariaLive:null,ariaModal:k,ariaMultiLine:k,ariaMultiSelectable:k,ariaOrientation:null,ariaOwns:I,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:k,ariaReadOnly:k,ariaRelevant:null,ariaRequired:k,ariaRoleDescription:I,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:k,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Il(e,t){return t in e?e[t]:t}function Pl(e,t){return Il(e,t.toLowerCase())}const ws=me({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:he,acceptCharset:I,accessKey:I,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:I,autoFocus:R,autoPlay:R,blocking:I,capture:null,charSet:null,checked:R,cite:null,className:I,cols:g,colSpan:null,content:null,contentEditable:k,controls:R,controlsList:I,coords:g|he,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Jn,draggable:k,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:I,height:g,hidden:Jn,high:g,href:null,hrefLang:null,htmlFor:I,httpEquiv:I,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:I,itemRef:I,itemScope:R,itemType:I,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,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:R,optimum:g,pattern:null,ping:I,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:I,required:R,reversed:R,rows:g,rowSpan:g,sandbox:I,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:k,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:k,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:I,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:k,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:R,disableRemotePlayback:R,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:Pl}),Ts=me({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",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:X,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:I,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:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,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:he,g2:he,glyphName:he,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:X,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,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:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:I,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:X,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:X,rev:X,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:X,requiredFeatures:X,requiredFonts:X,requiredFormats:X,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:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:X,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:X,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:X,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Il}),Ll=me({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()}}),kl=me({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Pl}),Nl=me({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ms=/[A-Z]/g,ba=/-[a-z]/g,Os=/^data[-\w.:]+$/i;function Fl(e,t){const n=Me(t);let r=t,a=W;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Os.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ba,Ds);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ba.test(i)){let o=i.replace(Ms,Es);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=aa}return new a(r,t)}function Es(e){return"-"+e.toLowerCase()}function Ds(e){return e.charAt(1).toUpperCase()}const jl=El([Dl,ws,Ll,kl,Nl],"html"),ia=El([Dl,Ts,Ll,kl,Nl],"svg"),_a={}.hasOwnProperty;function Is(e,t){const n=t||{};function r(a,...i){let o=r.invalid;const l=r.handlers;if(a&&_a.call(a,e)){const s=String(a[e]);o=_a.call(l,s)?l[s]:r.unknown}if(o)return o.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ps=/["&'<>`]/g,Ls=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ks=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ns=/[|\\{}()[\]^$+*?.]/g,Sa=new WeakMap;function Fs(e,t){if(e=e.replace(t.subset?js(t.subset):Ps,r),t.subset||t.escapeOnly)return e;return e.replace(Ls,n).replace(ks,r);function n(a,i,o){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),t)}function r(a,i,o){return t.format(a.charCodeAt(0),o.charCodeAt(i+1),t)}}function js(e){let t=Sa.get(e);return t||(t=Bs(e),Sa.set(e,t)),t}function Bs(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Ns,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Hs=/[\dA-Fa-f]/;function zs(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Hs.test(String.fromCharCode(t))?r:r+";"}const Us=/\d/;function Gs(e,t,n){const r="&#"+String(e);return n&&t&&!Us.test(String.fromCharCode(t))?r:r+";"}const $s=["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"],et={nbsp:" ",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:"€"},Ks=["cent","copy","divide","gt","lt","not","para","times"],Bl={}.hasOwnProperty,ea={};let Fe;for(Fe in et)Bl.call(et,Fe)&&(ea[et[Fe]]=Fe);const Ws=/[^\dA-Za-z]/;function Ys(e,t,n,r){const a=String.fromCharCode(e);if(Bl.call(ea,a)){const i=ea[a],o="&"+i;return n&&$s.includes(i)&&!Ks.includes(i)&&(!r||t&&t!==61&&Ws.test(String.fromCharCode(t)))?o:o+";"}return""}function Vs(e,t,n){let r=zs(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=Ys(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const i=Gs(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function pe(e,t){return Fs(e,Object.assign({format:Vs},t))}const Xs=/^>|^->|<!--|-->|--!>|<!-$/g,Zs=[">"],Js=["<",">"];function Qs(e,t,n,r){return r.settings.bogusComments?"<?"+pe(e.value,Object.assign({},r.settings.characterReferences,{subset:Zs}))+">":"<!--"+e.value.replace(Xs,a)+"-->";function a(i){return pe(i,Object.assign({},r.settings.characterReferences,{subset:Js}))}}function eu(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function xa(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function Aa(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const o=n.slice(a,r).trim();(o||!i)&&t.push(o),a=r+1,r=n.indexOf(",",a)}return t}function tu(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Ca(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ru(e){return e.join(" ").trim()}const nu=/[ \t\n\f\r]/g;function oa(e){return typeof e=="object"?e.type==="text"?qa(e.value):!1:qa(e)}function qa(e){return e.replace(nu,"")===""}const j=zl(1),Hl=zl(-1),au=[];function zl(e){return t;function t(n,r,a){const i=n?n.children:au;let o=(r||0)+e,l=i[o];if(!a)for(;l&&oa(l);)o+=e,l=i[o];return l}}const iu={}.hasOwnProperty;function Ul(e){return t;function t(n,r,a){return iu.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const la=Ul({body:lu,caption:tt,colgroup:tt,dd:fu,dt:cu,head:tt,html:ou,li:uu,optgroup:du,option:hu,p:su,rp:Ra,rt:Ra,tbody:gu,td:wa,tfoot:mu,th:wa,thead:pu,tr:yu});function tt(e,t,n){const r=j(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&oa(r.value.charAt(0)))}function ou(e,t,n){const r=j(n,t);return!r||r.type!=="comment"}function lu(e,t,n){const r=j(n,t);return!r||r.type!=="comment"}function su(e,t,n){const r=j(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 uu(e,t,n){const r=j(n,t);return!r||r.type==="element"&&r.tagName==="li"}function cu(e,t,n){const r=j(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function fu(e,t,n){const r=j(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Ra(e,t,n){const r=j(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function du(e,t,n){const r=j(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function hu(e,t,n){const r=j(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function pu(e,t,n){const r=j(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function gu(e,t,n){const r=j(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function mu(e,t,n){return!j(n,t)}function yu(e,t,n){const r=j(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function wa(e,t,n){const r=j(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const vu=Ul({body:Su,colgroup:xu,head:_u,html:bu,tbody:Au});function bu(e){const t=j(e,-1);return!t||t.type!=="comment"}function _u(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function Su(e){const t=j(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&oa(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function xu(e,t,n){const r=Hl(n,t),a=j(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&la(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function Au(e,t,n){const r=Hl(n,t),a=j(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&la(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const je={name:[[`
|
|
1
|
+
"use strict";var zy=Object.defineProperty;var By=(e,t,n)=>t in e?zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yi=(e,t,n)=>By(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react/jsx-runtime"),B=require("@mui/material"),V=require("react"),Zg=require("@mui/icons-material");function Uy(e){return e}var Ss=1,Ts=2,Yu=3,Ai=4,Df=1e-6;function Hy(e){return"translate("+e+",0)"}function Gy(e){return"translate(0,"+e+")"}function jy(e){return t=>+e(t)}function Yy(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Xy(){return!this.__axis}function Qg(e,t){var n=[],r=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===Ss||e===Ai?-1:1,c=e===Ai||e===Ts?"x":"y",f=e===Ss||e===Yu?Hy:Gy;function h(p){var g=r??(t.ticks?t.ticks.apply(t,n):t.domain()),d=i??(t.tickFormat?t.tickFormat.apply(t,n):Uy),m=Math.max(a,0)+o,v=t.range(),y=+v[0]+l,x=+v[v.length-1]+l,_=(t.bandwidth?Yy:jy)(t.copy(),l),w=p.selection?p.selection():p,S=w.selectAll(".domain").data([null]),b=w.selectAll(".tick").data(g,t).order(),T=b.exit(),M=b.enter().append("g").attr("class","tick"),C=b.select("line"),A=b.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(M),C=C.merge(M.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),A=A.merge(M.append("text").attr("fill","currentColor").attr(c,u*m).attr("dy",e===Ss?"0em":e===Yu?"0.71em":"0.32em")),p!==w&&(S=S.transition(p),b=b.transition(p),C=C.transition(p),A=A.transition(p),T=T.transition(p).attr("opacity",Df).attr("transform",function(D){return isFinite(D=_(D))?f(D+l):this.getAttribute("transform")}),M.attr("opacity",Df).attr("transform",function(D){var k=this.parentNode.__axis;return f((k&&isFinite(k=k(D))?k:_(D))+l)})),T.remove(),S.attr("d",e===Ai||e===Ts?s?"M"+u*s+","+y+"H"+l+"V"+x+"H"+u*s:"M"+l+","+y+"V"+x:s?"M"+y+","+u*s+"V"+l+"H"+x+"V"+u*s:"M"+y+","+l+"H"+x),b.attr("opacity",1).attr("transform",function(D){return f(_(D)+l)}),C.attr(c+"2",u*a),A.attr(c,u*m).text(d),w.filter(Xy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ts?"start":e===Ai?"end":"middle"),w.each(function(){this.__axis=_})}return h.scale=function(p){return arguments.length?(t=p,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(a=s=+p,h):a},h.tickSizeInner=function(p){return arguments.length?(a=+p,h):a},h.tickSizeOuter=function(p){return arguments.length?(s=+p,h):s},h.tickPadding=function(p){return arguments.length?(o=+p,h):o},h.offset=function(p){return arguments.length?(l=+p,h):l},h}function br(e){return Qg(Yu,e)}function wr(e){return Qg(Ai,e)}var Wy={value:()=>{}};function Dc(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ta(n)}function Ta(e){this._=e}function Ky(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ta.prototype=Dc.prototype={constructor:Ta,on:function(e,t){var n=this._,r=Ky(e+"",n),i,a=-1,s=r.length;if(arguments.length<2){for(;++a<s;)if((i=(e=r[a]).type)&&(i=Vy(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=r[a]).type)n[i]=Of(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Of(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 Ta(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new 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 new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Vy(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Of(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Wy,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Xu="http://www.w3.org/1999/xhtml";const Pf={svg:"http://www.w3.org/2000/svg",xhtml:Xu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function es(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Pf.hasOwnProperty(t)?{space:Pf[t],local:e}:e}function Zy(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Xu&&t.documentElement.namespaceURI===Xu?t.createElement(e):t.createElementNS(n,e)}}function Qy(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Jg(e){var t=es(e);return(t.local?Qy:Zy)(t)}function Jy(){}function Oc(e){return e==null?Jy:function(){return this.querySelector(e)}}function t_(e){typeof e!="function"&&(e=Oc(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=new Array(s),l,u,c=0;c<s;++c)(l=a[c])&&(u=e.call(l,l.__data__,c,a))&&("__data__"in l&&(u.__data__=l.__data__),o[c]=u);return new tn(r,this._parents)}function e_(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function n_(){return[]}function tm(e){return e==null?n_:function(){return this.querySelectorAll(e)}}function r_(e){return function(){return e_(e.apply(this,arguments))}}function i_(e){typeof e=="function"?e=r_(e):e=tm(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var s=t[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&(r.push(e.call(l,l.__data__,u,s)),i.push(l));return new tn(r,i)}function em(e){return function(){return this.matches(e)}}function nm(e){return function(t){return t.matches(e)}}var a_=Array.prototype.find;function s_(e){return function(){return a_.call(this.children,e)}}function o_(){return this.firstElementChild}function l_(e){return this.select(e==null?o_:s_(typeof e=="function"?e:nm(e)))}var u_=Array.prototype.filter;function c_(){return Array.from(this.children)}function f_(e){return function(){return u_.call(this.children,e)}}function h_(e){return this.selectAll(e==null?c_:f_(typeof e=="function"?e:nm(e)))}function p_(e){typeof e!="function"&&(e=em(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=[],l,u=0;u<s;++u)(l=a[u])&&e.call(l,l.__data__,u,a)&&o.push(l);return new tn(r,this._parents)}function rm(e){return new Array(e.length)}function d_(){return new tn(this._enter||this._groups.map(rm),this._parents)}function Oa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Oa.prototype={constructor:Oa,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 g_(e){return function(){return e}}function m_(e,t,n,r,i,a){for(var s=0,o,l=t.length,u=a.length;s<u;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new Oa(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function y_(e,t,n,r,i,a,s){var o,l,u=new Map,c=t.length,f=a.length,h=new Array(c),p;for(o=0;o<c;++o)(l=t[o])&&(h[o]=p=s.call(l,l.__data__,o,t)+"",u.has(p)?i[o]=l:u.set(p,l));for(o=0;o<f;++o)p=s.call(e,a[o],o,a)+"",(l=u.get(p))?(r[o]=l,l.__data__=a[o],u.delete(p)):n[o]=new Oa(e,a[o]);for(o=0;o<c;++o)(l=t[o])&&u.get(h[o])===l&&(i[o]=l)}function __(e){return e.__data__}function v_(e,t){if(!arguments.length)return Array.from(this,__);var n=t?y_:m_,r=this._parents,i=this._groups;typeof e!="function"&&(e=g_(e));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),u=0;u<a;++u){var c=r[u],f=i[u],h=f.length,p=x_(e.call(c,c&&c.__data__,u,r)),g=p.length,d=o[u]=new Array(g),m=s[u]=new Array(g),v=l[u]=new Array(h);n(c,f,d,m,v,p,t);for(var y=0,x=0,_,w;y<g;++y)if(_=d[y]){for(y>=x&&(x=y+1);!(w=m[x])&&++x<g;);_._next=w||null}}return s=new tn(s,r),s._enter=o,s._exit=l,s}function x_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b_(){return new tn(this._exit||this._groups.map(rm),this._parents)}function w_(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function S_(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var u=n[l],c=r[l],f=u.length,h=o[l]=new Array(f),p,g=0;g<f;++g)(p=u[g]||c[g])&&(h[g]=p);for(;l<i;++l)o[l]=n[l];return new tn(o,this._parents)}function T_(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],s;--i>=0;)(s=r[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function M_(e){e||(e=A_);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var s=n[a],o=s.length,l=i[a]=new Array(o),u,c=0;c<o;++c)(u=s[c])&&(l[c]=u);l.sort(t)}return new tn(i,this._parents).order()}function A_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function C_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function k_(){return Array.from(this)}function R_(){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 s=r[i];if(s)return s}return null}function E_(){let e=0;for(const t of this)++e;return e}function D_(){return!this.node()}function O_(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,s=i.length,o;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this}function P_(e){return function(){this.removeAttribute(e)}}function F_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function N_(e,t){return function(){this.setAttribute(e,t)}}function L_(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function q_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function $_(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 I_(e,t){var n=es(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?F_:P_:typeof t=="function"?n.local?$_:q_:n.local?L_:N_)(n,t))}function im(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function z_(e){return function(){this.style.removeProperty(e)}}function B_(e,t,n){return function(){this.style.setProperty(e,t,n)}}function U_(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function H_(e,t,n){return arguments.length>1?this.each((t==null?z_:typeof t=="function"?U_:B_)(e,t,n??"")):ei(this.node(),e)}function ei(e,t){return e.style.getPropertyValue(t)||im(e).getComputedStyle(e,null).getPropertyValue(t)}function G_(e){return function(){delete this[e]}}function j_(e,t){return function(){this[e]=t}}function Y_(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function X_(e,t){return arguments.length>1?this.each((t==null?G_:typeof t=="function"?Y_:j_)(e,t)):this.node()[e]}function am(e){return e.trim().split(/^|\s+/)}function Pc(e){return e.classList||new sm(e)}function sm(e){this._node=e,this._names=am(e.getAttribute("class")||"")}sm.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function om(e,t){for(var n=Pc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function lm(e,t){for(var n=Pc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function W_(e){return function(){om(this,e)}}function K_(e){return function(){lm(this,e)}}function V_(e,t){return function(){(t.apply(this,arguments)?om:lm)(this,e)}}function Z_(e,t){var n=am(e+"");if(arguments.length<2){for(var r=Pc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?V_:t?W_:K_)(n,t))}function Q_(){this.textContent=""}function J_(e){return function(){this.textContent=e}}function t1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function e1(e){return arguments.length?this.each(e==null?Q_:(typeof e=="function"?t1:J_)(e)):this.node().textContent}function n1(){this.innerHTML=""}function r1(e){return function(){this.innerHTML=e}}function i1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function a1(e){return arguments.length?this.each(e==null?n1:(typeof e=="function"?i1:r1)(e)):this.node().innerHTML}function s1(){this.nextSibling&&this.parentNode.appendChild(this)}function o1(){return this.each(s1)}function l1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function u1(){return this.each(l1)}function c1(e){var t=typeof e=="function"?e:Jg(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function f1(){return null}function h1(e,t){var n=typeof e=="function"?e:Jg(e),r=t==null?f1:typeof t=="function"?t:Oc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function p1(){var e=this.parentNode;e&&e.removeChild(this)}function d1(){return this.each(p1)}function g1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function m1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function y1(e){return this.select(e?m1:g1)}function _1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function v1(e){return function(t){e.call(this,t,this.__data__)}}function x1(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function b1(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 w1(e,t,n){return function(){var r=this.__on,i,a=v1(t);if(r){for(var s=0,o=r.length;s<o;++s)if((i=r[s]).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 S1(e,t,n){var r=x1(e+""),i,a=r.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,c;l<u;++l)for(i=0,c=o[l];i<a;++i)if((s=r[i]).type===c.type&&s.name===c.name)return c.value}return}for(o=t?w1:b1,i=0;i<a;++i)this.each(o(r[i],t,n));return this}function um(e,t,n){var r=im(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 T1(e,t){return function(){return um(this,e,t)}}function M1(e,t){return function(){return um(this,e,t.apply(this,arguments))}}function A1(e,t){return this.each((typeof t=="function"?M1:T1)(e,t))}function*C1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,s;i<a;++i)(s=r[i])&&(yield s)}var cm=[null];function tn(e,t){this._groups=e,this._parents=t}function hi(){return new tn([[document.documentElement]],cm)}function k1(){return this}tn.prototype=hi.prototype={constructor:tn,select:t_,selectAll:i_,selectChild:l_,selectChildren:h_,filter:p_,data:v_,enter:d_,exit:b_,join:w_,merge:S_,selection:k1,order:T_,sort:M_,call:C_,nodes:k_,node:R_,size:E_,empty:D_,each:O_,attr:I_,style:H_,property:X_,classed:Z_,text:e1,html:a1,raise:o1,lower:u1,append:c1,insert:h1,remove:d1,clone:y1,datum:_1,on:S1,dispatch:A1,[Symbol.iterator]:C1};function Rt(e){return typeof e=="string"?new tn([[document.querySelector(e)]],[document.documentElement]):new tn([[e]],cm)}function R1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Sr(e,t){if(e=R1(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]}const Wu={capture:!0,passive:!1};function Ku(e){e.preventDefault(),e.stopImmediatePropagation()}function E1(e){var t=e.document.documentElement,n=Rt(e).on("dragstart.drag",Ku,Wu);"onselectstart"in t?n.on("selectstart.drag",Ku,Wu):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function D1(e,t){var n=e.document.documentElement,r=Rt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ku,Wu),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Fc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function na(){}var Gi=.7,Pa=1/Gi,Wr="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O1=/^#([0-9a-f]{3,8})$/,P1=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),F1=new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`),N1=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${ji}\\)$`),L1=new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${ji}\\)$`),q1=new RegExp(`^hsl\\(${ji},${Mn},${Mn}\\)$`),$1=new RegExp(`^hsla\\(${ji},${Mn},${Mn},${ji}\\)$`),Ff={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};Fc(na,Tr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Nf,formatHex:Nf,formatHex8:I1,formatHsl:z1,formatRgb:Lf,toString:Lf});function Nf(){return this.rgb().formatHex()}function I1(){return this.rgb().formatHex8()}function z1(){return hm(this).formatHsl()}function Lf(){return this.rgb().formatRgb()}function Tr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=O1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?qf(t):n===3?new qe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ga(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ga(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=P1.exec(e))?new qe(t[1],t[2],t[3],1):(t=F1.exec(e))?new qe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=N1.exec(e))?ga(t[1],t[2],t[3],t[4]):(t=L1.exec(e))?ga(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=q1.exec(e))?zf(t[1],t[2]/100,t[3]/100,1):(t=$1.exec(e))?zf(t[1],t[2]/100,t[3]/100,t[4]):Ff.hasOwnProperty(e)?qf(Ff[e]):e==="transparent"?new qe(NaN,NaN,NaN,0):null}function qf(e){return new qe(e>>16&255,e>>8&255,e&255,1)}function ga(e,t,n,r){return r<=0&&(e=t=n=NaN),new qe(e,t,n,r)}function B1(e){return e instanceof na||(e=Tr(e)),e?(e=e.rgb(),new qe(e.r,e.g,e.b,e.opacity)):new qe}function Vu(e,t,n,r){return arguments.length===1?B1(e):new qe(e,t,n,r??1)}function qe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fc(qe,Vu,fm(na,{brighter(e){return e=e==null?Pa:Math.pow(Pa,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gi:Math.pow(Gi,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qe(mr(this.r),mr(this.g),mr(this.b),Fa(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:$f,formatHex:$f,formatHex8:U1,formatRgb:If,toString:If}));function $f(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}`}function U1(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}${pr((isNaN(this.opacity)?1:this.opacity)*255)}`}function If(){const e=Fa(this.opacity);return`${e===1?"rgb(":"rgba("}${mr(this.r)}, ${mr(this.g)}, ${mr(this.b)}${e===1?")":`, ${e})`}`}function Fa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pr(e){return e=mr(e),(e<16?"0":"")+e.toString(16)}function zf(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yn(e,t,n,r)}function hm(e){if(e instanceof yn)return new yn(e.h,e.s,e.l,e.opacity);if(e instanceof na||(e=Tr(e)),!e)return new yn;if(e instanceof yn)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),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(n-r)/o+(n<r)*6:n===a?s=(r-t)/o+2:s=(t-n)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new yn(s,o,l,e.opacity)}function H1(e,t,n,r){return arguments.length===1?hm(e):new yn(e,t,n,r??1)}function yn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fc(yn,H1,fm(na,{brighter(e){return e=e==null?Pa:Math.pow(Pa,e),new yn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gi:Math.pow(Gi,e),new yn(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 qe(Ms(e>=240?e-240:e+120,i,r),Ms(e,i,r),Ms(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new yn(Bf(this.h),ma(this.s),ma(this.l),Fa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Fa(this.opacity);return`${e===1?"hsl(":"hsla("}${Bf(this.h)}, ${ma(this.s)*100}%, ${ma(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Bf(e){return e=(e||0)%360,e<0?e+360:e}function ma(e){return Math.max(0,Math.min(1,e||0))}function Ms(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Nc=e=>()=>e;function G1(e,t){return function(n){return e+n*t}}function j1(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Y1(e){return(e=+e)==1?pm:function(t,n){return n-t?j1(t,n,e):Nc(isNaN(t)?n:t)}}function pm(e,t){var n=t-e;return n?G1(e,n):Nc(isNaN(e)?t:e)}const Na=(function e(t){var n=Y1(t);function r(i,a){var s=n((i=Vu(i)).r,(a=Vu(a)).r),o=n(i.g,a.g),l=n(i.b,a.b),u=pm(i.opacity,a.opacity);return function(c){return i.r=s(c),i.g=o(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r})(1);function X1(e,t){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 W1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function K1(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),s;for(s=0;s<r;++s)i[s]=ns(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(o){for(s=0;s<r;++s)a[s]=i[s](o);return a}}function V1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function mn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Z1(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ns(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Zu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,As=new RegExp(Zu.source,"g");function Q1(e){return function(){return e}}function J1(e){return function(t){return e(t)+""}}function dm(e,t){var n=Zu.lastIndex=As.lastIndex=0,r,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(r=Zu.exec(e))&&(i=As.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:mn(r,i)})),n=As.lastIndex;return n<t.length&&(a=t.slice(n),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?J1(l[0].x):Q1(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)o[(f=l[c]).i]=f.x(u);return o.join("")})}function ns(e,t){var n=typeof t,r;return t==null||n==="boolean"?Nc(t):(n==="number"?mn:n==="string"?(r=Tr(t))?(t=r,Na):dm:t instanceof Tr?Na:t instanceof Date?V1:W1(t)?X1:Array.isArray(t)?K1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Z1:mn)(e,t)}function tv(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Uf=180/Math.PI,Qu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gm(e,t,n,r,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Uf,skewX:Math.atan(l)*Uf,scaleX:s,scaleY:o}}var ya;function ev(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qu:gm(t.a,t.b,t.c,t.d,t.e,t.f)}function nv(e){return e==null||(ya||(ya=document.createElementNS("http://www.w3.org/2000/svg","g")),ya.setAttribute("transform",e),!(e=ya.transform.baseVal.consolidate()))?Qu:(e=e.matrix,gm(e.a,e.b,e.c,e.d,e.e,e.f))}function mm(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,p,g){if(u!==f||c!==h){var d=p.push("translate(",null,t,null,n);g.push({i:d-4,x:mn(u,f)},{i:d-2,x:mn(c,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function s(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:mn(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function o(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:mn(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function l(u,c,f,h,p,g){if(u!==f||c!==h){var d=p.push(i(p)+"scale(",null,",",null,")");g.push({i:d-4,x:mn(u,f)},{i:d-2,x:mn(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),o(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var g=-1,d=h.length,m;++g<d;)f[(m=h[g]).i]=m.x(p);return f.join("")}}}var rv=mm(ev,"px, ","px)","deg)"),iv=mm(nv,", ",")",")"),ni=0,Ci=0,_i=0,ym=1e3,La,ki,qa=0,Mr=0,rs=0,Yi=typeof performance=="object"&&performance.now?performance:Date,_m=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Lc(){return Mr||(_m(av),Mr=Yi.now()+rs)}function av(){Mr=0}function $a(){this._call=this._time=this._next=null}$a.prototype=vm.prototype={constructor:$a,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Lc():+n)+(t==null?0:+t),!this._next&&ki!==this&&(ki?ki._next=this:La=this,ki=this),this._call=e,this._time=n,Ju()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ju())}};function vm(e,t,n){var r=new $a;return r.restart(e,t,n),r}function sv(){Lc(),++ni;for(var e=La,t;e;)(t=Mr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ni}function Hf(){Mr=(qa=Yi.now())+rs,ni=Ci=0;try{sv()}finally{ni=0,lv(),Mr=0}}function ov(){var e=Yi.now(),t=e-qa;t>ym&&(rs-=t,qa=e)}function lv(){for(var e,t=La,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:La=n);ki=e,Ju(r)}function Ju(e){if(!ni){Ci&&(Ci=clearTimeout(Ci));var t=e-Mr;t>24?(e<1/0&&(Ci=setTimeout(Hf,e-Yi.now()-rs)),_i&&(_i=clearInterval(_i))):(_i||(qa=Yi.now(),_i=setInterval(ov,ym)),ni=1,_m(Hf))}}function Gf(e,t,n){var r=new $a;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var uv=Dc("start","end","cancel","interrupt"),cv=[],xm=0,jf=1,tc=2,Ma=3,Yf=4,ec=5,Aa=6;function is(e,t,n,r,i,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;fv(e,n,{name:t,index:r,group:i,on:uv,tween:cv,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:xm})}function qc(e,t){var n=_n(e,t);if(n.state>xm)throw new Error("too late; already scheduled");return n}function Cn(e,t){var n=_n(e,t);if(n.state>Ma)throw new Error("too late; already running");return n}function _n(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fv(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=vm(a,0,n.time);function a(u){n.state=jf,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,h,p;if(n.state!==jf)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Ma)return Gf(s);p.state===Yf?(p.state=Aa,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c<t&&(p.state=Aa,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[c])}if(Gf(function(){n.state===Ma&&(n.state=Yf,n.timer.restart(o,n.delay,n.time),o(u))}),n.state=tc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===tc){for(n.state=Ma,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function o(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=ec,1),f=-1,h=i.length;++f<h;)i[f].call(e,c);n.state===ec&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Aa,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function nc(e,t){var n=e.__transition,r,i,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){a=!1;continue}i=r.state>tc&&r.state<ec,r.state=Aa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}a&&delete e.__transition}}function hv(e){return this.each(function(){nc(this,e)})}function pv(e,t){var n,r;return function(){var i=Cn(this,e),a=i.tween;if(a!==n){r=n=a;for(var s=0,o=r.length;s<o;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function dv(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=Cn(this,e),s=a.tween;if(s!==r){i=(r=s).slice();for(var o={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=o;break}l===u&&i.push(o)}a.tween=i}}function gv(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=_n(this.node(),n).tween,i=0,a=r.length,s;i<a;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?pv:dv)(n,e,t))}function $c(e,t,n){var r=e._id;return e.each(function(){var i=Cn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return _n(i,r).value[t]}}function bm(e,t){var n;return(typeof t=="number"?mn:t instanceof Tr?Na:(n=Tr(t))?(t=n,Na):dm)(e,t)}function mv(e){return function(){this.removeAttribute(e)}}function yv(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _v(e,t,n){var r,i=n+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===r?a:a=t(r=s,n)}}function vv(e,t,n){var r,i=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?a:a=t(r=s,n)}}function xv(e,t,n){var r,i,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o)))}}function bv(e,t,n){var r,i,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o)))}}function wv(e,t){var n=es(e),r=n==="transform"?iv:bm;return this.attrTween(e,typeof t=="function"?(n.local?bv:xv)(n,r,$c(this,"attr."+e,t)):t==null?(n.local?yv:mv)(n):(n.local?vv:_v)(n,r,t))}function Sv(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Tv(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Mv(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Tv(e,a)),n}return i._value=t,i}function Av(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Sv(e,a)),n}return i._value=t,i}function Cv(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=es(e);return this.tween(n,(r.local?Mv:Av)(r,t))}function kv(e,t){return function(){qc(this,e).delay=+t.apply(this,arguments)}}function Rv(e,t){return t=+t,function(){qc(this,e).delay=t}}function Ev(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?kv:Rv)(t,e)):_n(this.node(),t).delay}function Dv(e,t){return function(){Cn(this,e).duration=+t.apply(this,arguments)}}function Ov(e,t){return t=+t,function(){Cn(this,e).duration=t}}function Pv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Dv:Ov)(t,e)):_n(this.node(),t).duration}function Fv(e,t){if(typeof t!="function")throw new Error;return function(){Cn(this,e).ease=t}}function Nv(e){var t=this._id;return arguments.length?this.each(Fv(t,e)):_n(this.node(),t).ease}function Lv(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Cn(this,e).ease=n}}function qv(e){if(typeof e!="function")throw new Error;return this.each(Lv(this._id,e))}function $v(e){typeof e!="function"&&(e=em(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=[],l,u=0;u<s;++u)(l=a[u])&&e.call(l,l.__data__,u,a)&&o.push(l);return new In(r,this._parents,this._name,this._id)}function Iv(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),s=new Array(r),o=0;o<a;++o)for(var l=t[o],u=n[o],c=l.length,f=s[o]=new Array(c),h,p=0;p<c;++p)(h=l[p]||u[p])&&(f[p]=h);for(;o<r;++o)s[o]=t[o];return new In(s,this._parents,this._name,this._id)}function zv(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Bv(e,t,n){var r,i,a=zv(t)?qc:Cn;return function(){var s=a(this,e),o=s.on;o!==r&&(i=(r=o).copy()).on(t,n),s.on=i}}function Uv(e,t){var n=this._id;return arguments.length<2?_n(this.node(),n).on.on(e):this.each(Bv(n,e,t))}function Hv(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Gv(){return this.on("end.remove",Hv(this._id))}function jv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Oc(e));for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s)for(var o=r[s],l=o.length,u=a[s]=new Array(l),c,f,h=0;h<l;++h)(c=o[h])&&(f=e.call(c,c.__data__,h,o))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,is(u[h],t,n,h,u,_n(c,n)));return new In(a,this._parents,t,n)}function Yv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=tm(e));for(var r=this._groups,i=r.length,a=[],s=[],o=0;o<i;++o)for(var l=r[o],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var h=e.call(c,c.__data__,f,l),p,g=_n(c,n),d=0,m=h.length;d<m;++d)(p=h[d])&&is(p,t,n,d,h,g);a.push(h),s.push(c)}return new In(a,s,t,n)}var Xv=hi.prototype.constructor;function Wv(){return new Xv(this._groups,this._parents)}function Kv(e,t){var n,r,i;return function(){var a=ei(this,e),s=(this.style.removeProperty(e),ei(this,e));return a===s?null:a===n&&s===r?i:i=t(n=a,r=s)}}function wm(e){return function(){this.style.removeProperty(e)}}function Vv(e,t,n){var r,i=n+"",a;return function(){var s=ei(this,e);return s===i?null:s===r?a:a=t(r=s,n)}}function Zv(e,t,n){var r,i,a;return function(){var s=ei(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),ei(this,e))),s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o))}}function Qv(e,t){var n,r,i,a="style."+t,s="end."+a,o;return function(){var l=Cn(this,e),u=l.on,c=l.value[a]==null?o||(o=wm(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(s,i=c),l.on=r}}function Jv(e,t,n){var r=(e+="")=="transform"?rv:bm;return t==null?this.styleTween(e,Kv(e,r)).on("end.style."+e,wm(e)):typeof t=="function"?this.styleTween(e,Zv(e,r,$c(this,"style."+e,t))).each(Qv(this._id,e)):this.styleTween(e,Vv(e,r,t),n).on("end.style."+e,null)}function tx(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function ex(e,t,n){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&tx(e,s,n)),r}return a._value=t,a}function nx(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,ex(e,t,n??""))}function rx(e){return function(){this.textContent=e}}function ix(e){return function(){var t=e(this);this.textContent=t??""}}function ax(e){return this.tween("text",typeof e=="function"?ix($c(this,"text",e)):rx(e==null?"":e+""))}function sx(e){return function(t){this.textContent=e.call(this,t)}}function ox(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&sx(i)),t}return r._value=e,r}function lx(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,ox(e))}function ux(){for(var e=this._name,t=this._id,n=Sm(),r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,l,u=0;u<o;++u)if(l=s[u]){var c=_n(l,t);is(l,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new In(r,this._parents,e,n)}function cx(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};n.each(function(){var u=Cn(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),u.on=t}),i===0&&a()})}var fx=0;function In(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ic(e){return hi().transition(e)}function Sm(){return++fx}var On=hi.prototype;In.prototype=Ic.prototype={constructor:In,select:jv,selectAll:Yv,selectChild:On.selectChild,selectChildren:On.selectChildren,filter:$v,merge:Iv,selection:Wv,transition:ux,call:On.call,nodes:On.nodes,node:On.node,size:On.size,empty:On.empty,each:On.each,on:Uv,attr:wv,attrTween:Cv,style:Jv,styleTween:nx,text:ax,textTween:lx,remove:Gv,tween:gv,delay:Ev,duration:Pv,ease:Nv,easeVarying:qv,end:cx,[Symbol.iterator]:On[Symbol.iterator]};function hx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var px={time:null,delay:0,duration:250,ease:hx};function dx(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function gx(e){var t,n;e instanceof In?(t=e._id,e=e._name):(t=Sm(),(n=px).time=Lc(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&is(l,e,t,u,s,n||dx(l,t));return new In(r,this._parents,e,t)}hi.prototype.interrupt=hv;hi.prototype.transition=gx;const Cs=e=>()=>e;function mx(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 yx(e){e.stopImmediatePropagation()}function ks(e){e.preventDefault(),e.stopImmediatePropagation()}var Xf={name:"drag"},Rs={name:"space"},$r={name:"handle"},Ir={name:"center"};const{abs:Wf,max:Ae,min:Ce}=Math;function Kf(e){return[+e[0],+e[1]]}function Vf(e){return[Kf(e[0]),Kf(e[1])]}var Ca={name:"x",handles:["w","e"].map(rc),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]]}},Es={},Pn={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"},Zf={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Qf={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},_x={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vx={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function rc(e){return{type:e}}function xx(e){return!e.ctrlKey&&!e.button}function bx(){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 wx(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ds(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Sx(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function ra(){return Tx(Ca)}function Tx(e){var t=bx,n=xx,r=wx,i=!0,a=Dc("start","brush","end"),s=6,o;function l(m){var v=m.property("__brush",d).selectAll(".overlay").data([rc("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Pn.overlay).merge(v).each(function(){var x=Ds(this).extent;Rt(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([rc("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Pn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=m.selectAll(".handle").data(e.handles,function(x){return x.type});y.exit().remove(),y.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return Pn[x.type]}),m.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,v,y){m.tween?m.on("start.brush",function(x){c(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){c(this,arguments).end(x)}).tween("brush",function(){var x=this,_=x.__brush,w=c(x,arguments),S=_.selection,b=e.input(typeof v=="function"?v.apply(this,arguments):v,_.extent),T=ns(S,b);function M(C){_.selection=C===1&&b===null?null:T(C),u.call(x),w.brush()}return S!==null&&b!==null?M:M(1)}):m.each(function(){var x=this,_=arguments,w=x.__brush,S=e.input(typeof v=="function"?v.apply(x,_):v,w.extent),b=c(x,_).beforestart();nc(x),w.selection=S===null?null:S,u.call(x),b.start(y).brush(y).end(y)})},l.clear=function(m,v){l.move(m,null,v)};function u(){var m=Rt(this),v=Ds(this).selection;v?(m.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?v[1][0]-s/2:v[0][0]-s/2}).attr("y",function(y){return y.type[0]==="s"?v[1][1]-s/2:v[0][1]-s/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?v[1][0]-v[0][0]+s:s}).attr("height",function(y){return y.type==="e"||y.type==="w"?v[1][1]-v[0][1]+s:s})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(m,v,y){var x=m.__brush.emitter;return x&&(!y||!x.clean)?x:new f(m,v,y)}function f(m,v,y){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=y}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,y){var x=Rt(this.that).datum();a.call(m,this.that,new mx(m,{sourceEvent:v,target:l,selection:e.output(this.state.selection),mode:y,dispatch:a}),x)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var v=this,y=m.target.__data__.type,x=(i&&m.metaKey?y="overlay":y)==="selection"?Xf:i&&m.altKey?Ir:$r,_=e===Es?null:_x[y],w=e===Ca?null:vx[y],S=Ds(v),b=S.extent,T=S.selection,M=b[0][0],C,A,D=b[0][1],k,N,I=b[1][0],P,O,H=b[1][1],X,et,at=0,tt=0,U,Q=_&&w&&i&&m.shiftKey,L,W,J=Array.from(m.touches||[m],nt=>{const ft=nt.identifier;return nt=Sr(nt,v),nt.point0=nt.slice(),nt.identifier=ft,nt});nc(v);var j=c(v,arguments,!0).beforestart();if(y==="overlay"){T&&(U=!0);const nt=[J[0],J[1]||J[0]];S.selection=T=[[C=e===Es?M:Ce(nt[0][0],nt[1][0]),k=e===Ca?D:Ce(nt[0][1],nt[1][1])],[P=e===Es?I:Ae(nt[0][0],nt[1][0]),X=e===Ca?H:Ae(nt[0][1],nt[1][1])]],J.length>1&&it(m)}else C=T[0][0],k=T[0][1],P=T[1][0],X=T[1][1];A=C,N=k,O=P,et=X;var E=Rt(v).attr("pointer-events","none"),z=E.selectAll(".overlay").attr("cursor",Pn[y]);if(m.touches)j.moved=R,j.ended=G;else{var q=Rt(m.view).on("mousemove.brush",R,!0).on("mouseup.brush",G,!0);i&&q.on("keydown.brush",K,!0).on("keyup.brush",lt,!0),E1(m.view)}u.call(v),j.start(m,x.name);function R(nt){for(const ft of nt.changedTouches||[nt])for(const At of J)At.identifier===ft.identifier&&(At.cur=Sr(ft,v));if(Q&&!L&&!W&&J.length===1){const ft=J[0];Wf(ft.cur[0]-ft[0])>Wf(ft.cur[1]-ft[1])?W=!0:L=!0}for(const ft of J)ft.cur&&(ft[0]=ft.cur[0],ft[1]=ft.cur[1]);U=!0,ks(nt),it(nt)}function it(nt){const ft=J[0],At=ft.point0;var st;switch(at=ft[0]-At[0],tt=ft[1]-At[1],x){case Rs:case Xf:{_&&(at=Ae(M-C,Ce(I-P,at)),A=C+at,O=P+at),w&&(tt=Ae(D-k,Ce(H-X,tt)),N=k+tt,et=X+tt);break}case $r:{J[1]?(_&&(A=Ae(M,Ce(I,J[0][0])),O=Ae(M,Ce(I,J[1][0])),_=1),w&&(N=Ae(D,Ce(H,J[0][1])),et=Ae(D,Ce(H,J[1][1])),w=1)):(_<0?(at=Ae(M-C,Ce(I-C,at)),A=C+at,O=P):_>0&&(at=Ae(M-P,Ce(I-P,at)),A=C,O=P+at),w<0?(tt=Ae(D-k,Ce(H-k,tt)),N=k+tt,et=X):w>0&&(tt=Ae(D-X,Ce(H-X,tt)),N=k,et=X+tt));break}case Ir:{_&&(A=Ae(M,Ce(I,C-at*_)),O=Ae(M,Ce(I,P+at*_))),w&&(N=Ae(D,Ce(H,k-tt*w)),et=Ae(D,Ce(H,X+tt*w)));break}}O<A&&(_*=-1,st=C,C=P,P=st,st=A,A=O,O=st,y in Zf&&z.attr("cursor",Pn[y=Zf[y]])),et<N&&(w*=-1,st=k,k=X,X=st,st=N,N=et,et=st,y in Qf&&z.attr("cursor",Pn[y=Qf[y]])),S.selection&&(T=S.selection),L&&(A=T[0][0],O=T[1][0]),W&&(N=T[0][1],et=T[1][1]),(T[0][0]!==A||T[0][1]!==N||T[1][0]!==O||T[1][1]!==et)&&(S.selection=[[A,N],[O,et]],u.call(v),j.brush(nt,x.name))}function G(nt){if(yx(nt),nt.touches){if(nt.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else D1(nt.view,U),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);E.attr("pointer-events","all"),z.attr("cursor",Pn.overlay),S.selection&&(T=S.selection),Sx(T)&&(S.selection=null,u.call(v)),j.end(nt,x.name)}function K(nt){switch(nt.keyCode){case 16:{Q=_&&w;break}case 18:{x===$r&&(_&&(P=O-at*_,C=A+at*_),w&&(X=et-tt*w,k=N+tt*w),x=Ir,it(nt));break}case 32:{(x===$r||x===Ir)&&(_<0?P=O-at:_>0&&(C=A-at),w<0?X=et-tt:w>0&&(k=N-tt),x=Rs,z.attr("cursor",Pn.selection),it(nt));break}default:return}ks(nt)}function lt(nt){switch(nt.keyCode){case 16:{Q&&(L=W=Q=!1,it(nt));break}case 18:{x===Ir&&(_<0?P=O:_>0&&(C=A),w<0?X=et:w>0&&(k=N),x=$r,it(nt));break}case 32:{x===Rs&&(nt.altKey?(_&&(P=O-at*_,C=A+at*_),w&&(X=et-tt*w,k=N+tt*w),x=Ir):(_<0?P=O:_>0&&(C=A),w<0?X=et:w>0&&(k=N),x=$r),z.attr("cursor",Pn[y]),it(nt));break}default:return}ks(nt)}}function p(m){c(this,arguments).moved(m)}function g(m){c(this,arguments).ended(m)}function d(){var m=this.__brush||{selection:null};return m.extent=Vf(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:Cs(Vf(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:Cs(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:Cs(!!m),l):r},l.handleSize=function(m){return arguments.length?(s=+m,l):s},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=a.on.apply(a,arguments);return m===a?l:m},l}function ka(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Mx(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zc(e){let t,n,r;e.length!==2?(t=ka,n=(o,l)=>ka(e(o),l),r=(o,l)=>e(o)-l):(t=e===ka||e===Mx?e:Ax,n=e,r=e);function i(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<0?u=f+1:c=f}while(u<c)}return u}function a(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function s(o,l,u=0,c=o.length){const f=i(o,l,u,c-1);return f>u&&r(o[f-1],l)>-r(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function Ax(){return 0}function Cx(e){return e===null?NaN:+e}const kx=zc(ka),Rx=kx.right;zc(Cx).center;const Ex=Math.sqrt(50),Dx=Math.sqrt(10),Ox=Math.sqrt(2);function Ia(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=Ex?10:a>=Dx?5:a>=Ox?2:1;let o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(e*u),l=Math.round(t*u),o/u<e&&++o,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(e/u),l=Math.round(t/u),o*u<e&&++o,l*u>t&&--l),l<o&&.5<=n&&n<2?Ia(e,t,n*2):[o,l,u]}function Px(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,s]=r?Ia(t,e,n):Ia(e,t,n);if(!(a>=i))return[];const o=a-i+1,l=new Array(o);if(r)if(s<0)for(let u=0;u<o;++u)l[u]=(a-u)/-s;else for(let u=0;u<o;++u)l[u]=(a-u)*s;else if(s<0)for(let u=0;u<o;++u)l[u]=(i+u)/-s;else for(let u=0;u<o;++u)l[u]=(i+u)*s;return l}function ic(e,t,n){return t=+t,e=+e,n=+n,Ia(e,t,n)[2]}function ac(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?ic(t,e,n):ic(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Tm(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Fx(e){return function(){return e}}function Nx(e){return+e}var Jf=[0,1];function Gr(e){return e}function sc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Fx(isNaN(t)?NaN:.5)}function Lx(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function qx(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i<r?(r=sc(i,r),a=n(s,a)):(r=sc(r,i),a=n(a,s)),function(o){return a(r(o))}}function $x(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=sc(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(o){var l=Rx(e,o,1,r)-1;return a[l](i[l](o))}}function Mm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ix(){var e=Jf,t=Jf,n=ns,r,i,a,s=Gr,o,l,u;function c(){var h=Math.min(e.length,t.length);return s!==Gr&&(s=Lx(e[0],e[h-1])),o=h>2?$x:qx,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(i((u||(u=o(t,e.map(r),mn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Nx),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=tv,c()},f.clamp=function(h){return arguments.length?(s=h?!0:Gr,c()):s!==Gr},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return r=h,i=p,c()}}function Am(){return Ix()(Gr,Gr)}function zx(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function za(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ri(e){return e=za(Math.abs(e)),e?e[1]:NaN}function Bx(e,t){return function(n,r){for(var i=n.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function Ux(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Hx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ba(e){if(!(t=Hx.exec(e)))throw new Error("invalid format: "+e);var t;return new Bc({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]})}Ba.prototype=Bc.prototype;function Bc(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+""}Bc.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 Gx(e){t: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 t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Cm;function jx(e,t){var n=za(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Cm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+za(e,Math.max(0,t+a-1))[0]}function th(e,t){var n=za(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const eh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:zx,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)=>th(e*100,t),r:th,s:jx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function nh(e){return e}var rh=Array.prototype.map,ih=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Yx(e){var t=e.grouping===void 0||e.thousands===void 0?nh:Bx(rh.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?nh:Ux(rh.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Ba(f);var h=f.fill,p=f.align,g=f.sign,d=f.symbol,m=f.zero,v=f.width,y=f.comma,x=f.precision,_=f.trim,w=f.type;w==="n"?(y=!0,w="g"):eh[w]||(x===void 0&&(x=12),_=!0,w="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var S=d==="$"?n:d==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",b=d==="$"?r:/[%p]/.test(w)?s:"",T=eh[w],M=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function C(A){var D=S,k=b,N,I,P;if(w==="c")k=T(A)+k,A="";else{A=+A;var O=A<0||1/A<0;if(A=isNaN(A)?l:T(Math.abs(A),x),_&&(A=Gx(A)),O&&+A==0&&g!=="+"&&(O=!1),D=(O?g==="("?g:o:g==="-"||g==="("?"":g)+D,k=(w==="s"?ih[8+Cm/3]:"")+k+(O&&g==="("?")":""),M){for(N=-1,I=A.length;++N<I;)if(P=A.charCodeAt(N),48>P||P>57){k=(P===46?i+A.slice(N+1):A.slice(N))+k,A=A.slice(0,N);break}}}y&&!m&&(A=t(A,1/0));var H=D.length+A.length+k.length,X=H<v?new Array(v-H+1).join(h):"";switch(y&&m&&(A=t(X+A,X.length?v-k.length:1/0),X=""),p){case"<":A=D+A+k+X;break;case"=":A=D+X+A+k;break;case"^":A=X.slice(0,H=X.length>>1)+D+A+k+X.slice(H);break;default:A=X+D+A+k;break}return a(A)}return C.toString=function(){return f+""},C}function c(f,h){var p=u((f=Ba(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(ri(h)/3)))*3,d=Math.pow(10,-g),m=ih[8+g/3];return function(v){return p(d*v)+m}}return{format:u,formatPrefix:c}}var _a,km,Rm;Xx({thousands:",",grouping:[3],currency:["$",""]});function Xx(e){return _a=Yx(e),km=_a.format,Rm=_a.formatPrefix,_a}function Wx(e){return Math.max(0,-ri(Math.abs(e)))}function Kx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ri(t)/3)))*3-ri(Math.abs(e)))}function Vx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ri(t)-ri(e))+1}function Zx(e,t,n,r){var i=ac(e,t,n),a;switch(r=Ba(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Kx(i,s))&&(r.precision=a),Rm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Vx(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Wx(i))&&(r.precision=a-(r.type==="%")*2);break}}return km(r)}function Qx(e){var t=e.domain;return e.ticks=function(n){var r=t();return Px(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Zx(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,s=r[i],o=r[a],l,u,c=10;for(o<s&&(u=s,s=o,o=u,u=i,i=a,a=u);c-- >0;){if(u=ic(s,o,n),u===l)return r[i]=s,r[a]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function Xi(){var e=Am();return e.copy=function(){return Mm(e,Xi())},Tm.apply(e,arguments),Qx(e)}function Jx(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),e[n]=t.floor(i),e[r]=t.ceil(a),e}const Os=new Date,Ps=new Date;function pe(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let u;do l.push(u=new Date(+a)),t(a,o),e(a);while(u<a&&a<s);return l},i.filter=a=>pe(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(Os.setTime(+a),Ps.setTime(+s),e(Os),e(Ps),Math.floor(n(Os,Ps))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ua=pe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ua.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?pe(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ua);Ua.range;const qn=1e3,on=qn*60,$n=on*60,zn=$n*24,Uc=zn*7,ah=zn*30,Fs=zn*365,jr=pe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qn)},(e,t)=>(t-e)/qn,e=>e.getUTCSeconds());jr.range;const Hc=pe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qn)},(e,t)=>{e.setTime(+e+t*on)},(e,t)=>(t-e)/on,e=>e.getMinutes());Hc.range;const tb=pe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*on)},(e,t)=>(t-e)/on,e=>e.getUTCMinutes());tb.range;const Gc=pe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qn-e.getMinutes()*on)},(e,t)=>{e.setTime(+e+t*$n)},(e,t)=>(t-e)/$n,e=>e.getHours());Gc.range;const eb=pe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*$n)},(e,t)=>(t-e)/$n,e=>e.getUTCHours());eb.range;const ia=pe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*on)/zn,e=>e.getDate()-1);ia.range;const jc=pe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zn,e=>e.getUTCDate()-1);jc.range;const nb=pe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zn,e=>Math.floor(e/zn));nb.range;function kr(e){return pe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*on)/Uc)}const as=kr(0),Ha=kr(1),rb=kr(2),ib=kr(3),ii=kr(4),ab=kr(5),sb=kr(6);as.range;Ha.range;rb.range;ib.range;ii.range;ab.range;sb.range;function Rr(e){return pe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Uc)}const Em=Rr(0),Ga=Rr(1),ob=Rr(2),lb=Rr(3),ai=Rr(4),ub=Rr(5),cb=Rr(6);Em.range;Ga.range;ob.range;lb.range;ai.range;ub.range;cb.range;const Yc=pe(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());Yc.range;const fb=pe(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());fb.range;const Bn=pe(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());Bn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pe(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)});Bn.range;const Ar=pe(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());Ar.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pe(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)});Ar.range;function hb(e,t,n,r,i,a){const s=[[jr,1,qn],[jr,5,5*qn],[jr,15,15*qn],[jr,30,30*qn],[a,1,on],[a,5,5*on],[a,15,15*on],[a,30,30*on],[i,1,$n],[i,3,3*$n],[i,6,6*$n],[i,12,12*$n],[r,1,zn],[r,2,2*zn],[n,1,Uc],[t,1,ah],[t,3,3*ah],[e,1,Fs]];function o(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),g=p?p.range(u,+c+1):[];return h?g.reverse():g}function l(u,c,f){const h=Math.abs(c-u)/f,p=zc(([,,m])=>m).right(s,h);if(p===s.length)return e.every(ac(u/Fs,c/Fs,f));if(p===0)return Ua.every(Math.max(ac(u,c,f),1));const[g,d]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(d)}return[o,l]}const[pb,db]=hb(Bn,Yc,as,ia,Gc,Hc);function Ns(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 Ls(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 vi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function gb(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=xi(i),c=bi(i),f=xi(a),h=bi(a),p=xi(s),g=bi(s),d=xi(o),m=bi(o),v=xi(l),y=bi(l),x={a:O,A:H,b:X,B:et,c:null,d:fh,e:fh,f:$b,g:Wb,G:Vb,H:Nb,I:Lb,j:qb,L:Dm,m:Ib,M:zb,p:at,q:tt,Q:dh,s:gh,S:Bb,u:Ub,U:Hb,V:Gb,w:jb,W:Yb,x:null,X:null,y:Xb,Y:Kb,Z:Zb,"%":ph},_={a:U,A:Q,b:L,B:W,c:null,d:hh,e:hh,f:ew,g:fw,G:pw,H:Qb,I:Jb,j:tw,L:Pm,m:nw,M:rw,p:J,q:j,Q:dh,s:gh,S:iw,u:aw,U:sw,V:ow,w:lw,W:uw,x:null,X:null,y:cw,Y:hw,Z:dw,"%":ph},w={a:C,A,b:D,B:k,c:N,d:uh,e:uh,f:Db,g:lh,G:oh,H:ch,I:ch,j:Cb,L:Eb,m:Ab,M:kb,p:M,q:Mb,Q:Pb,s:Fb,S:Rb,u:xb,U:bb,V:wb,w:vb,W:Sb,x:I,X:P,y:lh,Y:oh,Z:Tb,"%":Ob};x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),_.x=S(n,_),_.X=S(r,_),_.c=S(t,_);function S(E,z){return function(q){var R=[],it=-1,G=0,K=E.length,lt,nt,ft;for(q instanceof Date||(q=new Date(+q));++it<K;)E.charCodeAt(it)===37&&(R.push(E.slice(G,it)),(nt=sh[lt=E.charAt(++it)])!=null?lt=E.charAt(++it):nt=lt==="e"?" ":"0",(ft=z[lt])&&(lt=ft(q,nt)),R.push(lt),G=it+1);return R.push(E.slice(G,it)),R.join("")}}function b(E,z){return function(q){var R=vi(1900,void 0,1),it=T(R,E,q+="",0),G,K;if(it!=q.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(z&&!("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?(G=Ls(vi(R.y,0,1)),K=G.getUTCDay(),G=K>4||K===0?Ga.ceil(G):Ga(G),G=jc.offset(G,(R.V-1)*7),R.y=G.getUTCFullYear(),R.m=G.getUTCMonth(),R.d=G.getUTCDate()+(R.w+6)%7):(G=Ns(vi(R.y,0,1)),K=G.getDay(),G=K>4||K===0?Ha.ceil(G):Ha(G),G=ia.offset(G,(R.V-1)*7),R.y=G.getFullYear(),R.m=G.getMonth(),R.d=G.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?1:0),K="Z"in R?Ls(vi(R.y,0,1)).getUTCDay():Ns(vi(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(K+5)%7:R.w+R.U*7-(K+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Ls(R)):Ns(R)}}function T(E,z,q,R){for(var it=0,G=z.length,K=q.length,lt,nt;it<G;){if(R>=K)return-1;if(lt=z.charCodeAt(it++),lt===37){if(lt=z.charAt(it++),nt=w[lt in sh?z.charAt(it++):lt],!nt||(R=nt(E,q,R))<0)return-1}else if(lt!=q.charCodeAt(R++))return-1}return R}function M(E,z,q){var R=u.exec(z.slice(q));return R?(E.p=c.get(R[0].toLowerCase()),q+R[0].length):-1}function C(E,z,q){var R=p.exec(z.slice(q));return R?(E.w=g.get(R[0].toLowerCase()),q+R[0].length):-1}function A(E,z,q){var R=f.exec(z.slice(q));return R?(E.w=h.get(R[0].toLowerCase()),q+R[0].length):-1}function D(E,z,q){var R=v.exec(z.slice(q));return R?(E.m=y.get(R[0].toLowerCase()),q+R[0].length):-1}function k(E,z,q){var R=d.exec(z.slice(q));return R?(E.m=m.get(R[0].toLowerCase()),q+R[0].length):-1}function N(E,z,q){return T(E,t,z,q)}function I(E,z,q){return T(E,n,z,q)}function P(E,z,q){return T(E,r,z,q)}function O(E){return s[E.getDay()]}function H(E){return a[E.getDay()]}function X(E){return l[E.getMonth()]}function et(E){return o[E.getMonth()]}function at(E){return i[+(E.getHours()>=12)]}function tt(E){return 1+~~(E.getMonth()/3)}function U(E){return s[E.getUTCDay()]}function Q(E){return a[E.getUTCDay()]}function L(E){return l[E.getUTCMonth()]}function W(E){return o[E.getUTCMonth()]}function J(E){return i[+(E.getUTCHours()>=12)]}function j(E){return 1+~~(E.getUTCMonth()/3)}return{format:function(E){var z=S(E+="",x);return z.toString=function(){return E},z},parse:function(E){var z=b(E+="",!1);return z.toString=function(){return E},z},utcFormat:function(E){var z=S(E+="",_);return z.toString=function(){return E},z},utcParse:function(E){var z=b(E+="",!0);return z.toString=function(){return E},z}}}var sh={"-":"",_:" ",0:"0"},_e=/^\s*\d+/,mb=/^%/,yb=/[\\^$*+?|[\]().{}]/g;function Tt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function _b(e){return e.replace(yb,"\\$&")}function xi(e){return new RegExp("^(?:"+e.map(_b).join("|")+")","i")}function bi(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function vb(e,t,n){var r=_e.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function xb(e,t,n){var r=_e.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bb(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function wb(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Sb(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function oh(e,t,n){var r=_e.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function lh(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Tb(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 Mb(e,t,n){var r=_e.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ab(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function uh(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Cb(e,t,n){var r=_e.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ch(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function kb(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Rb(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Eb(e,t,n){var r=_e.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Db(e,t,n){var r=_e.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ob(e,t,n){var r=mb.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Pb(e,t,n){var r=_e.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Fb(e,t,n){var r=_e.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function fh(e,t){return Tt(e.getDate(),t,2)}function Nb(e,t){return Tt(e.getHours(),t,2)}function Lb(e,t){return Tt(e.getHours()%12||12,t,2)}function qb(e,t){return Tt(1+ia.count(Bn(e),e),t,3)}function Dm(e,t){return Tt(e.getMilliseconds(),t,3)}function $b(e,t){return Dm(e,t)+"000"}function Ib(e,t){return Tt(e.getMonth()+1,t,2)}function zb(e,t){return Tt(e.getMinutes(),t,2)}function Bb(e,t){return Tt(e.getSeconds(),t,2)}function Ub(e){var t=e.getDay();return t===0?7:t}function Hb(e,t){return Tt(as.count(Bn(e)-1,e),t,2)}function Om(e){var t=e.getDay();return t>=4||t===0?ii(e):ii.ceil(e)}function Gb(e,t){return e=Om(e),Tt(ii.count(Bn(e),e)+(Bn(e).getDay()===4),t,2)}function jb(e){return e.getDay()}function Yb(e,t){return Tt(Ha.count(Bn(e)-1,e),t,2)}function Xb(e,t){return Tt(e.getFullYear()%100,t,2)}function Wb(e,t){return e=Om(e),Tt(e.getFullYear()%100,t,2)}function Kb(e,t){return Tt(e.getFullYear()%1e4,t,4)}function Vb(e,t){var n=e.getDay();return e=n>=4||n===0?ii(e):ii.ceil(e),Tt(e.getFullYear()%1e4,t,4)}function Zb(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tt(t/60|0,"0",2)+Tt(t%60,"0",2)}function hh(e,t){return Tt(e.getUTCDate(),t,2)}function Qb(e,t){return Tt(e.getUTCHours(),t,2)}function Jb(e,t){return Tt(e.getUTCHours()%12||12,t,2)}function tw(e,t){return Tt(1+jc.count(Ar(e),e),t,3)}function Pm(e,t){return Tt(e.getUTCMilliseconds(),t,3)}function ew(e,t){return Pm(e,t)+"000"}function nw(e,t){return Tt(e.getUTCMonth()+1,t,2)}function rw(e,t){return Tt(e.getUTCMinutes(),t,2)}function iw(e,t){return Tt(e.getUTCSeconds(),t,2)}function aw(e){var t=e.getUTCDay();return t===0?7:t}function sw(e,t){return Tt(Em.count(Ar(e)-1,e),t,2)}function Fm(e){var t=e.getUTCDay();return t>=4||t===0?ai(e):ai.ceil(e)}function ow(e,t){return e=Fm(e),Tt(ai.count(Ar(e),e)+(Ar(e).getUTCDay()===4),t,2)}function lw(e){return e.getUTCDay()}function uw(e,t){return Tt(Ga.count(Ar(e)-1,e),t,2)}function cw(e,t){return Tt(e.getUTCFullYear()%100,t,2)}function fw(e,t){return e=Fm(e),Tt(e.getUTCFullYear()%100,t,2)}function hw(e,t){return Tt(e.getUTCFullYear()%1e4,t,4)}function pw(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ai(e):ai.ceil(e),Tt(e.getUTCFullYear()%1e4,t,4)}function dw(){return"+0000"}function ph(){return"%"}function dh(e){return+e}function gh(e){return Math.floor(+e/1e3)}var zr,Nm;gw({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 gw(e){return zr=gb(e),Nm=zr.format,zr.parse,zr.utcFormat,zr.utcParse,zr}function mw(e){return new Date(e)}function yw(e){return e instanceof Date?+e:+new Date(+e)}function Lm(e,t,n,r,i,a,s,o,l,u){var c=Am(),f=c.invert,h=c.domain,p=u(".%L"),g=u(":%S"),d=u("%I:%M"),m=u("%I %p"),v=u("%a %d"),y=u("%b %d"),x=u("%B"),_=u("%Y");function w(S){return(l(S)<S?p:o(S)<S?g:s(S)<S?d:a(S)<S?m:r(S)<S?i(S)<S?v:y:n(S)<S?x:_)(S)}return c.invert=function(S){return new Date(f(S))},c.domain=function(S){return arguments.length?h(Array.from(S,yw)):h().map(mw)},c.ticks=function(S){var b=h();return e(b[0],b[b.length-1],S??10)},c.tickFormat=function(S,b){return b==null?w:u(b)},c.nice=function(S){var b=h();return(!S||typeof S.range!="function")&&(S=t(b[0],b[b.length-1],S??10)),S?h(Jx(b,S)):c},c.copy=function(){return Mm(c,Lm(e,t,n,r,i,a,s,o,l,u))},c}function Pi(){return Tm.apply(Lm(pb,db,Bn,Yc,as,ia,Gc,Hc,jr,Nm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Kt(e){return function(){return e}}const oc=Math.PI,lc=2*oc,fr=1e-6,_w=lc-fr;function qm(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function vw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qm;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class xw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qm:vw(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=r-t,u=i-n,c=s-t,f=o-n,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>fr)if(!(Math.abs(f*l-u*c)>fr)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,g=i-o,d=l*l+u*u,m=p*p+g*g,v=Math.sqrt(d),y=Math.sqrt(h),x=a*Math.tan((oc-Math.acos((d+h-m)/(2*v*y)))/2),_=x/y,w=x/v;Math.abs(_-1)>fr&&this._append`L${t+_*c},${n+_*f}`,this._append`A${a},${a},0,0,${+(f*p>c*g)},${this._x1=t+w*l},${this._y1=n+w*u}`}}arc(t,n,r,i,a,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),u=t+o,c=n+l,f=1^s,h=s?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>fr||Math.abs(this._y1-c)>fr)&&this._append`L${u},${c}`,r&&(h<0&&(h=h%lc+lc),h>_w?this._append`A${r},${r},0,1,${f},${t-o},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:h>fr&&this._append`A${r},${r},0,${+(h>=oc)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function $m(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new xw(t)}function Xc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Im(e){this._context=e}Im.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 Cr(e){return new Im(e)}function zm(e){return e[0]}function Bm(e){return e[1]}function Um(e,t){var n=Kt(!0),r=null,i=Cr,a=null,s=$m(o);e=typeof e=="function"?e:e===void 0?zm:Kt(e),t=typeof t=="function"?t:t===void 0?Bm:Kt(t);function o(l){var u,c=(l=Xc(l)).length,f,h=!1,p;for(r==null&&(a=i(p=s())),u=0;u<=c;++u)!(u<c&&n(f=l[u],u,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,u,l),+t(f,u,l));if(p)return a=null,p+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Kt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Kt(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Kt(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),o):r},o}function ss(e,t,n){var r=null,i=Kt(!0),a=null,s=Cr,o=null,l=$m(u);e=typeof e=="function"?e:e===void 0?zm:Kt(+e),t=typeof t=="function"?t:Kt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Bm:Kt(+n);function u(f){var h,p,g,d=(f=Xc(f)).length,m,v=!1,y,x=new Array(d),_=new Array(d);for(a==null&&(o=s(y=l())),h=0;h<=d;++h){if(!(h<d&&i(m=f[h],h,f))===v)if(v=!v)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),g=h-1;g>=p;--g)o.point(x[g],_[g]);o.lineEnd(),o.areaEnd()}v&&(x[h]=+e(m,h,f),_[h]=+t(m,h,f),o.point(r?+r(m,h,f):x[h],n?+n(m,h,f):_[h]))}if(y)return o=null,y+""||null}function c(){return Um().defined(i).curve(s).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Kt(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Kt(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Kt(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Kt(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Kt(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Kt(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Kt(!!f),u):i},u.curve=function(f){return arguments.length?(s=f,a!=null&&(o=s(a)),u):s},u.context=function(f){return arguments.length?(f==null?a=o=null:o=s(a=f),u):a},u}function mh(e,t){if((s=e.length)>1)for(var n=1,r,i,a=e[t[0]],s,o=a.length;n<s;++n)for(i=a,a=e[t[n]],r=0;r<o;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function yh(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bw(e,t){return e[t]}function ww(e){const t=[];return t.key=e,t}function ja(){var e=Kt([]),t=yh,n=mh,r=bw;function i(a){var s=Array.from(e.apply(this,arguments),ww),o,l=s.length,u=-1,c;for(const f of a)for(o=0,++u;o<l;++o)(s[o][u]=[0,+r(f,s[o].key,u,a)]).data=f;for(o=0,c=Xc(t(s));o<l;++o)s[c[o]].index=o;return n(s,c),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Kt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Kt(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?yh:typeof a=="function"?a:Kt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??mh,i):n},i}function Nn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}/*!
|
|
2
|
+
* GSAP 3.14.2
|
|
3
|
+
* https://gsap.com
|
|
4
|
+
*
|
|
5
|
+
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
6
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
7
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
8
|
+
*/var Je={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},si={duration:.5,overwrite:!1,delay:0},Wc,Se,zt,ln=1e8,Ot=1/ln,uc=Math.PI*2,Sw=uc/4,Tw=0,Gm=Math.sqrt,Mw=Math.cos,Aw=Math.sin,ye=function(t){return typeof t=="string"},Vt=function(t){return typeof t=="function"},Un=function(t){return typeof t=="number"},Kc=function(t){return typeof t>"u"},An=function(t){return typeof t=="object"},Ie=function(t){return t!==!1},Vc=function(){return typeof window<"u"},va=function(t){return Vt(t)||ye(t)},jm=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Ee=Array.isArray,Cw=/random\([^)]+\)/g,kw=/,\s*/g,_h=/(?:-?\.?\d|\.)+/gi,Ym=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Yr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,qs=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Xm=/[+-]=-?[.\d]+/,Rw=/[^,'"\[\]\s]+/gi,Ew=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Yt,wn,cc,Zc,en={},Ya={},Wm,Km=function(t){return(Ya=oi(t,en))&&He},Qc=function(t,n){return console.warn("Invalid property",t,"set to",n,"Missing plugin? gsap.registerPlugin()")},Wi=function(t,n){return!n&&console.warn(t)},Vm=function(t,n){return t&&(en[t]=n)&&Ya&&(Ya[t]=n)||en},Ki=function(){return 0},Dw={suppressEvents:!0,isStart:!0,kill:!1},Ra={suppressEvents:!0,kill:!1},Ow={suppressEvents:!0},Jc={},Qn=[],fc={},Zm,Ke={},$s={},vh=30,Ea=[],tf="",ef=function(t){var n=t[0],r,i;if(An(n)||Vt(n)||(t=[t]),!(r=(n._gsap||{}).harness)){for(i=Ea.length;i--&&!Ea[i].targetTest(n););r=Ea[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new b0(t[i],r)))||t.splice(i,1);return t},yr=function(t){return t._gsap||ef(un(t))[0]._gsap},Qm=function(t,n,r){return(r=t[n])&&Vt(r)?t[n]():Kc(r)&&t.getAttribute&&t.getAttribute(n)||r},ze=function(t,n){return(t=t.split(",")).forEach(n)||t},re=function(t){return Math.round(t*1e5)/1e5||0},jt=function(t){return Math.round(t*1e7)/1e7||0},Kr=function(t,n){var r=n.charAt(0),i=parseFloat(n.substr(2));return t=parseFloat(t),r==="+"?t+i:r==="-"?t-i:r==="*"?t*i:t/i},Pw=function(t,n){for(var r=n.length,i=0;t.indexOf(n[i])<0&&++i<r;);return i<r},Xa=function(){var t=Qn.length,n=Qn.slice(0),r,i;for(fc={},Qn.length=0,r=0;r<t;r++)i=n[r],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},nf=function(t){return!!(t._initted||t._startAt||t.add)},Jm=function(t,n,r,i){Qn.length&&!Se&&Xa(),t.render(n,r,!!(Se&&n<0&&nf(t))),Qn.length&&!Se&&Xa()},t0=function(t){var n=parseFloat(t);return(n||n===0)&&(t+"").match(Rw).length<2?n:ye(t)?t.trim():t},e0=function(t){return t},nn=function(t,n){for(var r in n)r in t||(t[r]=n[r]);return t},Fw=function(t){return function(n,r){for(var i in r)i in n||i==="duration"&&t||i==="ease"||(n[i]=r[i])}},oi=function(t,n){for(var r in n)t[r]=n[r];return t},xh=function e(t,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(t[r]=An(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},Wa=function(t,n){var r={},i;for(i in t)i in n||(r[i]=t[i]);return r},Fi=function(t){var n=t.parent||Yt,r=t.keyframes?Fw(Ee(t.keyframes)):nn;if(Ie(t.inherit))for(;n;)r(t,n.vars.defaults),n=n.parent||n._dp;return t},Nw=function(t,n){for(var r=t.length,i=r===n.length;i&&r--&&t[r]===n[r];);return r<0},n0=function(t,n,r,i,a){var s=t[i],o;if(a)for(o=n[a];s&&s[a]>o;)s=s._prev;return s?(n._next=s._next,s._next=n):(n._next=t[r],t[r]=n),n._next?n._next._prev=n:t[i]=n,n._prev=s,n.parent=n._dp=t,n},os=function(t,n,r,i){r===void 0&&(r="_first"),i===void 0&&(i="_last");var a=n._prev,s=n._next;a?a._next=s:t[r]===n&&(t[r]=s),s?s._prev=a:t[i]===n&&(t[i]=a),n._next=n._prev=n.parent=null},tr=function(t,n){t.parent&&(!n||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},_r=function(t,n){if(t&&(!n||n._end>t._dur||n._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},Lw=function(t){for(var n=t.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return t},hc=function(t,n,r,i){return t._startAt&&(Se?t._startAt.revert(Ra):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(n,!0,i))},qw=function e(t){return!t||t._ts&&e(t.parent)},bh=function(t){return t._repeat?li(t._tTime,t=t.duration()+t._rDelay)*t:0},li=function(t,n){var r=Math.floor(t=jt(t/n));return t&&r===t?r-1:r},Ka=function(t,n){return(t-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},ls=function(t){return t._end=jt(t._start+(t._tDur/Math.abs(t._ts||t._rts||Ot)||0))},us=function(t,n){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=jt(r._time-(t._ts>0?n/t._ts:((t._dirty?t.totalDuration():t._tDur)-n)/-t._ts)),ls(t),r._dirty||_r(r,t)),t},r0=function(t,n){var r;if((n._time||!n._dur&&n._initted||n._start<t._time&&(n._dur||!n.add))&&(r=Ka(t.rawTime(),n),(!n._dur||aa(0,n.totalDuration(),r)-n._tTime>Ot)&&n.render(r,!0)),_r(t,n)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-Ot}},Sn=function(t,n,r,i){return n.parent&&tr(n),n._start=jt((Un(r)?r:r||t!==Yt?sn(t,r,n):t._time)+n._delay),n._end=jt(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),n0(t,n,"_first","_last",t._sort?"_start":0),pc(n)||(t._recent=n),i||r0(t,n),t._ts<0&&us(t,t._tTime),t},i0=function(t,n){return(en.ScrollTrigger||Qc("scrollTrigger",n))&&en.ScrollTrigger.create(n,t)},a0=function(t,n,r,i,a){if(af(t,n,a),!t._initted)return 1;if(!r&&t._pt&&!Se&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Zm!==Ve.frame)return Qn.push(t),t._lazy=[a,i],1},$w=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},pc=function(t){var n=t.data;return n==="isFromStart"||n==="isStart"},Iw=function(t,n,r,i){var a=t.ratio,s=n<0||!n&&(!t._start&&$w(t)&&!(!t._initted&&pc(t))||(t._ts<0||t._dp._ts<0)&&!pc(t))?0:1,o=t._rDelay,l=0,u,c,f;if(o&&t._repeat&&(l=aa(0,t._tDur,n),c=li(l,o),t._yoyo&&c&1&&(s=1-s),c!==li(t._tTime,o)&&(a=1-s,t.vars.repeatRefresh&&t._initted&&t.invalidate())),s!==a||Se||i||t._zTime===Ot||!n&&t._zTime){if(!t._initted&&a0(t,n,i,r,l))return;for(f=t._zTime,t._zTime=n||(r?Ot:0),r||(r=n&&!f),t.ratio=s,t._from&&(s=1-s),t._time=0,t._tTime=l,u=t._pt;u;)u.r(s,u.d),u=u._next;n<0&&hc(t,n,r,!0),t._onUpdate&&!r&&Ze(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&Ze(t,"onRepeat"),(n>=t._tDur||n<0)&&t.ratio===s&&(s&&tr(t,1),!r&&!Se&&(Ze(t,s?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=n)},zw=function(t,n,r){var i;if(r>n)for(i=t._first;i&&i._start<=r;){if(i.data==="isPause"&&i._start>n)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if(i.data==="isPause"&&i._start<n)return i;i=i._prev}},ui=function(t,n,r,i){var a=t._repeat,s=jt(n)||0,o=t._tTime/t._tDur;return o&&!i&&(t._time*=s/t._dur),t._dur=s,t._tDur=a?a<0?1e10:jt(s*(a+1)+t._rDelay*a):s,o>0&&!i&&us(t,t._tTime=t._tDur*o),t.parent&&ls(t),r||_r(t.parent,t),t},wh=function(t){return t instanceof Oe?_r(t):ui(t,t._dur)},Bw={_start:0,endTime:Ki,totalDuration:Ki},sn=function e(t,n,r){var i=t.labels,a=t._recent||Bw,s=t.duration()>=ln?a.endTime(!1):t._dur,o,l,u;return ye(n)&&(isNaN(n)||n in i)?(l=n.charAt(0),u=n.substr(-1)==="%",o=n.indexOf("="),l==="<"||l===">"?(o>=0&&(n=n.replace(/=/,"")),(l==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(u?(o<0?a:r).totalDuration()/100:1)):o<0?(n in i||(i[n]=s),i[n]):(l=parseFloat(n.charAt(o-1)+n.substr(o+1)),u&&r&&(l=l/100*(Ee(r)?r[0]:r).totalDuration()),o>1?e(t,n.substr(0,o-1),r)+l:s+l)):n==null?s:+n},Ni=function(t,n,r){var i=Un(n[1]),a=(i?2:1)+(t<2?0:1),s=n[a],o,l;if(i&&(s.duration=n[1]),s.parent=r,t){for(o=s,l=r;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=Ie(l.vars.inherit)&&l.parent;s.immediateRender=Ie(o.immediateRender),t<2?s.runBackwards=1:s.startAt=n[a-1]}return new oe(n[0],s,n[a+1])},rr=function(t,n){return t||t===0?n(t):n},aa=function(t,n,r){return r<t?t:r>n?n:r},Re=function(t,n){return!ye(t)||!(n=Ew.exec(t))?"":n[1]},Uw=function(t,n,r){return rr(r,function(i){return aa(t,n,i)})},dc=[].slice,s0=function(t,n){return t&&An(t)&&"length"in t&&(!n&&!t.length||t.length-1 in t&&An(t[0]))&&!t.nodeType&&t!==wn},Hw=function(t,n,r){return r===void 0&&(r=[]),t.forEach(function(i){var a;return ye(i)&&!n||s0(i,1)?(a=r).push.apply(a,un(i)):r.push(i)})||r},un=function(t,n,r){return zt&&!n&&zt.selector?zt.selector(t):ye(t)&&!r&&(cc||!ci())?dc.call((n||Zc).querySelectorAll(t),0):Ee(t)?Hw(t,r):s0(t)?dc.call(t,0):t?[t]:[]},gc=function(t){return t=un(t)[0]||Wi("Invalid scope")||{},function(n){var r=t.current||t.nativeElement||t;return un(n,r.querySelectorAll?r:r===t?Wi("Invalid scope")||Zc.createElement("div"):t)}},o0=function(t){return t.sort(function(){return .5-Math.random()})},l0=function(t){if(Vt(t))return t;var n=An(t)?t:{each:t},r=vr(n.ease),i=n.from||0,a=parseFloat(n.base)||0,s={},o=i>0&&i<1,l=isNaN(i)||o,u=n.axis,c=i,f=i;return ye(i)?c=f={center:.5,edges:.5,end:1}[i]||0:!o&&l&&(c=i[0],f=i[1]),function(h,p,g){var d=(g||n).length,m=s[d],v,y,x,_,w,S,b,T,M;if(!m){if(M=n.grid==="auto"?0:(n.grid||[1,ln])[1],!M){for(b=-ln;b<(b=g[M++].getBoundingClientRect().left)&&M<d;);M<d&&M--}for(m=s[d]=[],v=l?Math.min(M,d)*c-.5:i%M,y=M===ln?0:l?d*f/M-.5:i/M|0,b=0,T=ln,S=0;S<d;S++)x=S%M-v,_=y-(S/M|0),m[S]=w=u?Math.abs(u==="y"?_:x):Gm(x*x+_*_),w>b&&(b=w),w<T&&(T=w);i==="random"&&o0(m),m.max=b-T,m.min=T,m.v=d=(parseFloat(n.amount)||parseFloat(n.each)*(M>d?d-1:u?u==="y"?d/M:M:Math.max(M,d/M))||0)*(i==="edges"?-1:1),m.b=d<0?a-d:a,m.u=Re(n.amount||n.each)||0,r=r&&d<0?_0(r):r}return d=(m[h]-m.min)/m.max||0,jt(m.b+(r?r(d):d)*m.v)+m.u}},mc=function(t){var n=Math.pow(10,((t+"").split(".")[1]||"").length);return function(r){var i=jt(Math.round(parseFloat(r)/t)*t*n);return(i-i%1)/n+(Un(r)?0:Re(r))}},u0=function(t,n){var r=Ee(t),i,a;return!r&&An(t)&&(i=r=t.radius||ln,t.values?(t=un(t.values),(a=!Un(t[0]))&&(i*=i)):t=mc(t.increment)),rr(n,r?Vt(t)?function(s){return a=t(s),Math.abs(a-s)<=i?a:s}:function(s){for(var o=parseFloat(a?s.x:s),l=parseFloat(a?s.y:0),u=ln,c=0,f=t.length,h,p;f--;)a?(h=t[f].x-o,p=t[f].y-l,h=h*h+p*p):h=Math.abs(t[f]-o),h<u&&(u=h,c=f);return c=!i||u<=i?t[c]:s,a||c===s||Un(s)?c:c+Re(s)}:mc(t))},c0=function(t,n,r,i){return rr(Ee(t)?!n:r===!0?!!(r=0):!i,function(){return Ee(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(n-t+r*.99))/r)*r*i)/i})},Gw=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduce(function(a,s){return s(a)},i)}},jw=function(t,n){return function(r){return t(parseFloat(r))+(n||Re(r))}},Yw=function(t,n,r){return h0(t,n,0,1,r)},f0=function(t,n,r){return rr(r,function(i){return t[~~n(i)]})},Xw=function e(t,n,r){var i=n-t;return Ee(t)?f0(t,e(0,t.length),n):rr(r,function(a){return(i+(a-t)%i)%i+t})},Ww=function e(t,n,r){var i=n-t,a=i*2;return Ee(t)?f0(t,e(0,t.length-1),n):rr(r,function(s){return s=(a+(s-t)%a)%a||0,t+(s>i?a-s:s)})},Vi=function(t){return t.replace(Cw,function(n){var r=n.indexOf("[")+1,i=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(kw);return c0(r?i:+i[0],r?0:+i[1],+i[2]||1e-5)})},h0=function(t,n,r,i,a){var s=n-t,o=i-r;return rr(a,function(l){return r+((l-t)/s*o||0)})},Kw=function e(t,n,r,i){var a=isNaN(t+n)?0:function(p){return(1-p)*t+p*n};if(!a){var s=ye(t),o={},l,u,c,f,h;if(r===!0&&(i=1)&&(r=null),s)t={p:t},n={p:n};else if(Ee(t)&&!Ee(n)){for(c=[],f=t.length,h=f-2,u=1;u<f;u++)c.push(e(t[u-1],t[u]));f--,a=function(g){g*=f;var d=Math.min(h,~~g);return c[d](g-d)},r=n}else i||(t=oi(Ee(t)?[]:{},t));if(!c){for(l in n)rf.call(o,t,l,"get",n[l]);a=function(g){return lf(g,o)||(s?t.p:t)}}}return rr(r,a)},Sh=function(t,n,r){var i=t.labels,a=ln,s,o,l;for(s in i)o=i[s]-n,o<0==!!r&&o&&a>(o=Math.abs(o))&&(l=s,a=o);return l},Ze=function(t,n,r){var i=t.vars,a=i[n],s=zt,o=t._ctx,l,u,c;if(a)return l=i[n+"Params"],u=i.callbackScope||t,r&&Qn.length&&Xa(),o&&(zt=o),c=l?a.apply(u,l):a.call(u),zt=s,c},Ri=function(t){return tr(t),t.scrollTrigger&&t.scrollTrigger.kill(!!Se),t.progress()<1&&Ze(t,"onInterrupt"),t},Xr,p0=[],d0=function(t){if(t)if(t=!t.name&&t.default||t,Vc()||t.headless){var n=t.name,r=Vt(t),i=n&&!r&&t.init?function(){this._props=[]}:t,a={init:Ki,render:lf,add:rf,kill:fS,modifier:cS,rawVars:0},s={targetTest:0,get:0,getSetter:of,aliases:{},register:0};if(ci(),t!==i){if(Ke[n])return;nn(i,nn(Wa(t,a),s)),oi(i.prototype,oi(a,Wa(t,s))),Ke[i.prop=n]=i,t.targetTest&&(Ea.push(i),Jc[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}Vm(n,i),t.register&&t.register(He,i,Be)}else p0.push(t)},Dt=255,Ei={aqua:[0,Dt,Dt],lime:[0,Dt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Dt],navy:[0,0,128],white:[Dt,Dt,Dt],olive:[128,128,0],yellow:[Dt,Dt,0],orange:[Dt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Dt,0,0],pink:[Dt,192,203],cyan:[0,Dt,Dt],transparent:[Dt,Dt,Dt,0]},Is=function(t,n,r){return t+=t<0?1:t>1?-1:0,(t*6<1?n+(r-n)*t*6:t<.5?r:t*3<2?n+(r-n)*(2/3-t)*6:n)*Dt+.5|0},g0=function(t,n,r){var i=t?Un(t)?[t>>16,t>>8&Dt,t&Dt]:0:Ei.black,a,s,o,l,u,c,f,h,p,g;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),Ei[t])i=Ei[t];else if(t.charAt(0)==="#"){if(t.length<6&&(a=t.charAt(1),s=t.charAt(2),o=t.charAt(3),t="#"+a+a+s+s+o+o+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&Dt,i&Dt,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&Dt,t&Dt]}else if(t.substr(0,3)==="hsl"){if(i=g=t.match(_h),!n)l=+i[0]%360/360,u=+i[1]/100,c=+i[2]/100,s=c<=.5?c*(u+1):c+u-c*u,a=c*2-s,i.length>3&&(i[3]*=1),i[0]=Is(l+1/3,a,s),i[1]=Is(l,a,s),i[2]=Is(l-1/3,a,s);else if(~t.indexOf("="))return i=t.match(Ym),r&&i.length<4&&(i[3]=1),i}else i=t.match(_h)||Ei.transparent;i=i.map(Number)}return n&&!g&&(a=i[0]/Dt,s=i[1]/Dt,o=i[2]/Dt,f=Math.max(a,s,o),h=Math.min(a,s,o),c=(f+h)/2,f===h?l=u=0:(p=f-h,u=c>.5?p/(2-f-h):p/(f+h),l=f===a?(s-o)/p+(s<o?6:0):f===s?(o-a)/p+2:(a-s)/p+4,l*=60),i[0]=~~(l+.5),i[1]=~~(u*100+.5),i[2]=~~(c*100+.5)),r&&i.length<4&&(i[3]=1),i},m0=function(t){var n=[],r=[],i=-1;return t.split(Jn).forEach(function(a){var s=a.match(Yr)||[];n.push.apply(n,s),r.push(i+=s.length+1)}),n.c=r,n},Th=function(t,n,r){var i="",a=(t+i).match(Jn),s=n?"hsla(":"rgba(",o=0,l,u,c,f;if(!a)return t;if(a=a.map(function(h){return(h=g0(h,n,1))&&s+(n?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),r&&(c=m0(t),l=r.c,l.join(i)!==c.c.join(i)))for(u=t.replace(Jn,"1").split(Yr),f=u.length-1;o<f;o++)i+=u[o]+(~l.indexOf(o)?a.shift()||s+"0,0,0,0)":(c.length?c:a.length?a:r).shift());if(!u)for(u=t.split(Jn),f=u.length-1;o<f;o++)i+=u[o]+a[o];return i+u[f]},Jn=(function(){var e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in Ei)e+="|"+t+"\\b";return new RegExp(e+")","gi")})(),Vw=/hsl[a]?\(/,y0=function(t){var n=t.join(" "),r;if(Jn.lastIndex=0,Jn.test(n))return r=Vw.test(n),t[1]=Th(t[1],r),t[0]=Th(t[0],r,m0(t[1])),!0},Zi,Ve=(function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,s=a,o=[],l,u,c,f,h,p,g=function d(m){var v=e()-i,y=m===!0,x,_,w,S;if((v>t||v<0)&&(r+=v-n),i+=v,w=i-r,x=w-s,(x>0||y)&&(S=++f.frame,h=w-f.time*1e3,f.time=w=w/1e3,s+=x+(x>=a?4:a-x),_=1),y||(l=u(d)),_)for(p=0;p<o.length;p++)o[p](w,h,S,m)};return f={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(m){return h/(1e3/(m||60))},wake:function(){Wm&&(!cc&&Vc()&&(wn=cc=window,Zc=wn.document||{},en.gsap=He,(wn.gsapVersions||(wn.gsapVersions=[])).push(He.version),Km(Ya||wn.GreenSockGlobals||!wn.gsap&&wn||{}),p0.forEach(d0)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),u=c||function(m){return setTimeout(m,s-f.time*1e3+1|0)},Zi=1,g(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),Zi=0,u=Ki},lagSmoothing:function(m,v){t=m||1/0,n=Math.min(v||33,t)},fps:function(m){a=1e3/(m||240),s=f.time*1e3+a},add:function(m,v,y){var x=v?function(_,w,S,b){m(_,w,S,b),f.remove(x)}:m;return f.remove(m),o[y?"unshift":"push"](x),ci(),x},remove:function(m,v){~(v=o.indexOf(m))&&o.splice(v,1)&&p>=v&&p--},_listeners:o},f})(),ci=function(){return!Zi&&Ve.wake()},_t={},Zw=/^[\d.\-M][\d.\-,\s]/,Qw=/["']/g,Jw=function(t){for(var n={},r=t.substr(1,t.length-3).split(":"),i=r[0],a=1,s=r.length,o,l,u;a<s;a++)l=r[a],o=a!==s-1?l.lastIndexOf(","):l.length,u=l.substr(0,o),n[i]=isNaN(u)?u.replace(Qw,"").trim():+u,i=l.substr(o+1).trim();return n},tS=function(t){var n=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",n);return t.substring(n,~i&&i<r?t.indexOf(")",r+1):r)},eS=function(t){var n=(t+"").split("("),r=_t[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~t.indexOf("{")?[Jw(n[1])]:tS(t).split(",").map(t0)):_t._CE&&Zw.test(t)?_t._CE("",t):r},_0=function(t){return function(n){return 1-t(1-n)}},v0=function e(t,n){for(var r=t._first,i;r;)r instanceof Oe?e(r,n):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==n&&(r.timeline?e(r.timeline,n):(i=r._ease,r._ease=r._yEase,r._yEase=i,r._yoyo=n)),r=r._next},vr=function(t,n){return t&&(Vt(t)?t:_t[t]||eS(t))||n},Er=function(t,n,r,i){r===void 0&&(r=function(l){return 1-n(1-l)}),i===void 0&&(i=function(l){return l<.5?n(l*2)/2:1-n((1-l)*2)/2});var a={easeIn:n,easeOut:r,easeInOut:i},s;return ze(t,function(o){_t[o]=en[o]=a,_t[s=o.toLowerCase()]=r;for(var l in a)_t[s+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=_t[o+"."+l]=a[l]}),a},x0=function(t){return function(n){return n<.5?(1-t(1-n*2))/2:.5+t((n-.5)*2)/2}},zs=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),s=a/uc*(Math.asin(1/i)||0),o=function(c){return c===1?1:i*Math.pow(2,-10*c)*Aw((c-s)*a)+1},l=t==="out"?o:t==="in"?function(u){return 1-o(1-u)}:x0(o);return a=uc/a,l.config=function(u,c){return e(t,u,c)},l},Bs=function e(t,n){n===void 0&&(n=1.70158);var r=function(s){return s?--s*s*((n+1)*s+n)+1:0},i=t==="out"?r:t==="in"?function(a){return 1-r(1-a)}:x0(r);return i.config=function(a){return e(t,a)},i};ze("Linear,Quad,Cubic,Quart,Quint,Strong",function(e,t){var n=t<5?t+1:t;Er(e+",Power"+(n-1),t?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});_t.Linear.easeNone=_t.none=_t.Linear.easeIn;Er("Elastic",zs("in"),zs("out"),zs());(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(o){return o<n?e*o*o:o<r?e*Math.pow(o-1.5/t,2)+.75:o<i?e*(o-=2.25/t)*o+.9375:e*Math.pow(o-2.625/t,2)+.984375};Er("Bounce",function(s){return 1-a(1-s)},a)})(7.5625,2.75);Er("Expo",function(e){return Math.pow(2,10*(e-1))*e+e*e*e*e*e*e*(1-e)});Er("Circ",function(e){return-(Gm(1-e*e)-1)});Er("Sine",function(e){return e===1?1:-Mw(e*Sw)+1});Er("Back",Bs("in"),Bs("out"),Bs());_t.SteppedEase=_t.steps=en.SteppedEase={config:function(t,n){t===void 0&&(t=1);var r=1/t,i=t+(n?0:1),a=n?1:0,s=1-Ot;return function(o){return((i*aa(0,s,o)|0)+a)*r}}};si.ease=_t["quad.out"];ze("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(e){return tf+=e+","+e+"Params,"});var b0=function(t,n){this.id=Tw++,t._gsap=this,this.target=t,this.harness=n,this.get=n?n.get:Qm,this.set=n?n.getSetter:of},Qi=(function(){function e(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,ui(this,+n.duration,1,1),this.data=n.data,zt&&(this._ctx=zt,zt.data.push(this)),Zi||Ve.wake()}var t=e.prototype;return t.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},t.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},t.totalDuration=function(r){return arguments.length?(this._dirty=0,ui(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(r,i){if(ci(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(us(this,r),!a._dp||a.parent||r0(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&Sn(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===Ot||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),Jm(this,r,i)),this},t.time=function(r,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+bh(this))%(this._dur+this._rDelay)||(r?this._dur:0),i):this._time},t.totalProgress=function(r,i){return arguments.length?this.totalTime(this.totalDuration()*r,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(r,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+bh(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(r,i){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*a,i):this._repeat?li(this._tTime,a)+1:1},t.timeScale=function(r,i){if(!arguments.length)return this._rts===-Ot?0:this._rts;if(this._rts===r)return this;var a=this.parent&&this._ts?Ka(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Ot?0:this._rts,this.totalTime(aa(-Math.abs(this._delay),this.totalDuration(),a),i!==!1),ls(this),Lw(this)},t.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ci(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ot&&(this._tTime-=Ot)))),this):this._ps},t.startTime=function(r){if(arguments.length){this._start=jt(r);var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Sn(i,this,this._start-this._delay),this}return this._start},t.endTime=function(r){return this._start+(Ie(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(r){var i=this.parent||this._dp;return i?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ka(i.rawTime(r),this):this._tTime:this._tTime},t.revert=function(r){r===void 0&&(r=Ow);var i=Se;return Se=r,nf(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),Se=i,this},t.globalTime=function(r){for(var i=this,a=arguments.length?r:i.rawTime();i;)a=i._start+a/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(r):a},t.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,wh(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(r){if(arguments.length){var i=this._time;return this._rDelay=r,wh(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},t.seek=function(r,i){return this.totalTime(sn(this,r),Ie(i))},t.restart=function(r,i){return this.play().totalTime(r?-this._delay:0,Ie(i)),this._dur||(this._zTime=-Ot),this},t.play=function(r,i){return r!=null&&this.seek(r,i),this.reversed(!1).paused(!1)},t.reverse=function(r,i){return r!=null&&this.seek(r||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(r,i){return r!=null&&this.seek(r,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-Ot:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ot,this},t.isActive=function(){var r=this.parent||this._dp,i=this._start,a;return!!(!r||this._ts&&this._initted&&r.isActive()&&(a=r.rawTime(!0))>=i&&a<this.endTime(!0)-Ot)},t.eventCallback=function(r,i,a){var s=this.vars;return arguments.length>1?(i?(s[r]=i,a&&(s[r+"Params"]=a),r==="onUpdate"&&(this._onUpdate=i)):delete s[r],this):s[r]},t.then=function(r){var i=this,a=i._prom;return new Promise(function(s){var o=Vt(r)?r:e0,l=function(){var c=i.then;i.then=null,a&&a(),Vt(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?l():i._prom=l})},t.kill=function(){Ri(this)},e})();nn(Qi.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:-Ot,_prom:0,_ps:!1,_rts:1});var Oe=(function(e){Hm(t,e);function t(r,i){var a;return r===void 0&&(r={}),a=e.call(this,r)||this,a.labels={},a.smoothChildTiming=!!r.smoothChildTiming,a.autoRemoveChildren=!!r.autoRemoveChildren,a._sort=Ie(r.sortChildren),Yt&&Sn(r.parent||Yt,Nn(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),r.scrollTrigger&&i0(Nn(a),r.scrollTrigger),a}var n=t.prototype;return n.to=function(i,a,s){return Ni(0,arguments,this),this},n.from=function(i,a,s){return Ni(1,arguments,this),this},n.fromTo=function(i,a,s,o){return Ni(2,arguments,this),this},n.set=function(i,a,s){return a.duration=0,a.parent=this,Fi(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new oe(i,a,sn(this,s),1),this},n.call=function(i,a,s){return Sn(this,oe.delayedCall(0,i,a),s)},n.staggerTo=function(i,a,s,o,l,u,c){return s.duration=a,s.stagger=s.stagger||o,s.onComplete=u,s.onCompleteParams=c,s.parent=this,new oe(i,s,sn(this,l)),this},n.staggerFrom=function(i,a,s,o,l,u,c){return s.runBackwards=1,Fi(s).immediateRender=Ie(s.immediateRender),this.staggerTo(i,a,s,o,l,u,c)},n.staggerFromTo=function(i,a,s,o,l,u,c,f){return o.startAt=s,Fi(o).immediateRender=Ie(o.immediateRender),this.staggerTo(i,a,o,l,u,c,f)},n.render=function(i,a,s){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=i<=0?0:jt(i),f=this._zTime<0!=i<0&&(this._initted||!u),h,p,g,d,m,v,y,x,_,w,S,b;if(this!==Yt&&c>l&&i>=0&&(c=l),c!==this._tTime||s||f){if(o!==this._time&&u&&(c+=this._time-o,i+=this._time-o),h=c,_=this._start,x=this._ts,v=!x,f&&(u||(o=this._zTime),(i||!a)&&(this._zTime=i)),this._repeat){if(S=this._yoyo,m=u+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(m*100+i,a,s);if(h=jt(c%m),c===l?(d=this._repeat,h=u):(w=jt(c/m),d=~~w,d&&d===w&&(h=u,d--),h>u&&(h=u)),w=li(this._tTime,m),!o&&this._tTime&&w!==d&&this._tTime-w*m-this._dur<=0&&(w=d),S&&d&1&&(h=u-h,b=1),d!==w&&!this._lock){var T=S&&w&1,M=T===(S&&d&1);if(d<w&&(T=!T),o=T?0:c%u?u:c,this._lock=1,this.render(o||(b?0:jt(d*m)),a,!u)._lock=0,this._tTime=c,!a&&this.parent&&Ze(this,"onRepeat"),this.vars.repeatRefresh&&!b&&(this.invalidate()._lock=1,w=d),o&&o!==this._time||v!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,M&&(this._lock=2,o=T?u:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!b&&this.invalidate()),this._lock=0,!this._ts&&!v)return this;v0(this,b)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(y=zw(this,jt(o),jt(h)),y&&(c-=h-(h=y._start))),this._tTime=c,this._time=h,this._act=!x,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,o=0),!o&&c&&u&&!a&&!w&&(Ze(this,"onStart"),this._tTime!==c))return this;if(h>=o&&i>=0)for(p=this._first;p;){if(g=p._next,(p._act||h>=p._start)&&p._ts&&y!==p){if(p.parent!==this)return this.render(i,a,s);if(p.render(p._ts>0?(h-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(h-p._start)*p._ts,a,s),h!==this._time||!this._ts&&!v){y=0,g&&(c+=this._zTime=-Ot);break}}p=g}else{p=this._last;for(var C=i<0?i:h;p;){if(g=p._prev,(p._act||C<=p._end)&&p._ts&&y!==p){if(p.parent!==this)return this.render(i,a,s);if(p.render(p._ts>0?(C-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(C-p._start)*p._ts,a,s||Se&&nf(p)),h!==this._time||!this._ts&&!v){y=0,g&&(c+=this._zTime=C?-Ot:Ot);break}}p=g}}if(y&&!a&&(this.pause(),y.render(h>=o?0:-Ot)._zTime=h>=o?1:-1,this._ts))return this._start=_,ls(this),this.render(i,a,s);this._onUpdate&&!a&&Ze(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(_===this._start||Math.abs(x)!==Math.abs(this._ts))&&(this._lock||((i||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&tr(this,1),!a&&!(i<0&&!o)&&(c||o||!l)&&(Ze(this,c===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(i,a){var s=this;if(Un(a)||(a=sn(this,a,i)),!(i instanceof Qi)){if(Ee(i))return i.forEach(function(o){return s.add(o,a)}),this;if(ye(i))return this.addLabel(i,a);if(Vt(i))i=oe.delayedCall(0,i);else return this}return this!==i?Sn(this,i,a):this},n.getChildren=function(i,a,s,o){i===void 0&&(i=!0),a===void 0&&(a=!0),s===void 0&&(s=!0),o===void 0&&(o=-ln);for(var l=[],u=this._first;u;)u._start>=o&&(u instanceof oe?a&&l.push(u):(s&&l.push(u),i&&l.push.apply(l,u.getChildren(!0,a,s)))),u=u._next;return l},n.getById=function(i){for(var a=this.getChildren(1,1,1),s=a.length;s--;)if(a[s].vars.id===i)return a[s]},n.remove=function(i){return ye(i)?this.removeLabel(i):Vt(i)?this.killTweensOf(i):(i.parent===this&&os(this,i),i===this._recent&&(this._recent=this._last),_r(this))},n.totalTime=function(i,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=jt(Ve.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),e.prototype.totalTime.call(this,i,a),this._forcing=0,this):this._tTime},n.addLabel=function(i,a){return this.labels[i]=sn(this,a),this},n.removeLabel=function(i){return delete this.labels[i],this},n.addPause=function(i,a,s){var o=oe.delayedCall(0,a||Ki,s);return o.data="isPause",this._hasPause=1,Sn(this,o,sn(this,i))},n.removePause=function(i){var a=this._first;for(i=sn(this,i);a;)a._start===i&&a.data==="isPause"&&tr(a),a=a._next},n.killTweensOf=function(i,a,s){for(var o=this.getTweensOf(i,s),l=o.length;l--;)Kn!==o[l]&&o[l].kill(i,a);return this},n.getTweensOf=function(i,a){for(var s=[],o=un(i),l=this._first,u=Un(a),c;l;)l instanceof oe?Pw(l._targets,o)&&(u?(!Kn||l._initted&&l._ts)&&l.globalTime(0)<=a&&l.globalTime(l.totalDuration())>a:!a||l.isActive())&&s.push(l):(c=l.getTweensOf(o,a)).length&&s.push.apply(s,c),l=l._next;return s},n.tweenTo=function(i,a){a=a||{};var s=this,o=sn(s,i),l=a,u=l.startAt,c=l.onStart,f=l.onStartParams,h=l.immediateRender,p,g=oe.to(s,nn({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale())||Ot,onStart:function(){if(s.pause(),!p){var m=a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale());g._dur!==m&&ui(g,m,0,1).render(g._time,!0,!0),p=1}c&&c.apply(g,f||[])}},a));return h?g.render(0):g},n.tweenFromTo=function(i,a,s){return this.tweenTo(a,nn({startAt:{time:sn(this,i)}},s))},n.recent=function(){return this._recent},n.nextLabel=function(i){return i===void 0&&(i=this._time),Sh(this,sn(this,i))},n.previousLabel=function(i){return i===void 0&&(i=this._time),Sh(this,sn(this,i),1)},n.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+Ot)},n.shiftChildren=function(i,a,s){s===void 0&&(s=0);var o=this._first,l=this.labels,u;for(i=jt(i);o;)o._start>=s&&(o._start+=i,o._end+=i),o=o._next;if(a)for(u in l)l[u]>=s&&(l[u]+=i);return _r(this)},n.invalidate=function(i){var a=this._first;for(this._lock=0;a;)a.invalidate(i),a=a._next;return e.prototype.invalidate.call(this,i)},n.clear=function(i){i===void 0&&(i=!0);for(var a=this._first,s;a;)s=a._next,this.remove(a),a=s;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),_r(this)},n.totalDuration=function(i){var a=0,s=this,o=s._last,l=ln,u,c,f;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-i:i));if(s._dirty){for(f=s.parent;o;)u=o._prev,o._dirty&&o.totalDuration(),c=o._start,c>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,Sn(s,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(a-=c,(!f&&!s._dp||f&&f.smoothChildTiming)&&(s._start+=jt(c/s._ts),s._time-=c,s._tTime-=c),s.shiftChildren(-c,!1,-1/0),l=0),o._end>a&&o._ts&&(a=o._end),o=u;ui(s,s===Yt&&s._time>a?s._time:a,1,1),s._dirty=0}return s._tDur},t.updateRoot=function(i){if(Yt._ts&&(Jm(Yt,Ka(i,Yt)),Zm=Ve.frame),Ve.frame>=vh){vh+=Je.autoSleep||120;var a=Yt._first;if((!a||!a._ts)&&Je.autoSleep&&Ve._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||Ve.sleep()}}},t})(Qi);nn(Oe.prototype,{_lock:0,_hasPause:0,_forcing:0});var nS=function(t,n,r,i,a,s,o){var l=new Be(this._pt,t,n,0,1,C0,null,a),u=0,c=0,f,h,p,g,d,m,v,y;for(l.b=r,l.e=i,r+="",i+="",(v=~i.indexOf("random("))&&(i=Vi(i)),s&&(y=[r,i],s(y,t,n),r=y[0],i=y[1]),h=r.match(qs)||[];f=qs.exec(i);)g=f[0],d=i.substring(u,f.index),p?p=(p+1)%5:d.substr(-5)==="rgba("&&(p=1),g!==h[c++]&&(m=parseFloat(h[c-1])||0,l._pt={_next:l._pt,p:d||c===1?d:",",s:m,c:g.charAt(1)==="="?Kr(m,g)-m:parseFloat(g)-m,m:p&&p<4?Math.round:0},u=qs.lastIndex);return l.c=u<i.length?i.substring(u,i.length):"",l.fp=o,(Xm.test(i)||v)&&(l.e=0),this._pt=l,l},rf=function(t,n,r,i,a,s,o,l,u,c){Vt(i)&&(i=i(a||0,t,s));var f=t[n],h=r!=="get"?r:Vt(f)?u?t[n.indexOf("set")||!Vt(t["get"+n.substr(3)])?n:"get"+n.substr(3)](u):t[n]():f,p=Vt(f)?u?oS:M0:sf,g;if(ye(i)&&(~i.indexOf("random(")&&(i=Vi(i)),i.charAt(1)==="="&&(g=Kr(h,i)+(Re(h)||0),(g||g===0)&&(i=g))),!c||h!==i||yc)return!isNaN(h*i)&&i!==""?(g=new Be(this._pt,t,n,+h||0,i-(h||0),typeof f=="boolean"?uS:A0,0,p),u&&(g.fp=u),o&&g.modifier(o,this,t),this._pt=g):(!f&&!(n in t)&&Qc(n,i),nS.call(this,t,n,h,i,p,l||Je.stringFilter,u))},rS=function(t,n,r,i,a){if(Vt(t)&&(t=Li(t,a,n,r,i)),!An(t)||t.style&&t.nodeType||Ee(t)||jm(t))return ye(t)?Li(t,a,n,r,i):t;var s={},o;for(o in t)s[o]=Li(t[o],a,n,r,i);return s},w0=function(t,n,r,i,a,s){var o,l,u,c;if(Ke[t]&&(o=new Ke[t]).init(a,o.rawVars?n[t]:rS(n[t],i,a,s,r),r,i,s)!==!1&&(r._pt=l=new Be(r._pt,a,t,0,1,o.render,o,0,o.priority),r!==Xr))for(u=r._ptLookup[r._targets.indexOf(a)],c=o._props.length;c--;)u[o._props[c]]=l;return o},Kn,yc,af=function e(t,n,r){var i=t.vars,a=i.ease,s=i.startAt,o=i.immediateRender,l=i.lazy,u=i.onUpdate,c=i.runBackwards,f=i.yoyoEase,h=i.keyframes,p=i.autoRevert,g=t._dur,d=t._startAt,m=t._targets,v=t.parent,y=v&&v.data==="nested"?v.vars.targets:m,x=t._overwrite==="auto"&&!Wc,_=t.timeline,w,S,b,T,M,C,A,D,k,N,I,P,O;if(_&&(!h||!a)&&(a="none"),t._ease=vr(a,si.ease),t._yEase=f?_0(vr(f===!0?a:f,si.ease)):0,f&&t._yoyo&&!t._repeat&&(f=t._yEase,t._yEase=t._ease,t._ease=f),t._from=!_&&!!i.runBackwards,!_||h&&!i.stagger){if(D=m[0]?yr(m[0]).harness:0,P=D&&i[D.prop],w=Wa(i,Jc),d&&(d._zTime<0&&d.progress(1),n<0&&c&&o&&!p?d.render(-1,!0):d.revert(c&&g?Ra:Dw),d._lazy=0),s){if(tr(t._startAt=oe.set(m,nn({data:"isStart",overwrite:!1,parent:v,immediateRender:!0,lazy:!d&&Ie(l),startAt:null,delay:0,onUpdate:u&&function(){return Ze(t,"onUpdate")},stagger:0},s))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(Se||!o&&!p)&&t._startAt.revert(Ra),o&&g&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(c&&g&&!d){if(n&&(o=!1),b=nn({overwrite:!1,data:"isFromStart",lazy:o&&!d&&Ie(l),immediateRender:o,stagger:0,parent:v},w),P&&(b[D.prop]=P),tr(t._startAt=oe.set(m,b)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(Se?t._startAt.revert(Ra):t._startAt.render(-1,!0)),t._zTime=n,!o)e(t._startAt,Ot,Ot);else if(!n)return}for(t._pt=t._ptCache=0,l=g&&Ie(l)||l&&!g,S=0;S<m.length;S++){if(M=m[S],A=M._gsap||ef(m)[S]._gsap,t._ptLookup[S]=N={},fc[A.id]&&Qn.length&&Xa(),I=y===m?S:y.indexOf(M),D&&(k=new D).init(M,P||w,t,I,y)!==!1&&(t._pt=T=new Be(t._pt,M,k.name,0,1,k.render,k,0,k.priority),k._props.forEach(function(H){N[H]=T}),k.priority&&(C=1)),!D||P)for(b in w)Ke[b]&&(k=w0(b,w,t,I,M,y))?k.priority&&(C=1):N[b]=T=rf.call(t,M,b,"get",w[b],I,y,0,i.stringFilter);t._op&&t._op[S]&&t.kill(M,t._op[S]),x&&t._pt&&(Kn=t,Yt.killTweensOf(M,N,t.globalTime(n)),O=!t.parent,Kn=0),t._pt&&l&&(fc[A.id]=1)}C&&k0(t),t._onInit&&t._onInit(t)}t._onUpdate=u,t._initted=(!t._op||t._pt)&&!O,h&&n<=0&&_.render(ln,!0,!0)},iS=function(t,n,r,i,a,s,o,l){var u=(t._pt&&t._ptCache||(t._ptCache={}))[n],c,f,h,p;if(!u)for(u=t._ptCache[n]=[],h=t._ptLookup,p=t._targets.length;p--;){if(c=h[p][n],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==n&&c.fp!==n;)c=c._next;if(!c)return yc=1,t.vars[n]="+=0",af(t,o),yc=0,l?Wi(n+" not eligible for reset"):1;u.push(c)}for(p=u.length;p--;)f=u[p],c=f._pt||f,c.s=(i||i===0)&&!a?i:c.s+(i||0)+s*c.c,c.c=r-c.s,f.e&&(f.e=re(r)+Re(f.e)),f.b&&(f.b=c.s+Re(f.b))},aS=function(t,n){var r=t[0]?yr(t[0]).harness:0,i=r&&r.aliases,a,s,o,l;if(!i)return n;a=oi({},n);for(s in i)if(s in a)for(l=i[s].split(","),o=l.length;o--;)a[l[o]]=a[s];return a},sS=function(t,n,r,i){var a=n.ease||i||"power1.inOut",s,o;if(Ee(n))o=r[t]||(r[t]=[]),n.forEach(function(l,u){return o.push({t:u/(n.length-1)*100,v:l,e:a})});else for(s in n)o=r[s]||(r[s]=[]),s==="ease"||o.push({t:parseFloat(t),v:n[s],e:a})},Li=function(t,n,r,i,a){return Vt(t)?t.call(n,r,i,a):ye(t)&&~t.indexOf("random(")?Vi(t):t},S0=tf+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",T0={};ze(S0+",id,stagger,delay,duration,paused,scrollTrigger",function(e){return T0[e]=1});var oe=(function(e){Hm(t,e);function t(r,i,a,s){var o;typeof i=="number"&&(a.duration=i,i=a,a=null),o=e.call(this,s?i:Fi(i))||this;var l=o.vars,u=l.duration,c=l.delay,f=l.immediateRender,h=l.stagger,p=l.overwrite,g=l.keyframes,d=l.defaults,m=l.scrollTrigger,v=l.yoyoEase,y=i.parent||Yt,x=(Ee(r)||jm(r)?Un(r[0]):"length"in i)?[r]:un(r),_,w,S,b,T,M,C,A;if(o._targets=x.length?ef(x):Wi("GSAP target "+r+" not found. https://gsap.com",!Je.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=p,g||h||va(u)||va(c)){if(i=o.vars,_=o.timeline=new Oe({data:"nested",defaults:d||{},targets:y&&y.data==="nested"?y.vars.targets:x}),_.kill(),_.parent=_._dp=Nn(o),_._start=0,h||va(u)||va(c)){if(b=x.length,C=h&&l0(h),An(h))for(T in h)~S0.indexOf(T)&&(A||(A={}),A[T]=h[T]);for(w=0;w<b;w++)S=Wa(i,T0),S.stagger=0,v&&(S.yoyoEase=v),A&&oi(S,A),M=x[w],S.duration=+Li(u,Nn(o),w,M,x),S.delay=(+Li(c,Nn(o),w,M,x)||0)-o._delay,!h&&b===1&&S.delay&&(o._delay=c=S.delay,o._start+=c,S.delay=0),_.to(M,S,C?C(w,M,x):0),_._ease=_t.none;_.duration()?u=c=0:o.timeline=0}else if(g){Fi(nn(_.vars.defaults,{ease:"none"})),_._ease=vr(g.ease||i.ease||"none");var D=0,k,N,I;if(Ee(g))g.forEach(function(P){return _.to(x,P,">")}),_.duration();else{S={};for(T in g)T==="ease"||T==="easeEach"||sS(T,g[T],S,g.easeEach);for(T in S)for(k=S[T].sort(function(P,O){return P.t-O.t}),D=0,w=0;w<k.length;w++)N=k[w],I={ease:N.e,duration:(N.t-(w?k[w-1].t:0))/100*u},I[T]=N.v,_.to(x,I,D),D+=I.duration;_.duration()<u&&_.to({},{duration:u-_.duration()})}}u||o.duration(u=_.duration())}else o.timeline=0;return p===!0&&!Wc&&(Kn=Nn(o),Yt.killTweensOf(x),Kn=0),Sn(y,Nn(o),a),i.reversed&&o.reverse(),i.paused&&o.paused(!0),(f||!u&&!g&&o._start===jt(y._time)&&Ie(f)&&qw(Nn(o))&&y.data!=="nested")&&(o._tTime=-Ot,o.render(Math.max(0,-c)||0)),m&&i0(Nn(o),m),o}var n=t.prototype;return n.render=function(i,a,s){var o=this._time,l=this._tDur,u=this._dur,c=i<0,f=i>l-Ot&&!c?l:i<Ot?0:i,h,p,g,d,m,v,y,x,_;if(!u)Iw(this,i,a,s);else if(f!==this._tTime||!i||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(h=f,x=this.timeline,this._repeat){if(d=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(d*100+i,a,s);if(h=jt(f%d),f===l?(g=this._repeat,h=u):(m=jt(f/d),g=~~m,g&&g===m?(h=u,g--):h>u&&(h=u)),v=this._yoyo&&g&1,v&&(_=this._yEase,h=u-h),m=li(this._tTime,d),h===o&&!s&&this._initted&&g===m)return this._tTime=f,this;g!==m&&(x&&this._yEase&&v0(x,v),this.vars.repeatRefresh&&!v&&!this._lock&&h!==d&&this._initted&&(this._lock=s=1,this.render(jt(d*g),!0).invalidate()._lock=0))}if(!this._initted){if(a0(this,c?i:h,s,a,f))return this._tTime=0,this;if(o!==this._time&&!(s&&this.vars.repeatRefresh&&g!==m))return this;if(u!==this._dur)return this.render(i,a,s)}if(this._tTime=f,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=y=(_||this._ease)(h/u),this._from&&(this.ratio=y=1-y),!o&&f&&!a&&!m&&(Ze(this,"onStart"),this._tTime!==f))return this;for(p=this._pt;p;)p.r(y,p.d),p=p._next;x&&x.render(i<0?i:x._dur*x._ease(h/this._dur),a,s)||this._startAt&&(this._zTime=i),this._onUpdate&&!a&&(c&&hc(this,i,a,s),Ze(this,"onUpdate")),this._repeat&&g!==m&&this.vars.onRepeat&&!a&&this.parent&&Ze(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(c&&!this._onUpdate&&hc(this,i,!0,!0),(i||!u)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&tr(this,1),!a&&!(c&&!o)&&(f||o||v)&&(Ze(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),e.prototype.invalidate.call(this,i)},n.resetTo=function(i,a,s,o,l){Zi||Ve.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||af(this,u),c=this._ease(u/this._dur),iS(this,i,a,s,o,c,u,l)?this.resetTo(i,a,s,o,1):(us(this,0),this.parent||n0(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(i,a){if(a===void 0&&(a="all"),!i&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?Ri(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Se),this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(i,a,Kn&&Kn.vars.overwrite!==!0)._first||Ri(this),this.parent&&s!==this.timeline.totalDuration()&&ui(this,this._dur*this.timeline._tDur/s,0,1),this}var o=this._targets,l=i?un(i):o,u=this._ptLookup,c=this._pt,f,h,p,g,d,m,v;if((!a||a==="all")&&Nw(o,l))return a==="all"&&(this._pt=0),Ri(this);for(f=this._op=this._op||[],a!=="all"&&(ye(a)&&(d={},ze(a,function(y){return d[y]=1}),a=d),a=aS(o,a)),v=o.length;v--;)if(~l.indexOf(o[v])){h=u[v],a==="all"?(f[v]=a,g=h,p={}):(p=f[v]=f[v]||{},g=a);for(d in g)m=h&&h[d],m&&((!("kill"in m.d)||m.d.kill(d)===!0)&&os(this,m,"_pt"),delete h[d]),p!=="all"&&(p[d]=1)}return this._initted&&!this._pt&&c&&Ri(this),this},t.to=function(i,a){return new t(i,a,arguments[2])},t.from=function(i,a){return Ni(1,arguments)},t.delayedCall=function(i,a,s,o){return new t(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:a,onReverseComplete:a,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:o})},t.fromTo=function(i,a,s){return Ni(2,arguments)},t.set=function(i,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new t(i,a)},t.killTweensOf=function(i,a,s){return Yt.killTweensOf(i,a,s)},t})(Qi);nn(oe.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ze("staggerTo,staggerFrom,staggerFromTo",function(e){oe[e]=function(){var t=new Oe,n=dc.call(arguments,0);return n.splice(e==="staggerFromTo"?5:4,0,0),t[e].apply(t,n)}});var sf=function(t,n,r){return t[n]=r},M0=function(t,n,r){return t[n](r)},oS=function(t,n,r,i){return t[n](i.fp,r)},lS=function(t,n,r){return t.setAttribute(n,r)},of=function(t,n){return Vt(t[n])?M0:Kc(t[n])&&t.setAttribute?lS:sf},A0=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e6)/1e6,n)},uS=function(t,n){return n.set(n.t,n.p,!!(n.s+n.c*t),n)},C0=function(t,n){var r=n._pt,i="";if(!t&&n.b)i=n.b;else if(t===1&&n.e)i=n.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round((r.s+r.c*t)*1e4)/1e4)+i,r=r._next;i+=n.c}n.set(n.t,n.p,i,n)},lf=function(t,n){for(var r=n._pt;r;)r.r(t,r.d),r=r._next},cS=function(t,n,r,i){for(var a=this._pt,s;a;)s=a._next,a.p===i&&a.modifier(t,n,r),a=s},fS=function(t){for(var n=this._pt,r,i;n;)i=n._next,n.p===t&&!n.op||n.op===t?os(this,n,"_pt"):n.dep||(r=1),n=i;return!r},hS=function(t,n,r,i){i.mSet(t,n,i.m.call(i.tween,r,i.mt),i)},k0=function(t){for(var n=t._pt,r,i,a,s;n;){for(r=n._next,i=a;i&&i.pr>n.pr;)i=i._next;(n._prev=i?i._prev:s)?n._prev._next=n:a=n,(n._next=i)?i._prev=n:s=n,n=r}t._pt=a},Be=(function(){function e(n,r,i,a,s,o,l,u,c){this.t=r,this.s=a,this.c=s,this.p=i,this.r=o||A0,this.d=l||this,this.set=u||sf,this.pr=c||0,this._next=n,n&&(n._prev=this)}var t=e.prototype;return t.modifier=function(r,i,a){this.mSet=this.mSet||this.set,this.set=hS,this.m=r,this.mt=a,this.tween=i},e})();ze(tf+"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",function(e){return Jc[e]=1});en.TweenMax=en.TweenLite=oe;en.TimelineLite=en.TimelineMax=Oe;Yt=new Oe({sortChildren:!1,defaults:si,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Je.stringFilter=y0;var xr=[],Da={},pS=[],Mh=0,dS=0,Us=function(t){return(Da[t]||pS).map(function(n){return n()})},_c=function(){var t=Date.now(),n=[];t-Mh>2&&(Us("matchMediaInit"),xr.forEach(function(r){var i=r.queries,a=r.conditions,s,o,l,u;for(o in i)s=wn.matchMedia(i[o]).matches,s&&(l=1),s!==a[o]&&(a[o]=s,u=1);u&&(r.revert(),l&&n.push(r))}),Us("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(i){return r.add(null,i)})}),Mh=t,Us("matchMedia"))},R0=(function(){function e(n,r){this.selector=r&&gc(r),this.data=[],this._r=[],this.isReverted=!1,this.id=dS++,n&&this.add(n)}var t=e.prototype;return t.add=function(r,i,a){Vt(r)&&(a=i,i=r,r=Vt);var s=this,o=function(){var u=zt,c=s.selector,f;return u&&u!==s&&u.data.push(s),a&&(s.selector=gc(a)),zt=s,f=i.apply(s,arguments),Vt(f)&&s._r.push(f),zt=u,s.selector=c,s.isReverted=!1,f};return s.last=o,r===Vt?o(s,function(l){return s.add(null,l)}):r?s[r]=o:o},t.ignore=function(r){var i=zt;zt=null,r(this),zt=i},t.getTweens=function(){var r=[];return this.data.forEach(function(i){return i instanceof e?r.push.apply(r,i.getTweens()):i instanceof oe&&!(i.parent&&i.parent.data==="nested")&&r.push(i)}),r},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(r,i){var a=this;if(r?(function(){for(var o=a.getTweens(),l=a.data.length,u;l--;)u=a.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return o.splice(o.indexOf(c),1)}));for(o.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,f){return f.g-c.g||-1/0}).forEach(function(c){return c.t.revert(r)}),l=a.data.length;l--;)u=a.data[l],u instanceof Oe?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof oe)&&u.revert&&u.revert(r);a._r.forEach(function(c){return c(r,a)}),a.isReverted=!0})():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),i)for(var s=xr.length;s--;)xr[s].id===this.id&&xr.splice(s,1)},t.revert=function(r){this.kill(r||{})},e})(),gS=(function(){function e(n){this.contexts=[],this.scope=n,zt&&zt.data.push(this)}var t=e.prototype;return t.add=function(r,i,a){An(r)||(r={matches:r});var s=new R0(0,a||this.scope),o=s.conditions={},l,u,c;zt&&!s.selector&&(s.selector=zt.selector),this.contexts.push(s),i=s.add("onMatch",i),s.queries=r;for(u in r)u==="all"?c=1:(l=wn.matchMedia(r[u]),l&&(xr.indexOf(s)<0&&xr.push(s),(o[u]=l.matches)&&(c=1),l.addListener?l.addListener(_c):l.addEventListener("change",_c)));return c&&i(s,function(f){return s.add(null,f)}),this},t.revert=function(r){this.kill(r||{})},t.kill=function(r){this.contexts.forEach(function(i){return i.kill(r,!0)})},e})(),Va={registerPlugin:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(i){return d0(i)})},timeline:function(t){return new Oe(t)},getTweensOf:function(t,n){return Yt.getTweensOf(t,n)},getProperty:function(t,n,r,i){ye(t)&&(t=un(t)[0]);var a=yr(t||{}).get,s=r?e0:t0;return r==="native"&&(r=""),t&&(n?s((Ke[n]&&Ke[n].get||a)(t,n,r,i)):function(o,l,u){return s((Ke[o]&&Ke[o].get||a)(t,o,l,u))})},quickSetter:function(t,n,r){if(t=un(t),t.length>1){var i=t.map(function(c){return He.quickSetter(c,n,r)}),a=i.length;return function(c){for(var f=a;f--;)i[f](c)}}t=t[0]||{};var s=Ke[n],o=yr(t),l=o.harness&&(o.harness.aliases||{})[n]||n,u=s?function(c){var f=new s;Xr._pt=0,f.init(t,r?c+r:c,Xr,0,[t]),f.render(1,f),Xr._pt&&lf(1,Xr)}:o.set(t,l);return s?u:function(c){return u(t,l,r?c+r:c,o,1)}},quickTo:function(t,n,r){var i,a=He.to(t,nn((i={},i[n]="+=0.1",i.paused=!0,i.stagger=0,i),r||{})),s=function(l,u,c){return a.resetTo(n,l,u,c)};return s.tween=a,s},isTweening:function(t){return Yt.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=vr(t.ease,si.ease)),xh(si,t||{})},config:function(t){return xh(Je,t||{})},registerEffect:function(t){var n=t.name,r=t.effect,i=t.plugins,a=t.defaults,s=t.extendTimeline;(i||"").split(",").forEach(function(o){return o&&!Ke[o]&&!en[o]&&Wi(n+" effect requires "+o+" plugin.")}),$s[n]=function(o,l,u){return r(un(o),nn(l||{},a),u)},s&&(Oe.prototype[n]=function(o,l,u){return this.add($s[n](o,An(l)?l:(u=l)&&{},this),u)})},registerEase:function(t,n){_t[t]=vr(n)},parseEase:function(t,n){return arguments.length?vr(t,n):_t},getById:function(t){return Yt.getById(t)},exportRoot:function(t,n){t===void 0&&(t={});var r=new Oe(t),i,a;for(r.smoothChildTiming=Ie(t.smoothChildTiming),Yt.remove(r),r._dp=0,r._time=r._tTime=Yt._time,i=Yt._first;i;)a=i._next,(n||!(!i._dur&&i instanceof oe&&i.vars.onComplete===i._targets[0]))&&Sn(r,i,i._start-i._delay),i=a;return Sn(Yt,r,0),r},context:function(t,n){return t?new R0(t,n):zt},matchMedia:function(t){return new gS(t)},matchMediaRefresh:function(){return xr.forEach(function(t){var n=t.conditions,r,i;for(i in n)n[i]&&(n[i]=!1,r=1);r&&t.revert()})||_c()},addEventListener:function(t,n){var r=Da[t]||(Da[t]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(t,n){var r=Da[t],i=r&&r.indexOf(n);i>=0&&r.splice(i,1)},utils:{wrap:Xw,wrapYoyo:Ww,distribute:l0,random:c0,snap:u0,normalize:Yw,getUnit:Re,clamp:Uw,splitColor:g0,toArray:un,selector:gc,mapRange:h0,pipe:Gw,unitize:jw,interpolate:Kw,shuffle:o0},install:Km,effects:$s,ticker:Ve,updateRoot:Oe.updateRoot,plugins:Ke,globalTimeline:Yt,core:{PropTween:Be,globals:Vm,Tween:oe,Timeline:Oe,Animation:Qi,getCache:yr,_removeLinkedListItem:os,reverting:function(){return Se},context:function(t){return t&&zt&&(zt.data.push(t),t._ctx=zt),zt},suppressOverwrites:function(t){return Wc=t}}};ze("to,from,fromTo,delayedCall,set,killTweensOf",function(e){return Va[e]=oe[e]});Ve.add(Oe.updateRoot);Xr=Va.to({},{duration:0});var mS=function(t,n){for(var r=t._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},yS=function(t,n){var r=t._targets,i,a,s;for(i in n)for(a=r.length;a--;)s=t._ptLookup[a][i],s&&(s=s.d)&&(s._pt&&(s=mS(s,i)),s&&s.modifier&&s.modifier(n[i],t,r[a],i))},Hs=function(t,n){return{name:t,headless:1,rawVars:1,init:function(i,a,s){s._onInit=function(o){var l,u;if(ye(a)&&(l={},ze(a,function(c){return l[c]=1}),a=l),n){l={};for(u in a)l[u]=n(a[u]);a=l}yS(o,a)}}}},He=Va.registerPlugin({name:"attr",init:function(t,n,r,i,a){var s,o,l;this.tween=r;for(s in n)l=t.getAttribute(s)||"",o=this.add(t,"setAttribute",(l||0)+"",n[s],i,a,0,0,s),o.op=s,o.b=l,this._props.push(s)},render:function(t,n){for(var r=n._pt;r;)Se?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function(t,n){for(var r=n.length;r--;)this.add(t,r,t[r]||0,n[r],0,0,0,0,0,1)}},Hs("roundProps",mc),Hs("modifiers"),Hs("snap",u0))||Va;oe.version=Oe.version=He.version="3.14.2";Wm=1;Vc()&&ci();_t.Power0;_t.Power1;_t.Power2;_t.Power3;_t.Power4;_t.Linear;_t.Quad;_t.Cubic;_t.Quart;_t.Quint;_t.Strong;_t.Elastic;_t.Back;_t.SteppedEase;_t.Bounce;_t.Sine;_t.Expo;_t.Circ;/*!
|
|
9
|
+
* CSSPlugin 3.14.2
|
|
10
|
+
* https://gsap.com
|
|
11
|
+
*
|
|
12
|
+
* Copyright 2008-2025, GreenSock. All rights reserved.
|
|
13
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
14
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
15
|
+
*/var Ah,Vn,Vr,uf,dr,Ch,cf,_S=function(){return typeof window<"u"},Hn={},hr=180/Math.PI,Zr=Math.PI/180,Br=Math.atan2,kh=1e8,ff=/([A-Z])/g,vS=/(left|right|width|margin|padding|x)/i,xS=/[\s,\(]\S/,Tn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},vc=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},bS=function(t,n){return n.set(n.t,n.p,t===1?n.e:Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},wS=function(t,n){return n.set(n.t,n.p,t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},SS=function(t,n){return n.set(n.t,n.p,t===1?n.e:t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},TS=function(t,n){var r=n.s+n.c*t;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},E0=function(t,n){return n.set(n.t,n.p,t?n.e:n.b,n)},D0=function(t,n){return n.set(n.t,n.p,t!==1?n.b:n.e,n)},MS=function(t,n,r){return t.style[n]=r},AS=function(t,n,r){return t.style.setProperty(n,r)},CS=function(t,n,r){return t._gsap[n]=r},kS=function(t,n,r){return t._gsap.scaleX=t._gsap.scaleY=r},RS=function(t,n,r,i,a){var s=t._gsap;s.scaleX=s.scaleY=r,s.renderTransform(a,s)},ES=function(t,n,r,i,a){var s=t._gsap;s[n]=r,s.renderTransform(a,s)},Xt="transform",Ue=Xt+"Origin",DS=function e(t,n){var r=this,i=this.target,a=i.style,s=i._gsap;if(t in Hn&&a){if(this.tfm=this.tfm||{},t!=="transform")t=Tn[t]||t,~t.indexOf(",")?t.split(",").forEach(function(o){return r.tfm[o]=Ln(i,o)}):this.tfm[t]=s.x?s[t]:Ln(i,t),t===Ue&&(this.tfm.zOrigin=s.zOrigin);else return Tn.transform.split(",").forEach(function(o){return e.call(r,o,n)});if(this.props.indexOf(Xt)>=0)return;s.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Ue,n,"")),t=Xt}(a||n)&&this.props.push(t,n,a[t])},O0=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},OS=function(){var t=this.props,n=this.target,r=n.style,i=n._gsap,a,s;for(a=0;a<t.length;a+=3)t[a+1]?t[a+1]===2?n[t[a]](t[a+2]):n[t[a]]=t[a+2]:t[a+2]?r[t[a]]=t[a+2]:r.removeProperty(t[a].substr(0,2)==="--"?t[a]:t[a].replace(ff,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)i[s]=this.tfm[s];i.svg&&(i.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),a=cf(),(!a||!a.isStart)&&!r[Xt]&&(O0(r),i.zOrigin&&r[Ue]&&(r[Ue]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},P0=function(t,n){var r={target:t,props:[],revert:OS,save:DS};return t._gsap||He.core.getCache(t),n&&t.style&&t.nodeType&&n.split(",").forEach(function(i){return r.save(i)}),r},F0,xc=function(t,n){var r=Vn.createElementNS?Vn.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Vn.createElement(t);return r&&r.style?r:Vn.createElement(t)},Qe=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(ff,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&e(t,fi(n)||n,1)||""},Rh="O,Moz,ms,Ms,Webkit".split(","),fi=function(t,n,r){var i=n||dr,a=i.style,s=5;if(t in a&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);s--&&!(Rh[s]+t in a););return s<0?null:(s===3?"ms":s>=0?Rh[s]:"")+t},bc=function(){_S()&&window.document&&(Ah=window,Vn=Ah.document,Vr=Vn.documentElement,dr=xc("div")||{style:{}},xc("div"),Xt=fi(Xt),Ue=Xt+"Origin",dr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",F0=!!fi("perspective"),cf=He.core.reverting,uf=1)},Eh=function(t){var n=t.ownerSVGElement,r=xc("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=t.cloneNode(!0),a;i.style.display="block",r.appendChild(i),Vr.appendChild(r);try{a=i.getBBox()}catch{}return r.removeChild(i),Vr.removeChild(r),a},Dh=function(t,n){for(var r=n.length;r--;)if(t.hasAttribute(n[r]))return t.getAttribute(n[r])},N0=function(t){var n,r;try{n=t.getBBox()}catch{n=Eh(t),r=1}return n&&(n.width||n.height)||r||(n=Eh(t)),n&&!n.width&&!n.x&&!n.y?{x:+Dh(t,["x","cx","x1"])||0,y:+Dh(t,["y","cy","y1"])||0,width:0,height:0}:n},L0=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&N0(t))},er=function(t,n){if(n){var r=t.style,i;n in Hn&&n!==Ue&&(n=Xt),r.removeProperty?(i=n.substr(0,2),(i==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(i==="--"?n:n.replace(ff,"-$1").toLowerCase())):r.removeAttribute(n)}},Zn=function(t,n,r,i,a,s){var o=new Be(t._pt,n,r,0,1,s?D0:E0);return t._pt=o,o.b=i,o.e=a,t._props.push(r),o},Oh={deg:1,rad:1,turn:1},PS={grid:1,flex:1},nr=function e(t,n,r,i){var a=parseFloat(r)||0,s=(r+"").trim().substr((a+"").length)||"px",o=dr.style,l=vS.test(n),u=t.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),f=100,h=i==="px",p=i==="%",g,d,m,v;if(i===s||!a||Oh[i]||Oh[s])return a;if(s!=="px"&&!h&&(a=e(t,n,r,"px")),v=t.getCTM&&L0(t),(p||s==="%")&&(Hn[n]||~n.indexOf("adius")))return g=v?t.getBBox()[l?"width":"height"]:t[c],re(p?a/g*f:a/100*g);if(o[l?"width":"height"]=f+(h?s:i),d=i!=="rem"&&~n.indexOf("adius")||i==="em"&&t.appendChild&&!u?t:t.parentNode,v&&(d=(t.ownerSVGElement||{}).parentNode),(!d||d===Vn||!d.appendChild)&&(d=Vn.body),m=d._gsap,m&&p&&m.width&&l&&m.time===Ve.time&&!m.uncache)return re(a/m.width*f);if(p&&(n==="height"||n==="width")){var y=t.style[n];t.style[n]=f+i,g=t[c],y?t.style[n]=y:er(t,n)}else(p||s==="%")&&!PS[Qe(d,"display")]&&(o.position=Qe(t,"position")),d===t&&(o.position="static"),d.appendChild(dr),g=dr[c],d.removeChild(dr),o.position="absolute";return l&&p&&(m=yr(d),m.time=Ve.time,m.width=d[c]),re(h?g*a/f:g&&a?f/g*a:0)},Ln=function(t,n,r,i){var a;return uf||bc(),n in Tn&&n!=="transform"&&(n=Tn[n],~n.indexOf(",")&&(n=n.split(",")[0])),Hn[n]&&n!=="transform"?(a=ta(t,i),a=n!=="transformOrigin"?a[n]:a.svg?a.origin:Qa(Qe(t,Ue))+" "+a.zOrigin+"px"):(a=t.style[n],(!a||a==="auto"||i||~(a+"").indexOf("calc("))&&(a=Za[n]&&Za[n](t,n,r)||Qe(t,n)||Qm(t,n)||(n==="opacity"?1:0))),r&&!~(a+"").trim().indexOf(" ")?nr(t,n,a,r)+r:a},FS=function(t,n,r,i){if(!r||r==="none"){var a=fi(n,t,1),s=a&&Qe(t,a,1);s&&s!==r?(n=a,r=s):n==="borderColor"&&(r=Qe(t,"borderTopColor"))}var o=new Be(this._pt,t.style,n,0,1,C0),l=0,u=0,c,f,h,p,g,d,m,v,y,x,_,w;if(o.b=r,o.e=i,r+="",i+="",i.substring(0,6)==="var(--"&&(i=Qe(t,i.substring(4,i.indexOf(")")))),i==="auto"&&(d=t.style[n],t.style[n]=i,i=Qe(t,n)||i,d?t.style[n]=d:er(t,n)),c=[r,i],y0(c),r=c[0],i=c[1],h=r.match(Yr)||[],w=i.match(Yr)||[],w.length){for(;f=Yr.exec(i);)m=f[0],y=i.substring(l,f.index),g?g=(g+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(g=1),m!==(d=h[u++]||"")&&(p=parseFloat(d)||0,_=d.substr((p+"").length),m.charAt(1)==="="&&(m=Kr(p,m)+_),v=parseFloat(m),x=m.substr((v+"").length),l=Yr.lastIndex-x.length,x||(x=x||Je.units[n]||_,l===i.length&&(i+=x,o.e+=x)),_!==x&&(p=nr(t,n,d,x)||0),o._pt={_next:o._pt,p:y||u===1?y:",",s:p,c:v-p,m:g&&g<4||n==="zIndex"?Math.round:0});o.c=l<i.length?i.substring(l,i.length):""}else o.r=n==="display"&&i==="none"?D0:E0;return Xm.test(i)&&(o.e=0),this._pt=o,o},Ph={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},NS=function(t){var n=t.split(" "),r=n[0],i=n[1]||"50%";return(r==="top"||r==="bottom"||i==="left"||i==="right")&&(t=r,r=i,i=t),n[0]=Ph[r]||r,n[1]=Ph[i]||i,n.join(" ")},LS=function(t,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,i=r.style,a=n.u,s=r._gsap,o,l,u;if(a==="all"||a===!0)i.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)o=a[u],Hn[o]&&(l=1,o=o==="transformOrigin"?Ue:Xt),er(r,o);l&&(er(r,Xt),s&&(s.svg&&r.removeAttribute("transform"),i.scale=i.rotate=i.translate="none",ta(r,1),s.uncache=1,O0(i)))}},Za={clearProps:function(t,n,r,i,a){if(a.data!=="isFromStart"){var s=t._pt=new Be(t._pt,n,r,0,0,LS);return s.u=i,s.pr=-10,s.tween=a,t._props.push(r),1}}},Ji=[1,0,0,1,0,0],q0={},$0=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Fh=function(t){var n=Qe(t,Xt);return $0(n)?Ji:n.substr(7).match(Ym).map(re)},hf=function(t,n){var r=t._gsap||yr(t),i=t.style,a=Fh(t),s,o,l,u;return r.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?Ji:a):(a===Ji&&!t.offsetParent&&t!==Vr&&!r.svg&&(l=i.display,i.display="block",s=t.parentNode,(!s||!t.offsetParent&&!t.getBoundingClientRect().width)&&(u=1,o=t.nextElementSibling,Vr.appendChild(t)),a=Fh(t),l?i.display=l:er(t,"display"),u&&(o?s.insertBefore(t,o):s?s.appendChild(t):Vr.removeChild(t))),n&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},wc=function(t,n,r,i,a,s){var o=t._gsap,l=a||hf(t,!0),u=o.xOrigin||0,c=o.yOrigin||0,f=o.xOffset||0,h=o.yOffset||0,p=l[0],g=l[1],d=l[2],m=l[3],v=l[4],y=l[5],x=n.split(" "),_=parseFloat(x[0])||0,w=parseFloat(x[1])||0,S,b,T,M;r?l!==Ji&&(b=p*m-g*d)&&(T=_*(m/b)+w*(-d/b)+(d*y-m*v)/b,M=_*(-g/b)+w*(p/b)-(p*y-g*v)/b,_=T,w=M):(S=N0(t),_=S.x+(~x[0].indexOf("%")?_/100*S.width:_),w=S.y+(~(x[1]||x[0]).indexOf("%")?w/100*S.height:w)),i||i!==!1&&o.smooth?(v=_-u,y=w-c,o.xOffset=f+(v*p+y*d)-v,o.yOffset=h+(v*g+y*m)-y):o.xOffset=o.yOffset=0,o.xOrigin=_,o.yOrigin=w,o.smooth=!!i,o.origin=n,o.originIsAbsolute=!!r,t.style[Ue]="0px 0px",s&&(Zn(s,o,"xOrigin",u,_),Zn(s,o,"yOrigin",c,w),Zn(s,o,"xOffset",f,o.xOffset),Zn(s,o,"yOffset",h,o.yOffset)),t.setAttribute("data-svg-origin",_+" "+w)},ta=function(t,n){var r=t._gsap||new b0(t);if("x"in r&&!n&&!r.uncache)return r;var i=t.style,a=r.scaleX<0,s="px",o="deg",l=getComputedStyle(t),u=Qe(t,Ue)||"0",c,f,h,p,g,d,m,v,y,x,_,w,S,b,T,M,C,A,D,k,N,I,P,O,H,X,et,at,tt,U,Q,L;return c=f=h=d=m=v=y=x=_=0,p=g=1,r.svg=!!(t.getCTM&&L0(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Xt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Xt]!=="none"?l[Xt]:"")),i.scale=i.rotate=i.translate="none"),b=hf(t,r.svg),r.svg&&(r.uncache?(H=t.getBBox(),u=r.xOrigin-H.x+"px "+(r.yOrigin-H.y)+"px",O=""):O=!n&&t.getAttribute("data-svg-origin"),wc(t,O||u,!!O||r.originIsAbsolute,r.smooth!==!1,b)),w=r.xOrigin||0,S=r.yOrigin||0,b!==Ji&&(A=b[0],D=b[1],k=b[2],N=b[3],c=I=b[4],f=P=b[5],b.length===6?(p=Math.sqrt(A*A+D*D),g=Math.sqrt(N*N+k*k),d=A||D?Br(D,A)*hr:0,y=k||N?Br(k,N)*hr+d:0,y&&(g*=Math.abs(Math.cos(y*Zr))),r.svg&&(c-=w-(w*A+S*k),f-=S-(w*D+S*N))):(L=b[6],U=b[7],et=b[8],at=b[9],tt=b[10],Q=b[11],c=b[12],f=b[13],h=b[14],T=Br(L,tt),m=T*hr,T&&(M=Math.cos(-T),C=Math.sin(-T),O=I*M+et*C,H=P*M+at*C,X=L*M+tt*C,et=I*-C+et*M,at=P*-C+at*M,tt=L*-C+tt*M,Q=U*-C+Q*M,I=O,P=H,L=X),T=Br(-k,tt),v=T*hr,T&&(M=Math.cos(-T),C=Math.sin(-T),O=A*M-et*C,H=D*M-at*C,X=k*M-tt*C,Q=N*C+Q*M,A=O,D=H,k=X),T=Br(D,A),d=T*hr,T&&(M=Math.cos(T),C=Math.sin(T),O=A*M+D*C,H=I*M+P*C,D=D*M-A*C,P=P*M-I*C,A=O,I=H),m&&Math.abs(m)+Math.abs(d)>359.9&&(m=d=0,v=180-v),p=re(Math.sqrt(A*A+D*D+k*k)),g=re(Math.sqrt(P*P+L*L)),T=Br(I,P),y=Math.abs(T)>2e-4?T*hr:0,_=Q?1/(Q<0?-Q:Q):0),r.svg&&(O=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!$0(Qe(t,Xt)),O&&t.setAttribute("transform",O))),Math.abs(y)>90&&Math.abs(y)<270&&(a?(p*=-1,y+=d<=0?180:-180,d+=d<=0?180:-180):(g*=-1,y+=y<=0?180:-180)),n=n||r.uncache,r.x=c-((r.xPercent=c&&(!n&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+s,r.y=f-((r.yPercent=f&&(!n&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-f)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+s,r.z=h+s,r.scaleX=re(p),r.scaleY=re(g),r.rotation=re(d)+o,r.rotationX=re(m)+o,r.rotationY=re(v)+o,r.skewX=y+o,r.skewY=x+o,r.transformPerspective=_+s,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(i[Ue]=Qa(u)),r.xOffset=r.yOffset=0,r.force3D=Je.force3D,r.renderTransform=r.svg?$S:F0?I0:qS,r.uncache=0,r},Qa=function(t){return(t=t.split(" "))[0]+" "+t[1]},Gs=function(t,n,r){var i=Re(n);return re(parseFloat(n)+parseFloat(nr(t,"x",r+"px",i)))+i},qS=function(t,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,I0(t,n)},ur="0deg",wi="0px",cr=") ",I0=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.z,u=r.rotation,c=r.rotationY,f=r.rotationX,h=r.skewX,p=r.skewY,g=r.scaleX,d=r.scaleY,m=r.transformPerspective,v=r.force3D,y=r.target,x=r.zOrigin,_="",w=v==="auto"&&t&&t!==1||v===!0;if(x&&(f!==ur||c!==ur)){var S=parseFloat(c)*Zr,b=Math.sin(S),T=Math.cos(S),M;S=parseFloat(f)*Zr,M=Math.cos(S),s=Gs(y,s,b*M*-x),o=Gs(y,o,-Math.sin(S)*-x),l=Gs(y,l,T*M*-x+x)}m!==wi&&(_+="perspective("+m+cr),(i||a)&&(_+="translate("+i+"%, "+a+"%) "),(w||s!==wi||o!==wi||l!==wi)&&(_+=l!==wi||w?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+cr),u!==ur&&(_+="rotate("+u+cr),c!==ur&&(_+="rotateY("+c+cr),f!==ur&&(_+="rotateX("+f+cr),(h!==ur||p!==ur)&&(_+="skew("+h+", "+p+cr),(g!==1||d!==1)&&(_+="scale("+g+", "+d+cr),y.style[Xt]=_||"translate(0, 0)"},$S=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.rotation,u=r.skewX,c=r.skewY,f=r.scaleX,h=r.scaleY,p=r.target,g=r.xOrigin,d=r.yOrigin,m=r.xOffset,v=r.yOffset,y=r.forceCSS,x=parseFloat(s),_=parseFloat(o),w,S,b,T,M;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Zr,u*=Zr,w=Math.cos(l)*f,S=Math.sin(l)*f,b=Math.sin(l-u)*-h,T=Math.cos(l-u)*h,u&&(c*=Zr,M=Math.tan(u-c),M=Math.sqrt(1+M*M),b*=M,T*=M,c&&(M=Math.tan(c),M=Math.sqrt(1+M*M),w*=M,S*=M)),w=re(w),S=re(S),b=re(b),T=re(T)):(w=f,T=h,S=b=0),(x&&!~(s+"").indexOf("px")||_&&!~(o+"").indexOf("px"))&&(x=nr(p,"x",s,"px"),_=nr(p,"y",o,"px")),(g||d||m||v)&&(x=re(x+g-(g*w+d*b)+m),_=re(_+d-(g*S+d*T)+v)),(i||a)&&(M=p.getBBox(),x=re(x+i/100*M.width),_=re(_+a/100*M.height)),M="matrix("+w+","+S+","+b+","+T+","+x+","+_+")",p.setAttribute("transform",M),y&&(p.style[Xt]=M)},IS=function(t,n,r,i,a){var s=360,o=ye(a),l=parseFloat(a)*(o&&~a.indexOf("rad")?hr:1),u=l-i,c=i+u+"deg",f,h;return o&&(f=a.split("_")[1],f==="short"&&(u%=s,u!==u%(s/2)&&(u+=u<0?s:-s)),f==="cw"&&u<0?u=(u+s*kh)%s-~~(u/s)*s:f==="ccw"&&u>0&&(u=(u-s*kh)%s-~~(u/s)*s)),t._pt=h=new Be(t._pt,n,r,i,u,bS),h.e=c,h.u="deg",t._props.push(r),h},Nh=function(t,n){for(var r in n)t[r]=n[r];return t},zS=function(t,n,r){var i=Nh({},r._gsap),a="perspective,force3D,transformOrigin,svgOrigin",s=r.style,o,l,u,c,f,h,p,g;i.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),s[Xt]=n,o=ta(r,1),er(r,Xt),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Xt],s[Xt]=n,o=ta(r,1),s[Xt]=u);for(l in Hn)u=i[l],c=o[l],u!==c&&a.indexOf(l)<0&&(p=Re(u),g=Re(c),f=p!==g?nr(r,l,u,g):parseFloat(u),h=parseFloat(c),t._pt=new Be(t._pt,o,l,f,h-f,vc),t._pt.u=g||0,t._props.push(l));Nh(o,i)};ze("padding,margin,Width,Radius",function(e,t){var n="Top",r="Right",i="Bottom",a="Left",s=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(o){return t<2?e+o:"border"+o+e});Za[t>1?"border"+e:e]=function(o,l,u,c,f){var h,p;if(arguments.length<4)return h=s.map(function(g){return Ln(o,g,u)}),p=h.join(" "),p.split(h[0]).length===5?h[0]:p;h=(c+"").split(" "),p={},s.forEach(function(g,d){return p[g]=h[d]=h[d]||h[(d-1)/2|0]}),o.init(l,p,f)}});var z0={name:"css",register:bc,targetTest:function(t){return t.style&&t.nodeType},init:function(t,n,r,i,a){var s=this._props,o=t.style,l=r.vars.startAt,u,c,f,h,p,g,d,m,v,y,x,_,w,S,b,T,M;uf||bc(),this.styles=this.styles||P0(t),T=this.styles.props,this.tween=r;for(d in n)if(d!=="autoRound"&&(c=n[d],!(Ke[d]&&w0(d,n,r,i,t,a)))){if(p=typeof c,g=Za[d],p==="function"&&(c=c.call(r,i,t,a),p=typeof c),p==="string"&&~c.indexOf("random(")&&(c=Vi(c)),g)g(this,t,d,c,r)&&(b=1);else if(d.substr(0,2)==="--")u=(getComputedStyle(t).getPropertyValue(d)+"").trim(),c+="",Jn.lastIndex=0,Jn.test(u)||(m=Re(u),v=Re(c),v?m!==v&&(u=nr(t,d,u,v)+v):m&&(c+=m)),this.add(o,"setProperty",u,c,i,a,0,0,d),s.push(d),T.push(d,0,o[d]);else if(p!=="undefined"){if(l&&d in l?(u=typeof l[d]=="function"?l[d].call(r,i,t,a):l[d],ye(u)&&~u.indexOf("random(")&&(u=Vi(u)),Re(u+"")||u==="auto"||(u+=Je.units[d]||Re(Ln(t,d))||""),(u+"").charAt(1)==="="&&(u=Ln(t,d))):u=Ln(t,d),h=parseFloat(u),y=p==="string"&&c.charAt(1)==="="&&c.substr(0,2),y&&(c=c.substr(2)),f=parseFloat(c),d in Tn&&(d==="autoAlpha"&&(h===1&&Ln(t,"visibility")==="hidden"&&f&&(h=0),T.push("visibility",0,o.visibility),Zn(this,o,"visibility",h?"inherit":"hidden",f?"inherit":"hidden",!f)),d!=="scale"&&d!=="transform"&&(d=Tn[d],~d.indexOf(",")&&(d=d.split(",")[0]))),x=d in Hn,x){if(this.styles.save(d),M=c,p==="string"&&c.substring(0,6)==="var(--"){if(c=Qe(t,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var C=t.style.perspective;t.style.perspective=c,c=Qe(t,"perspective"),C?t.style.perspective=C:er(t,"perspective")}f=parseFloat(c)}if(_||(w=t._gsap,w.renderTransform&&!n.parseTransform||ta(t,n.parseTransform),S=n.smoothOrigin!==!1&&w.smooth,_=this._pt=new Be(this._pt,o,Xt,0,1,w.renderTransform,w,0,-1),_.dep=1),d==="scale")this._pt=new Be(this._pt,w,"scaleY",w.scaleY,(y?Kr(w.scaleY,y+f):f)-w.scaleY||0,vc),this._pt.u=0,s.push("scaleY",d),d+="X";else if(d==="transformOrigin"){T.push(Ue,0,o[Ue]),c=NS(c),w.svg?wc(t,c,0,S,0,this):(v=parseFloat(c.split(" ")[2])||0,v!==w.zOrigin&&Zn(this,w,"zOrigin",w.zOrigin,v),Zn(this,o,d,Qa(u),Qa(c)));continue}else if(d==="svgOrigin"){wc(t,c,1,S,0,this);continue}else if(d in q0){IS(this,w,d,h,y?Kr(h,y+c):c);continue}else if(d==="smoothOrigin"){Zn(this,w,"smooth",w.smooth,c);continue}else if(d==="force3D"){w[d]=c;continue}else if(d==="transform"){zS(this,c,t);continue}}else d in o||(d=fi(d)||d);if(x||(f||f===0)&&(h||h===0)&&!xS.test(c)&&d in o)m=(u+"").substr((h+"").length),f||(f=0),v=Re(c)||(d in Je.units?Je.units[d]:m),m!==v&&(h=nr(t,d,u,v)),this._pt=new Be(this._pt,x?w:o,d,h,(y?Kr(h,y+f):f)-h,!x&&(v==="px"||d==="zIndex")&&n.autoRound!==!1?TS:vc),this._pt.u=v||0,x&&M!==c?(this._pt.b=u,this._pt.e=M,this._pt.r=SS):m!==v&&v!=="%"&&(this._pt.b=u,this._pt.r=wS);else if(d in o)FS.call(this,t,d,u,y?y+c:c);else if(d in t)this.add(t,d,u||t[d],y?y+c:c,i,a);else if(d!=="parseTransform"){Qc(d,c);continue}x||(d in o?T.push(d,0,o[d]):typeof t[d]=="function"?T.push(d,2,t[d]()):T.push(d,1,u||t[d])),s.push(d)}}b&&k0(this)},render:function(t,n){if(n.tween._time||!cf())for(var r=n._pt;r;)r.r(t,r.d),r=r._next;else n.styles.revert()},get:Ln,aliases:Tn,getSetter:function(t,n,r){var i=Tn[n];return i&&i.indexOf(",")<0&&(n=i),n in Hn&&n!==Ue&&(t._gsap.x||Ln(t,"x"))?r&&Ch===r?n==="scale"?kS:CS:(Ch=r||{})&&(n==="scale"?RS:ES):t.style&&!Kc(t.style[n])?MS:~n.indexOf("-")?AS:of(t,n)},core:{_removeProperty:er,_getMatrix:hf}};He.utils.checkPrefix=fi;He.core.getStyleSaver=P0;(function(e,t,n,r){var i=ze(e+","+t+","+n,function(a){Hn[a]=1});ze(t,function(a){Je.units[a]="deg",q0[a]=1}),Tn[i[13]]=e+","+t,ze(r,function(a){var s=a.split(":");Tn[s[1]]=i[s[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");ze("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){Je.units[e]="px"});He.registerPlugin(z0);var Sc=He.registerPlugin(z0)||He;Sc.core.Tween;const Ur={IN_OUT:"power2.inOut",OUT:"power2.out"},Si={NO_STAGGER:0,RIPPLE_STAGGER_DELAY:.05};class B0{constructor(t,n={}){yi(this,"timeline");yi(this,"currentStage","");yi(this,"callbacks");yi(this,"durations");this.durations=t,this.callbacks=n,this.timeline=Sc.timeline({paused:!0,onUpdate:()=>this.handleProgress(),onComplete:()=>{var i,a,s,o;(a=(i=this.callbacks).onComplete)==null||a.call(i),(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"complete")}});let r=0;this.timeline.addLabel("seatsToRings",r),r+=t.seatsToRings/1e3,this.timeline.addLabel("ringsToBar",r),r+=t.ringsToBar/1e3,this.timeline.addLabel("axesReveal",r),r+=t.axesReveal/1e3,this.timeline.addLabel("barSlide",r),r+=t.barSlide/1e3,this.timeline.addLabel("barsGrow",r),r+=t.barsGrow/1e3,this.timeline.addLabel("barsToArea",r)}animateSeatsToRings(t,n){const r=this.durations.seatsToRings/1e3;return t.each(function(){const i=this;if(!i.getAttribute("data-orig-x")){const a=i.getAttribute("x"),s=i.getAttribute("y"),o=i.getAttribute("width"),l=i.getAttribute("height");i.setAttribute("data-orig-x",a||"0"),i.setAttribute("data-orig-y",s||"0"),i.setAttribute("data-orig-width",o||"0"),i.setAttribute("data-orig-height",l||"0")}}),this.timeline.to(t.nodes(),{width:2,y:(i,a)=>parseFloat(a.getAttribute("y")||"0"),height:(i,a)=>{const s=parseFloat(a.getAttribute("y")||"0");return n-s},duration:r,ease:Ur.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="seatsToRings",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"seatsToRings")}},"seatsToRings"),this}animateRingsToBar(t,n){const r=this.durations.ringsToBar/1e3;return t.each(function(i,a){const s=this;if(!n[a])return;const l=s.getAttribute("x"),u=s.getAttribute("y"),c=s.getAttribute("width"),f=s.getAttribute("height");s.setAttribute("data-orig-x",l||"0"),s.setAttribute("data-orig-y",u||"0"),s.setAttribute("data-orig-width",c||"0"),s.setAttribute("data-orig-height",f||"0")}),this.timeline.to(t.nodes(),{x:i=>{var a;return((a=n[i])==null?void 0:a.x)??0},y:i=>{var a;return((a=n[i])==null?void 0:a.y)??0},width:i=>{var a;return((a=n[i])==null?void 0:a.width)??0},height:i=>{var a;return((a=n[i])==null?void 0:a.height)??0},duration:r,ease:Ur.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="ringsToBar",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"ringsToBar")}},"ringsToBar"),this}animateAxesReveal(t,n){const r=this.durations.axesReveal/1e3;return this.timeline.to([t.node(),n.node()],{opacity:1,duration:r,ease:Ur.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="axesReveal",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"axesReveal")}},"axesReveal"),this}animateBarSlide(t,n){const r=this.durations.barSlide/1e3;return this.timeline.to(t.nodes(),{x:n,duration:r,ease:Ur.OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="barSlide",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"barSlide")}},"barSlide"),this}animateBarsGrow(t,n,r=Si.RIPPLE_STAGGER_DELAY){const i=this.durations.barsGrow/1e3;return t.nodes().forEach((s,o)=>{const l=s,u=l.getAttribute("data-final-y")||"0",c=l.getAttribute("data-final-height")||"0",f=parseInt(l.getAttribute("data-timestamp-index")||"0"),p=Math.abs(f-n)*r;this.timeline.fromTo(l,{height:0,y:parseFloat(l.getAttribute("data-chart-baseline")||"400")},{y:parseFloat(u),height:parseFloat(c),duration:i,delay:p,ease:Ur.OUT},"barsGrow")}),this.timeline.call(()=>{var s,o;this.currentStage="barsGrow",(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"barsGrow")},[],"barsGrow"),this}animateBarsToArea(t,n,r,i){const a=this.durations.barsToArea/1e3,s=new Map;return t.each(function(){var c;const o=this,l=o.getAttribute("class");if(!l)return;const u=l.match(/category-([\w-]+)/);if(u&&u[1]){const f=u[1];s.has(f)||s.set(f,[]),(c=s.get(f))==null||c.push(o)}}),this.timeline.set(t.nodes(),{opacity:0},"barsToArea"),this.timeline.set(n.nodes(),{opacity:1},"barsToArea"),n.each(function(){const o=this,l=o.getAttribute("data-category");if(!l)return;const u=r.get(l);u&&Sc.to(o,{attr:{d:u},duration:a,ease:Ur.IN_OUT})}),this.timeline.call(()=>{var o,l;this.currentStage="barsToArea",(l=(o=this.callbacks).onStageComplete)==null||l.call(o,"barsToArea")},[],"barsToArea"),this}handleProgress(){var n,r;const t=this.timeline.progress();(r=(n=this.callbacks).onProgress)==null||r.call(n,t)}getControls(){return{play:()=>this.timeline.play(),pause:()=>this.timeline.pause(),reverse:()=>this.timeline.reverse(),restart:()=>this.timeline.restart(),seek:t=>this.timeline.progress(t),seekToStage:t=>{const n=this.timeline.labels[t];n!==void 0&&this.timeline.seek(n)},kill:()=>this.timeline.kill(),getProgress:()=>this.timeline.progress(),getCurrentStage:()=>this.currentStage,getTimeline:()=>this.timeline}}play(){this.timeline.play()}destroy(){this.timeline.kill()}}function BS(e,t){const{arcAngle:n,arcAngleFlexibility:r=5,radius:i,seatSize:a,minSeatSize:s,maxSeatSize:o,spacing:l,innerRadiusRatio:u}=t,c=i*u,f=e.reduce((D,k)=>D+k.seats,0);let h={seatSize:a,arcAngle:n,score:-1};const p=n-r,g=n+r;for(let D=p;D<=g;D+=2.5){const k=D*Math.PI/180;for(let N=o;N>=s;N-=.1){const I=N*2,P=I*l,O=Math.floor((i-c)/P);for(let H=1;H<=Math.min(O,10);H++){let X=0;for(let et=0;et<H;et++){const at=c+(et+.5)*P,tt=I*l/at,U=Math.floor(k/tt);X+=U}if(X>=f){const et=f/X,at=(N-s)/(o-s),tt=(X-f)/f,U=tt<.15?1:tt<.3?.7:tt<.5?.4:.1,Q=1-Math.abs(D-n)/r,L=U*.5+at*.3+et*.15+Q*.05;L>h.score&&(h={seatSize:N,arcAngle:D,rings:H,score:L})}}}}const d=h.seatSize,m=h.arcAngle,v=m*Math.PI/180,y=d*2,x=y*l,_=Math.floor((i-c)/x),w=[],S=-v/2-Math.PI/2,b=[];let T=0,M=[];for(let D=1;D<=_;D++){let k=0;const N=[];for(let I=0;I<D;I++){const P=c+(I+.5)*x,O=y*l/P,H=Math.floor(v/O);N.push(H),k+=H}if(k>=f){T=D,M=N;break}}if(T>0)b.push(...M);else for(let D=0;D<_;D++){const k=c+(D+.5)*x,N=y*l/k,I=Math.floor(v/N);b.push(I)}for(let D=0;D<b.length;D++){const k=c+(D+.5)*x,N=b[D]??0;if(N>0){const I=v/N;for(let P=0;P<N;P++){const O=S+(P+.5)*I,H=Math.cos(O)*k,X=Math.sin(O)*k;w.push({ring:D,index:P,angle:O,x:H,y:X})}}}w.sort((D,k)=>{const N=D.angle-k.angle;return Math.abs(N)>.001?N:D.ring-k.ring});const C=[];let A=0;return e.forEach((D,k)=>{const N=Math.min(D.seats,w.length-A);for(let I=0;I<N&&A<w.length;I++){const P=w[A++];P&&C.push({x:P.x,y:P.y,category:D.name,categoryIndex:k,seatIndex:I,ring:P.ring,angle:P.angle,radius:d})}}),{arcAngle:m,radius:i,innerRadius:c,centerX:i,centerY:i,seatSize:d,seats:C,totalSeats:f}}function US(e,t,n){const r=t<=n?1:n/t;return e.filter(i=>i.value>0).map(i=>{const a=t<=n?i.value:Math.max(1,Math.floor(i.value*r));return{id:i.dataKey,name:i.label,seats:a,colour:i.color}})}function Ja({svg:e,events:t,xScale:n,chartHeight:r,chartWidth:i,timelineHeight:a,timelineOffset:s,instanceId:o,setHoveredTimelineEvent:l,enableBrush:u=!1,onTimeRangeChange:c,minAllowedTime:f,maxAllowedTime:h,brushColor:p="#69b3a2",mainGroupSelector:g}){const d=r+s,m=o?`.main-chart-group-${o}`:".main-chart-group",v=e.select(g??m),y=o?`timeline-track timeline-track-${o}`:"timeline-track",x=v.append("g").attr("class",y),_=6,w=o?`timeline-clip-${o}`:`timeline-clip-${Math.random().toString(36).substr(2,9)}`;e.append("defs").append("clipPath").attr("id",w).append("rect").attr("x",0).attr("y",d).attr("width",i+_).attr("height",a),x.append("rect").attr("class","timeline-background").attr("x",0).attr("y",d).attr("width",i).attr("height",a).attr("fill","#FFFFFF").attr("stroke","#9CA3AF").attr("stroke-width",1);const S=x.append("g").attr("clip-path",`url(#${w})`),b=3,T=S.selectAll(".timeline-event").data(t).enter().append("rect").attr("class","timeline-event").attr("x",C=>n(new Date(C.timestamp))-b/2).attr("y",d).attr("width",b).attr("height",a).attr("fill",C=>C.color||"#2F42FF").attr("stroke","none").attr("cursor","pointer").attr("data-timestamp",C=>C.timestamp).attr("data-event-name",C=>C.eventName),M=6;if(T.on("mouseenter",function(C,A){const D=Rt(this),k=n(new Date(A.timestamp));D.transition().duration(150).attr("x",k-M/2).attr("width",M),l&&l({timestamp:A.timestamp,eventName:A.eventName,x:k})}).on("mouseleave",function(C,A){const D=Rt(this),k=n(new Date(A.timestamp));D.transition().duration(150).attr("x",k-b/2).attr("width",b),l&&l(null)}),u&&c){const C=f,A=h,D=ra().extent([[0,d],[i,d+a]]).on("start",I=>{if(!I.selection&&C!==void 0&&A!==void 0){const P=I.sourceEvent;if(P){const O=P.offsetX,H=+n.invert(O);if(H<C||H>A){const X=o?`.timeline-brush-${o}`:".timeline-brush";e.select(X).call(D.move,null);return}}}}).on("brush",I=>{if(!I.selection)return;const[P,O]=I.selection;let H=+n.invert(P),X=+n.invert(O);C!==void 0&&(H=Math.max(H,C),X=Math.max(X,C)),A!==void 0&&(H=Math.min(H,A),X=Math.min(X,A));const et=n(new Date(H)),at=n(new Date(X));if(et!==P||at!==O){const tt=o?`.timeline-brush-${o}`:".timeline-brush";e.select(tt).call(D.move,[et,at])}}).on("end",I=>{if(!I.selection)return;const[P,O]=I.selection,H=[+n.invert(P),+n.invert(O)];C!==void 0&&(H[0]=Math.max(H[0],C)),A!==void 0&&(H[1]=Math.min(H[1],A)),c(H);const X=o?`.timeline-brush-${o}`:".timeline-brush";e.select(X).call(D.move,null)}),k=o?`timeline-brush timeline-brush-${o}`:"timeline-brush",N=v.append("g").attr("class",k).call(D);N.selectAll(".selection").attr("fill",p).attr("fill-opacity",.2).attr("stroke",p).attr("stroke-width",1),N.selectAll(".handle").attr("fill",p).attr("fill-opacity",.8),N.on("dblclick",()=>{const I=n.domain(),P=[+I[0],+I[1]];c(P)})}}const cn={neoGrey:{200:"#EDEFEF",400:"#ADB5BD"},neoDigitalGreen:{600:"#40c048"}},qi=["#4CA75A","#FDDA04","#FFC008","#FF9800","#F9A91B","#FF5C24","#ED4134","#CB3446"],$e={greyHatch:{background:cn.neoGrey[200],lines:cn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}};function HS(e,t){const 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",$e.greyHatch.background),n.append("path").attr("d","M0,2 L8,2").attr("stroke",$e.greyHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M0,6 L8,6").attr("stroke",$e.greyHatch.lines).attr("stroke-width",.5)}function GS(e,t){const 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",$e.dataMissingHatch.background),n.append("path").attr("d","M0,8 L8,0").attr("stroke",$e.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,2 L2,-2").attr("stroke",$e.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,10 L10,6").attr("stroke",$e.dataMissingHatch.lines).attr("stroke-width",.5)}function jS(e,t){const 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",$e.noLstHatch.background),n.append("path").attr("d","M0,0 L8,8").attr("stroke",$e.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,6 L2,10").attr("stroke",$e.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,-2 L10,2").attr("stroke",$e.noLstHatch.lines).attr("stroke-width",.5)}function xa(e,t){let n=e.select("defs");n.empty()&&(n=e.append("defs")),HS(n,t),GS(n,t),jS(n,t)}function Lh(e,t){if(e.startsWith("url(#")&&e.endsWith(")")){const n=e.slice(5,-1);return`url(#${t}-${n})`}return e}function pf(e){return e.includes("greyHatchPattern")?$e.greyHatch.lines:e.includes("dataMissingHatchPattern")?$e.dataMissingHatch.lines:e.includes("noLstHatchPattern")?$e.noLstHatch.lines:e}function Tc(e,t,n,r){const{xScale:i,yScale:a,addClasses:s=!0,instanceId:o}=r,l=ss().x(h=>i(new Date(h.data.timestamp))).y0(h=>a(h[0])).y1(h=>a(h[1])).curve(Cr),u=Um().x(h=>i(new Date(h.data.timestamp))).y(h=>a(h[1])).curve(Cr),c=o?`areas areas-${o}`:"areas";let f=e.select(o?`.areas-${o}`:".areas");f.empty()&&(f=e.append("g").attr("class",c)),t.forEach((h,p)=>{var v;const g=n[p];if(!g)return;const d=((v=g.parliamentMapping)==null?void 0:v.isSpecialCategory)??!1,m=pf(g.color);if(d){const y=f.append("path").datum(h).attr("fill","none").attr("stroke",m).attr("stroke-width",3).attr("stroke-dasharray","15 8").attr("d",u).style("pointer-events","none");if(s){const x=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",x)}}else{const y=f.append("path").datum(h).attr("fill",g.color).attr("fill-opacity",g.fillOpacity??.7).attr("stroke",m).attr("stroke-width",g.strokeWidth??1.5).attr("d",l).style("pointer-events","none");if(s){const x=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",x)}}})}function YS(e,t){var r;const n=[];for(const i of e){let a=0;for(const s of t){const o=i[s.dataKey]||0,l=a,u=a+o;n.push({timestamp:i.timestamp,category:s.label,dataKey:s.dataKey,y0:l,y1:u,value:o,color:s.color,isSpecialCategory:((r=s.parliamentMapping)==null?void 0:r.isSpecialCategory)??!1}),a+=o}}return n}function ke(e){return e.replace(/[^a-zA-Z0-9-_]/g,"-")}function U0(e,t,n,r){const{centerX:i,centerY:a,addClasses:s=!0,instanceId:o,parliamentRadius:l=200}=r,u=o?`parliament parliament-${o}`:"parliament";let c=e.select(o?`.parliament-${o}`:".parliament");c.empty()&&(c=e.append("g").attr("class",u)),t.seats.forEach(p=>{const g=n.find(v=>v.label===p.category);if(!g)return;const d=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius).attr("fill",g.color).attr("stroke",g.color).attr("stroke-width",.5),m=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius*2.5).attr("fill","transparent").attr("stroke","none").attr("pointer-events","all");if(s){const v=o?`seat seat-${o} seat-${ke(p.category)}`:`seat seat-${ke(p.category)}`;d.attr("class",v),m.attr("class",v)}});const f=o?`parliament-label parliament-label-${o}`:"parliament-label";if(e.select(`.${f.split(" ")[0]}`).empty()){const p=e.append("g").attr("class",f).attr("transform",`translate(${i},${a-l*.15})`).style("opacity","0").style("pointer-events","none");p.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),p.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");const g=p.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");g.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),g.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}}function XS(e,t,n,r,i,a,s=!1){var f;const o=new Map;let l=i;if(t.length>0&&((f=t[0])==null?void 0:f.timestamp)!==void 0){const h=t[0].timestamp;l=n(new Date(h))}const u=new Map;for(const h of e.seats)u.has(h.category)||u.set(h.category,[]),u.get(h.category).push(h);const c=new Map;for(const h of t)c.set(h.dataKey,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory}),h.label&&h.label!==h.dataKey&&c.set(h.label,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory});for(const h of e.seats){const p=c.get(h.category);if(!p){o.set(h,{x:l,y:a/2});continue}const g=r(p.y0),d=r(p.y1);let m;if(s){const v=u.get(h.category)??[],y=h.seatIndex,x=v.length;if(x===1)m=(g+d)/2;else{const _=y/(x-1);m=g+(d-g)*_}}else m=d;o.set(h,{x:l,y:m})}return o}function WS(e,t,n){var s;if(e.length===0)return[];const r=e[e.length-1],i=[];let a=0;for(const o of t){const l=r[o.dataKey]||0,u=a,c=a+l;i.push({dataKey:o.dataKey,label:o.label,y0:u,y1:c,value:l,timestamp:r.timestamp,isSpecialCategory:((s=o.parliamentMapping)==null?void 0:s.isSpecialCategory)??!1}),a+=l}return i}function KS(e){const t=e;return{seatsToLines:t*.2,seatsToBar:t*.07,crossFadePause:t*.003,barSlideToTimeline:t*.22,axesAndBarsGrow:t*.22,barsToArea:t*.287}}const gr=new Map;Rt.prototype.transition=Ic;const VS=({containerRef:e,data:t,categories:n,mode:r,width:i,height:a,margin:s,timeRange:o,showGrid:l=!0,showAxes:u=!0,axisLabelColor:c,axisLabelSize:f=14,formatDate:h,formatValue:p,markers:g=[],arcAngle:d=200,parliamentRadius:m=200,seatSize:v=4.5,animationDuration:y=900,onMorphComplete:x,onAnimationStateChange:_,onTimelineReady:w,onAnimationProgress:S,onHoveredDataChange:b,hoveredCategory:T,maxSeats:M=2e3,parliamentTimestamp:C,enableBrush:A=!1,onTimeRangeChange:D,minAllowedTime:k,maxAllowedTime:N,showScaleIndicator:I=!1,reposPerSeat:P=1,timelineEvents:O=[],showTimeline:H=!1,timelineHeight:X=40,timelineOffset:et=35,brushColor:at="#69b3a2"})=>{const[tt,U]=V.useState("area"),[Q,L]=V.useState(!1),[W,J]=V.useState(null),[j,E]=V.useState(0),[z,q]=V.useState(null),[R,it]=V.useState(null),[G,K]=V.useState([]),lt=V.useRef(null),nt=V.useRef(r),ft=V.useRef(!0),At=V.useRef(!1),st=V.useRef(`morph-${Math.random().toString(36).substr(2,9)}`),bt=V.useRef(void 0),Bt=V.useRef(o),ot=V.useRef(g),mt=V.useRef(O),yt=V.useRef(x),xt=V.useRef(_),Ut=V.useRef(w),qt=V.useRef(S),Nt=V.useRef(b);V.useEffect(()=>{yt.current=x,xt.current=_,Ut.current=w,qt.current=S,Nt.current=b},[x,_,w,S,b]),V.useEffect(()=>{if(e.current&&tt==="parliament")if(T){const vt=n.find(Lt=>Lt.dataKey===T);if(vt){const Lt=vt.label;if(J(Lt),zi(e.current,Lt),t.length>0){const Zt=t[t.length-1],Ht=Math.round(Zt.values[vt.dataKey]||0),Wt={label:vt.label,value:Ht,color:pf(vt.color)};Ii(e.current,Wt,I,P,st.current)}}}else J(null),zi(e.current,null),Ii(e.current,null,I,P,st.current)},[T,tt,n,t,I,P]);const le=i-s.left-s.right,$t=a-s.top-s.bottom;return V.useEffect(()=>{var Ct;if(!e.current||t.length===0||n.length===0||(bt.current&&(bt.current(),bt.current=void 0),At.current))return;const vt=Rt(e.current),Lt=r!==nt.current;ft.current?(vt.selectAll("*").remove(),xa(vt,st.current),ft.current=!1):Lt||(vt.selectAll("*").remove(),xa(vt,st.current));const Zt=t[t.length-1],Ht=n.reduce((ct,kt)=>ct+(Zt.values[kt.dataKey]||0),0),Wt=t.map(ct=>{const kt={timestamp:ct.timestamp};for(const Pt of n)kt[Pt.dataKey]=ct.values[Pt.dataKey]||0;return kt}),je=n.map(ct=>ct.dataKey),ue=ja().keys(je),hn=ue(Wt),ve=t.map(ct=>ct.timestamp),Ye=Lt||!o?Math.min(...ve):o[0],Te=Lt||!o?Math.max(...ve):o[1],rn=[...ve].sort((ct,kt)=>ct-kt),ge=[];for(let ct=0;ct<rn.length-1;ct++)ge.push(rn[ct+1]-rn[ct]);const Mt=ge.length>0?ge.reduce((ct,kt)=>ct+kt,0)/ge.length:0,Qt=Te+Mt*1.15,wt=Pi().domain([new Date(Ye),new Date(Qt)]).range([0,le]),ie=Wt.filter(ct=>ct.timestamp>=Ye&&ct.timestamp<=Te),xe=ue(ie),Gt=xe.length>0?Math.max(...xe[xe.length-1].map(ct=>ct[1]??0)):0,Jt=Xi().domain([0,Gt*1.15]).range([$t,0]),ce=n.map(ct=>({...ct,color:Lh(ct.color,st.current)})),an=ce.map(ct=>({dataKey:ct.dataKey,label:ct.label,color:ct.color,value:Zt.values[ct.dataKey]||0})),$=US(an,Ht,M).reverse(),ut=BS($,{arcAngle:d,radius:m,seatSize:v,minSeatSize:4,maxSeatSize:30,spacing:1.1,innerRadiusRatio:.4});lt.current=ut;const pt=WS(Wt,n),St=XS(ut,pt,wt,Jt,le,$t);if(Lt&&!At.current){At.current=!0,L(!0),(Ct=xt.current)==null||Ct.call(xt,!0),q(null),K([]),E(0);let ct=vt.select("g[transform]");if(ct.empty()&&(ct=vt.select("g")),ct.empty()){vt.selectAll("*").remove(),xa(vt,st.current),js(vt,r==="parliament"?"parliament":"area",hn,ce,ut,wt,Jt,le,$t,s,l,u,c,f,h,p,A,D,st.current,g,o,K,q,O,H,X,et,it,k,N,at),L(!1),U(r==="parliament"?"parliament":"area"),E(r==="parliament"?1:0),nt.current=r;return}const kt=setTimeout(()=>{At.current=!1,L(!1),nt.current=r},y*3);JS(vt,r,hn,ce,ut,St,wt,Jt,le,$t,s,y,()=>{var Pt,me,te;if(clearTimeout(kt),At.current=!1,L(!1),U(r==="parliament"?"parliament":"area"),r==="parliament"&&E(1),(Pt=xt.current)==null||Pt.call(xt,!1),(me=yt.current)==null||me.call(yt),nt.current=r,r==="parliament"&&e.current&&Nt.current&&(bt.current=Ys(e.current,ce,t,W,J,Nt.current,I,P,st.current)),r!=="parliament"&&e.current){J(null),(te=Nt.current)==null||te.call(Nt,null),Ii(e.current,null,I,P,st.current);const De=Rt(e.current),fe=De.select(st.current?`.main-chart-group-${st.current}`:".main-chart-group");if(H){const Fe=st.current?`.timeline-track-${st.current}`:".timeline-track",Ne=st.current?`.timeline-brush-${st.current}`:".timeline-brush";fe.select(Fe).remove(),fe.select(Ne).remove(),Ja({svg:De,events:O,xScale:wt,chartHeight:$t,chartWidth:le,timelineHeight:X,timelineOffset:et,instanceId:st.current,setHoveredTimelineEvent:it,enableBrush:A,onTimeRangeChange:D,minAllowedTime:k,maxAllowedTime:N,brushColor:at})}if(A&&D){const Fe=fe.select(st.current?`.chart-content-group-${st.current}`:".chart-content-group");ZS(Fe,le,$t,wt,D,st.current,De,k,N,at)}if(g.length>0&&K&&q&&o){const Ne=g.filter(ee=>ee.timestamp>=(o[0]??0)-1&&ee.timestamp<=(o[1]??1/0)+1).map(ee=>({...ee,x:wt(new Date(ee.timestamp))}));if(K(Ne),Ne.length>0){qh(fe,Ne,$t,le,A,q,st.current);const ee=fe.select(st.current?`.markers-${st.current}`:".markers");if(!ee.empty()){fe.selectAll(".marker-hover-overlay").remove();const Pr=fe.select(st.current?`.chart-content-group-${st.current}`:".chart-content-group");let pn;A?pn=Pr.select(".brush .overlay"):pn=fe.append("rect").attr("class","marker-hover-overlay").attr("x",0).attr("y",0).attr("width",le).attr("height",$t).attr("fill","none").attr("pointer-events","all");let Rn=null;pn.on("mousemove",function(Fr){const[Gn]=Sr(Fr,this);let Nr=null,dn=1/0;if(Ne.forEach(ir=>{const Y=Math.abs(Gn-ir.x);Y<dn&&(dn=Y,Nr=ir)}),!Nr||dn>50){Rn!==null&&(Rn=null,ee.selectAll(".marker-line").attr("opacity",0),ee.selectAll(".marker-label").attr("opacity",0),q(null));return}const En=Nr;Rn!==En.timestamp&&(Rn=En.timestamp,ee.selectAll(".marker-line").attr("opacity",0),ee.selectAll(".marker-label").attr("opacity",0),ee.selectAll(".marker-line").filter(function(){return Rt(this).attr("data-timestamp")===String(En.timestamp)}).attr("opacity",.6),ee.selectAll(".marker-label").filter(function(){return Rt(this).attr("data-timestamp")===String(En.timestamp)}).attr("opacity",1),q(En))}),pn.on("mouseleave",function(){Rn=null,ee.selectAll(".marker-line").attr("opacity",0),ee.selectAll(".marker-label").attr("opacity",0),q(null)})}}}}},u,f,h,p,Ut.current,(Pt,me)=>{var te;if(r==="parliament"&&Pt>=.95){const De=(Pt-.95)/.05;E(Math.min(De,1))}(te=qt.current)==null||te.call(qt,Pt,me)},C,st.current)}else nt.current=r,r==="parliament"&&(q(null),K([])),js(vt,r==="parliament"?"parliament":"area",hn,ce,ut,wt,Jt,le,$t,s,l,u,c,f,h,p,A,D,st.current,g,o,K,q,O,H,X,et,it,k,N,at),U(r==="parliament"?"parliament":"area"),E(r==="parliament"?1:0),r==="parliament"&&e.current&&Nt.current&&(bt.current=Ys(e.current,ce,t,W,J,Nt.current,I,P,st.current));return()=>{bt.current&&(bt.current(),bt.current=void 0)}},[r]),V.useEffect(()=>{var ie,xe;if(!e.current||t.length===0||At.current)return;if(ft.current){Bt.current=o;return}if(!(o!==Bt.current&&((o==null?void 0:o[0])!==((ie=Bt.current)==null?void 0:ie[0])||(o==null?void 0:o[1])!==((xe=Bt.current)==null?void 0:xe[1]))))return;Bt.current=o;const Lt=Rt(e.current),Zt=t.map(Gt=>{const Jt={timestamp:Gt.timestamp};for(const ce of n)Jt[ce.dataKey]=Gt.values[ce.dataKey]||0;return Jt}),Ht=n.map(Gt=>Gt.dataKey),je=ja().keys(Ht)(Zt),ue=t.map(Gt=>Gt.timestamp),hn=o?o[0]:Math.min(...ue),ve=o?o[1]:Math.max(...ue),Te=(ue.length>1?(ue[ue.length-1]-ue[0])/(ue.length-1):0)*.5,rn=Pi().domain([new Date(hn-Te),new Date(ve+Te)]).range([0,i-s.left-s.right]),ge=Math.max(...je[je.length-1].map(Gt=>Gt[1])),Mt=Xi().domain([0,ge*1.1]).range([a-s.top-s.bottom,0]);if(!lt.current)return;const Qt=lt.current,wt=n.map(Gt=>({...Gt,color:Lh(Gt.color,st.current)}));Lt.selectAll("*").remove(),xa(Lt,st.current),js(Lt,tt==="parliament"?"parliament":"area",je,wt,Qt,rn,Mt,i-s.left-s.right,a-s.top-s.bottom,s,l,u,c,f,h,p,A,D,st.current,g,o,K,q,O,H,X,et,it,k,N,at),tt==="parliament"&&e.current&&Nt.current&&(bt.current=Ys(e.current,wt,t,W,J,Nt.current,I,P,st.current))},[o]),V.useEffect(()=>{if(!e.current||t.length===0||At.current)return;if(ft.current){ot.current=g,mt.current=O;return}if(tt==="parliament"){ot.current=g,mt.current=O;return}const vt=g.length!==ot.current.length||g.some((Mt,Qt)=>{var wt,ie;return Mt.timestamp!==((wt=ot.current[Qt])==null?void 0:wt.timestamp)||Mt.label!==((ie=ot.current[Qt])==null?void 0:ie.label)}),Lt=O.length!==mt.current.length||O.some((Mt,Qt)=>{var wt,ie;return Mt.timestamp!==((wt=mt.current[Qt])==null?void 0:wt.timestamp)||Mt.eventName!==((ie=mt.current[Qt])==null?void 0:ie.eventName)});if(!vt&&!Lt)return;ot.current=g,mt.current=O;const Zt=Rt(e.current),Ht=Zt.select(st.current?`.main-chart-group-${st.current}`:".main-chart-group");if(Ht.empty())return;const Wt=t.map(Mt=>Mt.timestamp),je=o?o[0]:Math.min(...Wt),ue=o?o[1]:Math.max(...Wt),ve=(Wt.length>1?(Wt[Wt.length-1]-Wt[0])/(Wt.length-1):0)*.5,Ye=i-s.left-s.right,Te=a-s.top-s.bottom,rn=Pi().domain([new Date(je-ve),new Date(ue+ve)]).range([0,Ye]);if(Lt&&H){const Mt=st.current?`.timeline-track-${st.current}`:".timeline-track",Qt=st.current?`.timeline-brush-${st.current}`:".timeline-brush";Ht.select(Mt).remove(),Ht.select(Qt).remove(),Ja({svg:Zt,events:O,xScale:rn,chartHeight:Te,chartWidth:Ye,timelineHeight:X,timelineOffset:et,instanceId:st.current,setHoveredTimelineEvent:it,enableBrush:A,onTimeRangeChange:D,minAllowedTime:k,maxAllowedTime:N,brushColor:at})}let ge=[];if(vt&&g.length>0&&o){const Mt=st.current?`.markers-${st.current}`:".markers";Ht.select(Mt).remove();const Qt=1;ge=g.filter(wt=>wt.timestamp>=(o[0]??0)-Qt&&wt.timestamp<=(o[1]??1/0)+Qt).map(wt=>({...wt,x:rn(new Date(wt.timestamp))})),K(ge),ge.length>0&&qh(Ht,ge,Te,Ye,A,q,st.current)}if(ge.length>0){const Mt=Ht.select(st.current?`.markers-${st.current}`:".markers");if(!Mt.empty()){Ht.selectAll(".marker-hover-overlay").remove();const Qt=Ht.append("rect").attr("class","marker-hover-overlay").attr("x",0).attr("y",0).attr("width",Ye).attr("height",Te).attr("fill","none").attr("pointer-events","all");let wt=null;Qt.on("mousemove",function(ie){const[xe]=Sr(ie,this);let Gt=null,Jt=1/0;if(ge.forEach($=>{const ut=Math.abs(xe-$.x);ut<Jt&&(Jt=ut,Gt=$)}),!Gt||Jt>50){wt!==null&&(wt=null,Mt.selectAll(".marker-line").attr("opacity",0),Mt.selectAll(".marker-label").attr("opacity",0),q(null));return}const an=Gt;wt!==an.timestamp&&(wt=an.timestamp,Mt.selectAll(".marker-line").attr("opacity",0),Mt.selectAll(".marker-label").attr("opacity",0),Mt.selectAll(".marker-line").filter(function(){return Rt(this).attr("data-timestamp")===String(an.timestamp)}).attr("opacity",.6),Mt.selectAll(".marker-label").filter(function(){return Rt(this).attr("data-timestamp")===String(an.timestamp)}).attr("opacity",1),q(an))}),Qt.on("mouseleave",function(){wt=null,Mt.selectAll(".marker-line").attr("opacity",0),Mt.selectAll(".marker-label").attr("opacity",0),q(null)})}}},[g,O,Q]),{isMorphing:Q,currentMode:tt,hoveredCategory:W,scaleIndicatorOpacity:j,visibleMarkers:G,hoveredMarker:z,setHoveredMarker:q,hoveredTimelineEvent:R,setHoveredTimelineEvent:it}};function ZS(e,t,n,r,i,a,s,o,l,u){const c=o,f=l,h=ra().extent([[0,0],[t,n]]).on("start",g=>{if(!g.selection&&c!==void 0&&f!==void 0){const d=g.sourceEvent;if(d){const m=d.offsetX,v=+r.invert(m);if(v<c||v>f){s.select(".brush").call(h.move,null);return}}}}).on("brush",g=>{if(!g.selection)return;const[d,m]=g.selection;let v=+r.invert(d),y=+r.invert(m);c!==void 0&&(v=Math.max(v,c),y=Math.max(y,c)),f!==void 0&&(v=Math.min(v,f),y=Math.min(y,f));const x=r(new Date(v)),_=r(new Date(y));(x!==d||_!==m)&&s.select(".brush").call(h.move,[x,_])}).on("end",g=>{if(!g.selection)return;const[d,m]=g.selection,v=[+r.invert(d),+r.invert(m)];c!==void 0&&(v[0]=Math.max(v[0],c)),f!==void 0&&(v[1]=Math.min(v[1],f)),i(v),s.select(".brush").call(h.move,null)}),p=e.append("g").attr("class","brush").call(h);p.selectAll(".selection").attr("fill",u).attr("fill-opacity",.2).attr("stroke",u).attr("stroke-width",1),p.selectAll(".handle").attr("fill",u).attr("fill-opacity",.8),p.on("dblclick",()=>{const g=r.domain(),d=[+g[0],+g[1]];o!==void 0&&(d[0]=Math.max(d[0],o)),l!==void 0&&(d[1]=Math.min(d[1],l)),i(d)})}function qh(e,t,n,r,i,a,s){const o=s?`markers markers-${s}`:"markers",l=e.append("g").attr("class",o);t.forEach(u=>{l.append("line").attr("class","marker-line").attr("data-timestamp",u.timestamp).attr("x1",u.x).attr("x2",u.x).attr("y1",0).attr("y2",n).attr("stroke",u.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),u.label&&l.append("text").attr("class","marker-label").attr("data-timestamp",u.timestamp).attr("x",u.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",u.color??"#2F42FF").attr("opacity",0)})}function QS(e,t,n,r,i,a,s){let o=null,l;a?l=e.select(".brush .overlay"):l=e.append("rect").attr("class","marker-hover-overlay").attr("width",r).attr("height",i).attr("fill","none").attr("pointer-events","all");const u=c=>{let f=null,h=1/0;if(n.forEach(d=>{const m=Math.abs(c-d.x);m<h&&(h=m,f=d)}),!f||h>50)return o!==null&&(o=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null)),!1;const g=f;return o===g.timestamp||(o=g.timestamp,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),t.selectAll(".marker-line").filter(function(){return Rt(this).attr("data-timestamp")===String(g.timestamp)}).attr("opacity",.6),t.selectAll(".marker-label").filter(function(){return Rt(this).attr("data-timestamp")===String(g.timestamp)}).attr("opacity",1),s(g)),!0};l.on("mousemove",function(c){const[f]=Sr(c,this);u(f)}),l.on("mouseleave",function(){o=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null)})}function js(e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m=!1,v,y,x=[],_=[0,0],w,S,b=[],T=!1,M=40,C=15,A,D,k,N="#69b3a2"){const I=D,P=k;let O=null;const H=y?`main-chart-group main-chart-group-${y}`:"main-chart-group",X=e.append("g").attr("class",H).attr("transform",`translate(${u.left},${u.top})`),et=y?`chart-clip-${y}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`;e.select("defs").append("clipPath").attr("id",et).append("rect").attr("x",0).attr("y",0).attr("width",o).attr("height",l);const at=y?`chart-content-group chart-content-group-${y}`:"chart-content-group",tt=X.append("g").attr("class",at).attr("clip-path",`url(#${et})`);if(c&&t!=="parliament"&&(tt.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(br(a).ticks(6).tickSize(l).tickFormat(()=>"")),tt.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(wr(s).ticks(5).tickSize(-o).tickFormat(()=>""))),t==="area"&&(Tc(tt,n,r,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),x.length>0)){const Q=x.filter(L=>L.timestamp>=_[0]-1&&L.timestamp<=_[1]+1).map(L=>({...L,x:a(new Date(L.timestamp))}));O={markersGroup:null,visibleMarkers:Q},w&&w(Q)}if(t==="parliament"){const U=o/2,Q=i.radius+10,L=l-i.radius*.3,W=Math.max(Q,L);U0(tt,i,r,{centerX:U,centerY:W,addClasses:!0,instanceId:y,parliamentRadius:i.radius})}if(f&&t!=="parliament"){const Q=br(a).ticks(6).tickPadding(12);g&&Q.tickFormat(z=>g(+z));const W=X.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).call(Q).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&W.attr("fill",h);const J=wr(s).ticks(5);J.tickFormat(z=>+z==0?"":d?d(+z):String(z));const E=X.append("g").attr("class","axis axis-y").call(J).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&E.attr("fill",h)}if(m&&v&&t==="area"){const U=I,Q=P,L=ra().extent([[0,0],[o,l]]).on("start",J=>{if(!J.selection&&U!==void 0&&Q!==void 0){const j=J.sourceEvent;if(j){const E=j.offsetX-((u==null?void 0:u.left)||0),z=+a.invert(E);if(z<U||z>Q){e.select(".brush").call(L.move,null);return}}}}).on("brush",J=>{if(!J.selection)return;const[j,E]=J.selection;let z=+a.invert(j),q=+a.invert(E);U!==void 0&&(z=Math.max(z,U),q=Math.max(q,U)),Q!==void 0&&(z=Math.min(z,Q),q=Math.min(q,Q));const R=a(new Date(z)),it=a(new Date(q));(R!==j||it!==E)&&e.select(".brush").call(L.move,[R,it])}).on("end",J=>{if(!J.selection)return;const[j,E]=J.selection,z=[+a.invert(j),+a.invert(E)];U!==void 0&&(z[0]=Math.max(z[0],U)),Q!==void 0&&(z[1]=Math.min(z[1],Q)),v(z),e.select(".brush").call(L.move,null)}),W=tt.append("g").attr("class","brush").call(L);W.selectAll(".selection").attr("fill",N).attr("fill-opacity",.2).attr("stroke",N).attr("stroke-width",1),W.selectAll(".handle").attr("fill",N).attr("fill-opacity",.8),W.on("dblclick",()=>{const J=a.domain(),j=[+J[0],+J[1]];v(j)})}if(t==="area"&&O&&O.visibleMarkers.length>0){const U=X.append("g").attr("class","markers").attr("clip-path",`url(#${et})`);O.visibleMarkers.forEach(Q=>{U.append("line").attr("class","marker-line").attr("data-timestamp",Q.timestamp).attr("x1",Q.x).attr("x2",Q.x).attr("y1",0).attr("y2",l).attr("stroke",Q.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),Q.label&&U.append("text").attr("class","marker-label").attr("data-timestamp",Q.timestamp).attr("x",Q.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",Q.color??"#2F42FF").attr("opacity",0)}),O.markersGroup=U}t==="area"&&T&&A&&Ja({svg:e,events:b,xScale:a,chartHeight:l,chartWidth:o,timelineHeight:M,timelineOffset:C,instanceId:y,setHoveredTimelineEvent:A,enableBrush:m,onTimeRangeChange:v,minAllowedTime:I,maxAllowedTime:P,brushColor:N}),O&&O.visibleMarkers.length>0&&S&&t==="area"&&QS(tt,O.markersGroup,O.visibleMarkers,o,l,m,S)}function JS(e,t,n,r,i,a,s,o,l,u,c,f,h,p=!0,g=14,d,m,v,y,x,_){const w=e.select(_?`.main-chart-group-${_}`:".main-chart-group");w.selectAll(".markers").remove(),w.selectAll(".marker-hover-overlay").remove(),w.selectAll(".brush").remove(),t==="stacked-area"||t==="area"?tT(w,n,r,i,a,s,o,l,u,f,h,p,g,d,m,v,y,x,_):eT(w,n,r,i,a,s,o,l,u,f,h,p,g,d,m,v,y,x,_)}function $i(e,t,n,r,i,a,s,o){const l=e[a];if(!l)return"";const u=l.find(S=>S.data.timestamp===s);if(!u)return"";const c=u.data,f=t[a];if(!f)return"";const h=f.dataKey,p=c[h];if(!p||p<=0)return"";const g=n.get(s);if(!g)return"";const d=g.x,m=g.width,v=u[0],y=u[1],x=o?i:r(v),_=o?i:r(y),w=[];return w.push(`M ${d} ${x}`),w.push(`L ${d} ${_}`),w.push(`L ${d+m} ${_}`),w.push(`L ${d+m} ${x}`),w.push("Z"),w.join(" ")}function tT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,v,y){var ir;const x=y?`.seat-${y}`:".seat",_=e.selectAll(x),w=y?`.chart-content-group-${y}`:".chart-content-group";let S=e.select(w);if(S.empty()){const Y=e.attr("clip-path"),rt=Y?((ir=Y.match(/url\(#(.+)\)/))==null?void 0:ir[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,ht=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";S=e.append("g").attr("class",ht).attr("clip-path",`url(#${rt})`)}if(_.size()===0){Tc(e,t,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),c();return}const b=KS(u),T=y?gr.get(y):void 0;T&&(T.destroy(),y&&gr.delete(y));const M=Y=>Y<.2?"seatsToRings":Y<.35?"ringsToBar":Y<.464?"axesReveal":Y<.6?"barSlide":Y<.82?"barsGrow":"barsToArea",C=new B0({seatsToRings:b.seatsToLines,ringsToBar:b.seatsToBar,axesReveal:b.barSlideToTimeline*.3,barSlide:b.barSlideToTimeline*.7,barsGrow:b.axesAndBarsGrow,barsToArea:b.barsToArea},{onStageComplete:Y=>{},onProgress:Y=>{if(m){const rt=M(Y);m(Y,rt)}},onComplete:()=>{c()}});y&&gr.set(y,C),d&&d(C.getControls().getTimeline());const A=t[0].map(Y=>Y.data),D=YS(A,n),k=o/2,N=r.radius+10,I=l-r.radius*.3,P=Math.max(N,I),O=A.map(Y=>Y.timestamp),H=v??Math.max(...O),X=new Map,et=[];O.forEach((Y,rt)=>{const ht=a(new Date(Y)),gt=O[rt+1];if(gt){const It=a(new Date(gt))-ht;et.push(It)}});const at=et.length>0?et.reduce((Y,rt)=>Y+rt,0)/et.length:30;O.forEach((Y,rt)=>{const ht=a(new Date(Y)),gt=O[rt+1],It=rt===O.length-1?at:a(new Date(gt))-ht;X.set(Y,{x:ht,width:It})});const tt=D.filter(Y=>Y.timestamp===H),U=X.get(H),Q=666,L=y?`parliament-bar-path parliament-bar-path-${y}`:"parliament-bar-path",W=S.append("g").attr("class",L);tt.sort((Y,rt)=>rt.y0-Y.y0),new Map().set(H,{x:Q-U.width/2,width:U.width});const j=[],E=(r.radius-r.innerRadius)*.6,q=l*.8,R=P,it=tt.reduce((Y,rt)=>Y+(rt.y1-rt.y0),0);let G=0;n.forEach(Y=>{const rt=tt.find(we=>we.dataKey===Y.dataKey);if(!rt)return;const ne=(rt.y1-rt.y0)/it*q,It=R-G,Me=R-G-ne,be=Q-E/2,Le=`M ${be} ${It} L ${be} ${Me} L ${be+E} ${Me} L ${be+E} ${It} Z`;G+=ne;const Xe=W.append("path").attr("class",`parliament-bar-segment category-${ke(rt.dataKey)}`).attr("d",Le).attr("fill",rt.color).style("opacity",0).node();Xe&&j.push(Xe)}),y&&(window.orchestratorMap=gr);const K=C.getControls().getTimeline(),lt=b.seatsToLines/1e3,nt=b.seatsToBar/1e3;K.call(()=>{m==null||m(K.progress(),"seatsToRings")},[],"seatsToRings");const ft=_.nodes(),At=k,st=P,bt=Math.max(...r.seats.map(Y=>Y.ring)),Bt=r.seats.filter(Y=>Y.ring===bt),ot=e.append("g").attr("class",`seat-lines-${y||"default"}`),mt=n.map(Y=>{const rt=_.filter(`.seat-${ke(Y.dataKey)}`).size();return rt>0?{name:Y.dataKey,seatCount:rt,color:Y.color}:null}).filter(Y=>Y!==null).reverse(),yt=mt.reduce((Y,rt)=>Y+rt.seatCount,0),xt=Bt.length,Ut=r.radius-r.innerRadius,qt=Ut*.6,Nt=qt/2,le=Ut*.6,$t=[];let vt=0;mt.forEach(Y=>{const rt=Math.max(1,Math.round(Y.seatCount/yt*xt));for(let ht=0;ht<rt;ht++){const gt=(vt+ht)/xt,ne=r.arcAngle*Math.PI/180,Me=-ne/2-Math.PI/2+gt*ne,be=(r.innerRadius+r.radius)/2,Le=At+Math.cos(Me)*be,Xe=st+Math.sin(Me)*be,we=Math.cos(Me),jn=Math.sin(Me),ar=Le-Nt*we,Lr=Xe-Nt*jn,he=Le+Nt*we,Yn=Xe+Nt*jn,Xn=ot.append("line").attr("class","seat-line").attr("x1",ar).attr("y1",Lr).attr("x2",he).attr("y2",Yn).attr("stroke",Y.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").style("opacity",0).attr("data-angle",Me*180/Math.PI).attr("data-center-x",Le).attr("data-center-y",Xe).attr("data-initial-length",qt).node();$t.push({element:Xn,angle:Me})}vt+=rt});const Lt=()=>{ot.remove()},Zt=lt*.5,Ht=0,Wt=[];if(Wt.push(...ft),Wt.sort((Y,rt)=>{const ht=parseInt(Y.getAttribute("data-layout-index")||"-1",10),gt=parseInt(rt.getAttribute("data-layout-index")||"-1",10);return ht-gt}),Wt.length>0&&$t.length>0){const Y=$t.map(rt=>rt.element);K.to(Wt,{attr:{r:1.5},duration:Zt*.3,ease:"power2.in"},`seatsToRings+=${Ht}`),Y.forEach(rt=>{const ht=rt.getAttribute("x1")||"0",gt=rt.getAttribute("y1")||"0",ne=rt.getAttribute("x2")||"0",It=rt.getAttribute("y2")||"0";rt.setAttribute("data-final-x1",ht),rt.setAttribute("data-final-y1",gt),rt.setAttribute("data-final-x2",ne),rt.setAttribute("data-final-y2",It),rt.setAttribute("x1",ht),rt.setAttribute("y1",gt),rt.setAttribute("x2",ht),rt.setAttribute("y2",gt)}),K.to(Y,{attr:{x2:(rt,ht)=>parseFloat(ht.getAttribute("data-final-x2")||"0"),y2:(rt,ht)=>parseFloat(ht.getAttribute("data-final-y2")||"0")},opacity:.9,duration:Zt*.6,ease:"power2.out"},`seatsToRings+=${Ht+Zt*.2}`),K.to(Wt,{opacity:0,duration:Zt*.3,ease:"power2.out"},`seatsToRings+=${Ht+Zt*.3}`)}const je=lt*.05,ue=lt*.7,hn=Ht+Zt+je;if($t.length>0){const Y=Q,rt=P,gt=l*.8/$t.length,ne=rt,It=[...$t].sort((Le,Xe)=>Xe.angle-Le.angle),be=.6/It.length;It.forEach((Le,Xe)=>{const we=Y,ar=ne-Xe*gt,Lr=be*Xe*ue,he=Le.element,Yn=parseFloat(he.getAttribute("data-final-x1")||"0"),Xn=parseFloat(he.getAttribute("data-final-y1")||"0"),mi=parseFloat(he.getAttribute("data-final-x2")||"0"),qr=parseFloat(he.getAttribute("data-final-y2")||"0"),pa=(Yn+mi)/2,vn=(Xn+qr)/2,Wn=Math.atan2(qr-Xn,mi-Yn),sr=Math.sqrt(Math.pow(mi-Yn,2)+Math.pow(qr-Xn,2));K.to({progress:0},{progress:1,duration:ue*.5,ease:"power2.inOut",delay:Lr,onUpdate:function(){const ae=this.progress(),vs=pa+(we-pa)*ae,xs=vn+(ar-vn)*ae,xn=40*4*ae*(1-ae),or=vs,lr=xs-xn,ws=0-Wn,Dn=Wn+ws*ae*ae,da=(sr+(le-sr)*ae)/2,Ly=or-da*Math.cos(Dn),qy=lr-da*Math.sin(Dn),$y=or+da*Math.cos(Dn),Iy=lr+da*Math.sin(Dn);he.setAttribute("x1",Ly.toString()),he.setAttribute("y1",qy.toString()),he.setAttribute("x2",$y.toString()),he.setAttribute("y2",Iy.toString())},onComplete:function(){const ae=le/2;he.setAttribute("x1",(we-ae).toString()),he.setAttribute("y1",ar.toString()),he.setAttribute("x2",(we+ae).toString()),he.setAttribute("y2",ar.toString())}},`seatsToRings+=${hn}`),K.to(Le.element,{opacity:.95,duration:ue*.3,ease:"power2.out",delay:Lr},`seatsToRings+=${hn}`)})}const ve=ot,Ye=[];tt.forEach((Y,rt)=>{const ht=_.filter(`.seat-${ke(Y.category)}`),gt=ht.size();if(gt===0)return;const ne=s(Y.y1),It=s(Y.y0)-s(Y.y1),Me=ht.nodes().sort((vn,Wn)=>{const sr=parseInt(vn.getAttribute("data-layout-index")||"-1",10),ae=parseInt(Wn.getAttribute("data-layout-index")||"-1",10);return sr-ae}),be=Math.max(U.width,100),Le=It,Xe=be/Math.max(Le,1),we=Math.max(2,Math.ceil(Math.sqrt(gt*Xe))),jn=Math.ceil(gt/we),ar=be*.8,Lr=Le*.8,he=we>1?ar/(we-1):0,Yn=jn>1?Lr/(jn-1):0,Xn=we>1?(we-1)*he:0,mi=jn>1?(jn-1)*Yn:0,qr=Q-be/2+(be-Xn)/2,pa=ne+(Le-mi)/2;Me.forEach((vn,Wn)=>{const sr=parseInt(vn.getAttribute("data-layout-index")||"-1",10),ae=sr>=0?r.seats[sr]:void 0,vs=ae?k+ae.x:parseFloat(vn.getAttribute("cx")||"0"),xs=ae?P+ae.y:parseFloat(vn.getAttribute("cy")||"0"),Rf=(ae==null?void 0:ae.radius)||parseFloat(vn.getAttribute("r")||"4"),xn=gt%we;let or,lr;if(xn>0&&Wn<xn)lr=0,or=Wn;else{const Dn=Wn-(xn>0?xn:0);or=Dn%we,lr=Math.floor(Dn/we)+(xn>0?1:0)}let bs=qr+or*he;if(xn>0&&lr===0){const Dn=xn>1?(xn-1)*he:0,Ef=(Xn-Dn)/2;bs=qr+Ef+or*he}const ws=pa+lr*Yn;Ye.push({element:vn,startX:vs,startY:xs,startRadius:Rf,category:Y.dataKey,segmentIndex:rt,endY:ws,endX:bs})})});const Te=Ye.map(Y=>{const rt=Y.startX-k,ht=Y.startY-P,gt=Math.atan2(ht,rt);return{...Y,angle:gt}});Te.sort((Y,rt)=>rt.angle-Y.angle);const rn=nt*.8,ge=.6,Mt=Te.length,wt=rn/Math.max(Mt,1)*(Mt-1)+ge,ie=nt*.3,xe=wt;K.to(j,{opacity:1,duration:ie,ease:"power2.inOut"},`seatsToBar+=${xe}`),ve&&(K.to(ve.selectAll(".seat-line").nodes(),{opacity:0,duration:ie,ease:"power2.inOut"},`seatsToBar+=${xe}`),K.call(()=>{Lt()},[],`seatsToBar+=${xe+ie}`));const Gt=b.barSlideToTimeline/1e3;let Jt=null,ce=null;if(f){const rt=br(a).ticks(6).tickPadding(12);p&&rt.tickFormat(gt=>p(gt.getTime())),Jt=e.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).attr("opacity",0),Jt.call(rt).selectAll("text").attr("font-size",h).attr("font-weight",500);const ht=wr(s).ticks(5);ht.tickFormat(gt=>+gt==0?"":g?g(gt):String(gt)),ce=e.append("g").attr("class","axis axis-y").attr("opacity",0),ce.call(ht).selectAll("text").attr("font-size",h).attr("font-weight",500)}const an=b.crossFadePause/1e3,$=xe+ie+an;j.forEach(Y=>{const rt=Array.from(Y.classList).find(It=>It.startsWith("category-"));if(!rt||!tt.find(It=>ke(It.dataKey)===rt.replace("category-","")))return;const gt=n.findIndex(It=>ke(It.dataKey)===rt.replace("category-",""));if(gt===-1)return;const ne=$i(t,n,X,s,l,gt,H,!1);ne&&K.to(Y,{attr:{d:ne},duration:Gt,ease:"power2.out"},`seatsToBar+=${$}`)});const ut=ss().x(Y=>a(Y.data.timestamp)).y0(Y=>s(Y[0])).y1(Y=>s(Y[1])).curve(Cr),pt=new Map;t.forEach((Y,rt)=>{const ht=n[rt];if(ht){const gt=ut(Y)||"";pt.set(ht.dataKey,gt)}});const St=$+Gt;f&&Jt&&ce&&K.to([Jt.node(),ce.node()],{opacity:1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${$}`);const Ct=S.select(".grid-vertical"),ct=S.select(".grid-horizontal");if(!Ct.empty()||!ct.empty()){const rt=[];Ct.empty()||rt.push(Ct.node()),ct.empty()||rt.push(ct.node()),K.to(rt,{opacity:.1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${$}`)}const kt=b.axesAndBarsGrow/1e3,Pt=b.barsToArea/1e3,me=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",te=S.append("g").attr("class",me);O.forEach(Y=>{if(Y===H)return;const rt=X.get(Y);rt&&n.forEach((ht,gt)=>{const ne=$i(t,n,X,s,l,gt,Y,!0),It=$i(t,n,X,s,l,gt,Y,!1);if(!ne||!It)return;const Me=y?`histogram-path histogram-path-${y} category-${ke(ht.dataKey)}`:`histogram-path category-${ke(ht.dataKey)}`;te.append("path").attr("class",Me).attr("d",ne).attr("fill",ht.color).attr("stroke",ht.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",ht.dataKey).attr("data-timestamp",Y).attr("data-x-position",rt.x).attr("data-full-height-path",It)})});const De=y?`.histogram-path-${y}`:".histogram-path",fe=te.selectAll(De);K.to(fe.nodes(),{opacity:1,duration:.3,ease:"power2.inOut"},`seatsToBar+=${St}`);const Fe=U.x+U.width/2;fe.each(function(){var be;const Y=this.getAttribute("data-full-height-path");if(!Y)return;const rt=parseFloat(this.getAttribute("data-x-position")||"0"),ht=parseFloat(this.getAttribute("data-timestamp")||"0"),gt=((be=X.get(ht))==null?void 0:be.width)||0,ne=rt+gt/2,Me=Math.abs(ne-Fe)*8e-4;K.to(this,{attr:{d:Y},duration:kt,ease:"power2.out"},`seatsToBar+=${St+Me}`)});const Ne=St+kt,ee=O[O.length-1],pn=a(new Date(ee))+at,Fr=a.invert(pn).getTime(),Gn=t.map(Y=>{const rt=Y[Y.length-1],ht={...rt,data:{...rt.data,timestamp:Fr}};return[...Y,ht]});Tc(e,Gn,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y});const Nr=y?`.area-${y}`:".area",dn=e.selectAll(Nr);dn.attr("opacity",0),K.to(fe.nodes(),{opacity:0,duration:Pt,ease:"power2.inOut"},`seatsToBar+=${Ne}`);const gi=W.selectAll("path").nodes();gi.length>0&&K.to(gi,{opacity:0,duration:Pt,ease:"power2.inOut"},`seatsToBar+=${Ne}`),K.to(dn.nodes(),{opacity:1,duration:Pt,ease:"power2.inOut"},`seatsToBar+=${Ne}`);const En=c;C.getControls().getTimeline().eventCallback("onComplete",()=>{const Y=y?`.morph-bar-${y}`:".morph-bar";e.selectAll(Y).remove();const rt=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll(rt).remove();const ht=y?`.seat-${y}`:".seat";e.selectAll(ht).style("pointer-events","none"),f&&(Jt&&Jt.attr("opacity",1),ce&&ce.attr("opacity",1)),En()}),C.play()}function eT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,v,y){var an;const x=y?`.chart-content-group-${y}`:".chart-content-group";let _=e.select(x);if(_.empty()){const $=e.attr("clip-path"),ut=$?((an=$.match(/url\(#(.+)\)/))==null?void 0:an[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,pt=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";_=e.append("g").attr("class",pt).attr("clip-path",`url(#${ut})`)}const w=y?`.area-${y}`:".area",S=e.selectAll(w);if(S.size()===0){nT(e,n,r,o,l,y),c();return}const b={areaToBar:u*.18,barsShrink:u*.22,barSlide:u*.22,axesHide:u*.03,barToRings:u*.07,ringsExpand:u*.18,ringsHold:u*.05,ringsToSeats:u*.07},T=y?gr.get(y):void 0;T&&(T.destroy(),y&&gr.delete(y));const M=$=>$<.18?"areaToBar":$<.4?"barsShrink":$<.62?"barSlide":$<.65?"axesHide":$<.72?"barToRings":$<.9?"ringsExpand":$<.95?"ringsHold":"ringsToSeats",C=new B0({seatsToRings:b.ringsToSeats,ringsHold:b.ringsHold,ringsToBar:b.barToRings,axesReveal:b.axesHide,barSlide:b.barSlide,barsGrow:b.barsShrink,barsToArea:b.areaToBar},{onStageComplete:$=>{},onProgress:$=>{if(m){const ut=M($);m($,ut)}},onComplete:()=>{c()}});y&&gr.set(y,C),d&&d(C.getControls().getTimeline());const D=t[0].map($=>$.data).map($=>$.timestamp),k=v??Math.max(...D),N=new Map,I=[];D.forEach(($,ut)=>{const pt=a(new Date($)),St=D[ut+1];if(St){const ct=a(new Date(St))-pt;I.push(ct)}});const P=I.length>0?I.reduce(($,ut)=>$+ut,0)/I.length:30;D.forEach(($,ut)=>{const pt=a(new Date($)),St=D[ut+1],ct=ut===D.length-1?P:a(new Date(St))-pt;N.set($,{x:pt,width:ct})});const O=C.getControls().getTimeline(),H=b.areaToBar/1e3,X=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",et=_.append("g").attr("class",X);D.forEach($=>{const ut=N.get($);ut&&n.forEach((pt,St)=>{const Ct=$i(t,n,N,s,l,St,$,!1);if(!Ct)return;const ct=y?`histogram-path histogram-path-${y} category-${ke(pt.dataKey)}`:`histogram-path category-${ke(pt.dataKey)}`;et.append("path").attr("class",ct).attr("d",Ct).attr("fill",pt.color).attr("stroke",pt.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",pt.dataKey).attr("data-timestamp",$).attr("data-x-position",ut.x)})});const at=y?`.histogram-path-${y}`:".histogram-path",tt=et.selectAll(at);O.to(S.nodes(),{opacity:0,duration:H,ease:"power2.inOut"},"areaToBar"),O.to(tt.nodes(),{opacity:1,duration:H,ease:"power2.inOut"},"areaToBar");const U=b.barsShrink/1e3,Q=H;tt.each(function(){const $=parseFloat(this.getAttribute("data-timestamp")||"0");if($===k)return;const ut=n.find(Ct=>this.classList.contains(`category-${ke(Ct.dataKey)}`));if(!ut)return;const pt=n.indexOf(ut),St=$i(t,n,N,s,l,pt,$,!0);St&&O.to(this,{attr:{d:St},duration:U,ease:"power2.in"},Q)});const L=b.axesHide/1e3,W=Q+U;if(f){const $=e.select(".axis-x"),ut=e.select(".axis-y");$.empty()||O.to($.node(),{opacity:0,duration:L,ease:"power2.inOut"},W),ut.empty()||O.to(ut.node(),{opacity:0,duration:L,ease:"power2.inOut"},W)}const J=_.select(".grid-vertical"),j=_.select(".grid-horizontal");J.empty()||O.to(J.node(),{opacity:0,duration:L,ease:"power2.inOut"},W),j.empty()||O.to(j.node(),{opacity:0,duration:L,ease:"power2.inOut"},W);const E=[];t.forEach(($,ut)=>{const pt=$.find(Ct=>Ct.data.timestamp===k);if(!pt)return;const St=n[ut];St&&E.push({category:St.label,dataKey:St.dataKey,color:St.color,y0:pt[0],y1:pt[1]})}),E.sort(($,ut)=>ut.y0-$.y0);const z=E.reduce(($,ut)=>$+(ut.y1-ut.y0),0),q=r.radius-r.innerRadius,R=o/2,it=r.radius+10,G=l-r.radius*.3,K=Math.max(it,G),lt=q*.6,ft=l*.8,At=K,st=b.barSlide/1e3,bt=W+L,Bt=666,ot=tt.nodes().filter($=>parseFloat($.getAttribute("data-timestamp")||"0")!==k);O.to(ot,{opacity:0,duration:st*.2,ease:"power2.out"},bt);const mt=tt.nodes().filter($=>parseFloat($.getAttribute("data-timestamp")||"0")===k);mt.forEach($=>{const ut=$.getAttribute("data-category");if(!ut)return;const pt=E.find(fe=>fe.dataKey===ut);if(!pt)return;const ct=(pt.y1-pt.y0)/z*ft;let kt=0;for(const fe of n){const Fe=E.find(Pr=>Pr.dataKey===fe.dataKey);if(!Fe)continue;if(Fe.dataKey===pt.dataKey)break;const ee=(Fe.y1-Fe.y0)/z;kt+=ee*ft}const Pt=At-kt,me=At-kt-ct,te=Bt-lt/2,De=`M ${te} ${Pt} L ${te} ${me} L ${te+lt} ${me} L ${te+lt} ${Pt} Z`;O.to($,{attr:{d:De},duration:st,ease:"power2.inOut"},bt)});const yt=b.barToRings/1e3,xt=bt+st,Ut=b.ringsExpand/1e3,qt=xt+yt,Nt=b.ringsHold/1e3,le=qt+Ut,$t=b.ringsToSeats/1e3,vt=le+Nt,Lt=Math.max(...r.seats.map($=>$.ring)),Zt=r.seats.filter($=>$.ring===Lt),Ht=_.append("g").attr("class",`slinky-${y||"h2p-default"}`),Wt=()=>{Ht.remove()};Zt.forEach(($,ut)=>{const pt=n.find(St=>St.label===$.category);pt&&Ht.append("line").attr("class","slinky-ring").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",0).attr("stroke",pt.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").attr("data-category",$.category).attr("data-category-index",$.categoryIndex).attr("data-ring-index",ut).attr("data-seat-x",R+$.x).attr("data-seat-y",K+$.y).attr("data-seat-angle",Math.atan2($.y,$.x)).style("opacity",0)});const je=Ht.selectAll(".slinky-ring").nodes(),ue=Bt,hn=ft/je.length,ve=[...je].sort(($,ut)=>{const pt=parseFloat($.getAttribute("data-seat-angle")||"0");return parseFloat(ut.getAttribute("data-seat-angle")||"0")-pt}),Ye=At;ve.forEach(($,ut)=>{const pt=Ye-ut*hn,Ct=lt/2,ct=ue-Ct,kt=ue+Ct;$.setAttribute("x1",ct.toString()),$.setAttribute("y1",pt.toString()),$.setAttribute("x2",kt.toString()),$.setAttribute("y2",pt.toString()),$.style.opacity="0"}),O.to(mt,{opacity:0,duration:yt*.7,ease:"power2.out"},xt+yt*.3),O.to(ve,{opacity:1,duration:yt,ease:"power2.in",stagger:.005},xt);const Te=q*.8;ve.forEach(($,ut)=>{const pt=parseFloat($.getAttribute("data-seat-x")||"0"),St=parseFloat($.getAttribute("data-seat-y")||"0"),Ct=parseFloat($.getAttribute("data-seat-angle")||"0"),ct=(ve.length-1-ut)/ve.length*(Ut*.4),kt=parseFloat($.getAttribute("x1")||"0"),Pt=parseFloat($.getAttribute("y1")||"0"),me=parseFloat($.getAttribute("x2")||"0"),te=parseFloat($.getAttribute("y2")||"0"),De=(kt+me)/2,fe=(Pt+te)/2,Fe=Math.atan2(te-Pt,me-kt),Ne=Math.sqrt(Math.pow(me-kt,2)+Math.pow(te-Pt,2)),ee=pt-Te/2*Math.cos(Ct),Pr=St-Te/2*Math.sin(Ct);O.to({progress:0},{progress:1,duration:Ut*.7,ease:"power2.out",onUpdate:function(){const pn=this.progress(),Rn=De+(ee-De)*pn,Fr=fe+(Pr-fe)*pn,Gn=Fe+(Ct-Fe)*pn,dn=(Ne+(Te-Ne)*pn)/2,gi=Rn-dn*Math.cos(Gn),En=Fr-dn*Math.sin(Gn),ir=Rn+dn*Math.cos(Gn),Y=Fr+dn*Math.sin(Gn);$.setAttribute("x1",gi.toString()),$.setAttribute("y1",En.toString()),$.setAttribute("x2",ir.toString()),$.setAttribute("y2",Y.toString())}},qt+ct),O.to($,{opacity:.9,duration:Ut*.3,ease:"power2.in"},qt+ct)}),O.call(()=>{m&&m(O.progress(),"ringsHold")},[],le);const rn=y?`parliament parliament-${y}`:"parliament",ge=_.append("g").attr("class",rn);r.seats.forEach(($,ut)=>{const pt=n.find(me=>me.label===$.category);if(!pt)return;const St=R+$.x,Ct=K+$.y;let ct,kt,Pt;$.ring===Lt?(ct=St,kt=Ct,Pt=2):(ct=St,kt=Ct,Pt=$.radius),ge.append("circle").attr("cx",ct).attr("cy",kt).attr("r",Pt).attr("fill",pt.color).attr("stroke",pt.color).attr("stroke-width",.5).attr("opacity",0).attr("class",()=>y?`seat seat-${y} seat-${ke($.category)}`:`seat seat-${ke($.category)}`).attr("data-layout-index",ut).attr("data-ring",$.ring).attr("data-final-x",St).attr("data-final-y",Ct).attr("data-final-r",$.radius)});const Mt=y?`.seat-${y}`:".seat",Qt=ge.selectAll(Mt);O.to(je,{opacity:0,duration:$t*.2,ease:"power3.out"},vt),O.to(Qt.nodes(),{opacity:.8,duration:$t*.3,ease:"power2.in"},vt+$t*.25);const wt=Qt.nodes(),ie=[],xe=[];wt.forEach($=>{parseInt($.getAttribute("data-ring")||"0")===Lt?ie.push($):xe.push($)});const Gt=$t*.2,Jt=$t*.7;ie.forEach($=>{const ut=parseFloat($.getAttribute("data-final-r")||"4");O.to($,{attr:{r:ut},opacity:1,duration:Jt*.6,ease:"power2.out"},vt+Gt)}),xe.length>0&&O.to(xe,{opacity:1,duration:Jt*.5,ease:"power2.in"},vt+Gt+$t*.15);const ce=c;C.getControls().getTimeline().eventCallback("onComplete",()=>{const $=y?`.areas-${y}`:".areas",ut=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll($).remove(),e.selectAll(ut).remove(),Wt(),e.selectAll(".axis-x").remove(),e.selectAll(".axis-y").remove(),_.selectAll(".grid-vertical").remove(),_.selectAll(".grid-horizontal").remove();const pt=y?`.parliament-label-${y}`:".parliament-label";if(e.select(pt).empty()){const Ct=o/2,ct=r.radius+10,kt=l-r.radius*.3,Pt=Math.max(ct,kt),me=y?`parliament-label parliament-label-${y}`:"parliament-label",te=e.append("g").attr("class",me).attr("transform",`translate(${Ct},${Pt-r.radius*.15})`).style("opacity","0").style("pointer-events","none");te.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),te.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");const De=te.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");De.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),De.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}ce()}),C.play()}function nT(e,t,n,r,i,a){const s=r/2,o=n.radius+10,l=i-n.radius*.3,u=Math.max(o,l);U0(e,n,t,{centerX:s,centerY:u,addClasses:!0,instanceId:a,parliamentRadius:n.radius})}function Ii(e,t,n,r,i){const a=i?`.parliament-label-${i}`:".parliament-label",s=Rt(e).select(a);if(!s.empty())if(t){s.style("opacity","1"),s.select(".label-category").text(t.label).style("fill","#666");const o=t.value>1?"repos":"repo";s.select(".label-value").text(`${t.value} ${o}`).style("fill",t.color);const l=s.select(".scale-indicator");n?l.style("opacity","1").select("text").text(`= ~${r} repos`):l.style("opacity","0")}else s.style("opacity","0")}function Ys(e,t,n,r,i,a,s,o,l){const u=e.querySelectorAll(".seat");if(!u||u.length===0)return;const c=n[n.length-1];if(!c)return;const f=[];u.forEach(p=>{const g=p;g.style.cursor="pointer",g.style.transition="fill-opacity 150ms ease, stroke-opacity 150ms ease"}),u.forEach(p=>{const m=(p.getAttribute("class")||"").split(/\s+/).filter(w=>w.startsWith("seat-")),v=m[m.length-1];if(!v)return;const y=v.substring(5),x=t.find(w=>ke(w.label)===y);if(!x)return;const _=()=>{i(x.label);const w=Math.round(c.values[x.dataKey]||0),S=pf(x.color),b={label:x.label,value:w,color:S};a&&a(b),Ii(e,b,s??!1,o??1,l),zi(e,x.label)};p.addEventListener("mouseenter",_),f.push({element:p,handler:_})});const h=()=>{i(null),a&&a(null),Ii(e,null,!1,1,l),zi(e,null)};return e.addEventListener("mouseleave",h),r&&zi(e,r),()=>{f.forEach(({element:p,handler:g})=>{p.removeEventListener("mouseenter",g)}),e.removeEventListener("mouseleave",h),u.forEach(p=>{const g=p;g.style.cursor="",g.style.transition=""})}}function zi(e,t){const n=e.querySelectorAll(".seat"),r=t?ke(t):null;n.forEach(i=>{const a=i,l=(i.getAttribute("class")||"").split(/\s+/).filter(f=>f.startsWith("seat-")),u=l[l.length-1];if(!u)return;const c=u.substring(5);r?c===r?(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1")):(a.setAttribute("fill-opacity","0.3"),a.setAttribute("stroke-opacity","0.2")):(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1"))})}const H0=({data:e,categories:t,mode:n,width:r=900,height:i=400,margin:a={top:10,right:30,bottom:40,left:60},timeRange:s,showGrid:o=!0,showAxes:l=!0,axisLabelColor:u,axisLabelSize:c=14,formatDate:f,formatValue:h,markers:p=[],arcAngle:g=200,parliamentRadius:d=200,seatSize:m=4.5,animationDuration:v=900,onMorphComplete:y,onAnimationStateChange:x,onTimelineReady:_,onAnimationProgress:w,onHoveredDataChange:S,hoveredCategory:b,maxSeats:T=500,showTooltip:M=!0,showTable:C=!1,showScaledIndicator:A=!0,parliamentTimestamp:D,enableBrush:k=!1,onTimeRangeChange:N,minAllowedTime:I,maxAllowedTime:P,timelineEvents:O=[],showTimeline:H=!1,timelineHeight:X=40,timelineOffset:et,brushColor:at="#69b3a2"})=>{const tt=V.useRef(null),U=V.useCallback(nt=>{S&&S(nt)},[S]),Q=12,W=et??6+Q+c+Q,J=e[e.length-1],j=J?t.reduce((nt,ft)=>nt+(J.values[ft.dataKey]||0),0):0,E=j>T,z=E?Math.round(j/T):1,q=H&&n==="stacked-area"?i+X+W:i,{isMorphing:R,currentMode:it,visibleMarkers:G,hoveredMarker:K,hoveredTimelineEvent:lt}=VS({containerRef:tt,data:e,categories:t,mode:n,width:r,height:i,margin:a,timeRange:s,showGrid:o,showAxes:l,axisLabelColor:u,axisLabelSize:c,formatDate:f,formatValue:h,markers:p,arcAngle:g,parliamentRadius:d,seatSize:m,animationDuration:v,onMorphComplete:y,onAnimationStateChange:x,onTimelineReady:_,onAnimationProgress:w,onHoveredDataChange:U,hoveredCategory:b,maxSeats:T,parliamentTimestamp:D,enableBrush:k,onTimeRangeChange:N,minAllowedTime:I,maxAllowedTime:P,showScaleIndicator:A&&E,reposPerSeat:z,timelineEvents:O,showTimeline:H,timelineHeight:X,timelineOffset:W,brushColor:at});return F.jsxs(B.Box,{sx:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:[F.jsx("svg",{ref:tt,viewBox:`0 0 ${r} ${q}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"auto",display:"block"}}),it==="area"&&G.map(nt=>{const ft=(nt.x+a.left)/r*100,At=a.top/i*100,st=new Date(nt.timestamp),bt=f?f(nt.timestamp):st.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),Bt=F.jsxs(B.Box,{children:[F.jsx(B.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:nt.label?.5:0},children:bt}),nt.label&&F.jsx(B.Box,{sx:{color:"white",fontWeight:500},children:nt.label})]});return F.jsx(B.Tooltip,{title:Bt,open:(K==null?void 0:K.timestamp)===nt.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:F.jsx(B.Box,{sx:{position:"absolute",left:`${ft}%`,top:`${At}%`,width:"1px",height:`${(i-a.top-a.bottom)/i*100}%`,pointerEvents:"none"}})},nt.timestamp)}),lt&&it==="area"&&F.jsx(B.Tooltip,{title:F.jsxs(B.Box,{children:[F.jsx(B.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:.5},children:f?f(lt.timestamp):new Date(lt.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}),F.jsx(B.Box,{sx:{color:"white",fontWeight:500},children:lt.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:F.jsx(B.Box,{sx:{position:"absolute",left:`${(lt.x+a.left)/r*100}%`,top:`${(i+W+X/2)/q*100}%`,width:"1px",height:"1px",pointerEvents:"none"}})}),R&&F.jsxs(B.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: ",it," → ",n]})]})},G0=[{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}],df=({repositoryCount:e})=>{const t=G0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxArc-t.minArc,s=t.minArc+a*i;return Math.round(s)},gf=({repositoryCount:e})=>{const t=G0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 6.5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxSeatSize-t.minSeatSize,s=t.minSeatSize+a*i;return Math.round(s*10)/10};class sa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}sa.prototype.normal={};sa.prototype.property={};sa.prototype.space=void 0;function j0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new sa(n,r,t)}function ea(e){return e.toLowerCase()}class Ge{constructor(t,n){this.attribute=n,this.property=t}}Ge.prototype.attribute="";Ge.prototype.booleanish=!1;Ge.prototype.boolean=!1;Ge.prototype.commaOrSpaceSeparated=!1;Ge.prototype.commaSeparated=!1;Ge.prototype.defined=!1;Ge.prototype.mustUseProperty=!1;Ge.prototype.number=!1;Ge.prototype.overloadedBoolean=!1;Ge.prototype.property="";Ge.prototype.spaceSeparated=!1;Ge.prototype.space=void 0;let rT=0;const dt=Dr(),se=Dr(),Mc=Dr(),Z=Dr(),Ft=Dr(),Qr=Dr(),We=Dr();function Dr(){return 2**++rT}const Ac=Object.freeze(Object.defineProperty({__proto__:null,boolean:dt,booleanish:se,commaOrSpaceSeparated:We,commaSeparated:Qr,number:Z,overloadedBoolean:Mc,spaceSeparated:Ft},Symbol.toStringTag,{value:"Module"})),Xs=Object.keys(Ac);class mf extends Ge{constructor(t,n,r,i){let a=-1;if(super(t,n),$h(this,"space",i),typeof r=="number")for(;++a<Xs.length;){const s=Xs[a];$h(this,Xs[a],(r&Ac[s])===Ac[s])}}}mf.prototype.defined=!0;function $h(e,t,n){n&&(e[t]=n)}function pi(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new mf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ea(r)]=r,n[ea(a.attribute)]=r}return new sa(t,n,e.space)}const Y0=pi({properties:{ariaActiveDescendant:null,ariaAtomic:se,ariaAutoComplete:null,ariaBusy:se,ariaChecked:se,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Ft,ariaCurrent:null,ariaDescribedBy:Ft,ariaDetails:null,ariaDisabled:se,ariaDropEffect:Ft,ariaErrorMessage:null,ariaExpanded:se,ariaFlowTo:Ft,ariaGrabbed:se,ariaHasPopup:null,ariaHidden:se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ft,ariaLevel:Z,ariaLive:null,ariaModal:se,ariaMultiLine:se,ariaMultiSelectable:se,ariaOrientation:null,ariaOwns:Ft,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:se,ariaReadOnly:se,ariaRelevant:null,ariaRequired:se,ariaRoleDescription:Ft,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:se,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function X0(e,t){return t in e?e[t]:t}function W0(e,t){return X0(e,t.toLowerCase())}const iT=pi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qr,acceptCharset:Ft,accessKey:Ft,action:null,allow:null,allowFullScreen:dt,allowPaymentRequest:dt,allowUserMedia:dt,alt:null,as:null,async:dt,autoCapitalize:null,autoComplete:Ft,autoFocus:dt,autoPlay:dt,blocking:Ft,capture:null,charSet:null,checked:dt,cite:null,className:Ft,cols:Z,colSpan:null,content:null,contentEditable:se,controls:dt,controlsList:Ft,coords:Z|Qr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:dt,defer:dt,dir:null,dirName:null,disabled:dt,download:Mc,draggable:se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:dt,formTarget:null,headers:Ft,height:Z,hidden:Mc,high:Z,href:null,hrefLang:null,htmlFor:Ft,httpEquiv:Ft,id:null,imageSizes:null,imageSrcSet:null,inert:dt,inputMode:null,integrity:null,is:null,isMap:dt,itemId:null,itemProp:Ft,itemRef:Ft,itemScope:dt,itemType:Ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:dt,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:dt,muted:dt,name:null,nonce:null,noModule:dt,noValidate:dt,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:dt,optimum:Z,pattern:null,ping:Ft,placeholder:null,playsInline:dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:dt,referrerPolicy:null,rel:Ft,required:dt,reversed:dt,rows:Z,rowSpan:Z,sandbox:Ft,scope:null,scoped:dt,seamless:dt,selected:dt,shadowRootClonable:dt,shadowRootDelegatesFocus:dt,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:dt,useMap:null,value:se,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ft,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:dt,declare:dt,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:dt,noHref:dt,noShade:dt,noWrap:dt,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:se,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:dt,disableRemotePlayback:dt,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:W0}),aT=pi({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",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:We,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Ft,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:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,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:Qr,g2:Qr,glyphName:Qr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:We,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,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:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:We,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:We,rev:We,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:We,requiredFeatures:We,requiredFonts:We,requiredFormats:We,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:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:We,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:We,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:We,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:X0}),K0=pi({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()}}),V0=pi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:W0}),Z0=pi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),sT=/[A-Z]/g,Ih=/-[a-z]/g,oT=/^data[-\w.:]+$/i;function Q0(e,t){const n=ea(t);let r=t,i=Ge;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ih,uT);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ih.test(a)){let s=a.replace(sT,lT);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=mf}return new i(r,t)}function lT(e){return"-"+e.toLowerCase()}function uT(e){return e.charAt(1).toUpperCase()}const J0=j0([Y0,iT,K0,V0,Z0],"html"),yf=j0([Y0,aT,K0,V0,Z0],"svg");function zh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function cT(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Bh=/[#.]/g;function fT(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Bh.lastIndex=i;const o=Bh.exec(n),l=n.slice(i,o?o.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Uh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function hT(e){return e.join(" ").trim()}function ty(e,t,n){const r=n?mT(n):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const u=s;o.unshift(u)}else{l=fT(a,t);const u=l.tagName.toLowerCase(),c=r?r.get(u):void 0;if(l.tagName=c||u,pT(s))o.unshift(s);else for(const[f,h]of Object.entries(s))dT(e,l.properties,f,h)}for(const u of o)Cc(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function pT(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function dT(e,t,n,r){const i=Q0(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Uh(r):i.commaSeparated?a=zh(r):i.commaOrSpaceSeparated?a=Uh(zh(r).join(" ")):a=Hh(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?gT(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(Hh(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Cc(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(const n of t)Cc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Cc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Hh(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ea(n)===ea(t)))return!0}return n}function gT(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function mT(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const yT=["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"];ty(J0,"div");const oa=ty(yf,"g",yT),ey=(e=oa)=>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:cn.neoGrey[200]}),e("path",{d:"M0,2 L8,2",stroke:cn.neoGrey[400],"stroke-width":.5}),e("path",{d:"M0,6 L8,6",stroke:cn.neoGrey[400],"stroke-width":.5})]),ny=(e=oa)=>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})]),ry=(e=oa)=>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})]),Et={greyHatch:{background:cn.neoGrey[200],lines:cn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}},_T=({categories:e,activeCategory:t,onCategoryHover:n,mode:r,visible:i=!0})=>F.jsx(B.Box,{className:"category-table",sx:{width:"100%",display:"flex",justifyContent:"center",opacity:i?1:0,transition:"opacity 0.3s ease-in-out","@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:"auto",maxWidth:"100%"}},onMouseLeave:()=>n(null),children:F.jsxs(B.Table,{"aria-label":"Categories summary",className:"category-summary-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":{padding:"2px 8px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 11.5px)"}},children:[F.jsx("thead",{children:F.jsxs(B.TableRow,{children:[F.jsx(B.TableCell,{}),F.jsx(B.TableCell,{sx:{fontWeight:"bold"},children:"Category"}),r==="point-in-time"?F.jsxs(F.Fragment,{children:[F.jsx(B.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"#"}),F.jsx(B.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"%"})]}):F.jsxs(F.Fragment,{children:[F.jsx(B.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"Last"}),F.jsx(B.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"Max"}),F.jsx(B.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"Min"})]})]})}),F.jsx("tbody",{children:e.map(a=>{const s=a.color==="url(#greyHatchPattern)"?Et.greyHatch.lines:a.color==="url(#dataMissingHatchPattern)"?Et.dataMissingHatch.lines:a.color==="url(#noLstHatchPattern)"?Et.noLstHatch.lines:a.color;return F.jsxs(B.TableRow,{onMouseEnter:()=>n(a.id),sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:t===a.id?`${s}15`:"transparent","&:hover":{backgroundColor:`${s}15`}},children:[F.jsx(B.TableCell,{align:"center",sx:{width:20},children:F.jsx(B.Box,{sx:{width:r==="historical"?4:12,height:12,backgroundColor:a.color==="url(#greyHatchPattern)"?Et.greyHatch.background:a.color==="url(#dataMissingHatchPattern)"?Et.dataMissingHatch.background:a.color==="url(#noLstHatchPattern)"?Et.noLstHatch.background:a.color,borderRadius:r==="historical"?2:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:t===a.id?"scale(1.2)":"scale(1)",...a.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
16
|
+
0deg,
|
|
17
|
+
transparent,
|
|
18
|
+
transparent 3px,
|
|
19
|
+
${Et.greyHatch.lines} 3px,
|
|
20
|
+
${Et.greyHatch.lines} 4px
|
|
21
|
+
)`,borderRadius:r==="historical"?2:"50%"}},...a.label==="Data Missing"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
22
|
+
45deg,
|
|
23
|
+
transparent,
|
|
24
|
+
transparent 3px,
|
|
25
|
+
${Et.dataMissingHatch.lines} 3px,
|
|
26
|
+
${Et.dataMissingHatch.lines} 4px
|
|
27
|
+
)`,borderRadius:r==="historical"?2:"50%"}},...a.label==="No LST"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
28
|
+
-45deg,
|
|
29
|
+
transparent,
|
|
30
|
+
transparent 3px,
|
|
31
|
+
${Et.noLstHatch.lines} 3px,
|
|
32
|
+
${Et.noLstHatch.lines} 4px
|
|
33
|
+
)`,borderRadius:r==="historical"?2:"50%"}}}})}),F.jsx(B.TableCell,{children:F.jsxs(B.Stack,{direction:"row",alignItems:"center",gap:.5,children:[F.jsx("span",{children:a.label}),a.tooltip&&F.jsx(B.Tooltip,{title:a.tooltip,placement:"right",arrow:!0,children:F.jsx(Zg.InfoOutlined,{sx:{fontSize:".875rem",color:"text.secondary"}})})]})}),r==="point-in-time"?F.jsxs(F.Fragment,{children:[F.jsx(B.TableCell,{align:"right",children:a.value}),F.jsxs(B.TableCell,{align:"right",children:[a.percentage,"%"]})]}):F.jsxs(F.Fragment,{children:[F.jsx(B.TableCell,{align:"right",children:a.value}),F.jsx(B.TableCell,{align:"right",children:a.max??"-"}),F.jsx(B.TableCell,{align:"right",children:a.min??"-"})]})]},a.id)})})]})}),Gh={"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."},vT=(e,t="point-in-time")=>{const n=e.timeSeries[e.timeSeries.length-1];if(!n)return[];const r=e.categories.filter(f=>{var h;return!((h=f.parliamentMapping)!=null&&h.isSpecialCategory)}),i=r.reduce((f,h)=>f+(n.values[h.id]??0),0),a=e.metadata.specialCounts,s=a?(a.notApplicable??0)+(a.noLst??0)+(a.unavailable??0):0,o=i+s,l=t==="historical"?new Map(r.map(f=>{const h=e.timeSeries.map(p=>Math.round(p.values[f.id]??0)).filter(p=>p!==void 0);return[f.id,{max:Math.max(...h),min:Math.min(...h)}]})):null,u=r.map(f=>{const h=Math.round(n.values[f.id]??0),p=h/o*100,g=p>0&&p<1?"< 1":p.toFixed(0),d={id:f.id,label:f.label,value:h,percentage:Number.parseFloat(g),color:f.color,tooltip:Gh[f.label]};if(l){const m=l.get(f.id);m&&(d.max=m.max,d.min=m.min)}return d}),c=[];if(a){const f=e.categories.filter(h=>{var p;return(p=h.parliamentMapping)==null?void 0:p.isSpecialCategory});for(const h of f){let p=0;if(h.label==="N/A"?p=Math.round(a.notApplicable??0):h.label==="No LST"?p=Math.round(a.noLst??0):h.label==="Data Missing"&&(p=Math.round(a.unavailable??0)),p>0){const g=p/o*100,d=g>0&&g<1?"< 1":g.toFixed(0);c.push({id:h.id,label:h.label,value:p,percentage:Number.parseFloat(d),color:h.color,tooltip:Gh[h.label]})}}}return[...u,...c]},xT=e=>{if(!e.timeSeries[e.timeSeries.length-1])throw new Error("ChronoChart: No data points available");const n=e.timeSeries.map(i=>({timestamp:i.timestamp,values:i.values})),r=e.categories.map(i=>{var a;return{dataKey:i.id,label:i.label,color:i.color,fillOpacity:.7,strokeWidth:(a=i.parliamentMapping)!=null&&a.isSpecialCategory?3:1.5,strokeDasharray:i.strokeDasharray,parliamentMapping:i.parliamentMapping}});return{data:n,categories:r}},bT=e=>{if(!e.timeSeries||e.timeSeries.length===0)throw new Error("ChronoChart: timeSeries must not be empty");if(!e.categories||e.categories.length===0)throw new Error("ChronoChart: categories must not be empty");if(!e.metadata||typeof e.metadata.total!="number")throw new Error("ChronoChart: metadata.total is required");if(!e.timeSeries.every((r,i)=>i===0||r.timestamp>=e.timeSeries[i-1].timestamp))throw new Error("ChronoChart: timeSeries must be sorted by timestamp (ascending)");const n=e.timeSeries[0];if(n){for(const r of e.categories.filter(i=>{var a;return!((a=i.parliamentMapping)!=null&&a.isSpecialCategory)}))if(!(r.id in n.values))throw new Error(`ChronoChart: Category "${r.id}" not found in timeSeries data`)}},iy=({data:e,selectedIndex:t,title:n,subtitle:r,showHeader:i=!0,width:a=960,height:s=400,timeRange:o,onTimeRangeChange:l,minAllowedTime:u,maxAllowedTime:c,enableBrush:f=!1,showLegend:h=!0,showTooltip:p=!0,showGrid:g=!0,axisLabelColor:d,axisLabelSize:m=14,enableAnimation:v=!0,animationDuration:y=5439,disableTimeline:x=!1,formatDate:_,formatValue:w,onAnimationStateChange:S,onTimelineReady:b,onAnimationProgress:T,brushColor:M="#69b3a2"})=>{bT(e);const[C,A]=V.useState(null),[D,k]=V.useState(!0),N=V.useRef("historical"),I=V.useRef(void 0),P=V.useMemo(()=>e.timeSeries.length===1||t!==void 0?"point-in-time":"historical",[t,e.timeSeries.length]),O=V.useMemo(()=>{var K;let G;return t!==void 0&&e.timeSeries[t]?(G=e.timeSeries[t].timestamp,I.current=G):N.current==="point-in-time"&&P==="historical"&&I.current!==void 0?G=I.current:G=(K=e.timeSeries[e.timeSeries.length-1])==null?void 0:K.timestamp,N.current=P,G},[t,e.timeSeries,P]),H=e.timeSeries[0].timestamp,X=e.timeSeries[e.timeSeries.length-1].timestamp,[et,at]=V.useState([H,X]),tt=o??et,U=V.useCallback(G=>{const K=[u!==void 0?Math.max(G[0],u):G[0],c!==void 0?Math.min(G[1],c):G[1]];l?l(K):at(K)},[l,u,c]);V.useEffect(()=>{A(null)},[P]);const Q=V.useMemo(()=>({top:10,right:30,left:60,bottom:30}),[]),L=V.useMemo(()=>xT(e),[e]),W=V.useMemo(()=>vT(e,P),[e,P]),J=V.useMemo(()=>{const G=e.timeSeries[e.timeSeries.length-1];return G?Object.values(G.values).reduce((K,lt)=>K+lt,0):0},[e.timeSeries]),j=V.useMemo(()=>df({repositoryCount:J}),[J]),E=V.useMemo(()=>gf({repositoryCount:J}),[J]),z=V.useMemo(()=>{const G=s-Q.top-Q.bottom;return Math.round(G*.9)},[s,Q]),q=V.useMemo(()=>e.events?e.events.map(G=>({timestamp:G.timestamp,label:G.eventName,color:typeof G.color=="string"?G.color:"#2F42FF"})):[],[e.events]),R=V.useCallback(G=>{if(G){const K=e.categories.find(lt=>lt.label===G.label);A((K==null?void 0:K.id)??null)}else A(null)},[e.categories]),it=V.useCallback(G=>{k(!G),S&&S(G)},[S]);return F.jsxs(B.Stack,{sx:{width:"100%",alignItems:"center",gap:2},children:[i&&(n||r)&&F.jsxs(B.Stack,{spacing:.5,sx:{mb:2,width:"100%",alignItems:"center"},children:[n&&F.jsx(B.Typography,{variant:"h5",sx:{fontWeight:500},children:n}),r&&F.jsx(B.Typography,{variant:"body2",sx:{color:"text.secondary"},children:r})]}),F.jsx(B.Box,{sx:{position:"relative",width:"100%"},children:F.jsx(H0,{data:L.data,categories:L.categories,mode:P==="point-in-time"?"parliament":"stacked-area",width:a,height:s,timeRange:tt,onTimeRangeChange:U,minAllowedTime:u,maxAllowedTime:c,enableBrush:f,showGrid:g,showAxes:!0,axisLabelColor:d,axisLabelSize:m,margin:Q,markers:q,formatDate:_,formatValue:w,animationDuration:y,onAnimationStateChange:it,onTimelineReady:b,onAnimationProgress:T,onHoveredDataChange:R,hoveredCategory:C,arcAngle:j,parliamentRadius:z,seatSize:E,parliamentTimestamp:O,timelineEvents:e.events??[],showTimeline:P==="historical"&&!x,brushColor:M})}),F.jsx(_T,{categories:W,activeCategory:C,onCategoryHover:A,mode:P,visible:D})]})},wT=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:s,showGrid:o=!0,showXAxis:l=!0,showYAxis:u=!0,enableBrush:c=!1,zoomToSelection:f=!1,onTimeRangeChange:h,formatDate:p,formatValue:g,markers:d=[],markerVisibilityMode:m="hover",onMarkerHoverChange:v,brushColor:y="#69b3a2"})=>{V.useEffect(()=>{if(!e.current||t.length===0||n.length===0)return;const x=Rt(e.current),_=r-a.left-a.right,w=i-a.top-a.bottom;x.selectAll("*").remove();const S=x.append("g").attr("transform",`translate(${a.left},${a.top})`),b=`d3-chart-clip-${Math.random().toString(36).substr(2,9)}`;x.append("defs").append("clipPath").attr("id",b).append("rect").attr("x",0).attr("y",0).attr("width",_).attr("height",w);const T=S.append("g").attr("clip-path",`url(#${b})`),M=[...t].sort((U,Q)=>U.timestamp-Q.timestamp),C=n.map(U=>U.dataKey),A=ja().keys(C),D=A(M),k=t.map(U=>U.timestamp),N=s?s[0]:Math.min(...k),I=s?s[1]:Math.max(...k),P=Pi().domain([new Date(N),new Date(I)]).range([0,_]),O=M.filter(U=>U.timestamp>=N&&U.timestamp<=I),H=A(O),X=H.length>0?Math.max(...H[H.length-1].map(U=>U[1]??0)):0,et=Xi().domain([0,X*1.1]).range([w,0]).nice();o&&(T.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(br(P).ticks(6).tickSize(w).tickFormat(()=>"")),T.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(wr(et).ticks(5).tickSize(-_).tickFormat(()=>"")));const at=ss().x(U=>P(new Date(U.data.timestamp))).y0(U=>et(U[0])).y1(U=>et(U[1])).curve(Cr),tt=T.append("g").attr("class","areas");if(D.forEach((U,Q)=>{const L=n[Q];if(!L)return;const W=tt.append("path").datum(U).attr("class",`area area-${L.dataKey}`).attr("fill",L.color).attr("fill-opacity",L.fillOpacity??.7).attr("stroke",L.color).attr("stroke-width",L.strokeWidth??1.5).attr("d",at);L.strokeDasharray&&W.attr("stroke-dasharray",L.strokeDasharray)}),d.length>0){const U=T.append("g").attr("class","markers"),Q=m==="hover"?0:.6,L=d.filter(W=>W.timestamp>=N&&W.timestamp<=I).map(W=>({...W,x:P(new Date(W.timestamp))}));if(L.forEach(W=>{const J=U.append("line").attr("class","marker-line").attr("data-timestamp",W.timestamp).attr("x1",W.x).attr("x2",W.x).attr("y1",0).attr("y2",w).attr("stroke",W.color??"#131E7A").attr("stroke-width",2).attr("opacity",Q);W.strokeDasharray&&J.attr("stroke-dasharray",W.strokeDasharray),W.label&&U.append("text").attr("class","marker-label").attr("data-timestamp",W.timestamp).attr("x",W.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",W.color??"#131E7A").attr("opacity",Q).text(W.label)}),m==="hover"&&L.length>0){const W=x.append("g").attr("class","marker-tooltip").attr("transform",`translate(${a.left},${a.top})`).style("pointer-events","none").style("display","none"),J=W.append("rect").attr("fill","#131E7A").attr("rx",4).attr("ry",4).attr("filter","drop-shadow(0px 2px 4px rgba(0,0,0,0.2))"),j=W.append("text").attr("fill","white").attr("font-size",12).attr("font-weight",500).attr("text-anchor","middle");let E=null;const z=T.append("rect").attr("class","marker-hover-overlay").attr("width",_).attr("height",w).attr("fill","none").attr("pointer-events","all"),q=R=>{let it=null,G=1/0;if(L.forEach(xt=>{const Ut=Math.abs(R-xt.x);Ut<G&&(G=Ut,it=xt)}),!it||G>50)return E!==null&&(E=null,U.selectAll(".marker-line").attr("opacity",0),U.selectAll(".marker-label").attr("opacity",0),W.style("display","none"),v==null||v(!1)),!1;const lt=it;if(E===null&&(v==null||v(!0)),E===lt.timestamp)return!0;E=lt.timestamp,U.selectAll(".marker-line").attr("opacity",0),U.selectAll(".marker-label").attr("opacity",0),U.selectAll(".marker-line").filter(function(){return Rt(this).attr("data-timestamp")===String(lt.timestamp)}).attr("opacity",.6),U.selectAll(".marker-label").filter(function(){return Rt(this).attr("data-timestamp")===String(lt.timestamp)}).attr("opacity",1);const nt=new Date(lt.timestamp),ft=p?p(lt.timestamp):nt.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),At=lt.label?`${lt.label}: ${ft}`:ft;j.text(At);const st=j.node().getBBox(),bt=8,Bt=st.width+bt*2,ot=st.height+bt*2;J.attr("width",Bt).attr("height",ot);let mt=lt.x-Bt/2;const yt=10;return mt<0?mt=0:mt+Bt>_&&(mt=_-Bt),W.attr("transform",`translate(${a.left+mt},${a.top+yt})`),j.attr("x",Bt/2).attr("y",ot/2+4),W.style("display","block"),!0};z.on("mousemove",function(R){const[it]=Sr(R,this);q(it)&&R.stopPropagation()}),z.on("mouseleave",function(){E=null,U.selectAll(".marker-line").attr("opacity",0),U.selectAll(".marker-label").attr("opacity",0),W.style("display","none"),v==null||v(!1)})}}if(l){const U=br(P).ticks(6);p&&U.tickFormat(Q=>p(+Q)),S.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${w})`).call(U).selectAll("text").attr("font-size",11)}if(u){const U=wr(et).ticks(5);g&&U.tickFormat(Q=>g(+Q)),S.append("g").attr("class","axis axis-y").call(U).selectAll("text").attr("font-size",11)}if(c&&h){const U=ra().extent([[0,0],[_,w]]).on("end",L=>{if(!L.selection)return;const[W,J]=L.selection,j=[+P.invert(W),+P.invert(J)];h(j),f&&x.select(".brush").call(U.move,null)}),Q=T.append("g").attr("class","brush").call(U);Q.selectAll(".selection").attr("fill",y).attr("fill-opacity",.2).attr("stroke",y).attr("stroke-width",1),Q.selectAll(".handle").attr("fill",y).attr("fill-opacity",.8)}return()=>{x.selectAll("*").remove()}},[e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m,v,y])},ST=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:s=!0,width:o=800,height:l=400,margin:u={top:20,right:30,bottom:40,left:60},timeRange:c,showGrid:f=!0,showAxes:h=!0,showXAxis:p,showYAxis:g,formatDate:d,formatValue:m,onTimeRangeChange:v,enableBrush:y=!1,zoomToSelection:x=!1,markers:_=[],markerVisibilityMode:w="hover",brushColor:S="#69b3a2"})=>{const b=V.useRef(null),[T,M]=V.useState(null),[C,A]=V.useState(!1);V.useEffect(()=>{C&&M(null)},[C]),wT({containerRef:b,data:e,categories:t,width:o,height:l,margin:u,timeRange:c,showGrid:f,showXAxis:p!==void 0?p:h,showYAxis:g!==void 0?g:h,enableBrush:y,zoomToSelection:x,onTimeRangeChange:v,formatDate:d,formatValue:m,markers:_,markerVisibilityMode:w,onMarkerHoverChange:A,brushColor:S});const N=P=>{if(!s||!b.current||C)return;const O=b.current.getBoundingClientRect(),H=P.clientX-O.left-u.left,X=P.clientY-O.top,et=o-u.left-u.right;if(H<0||H>et){M(null);return}const at=e.map(q=>q.timestamp),tt=c?c[0]:Math.min(...at),U=c?c[1]:Math.max(...at),Q=H/et*(U-tt)+tt,W=((q,R)=>{let it=0,G=q.length;for(;it<G;){const K=it+G>>>1;q[K]<R?it=K+1:G=K}return it})(at,Q),J=e[W-1],j=e[W];let E=j;if(J&&j?E=Q-J.timestamp>j.timestamp-Q?j:J:J&&(E=J),!E){M(null);return}const z=t.map(q=>({label:q.label,value:E[q.dataKey]??0,color:q.color}));M({visible:!0,x:P.clientX-O.left,y:X,timestamp:E.timestamp,values:z})},I=()=>{s&&M(null)};return F.jsxs(B.Stack,{sx:{width:"100%",alignItems:"center",gap:2},children:[i&&(n||r)&&F.jsxs(B.Stack,{spacing:.5,sx:{mb:2,width:"100%",alignItems:"center"},children:[n&&F.jsx(B.Typography,{variant:"h5",sx:{fontWeight:500},children:n}),r&&F.jsx(B.Typography,{variant:"body2",sx:{color:"text.secondary"},children:r})]}),F.jsxs(B.Box,{sx:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:[F.jsx("svg",{ref:b,viewBox:`0 0 ${o} ${l}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",maxWidth:"1200px",minWidth:"400px",height:"auto",display:"block"},onMouseMove:N,onMouseLeave:I}),s&&T&&T.visible&&F.jsxs(B.Paper,{elevation:3,sx:{position:"absolute",left:T.x+10,top:T.y-10,pointerEvents:"none",padding:1.5,minWidth:150,zIndex:1e3,transform:T.x>o/2?"translateX(-100%) translateX(-20px)":"none"},children:[F.jsx(B.Typography,{variant:"caption",sx:{fontWeight:600,mb:1},children:d?d(T.timestamp):new Date(T.timestamp).toLocaleDateString()}),F.jsx(B.Stack,{spacing:.5,sx:{mt:1},children:T.values.map(P=>F.jsxs(B.Stack,{direction:"row",justifyContent:"space-between",spacing:2,alignItems:"center",children:[F.jsxs(B.Stack,{direction:"row",spacing:.5,alignItems:"center",children:[F.jsx(B.Box,{sx:{width:8,height:8,backgroundColor:P.color,borderRadius:"50%"}}),F.jsxs(B.Typography,{variant:"caption",children:[P.label,":"]})]}),F.jsx(B.Typography,{variant:"caption",sx:{fontWeight:600},children:m?m(P.value):P.value})]},P.label))})]})]}),a&&F.jsx(B.Stack,{direction:"row",spacing:3,sx:{flexWrap:"wrap",justifyContent:"center",gap:2},children:t.map(P=>F.jsxs(B.Stack,{direction:"row",spacing:1,alignItems:"center",sx:{cursor:"pointer","&:hover":{opacity:.7}},children:[F.jsx(B.Box,{sx:{width:16,height:16,backgroundColor:P.color,opacity:P.fillOpacity??.7,border:`2px solid ${P.color}`,borderRadius:"2px",...P.strokeDasharray&&{backgroundImage:`repeating-linear-gradient(
|
|
34
|
+
45deg,
|
|
35
|
+
transparent,
|
|
36
|
+
transparent 4px,
|
|
37
|
+
${P.color} 4px,
|
|
38
|
+
${P.color} 8px
|
|
39
|
+
)`}}}),F.jsx(B.Typography,{variant:"body2",children:P.label})]},P.dataKey))})]})},TT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],jh={}.hasOwnProperty;function MT(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&jh.call(i,e)){const l=String(i[e]);s=jh.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const AT=/["&'<>`]/g,CT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,kT=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,RT=/[|\\{}()[\]^$+*?.]/g,Yh=new WeakMap;function ET(e,t){if(e=e.replace(t.subset?DT(t.subset):AT,r),t.subset||t.escapeOnly)return e;return e.replace(CT,n).replace(kT,r);function n(i,a,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(a+2),t)}function r(i,a,s){return t.format(i.charCodeAt(0),s.charCodeAt(a+1),t)}}function DT(e){let t=Yh.get(e);return t||(t=OT(e),Yh.set(e,t)),t}function OT(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(RT,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const PT=/[\dA-Fa-f]/;function FT(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!PT.test(String.fromCharCode(t))?r:r+";"}const NT=/\d/;function LT(e,t,n){const r="&#"+String(e);return n&&t&&!NT.test(String.fromCharCode(t))?r:r+";"}const qT=["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"],Ws={nbsp:" ",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:"€"},$T=["cent","copy","divide","gt","lt","not","para","times"],ay={}.hasOwnProperty,kc={};let ba;for(ba in Ws)ay.call(Ws,ba)&&(kc[Ws[ba]]=ba);const IT=/[^\dA-Za-z]/;function zT(e,t,n,r){const i=String.fromCharCode(e);if(ay.call(kc,i)){const a=kc[i],s="&"+a;return n&&qT.includes(a)&&!$T.includes(a)&&(!r||t&&t!==61&&IT.test(String.fromCharCode(t)))?s:s+";"}return""}function BT(e,t,n){let r=FT(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=zT(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const a=LT(e,t,n.omitOptionalSemicolons);a.length<r.length&&(r=a)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Jr(e,t){return ET(e,Object.assign({format:BT},t))}const UT=/^>|^->|<!--|-->|--!>|<!-$/g,HT=[">"],GT=["<",">"];function jT(e,t,n,r){return r.settings.bogusComments?"<?"+Jr(e.value,Object.assign({},r.settings.characterReferences,{subset:HT}))+">":"<!--"+e.value.replace(UT,i)+"-->";function i(a){return Jr(a,Object.assign({},r.settings.characterReferences,{subset:GT}))}}function YT(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Xh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const XT=/[ \t\n\f\r]/g;function _f(e){return typeof e=="object"?e.type==="text"?Wh(e.value):!1:Wh(e)}function Wh(e){return e.replace(XT,"")===""}const de=oy(1),sy=oy(-1),WT=[];function oy(e){return t;function t(n,r,i){const a=n?n.children:WT;let s=(r||0)+e,o=a[s];if(!i)for(;o&&_f(o);)s+=e,o=a[s];return o}}const KT={}.hasOwnProperty;function ly(e){return t;function t(n,r,i){return KT.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const vf=ly({body:ZT,caption:Ks,colgroup:Ks,dd:eM,dt:tM,head:Ks,html:VT,li:JT,optgroup:nM,option:rM,p:QT,rp:Kh,rt:Kh,tbody:aM,td:Vh,tfoot:sM,th:Vh,thead:iM,tr:oM});function Ks(e,t,n){const r=de(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&_f(r.value.charAt(0)))}function VT(e,t,n){const r=de(n,t);return!r||r.type!=="comment"}function ZT(e,t,n){const r=de(n,t);return!r||r.type!=="comment"}function QT(e,t,n){const r=de(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 JT(e,t,n){const r=de(n,t);return!r||r.type==="element"&&r.tagName==="li"}function tM(e,t,n){const r=de(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function eM(e,t,n){const r=de(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Kh(e,t,n){const r=de(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function nM(e,t,n){const r=de(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function rM(e,t,n){const r=de(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function iM(e,t,n){const r=de(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function aM(e,t,n){const r=de(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function sM(e,t,n){return!de(n,t)}function oM(e,t,n){const r=de(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Vh(e,t,n){const r=de(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const lM=ly({body:fM,colgroup:hM,head:cM,html:uM,tbody:pM});function uM(e){const t=de(e,-1);return!t||t.type!=="comment"}function cM(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function fM(e){const t=de(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&_f(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function hM(e,t,n){const r=sy(n,t),i=de(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&vf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function pM(e,t,n){const r=sy(n,t),i=de(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&vf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const wa={name:[[`
|
|
2
40
|
\f\r &/=>`.split(""),`
|
|
3
41
|
\f\r "&'/=>\``.split("")],[`\0
|
|
4
42
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -6,22 +44,22 @@
|
|
|
6
44
|
\f\r &>`.split(""),`\0
|
|
7
45
|
\f\r "&'<=>\``.split("")],[`\0
|
|
8
46
|
\f\r "&'<=>\``.split(""),`\0
|
|
9
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Cu(e,t,n,r){const a=r.schema,i=a.space==="svg"?!1:r.settings.omitOptionalTags;let o=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const l=[];let s;a.space==="html"&&e.tagName==="svg"&&(r.schema=ia);const u=qu(r,e.properties),f=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,f&&(o=!1),(u||!i||!vu(e,t,n))&&(l.push("<",e.tagName,u?" "+u:""),o&&(a.space==="svg"||r.settings.closeSelfClosing)&&(s=u.charAt(u.length-1),(!r.settings.tightSelfClosing||s==="/"||s&&s!=='"'&&s!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(f),!o&&(!i||!la(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function qu(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const i=Ru(e,a,t[a]);i&&n.push(i)}}for(;++r<n.length;){const i=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function Ru(e,t,n){const r=Fl(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let o=e.quote,l;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"";const s=pe(r.attribute,Object.assign({},e.settings.characterReferences,{subset:je.name[a][i]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?tu:ru)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?s:(e.settings.preferUnquoted&&(l=pe(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:je.unquoted[a][i]}))),l!==n&&(e.settings.quoteSmart&&xa(n,o)>xa(n,e.alternative)&&(o=e.alternative),l=o+pe(n,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?je.single:je.double)[a][i],attribute:!0}))+o),s+(l&&"="+l))}const wu=["<","&"];function Gl(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:pe(e.value,Object.assign({},r.settings.characterReferences,{subset:wu}))}function Tu(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Gl(e,t,n,r)}function Mu(e,t,n,r){return r.all(e)}const Ou=Is("type",{invalid:Eu,unknown:Du,handlers:{comment:Qs,doctype:eu,element:Cu,raw:Tu,root:Mu,text:Gl}});function Eu(e){throw new Error("Expected node, not `"+e+"`")}function Du(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Iu={},Pu={},Lu=[];function ku(e,t){const n=Iu,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Nu,all:Fu,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||qs,characterReferences:n.characterReferences||Pu,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ia:jl,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Nu(e,t,n){return Ou(e,t,n,this)}function Fu(e){const t=[],n=e&&e.children||Lu;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const le={neoGrey:{200:"#EDEFEF",400:"#ADB5BD"},neoDigitalGreen:{600:"#40c048"}},K={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.1,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:"#f8f8f8",emptySeatsBorder:"#d8d8d8",seatBorder:"#fff"},animation:{transitionDuration:"0.2s",hoverOpacity:{active:"1",dimmed:"0.2",empty:"0.3"}},scaling:{enableScaling:!0,scaleThreshold:200}},ge={COMPLETED:le.neoDigitalGreen[600],NOT_APPLICABLE:"url(#greyHatchPattern)",NO_LST:"url(#noLstHatchPattern)",DATA_MISSING:"url(#dataMissingHatchPattern)"},Re="N/A",we="No LST",Te="Data Missing",Ta=/[#.]/g;function ju(e,t){const n=e||"",r={};let a=0,i,o;for(;a<n.length;){Ta.lastIndex=a;const l=Ta.exec(n),s=n.slice(a,l?l.index:n.length);s&&(i?i==="#"?r.id=s:Array.isArray(r.className)?r.className.push(s):r.className=[s]:o=s,a+=s.length),l&&(i=l[0],a++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}function $l(e,t,n){const r=n?Uu(n):void 0;function a(i,o,...l){let s;if(i==null){s={type:"root",children:[]};const u=o;l.unshift(u)}else{s=ju(i,t);const u=s.tagName.toLowerCase(),f=r?r.get(u):void 0;if(s.tagName=f||u,Bu(o))l.unshift(o);else for(const[d,c]of Object.entries(o))Hu(e,s.properties,d,c)}for(const u of l)ta(s.children,u);return s.type==="element"&&s.tagName==="template"&&(s.content={type:"root",children:s.children},s.children=[]),s}return a}function Bu(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const i=a;for(const o of i)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Hu(e,t,n,r){const a=Fl(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?a.spaceSeparated?i=Ca(r):a.commaSeparated?i=Aa(r):a.commaOrSpaceSeparated?i=Ca(Aa(r).join(" ")):i=Ma(a,a.property,r):Array.isArray(r)?i=[...r]:i=a.property==="style"?zu(r):String(r);if(Array.isArray(i)){const o=[];for(const l of i)o.push(Ma(a,a.property,l));i=o}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function ta(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(const n of t)ta(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ta(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ma(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Me(n)===Me(t)))return!0}return n}function zu(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Uu(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Gu=["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"];$l(jl,"div");const Ee=$l(ia,"g",Gu);var Be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt,Oa;function Kl(){if(Oa)return rt;Oa=1;var e=typeof Be=="object"&&Be&&Be.Object===Object&&Be;return rt=e,rt}var nt,Ea;function ie(){if(Ea)return nt;Ea=1;var e=Kl(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return nt=n,nt}var at,Da;function $u(){if(Da)return at;Da=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return at=t,at}var it,Ia;function Ku(){if(Ia)return it;Ia=1;var e=$u(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return it=n,it}var ot,Pa;function De(){if(Pa)return ot;Pa=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return ot=e,ot}var lt,La;function Ie(){if(La)return lt;La=1;var e=ie(),t=e.Symbol;return lt=t,lt}var st,ka;function Wu(){if(ka)return st;ka=1;var e=Ie(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function i(o){var l=n.call(o,a),s=o[a];try{o[a]=void 0;var u=!0}catch{}var f=r.call(o);return u&&(l?o[a]=s:delete o[a]),f}return st=i,st}var ut,Na;function Yu(){if(Na)return ut;Na=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ut=n,ut}var ct,Fa;function Pe(){if(Fa)return ct;Fa=1;var e=Ie(),t=Wu(),n=Yu(),r="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?a:r:i&&i in Object(l)?t(l):n(l)}return ct=o,ct}var ft,ja;function Le(){if(ja)return ft;ja=1;function e(t){return t!=null&&typeof t=="object"}return ft=e,ft}var dt,Ba;function ke(){if(Ba)return dt;Ba=1;var e=Pe(),t=Le(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return dt=r,dt}var ht,Ha;function Wl(){if(Ha)return ht;Ha=1;var e=Ku(),t=De(),n=ke(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function s(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=t(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=e(u);var d=i.test(u);return d||o.test(u)?l(u.slice(2),d?2:8):a.test(u)?r:+u}return ht=s,ht}var pt,za;function Yl(){if(za)return pt;za=1;var e=Wl(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*n}return a===a?a:0}return pt=r,pt}var gt,Ua;function Vl(){if(Ua)return gt;Ua=1;var e=Yl();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return gt=t,gt}var mt,Ga;function ze(){if(Ga)return mt;Ga=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=n(t[r],r,t);return i}return mt=e,mt}var yt,$a;function Q(){if($a)return yt;$a=1;var e=Array.isArray;return yt=e,yt}var vt,Ka;function Vu(){if(Ka)return vt;Ka=1;var e=Ie(),t=ze(),n=Q(),r=ke(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return i?i.call(l):"";var s=l+"";return s=="0"&&1/l==-1/0?"-0":s}return vt=o,vt}var bt,Wa;function Xl(){if(Wa)return bt;Wa=1;var e=Vu();function t(n){return n==null?"":e(n)}return bt=t,bt}var _t,Ya;function Xu(){if(Ya)return _t;Ya=1;var e=ie(),t=Vl(),n=Wl(),r=Xl(),a=e.isFinite,i=Math.min;function o(l){var s=Math[l];return function(u,f){if(u=n(u),f=f==null?0:i(t(f),292),f&&a(u)){var d=(r(u)+"e").split("e"),c=s(d[0]+"e"+(+d[1]+f));return d=(r(c)+"e").split("e"),+(d[0]+"e"+(+d[1]-f))}return s(u)}}return _t=o,_t}var St,Va;function Zu(){if(Va)return St;Va=1;var e=Xu(),t=e("round");return St=t,St}var Ju=Zu();const Qu=ye(Ju);var xt,Xa;function Zl(){if(Xa)return xt;Xa=1;function e(t,n){for(var r=-1,a=n.length,i=t.length;++r<a;)t[i+r]=n[r];return t}return xt=e,xt}var At,Za;function ec(){if(Za)return At;Za=1;var e=Pe(),t=Le(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return At=r,At}var Ct,Ja;function sa(){if(Ja)return Ct;Ja=1;var e=ec(),t=Le(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!a.call(o,"callee")};return Ct=i,Ct}var qt,Qa;function tc(){if(Qa)return qt;Qa=1;var e=Ie(),t=sa(),n=Q(),r=e?e.isConcatSpreadable:void 0;function a(i){return n(i)||t(i)||!!(r&&i&&i[r])}return qt=a,qt}var Rt,ei;function Jl(){if(ei)return Rt;ei=1;var e=Zl(),t=tc();function n(r,a,i,o,l){var s=-1,u=r.length;for(i||(i=t),l||(l=[]);++s<u;){var f=r[s];a>0&&i(f)?a>1?n(f,a-1,i,o,l):e(l,f):o||(l[l.length]=f)}return l}return Rt=n,Rt}var wt,ti;function ua(){if(ti)return wt;ti=1;var e=Q(),t=ke(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,o){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||o!=null&&i in Object(o)}return wt=a,wt}var Tt,ri;function Ql(){if(ri)return Tt;ri=1;var e=Pe(),t=De(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(l){if(!t(l))return!1;var s=e(l);return s==r||s==a||s==n||s==i}return Tt=o,Tt}var Mt,ni;function rc(){if(ni)return Mt;ni=1;var e=ie(),t=e["__core-js_shared__"];return Mt=t,Mt}var Ot,ai;function nc(){if(ai)return Ot;ai=1;var e=rc(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Ot=n,Ot}var Et,ii;function es(){if(ii)return Et;ii=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Et=n,Et}var Dt,oi;function ac(){if(oi)return Dt;oi=1;var e=Ql(),t=nc(),n=De(),r=es(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,s=o.toString,u=l.hasOwnProperty,f=RegExp("^"+s.call(u).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(c){if(!n(c)||t(c))return!1;var h=e(c)?f:i;return h.test(r(c))}return Dt=d,Dt}var It,li;function ic(){if(li)return It;li=1;function e(t,n){return t==null?void 0:t[n]}return It=e,It}var Pt,si;function ue(){if(si)return Pt;si=1;var e=ac(),t=ic();function n(r,a){var i=t(r,a);return e(i)?i:void 0}return Pt=n,Pt}var Lt,ui;function Ue(){if(ui)return Lt;ui=1;var e=ue(),t=e(Object,"create");return Lt=t,Lt}var kt,ci;function oc(){if(ci)return kt;ci=1;var e=Ue();function t(){this.__data__=e?e(null):{},this.size=0}return kt=t,kt}var Nt,fi;function lc(){if(fi)return Nt;fi=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Nt=e,Nt}var Ft,di;function sc(){if(di)return Ft;di=1;var e=Ue(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(i){var o=this.__data__;if(e){var l=o[i];return l===t?void 0:l}return r.call(o,i)?o[i]:void 0}return Ft=a,Ft}var jt,hi;function uc(){if(hi)return jt;hi=1;var e=Ue(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var i=this.__data__;return e?i[a]!==void 0:n.call(i,a)}return jt=r,jt}var Bt,pi;function cc(){if(pi)return Bt;pi=1;var e=Ue(),t="__lodash_hash_undefined__";function n(r,a){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&a===void 0?t:a,this}return Bt=n,Bt}var Ht,gi;function fc(){if(gi)return Ht;gi=1;var e=oc(),t=lc(),n=sc(),r=uc(),a=cc();function i(o){var l=-1,s=o==null?0:o.length;for(this.clear();++l<s;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Ht=i,Ht}var zt,mi;function dc(){if(mi)return zt;mi=1;function e(){this.__data__=[],this.size=0}return zt=e,zt}var Ut,yi;function ca(){if(yi)return Ut;yi=1;function e(t,n){return t===n||t!==t&&n!==n}return Ut=e,Ut}var Gt,vi;function Ge(){if(vi)return Gt;vi=1;var e=ca();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return Gt=t,Gt}var $t,bi;function hc(){if(bi)return $t;bi=1;var e=Ge(),t=Array.prototype,n=t.splice;function r(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var l=i.length-1;return o==l?i.pop():n.call(i,o,1),--this.size,!0}return $t=r,$t}var Kt,_i;function pc(){if(_i)return Kt;_i=1;var e=Ge();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return Kt=t,Kt}var Wt,Si;function gc(){if(Si)return Wt;Si=1;var e=Ge();function t(n){return e(this.__data__,n)>-1}return Wt=t,Wt}var Yt,xi;function mc(){if(xi)return Yt;xi=1;var e=Ge();function t(n,r){var a=this.__data__,i=e(a,n);return i<0?(++this.size,a.push([n,r])):a[i][1]=r,this}return Yt=t,Yt}var Vt,Ai;function $e(){if(Ai)return Vt;Ai=1;var e=dc(),t=hc(),n=pc(),r=gc(),a=mc();function i(o){var l=-1,s=o==null?0:o.length;for(this.clear();++l<s;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Vt=i,Vt}var Xt,Ci;function fa(){if(Ci)return Xt;Ci=1;var e=ue(),t=ie(),n=e(t,"Map");return Xt=n,Xt}var Zt,qi;function yc(){if(qi)return Zt;qi=1;var e=fc(),t=$e(),n=fa();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Zt=r,Zt}var Jt,Ri;function vc(){if(Ri)return Jt;Ri=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Jt=e,Jt}var Qt,wi;function Ke(){if(wi)return Qt;wi=1;var e=vc();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return Qt=t,Qt}var er,Ti;function bc(){if(Ti)return er;Ti=1;var e=Ke();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return er=t,er}var tr,Mi;function _c(){if(Mi)return tr;Mi=1;var e=Ke();function t(n){return e(this,n).get(n)}return tr=t,tr}var rr,Oi;function Sc(){if(Oi)return rr;Oi=1;var e=Ke();function t(n){return e(this,n).has(n)}return rr=t,rr}var nr,Ei;function xc(){if(Ei)return nr;Ei=1;var e=Ke();function t(n,r){var a=e(this,n),i=a.size;return a.set(n,r),this.size+=a.size==i?0:1,this}return nr=t,nr}var ar,Di;function da(){if(Di)return ar;Di=1;var e=yc(),t=bc(),n=_c(),r=Sc(),a=xc();function i(o){var l=-1,s=o==null?0:o.length;for(this.clear();++l<s;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,ar=i,ar}var ir,Ii;function Ac(){if(Ii)return ir;Ii=1;var e=da(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var o=arguments,l=a?a.apply(this,o):o[0],s=i.cache;if(s.has(l))return s.get(l);var u=r.apply(this,o);return i.cache=s.set(l,u)||s,u};return i.cache=new(n.Cache||e),i}return n.Cache=e,ir=n,ir}var or,Pi;function Cc(){if(Pi)return or;Pi=1;var e=Ac(),t=500;function n(r){var a=e(r,function(o){return i.size===t&&i.clear(),o}),i=a.cache;return a}return or=n,or}var lr,Li;function qc(){if(Li)return lr;Li=1;var e=Cc(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(o,l,s,u){i.push(s?u.replace(n,"$1"):l||o)}),i});return lr=r,lr}var sr,ki;function ts(){if(ki)return sr;ki=1;var e=Q(),t=ua(),n=qc(),r=Xl();function a(i,o){return e(i)?i:t(i,o)?[i]:n(r(i))}return sr=a,sr}var ur,Ni;function We(){if(Ni)return ur;Ni=1;var e=ke();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return ur=t,ur}var cr,Fi;function ha(){if(Fi)return cr;Fi=1;var e=ts(),t=We();function n(r,a){a=e(a,r);for(var i=0,o=a.length;r!=null&&i<o;)r=r[t(a[i++])];return i&&i==o?r:void 0}return cr=n,cr}var fr,ji;function Rc(){if(ji)return fr;ji=1;var e=$e();function t(){this.__data__=new e,this.size=0}return fr=t,fr}var dr,Bi;function wc(){if(Bi)return dr;Bi=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return dr=e,dr}var hr,Hi;function Tc(){if(Hi)return hr;Hi=1;function e(t){return this.__data__.get(t)}return hr=e,hr}var pr,zi;function Mc(){if(zi)return pr;zi=1;function e(t){return this.__data__.has(t)}return pr=e,pr}var gr,Ui;function Oc(){if(Ui)return gr;Ui=1;var e=$e(),t=fa(),n=da(),r=200;function a(i,o){var l=this.__data__;if(l instanceof e){var s=l.__data__;if(!t||s.length<r-1)return s.push([i,o]),this.size=++l.size,this;l=this.__data__=new n(s)}return l.set(i,o),this.size=l.size,this}return gr=a,gr}var mr,Gi;function rs(){if(Gi)return mr;Gi=1;var e=$e(),t=Rc(),n=wc(),r=Tc(),a=Mc(),i=Oc();function o(l){var s=this.__data__=new e(l);this.size=s.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=a,o.prototype.set=i,mr=o,mr}var yr,$i;function Ec(){if($i)return yr;$i=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return yr=t,yr}var vr,Ki;function Dc(){if(Ki)return vr;Ki=1;function e(t){return this.__data__.has(t)}return vr=e,vr}var br,Wi;function Ic(){if(Wi)return br;Wi=1;var e=da(),t=Ec(),n=Dc();function r(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,br=r,br}var _r,Yi;function Pc(){if(Yi)return _r;Yi=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return _r=e,_r}var Sr,Vi;function Lc(){if(Vi)return Sr;Vi=1;function e(t,n){return t.has(n)}return Sr=e,Sr}var xr,Xi;function ns(){if(Xi)return xr;Xi=1;var e=Ic(),t=Pc(),n=Lc(),r=1,a=2;function i(o,l,s,u,f,d){var c=s&r,h=o.length,m=l.length;if(h!=m&&!(c&&m>h))return!1;var v=d.get(o),_=d.get(l);if(v&&_)return v==l&&_==o;var p=-1,b=!0,y=s&a?new e:void 0;for(d.set(o,l),d.set(l,o);++p<h;){var S=o[p],q=l[p];if(u)var C=c?u(q,S,p,l,o,d):u(S,q,p,o,l,d);if(C!==void 0){if(C)continue;b=!1;break}if(y){if(!t(l,function(A,E){if(!n(y,E)&&(S===A||f(S,A,s,u,d)))return y.push(E)})){b=!1;break}}else if(!(S===q||f(S,q,s,u,d))){b=!1;break}}return d.delete(o),d.delete(l),b}return xr=i,xr}var Ar,Zi;function kc(){if(Zi)return Ar;Zi=1;var e=ie(),t=e.Uint8Array;return Ar=t,Ar}var Cr,Ji;function Nc(){if(Ji)return Cr;Ji=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,i){r[++n]=[i,a]}),r}return Cr=e,Cr}var qr,Qi;function Fc(){if(Qi)return qr;Qi=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return qr=e,qr}var Rr,eo;function jc(){if(eo)return Rr;eo=1;var e=Ie(),t=kc(),n=ca(),r=ns(),a=Nc(),i=Fc(),o=1,l=2,s="[object Boolean]",u="[object Date]",f="[object Error]",d="[object Map]",c="[object Number]",h="[object RegExp]",m="[object Set]",v="[object String]",_="[object Symbol]",p="[object ArrayBuffer]",b="[object DataView]",y=e?e.prototype:void 0,S=y?y.valueOf:void 0;function q(C,A,E,P,L,w,z){switch(E){case b:if(C.byteLength!=A.byteLength||C.byteOffset!=A.byteOffset)return!1;C=C.buffer,A=A.buffer;case p:return!(C.byteLength!=A.byteLength||!w(new t(C),new t(A)));case s:case u:case c:return n(+C,+A);case f:return C.name==A.name&&C.message==A.message;case h:case v:return C==A+"";case d:var N=a;case m:var B=P&o;if(N||(N=i),C.size!=A.size&&!B)return!1;var Y=z.get(C);if(Y)return Y==A;P|=l,z.set(C,A);var ee=r(N(C),N(A),P,L,w,z);return z.delete(C),ee;case _:if(S)return S.call(C)==S.call(A)}return!1}return Rr=q,Rr}var wr,to;function Bc(){if(to)return wr;to=1;var e=Zl(),t=Q();function n(r,a,i){var o=a(r);return t(r)?o:e(o,i(r))}return wr=n,wr}var Tr,ro;function Hc(){if(ro)return Tr;ro=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=0,o=[];++r<a;){var l=t[r];n(l,r,t)&&(o[i++]=l)}return o}return Tr=e,Tr}var Mr,no;function zc(){if(no)return Mr;no=1;function e(){return[]}return Mr=e,Mr}var Or,ao;function Uc(){if(ao)return Or;ao=1;var e=Hc(),t=zc(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(l){return r.call(o,l)}))}:t;return Or=i,Or}var Er,io;function Gc(){if(io)return Er;io=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return Er=e,Er}var Ce={exports:{}},Dr,oo;function $c(){if(oo)return Dr;oo=1;function e(){return!1}return Dr=e,Dr}Ce.exports;var lo;function as(){return lo||(lo=1,(function(e,t){var n=ie(),r=$c(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o?n.Buffer:void 0,s=l?l.isBuffer:void 0,u=s||r;e.exports=u})(Ce,Ce.exports)),Ce.exports}var Ir,so;function pa(){if(so)return Ir;so=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var i=typeof r;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return Ir=n,Ir}var Pr,uo;function ga(){if(uo)return Pr;uo=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Pr=t,Pr}var Lr,co;function Kc(){if(co)return Lr;co=1;var e=Pe(),t=ga(),n=Le(),r="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",l="[object Error]",s="[object Function]",u="[object Map]",f="[object Number]",d="[object Object]",c="[object RegExp]",h="[object Set]",m="[object String]",v="[object WeakMap]",_="[object ArrayBuffer]",p="[object DataView]",b="[object Float32Array]",y="[object Float64Array]",S="[object Int8Array]",q="[object Int16Array]",C="[object Int32Array]",A="[object Uint8Array]",E="[object Uint8ClampedArray]",P="[object Uint16Array]",L="[object Uint32Array]",w={};w[b]=w[y]=w[S]=w[q]=w[C]=w[A]=w[E]=w[P]=w[L]=!0,w[r]=w[a]=w[_]=w[i]=w[p]=w[o]=w[l]=w[s]=w[u]=w[f]=w[d]=w[c]=w[h]=w[m]=w[v]=!1;function z(N){return n(N)&&t(N.length)&&!!w[e(N)]}return Lr=z,Lr}var kr,fo;function is(){if(fo)return kr;fo=1;function e(t){return function(n){return t(n)}}return kr=e,kr}var qe={exports:{}};qe.exports;var ho;function Wc(){return ho||(ho=1,(function(e,t){var n=Kl(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,o=i&&n.process,l=(function(){try{var s=a&&a.require&&a.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(qe,qe.exports)),qe.exports}var Nr,po;function os(){if(po)return Nr;po=1;var e=Kc(),t=is(),n=Wc(),r=n&&n.isTypedArray,a=r?t(r):e;return Nr=a,Nr}var Fr,go;function Yc(){if(go)return Fr;go=1;var e=Gc(),t=sa(),n=Q(),r=as(),a=pa(),i=os(),o=Object.prototype,l=o.hasOwnProperty;function s(u,f){var d=n(u),c=!d&&t(u),h=!d&&!c&&r(u),m=!d&&!c&&!h&&i(u),v=d||c||h||m,_=v?e(u.length,String):[],p=_.length;for(var b in u)(f||l.call(u,b))&&!(v&&(b=="length"||h&&(b=="offset"||b=="parent")||m&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,p)))&&_.push(b);return _}return Fr=s,Fr}var jr,mo;function Vc(){if(mo)return jr;mo=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return jr=t,jr}var Br,yo;function Xc(){if(yo)return Br;yo=1;function e(t,n){return function(r){return t(n(r))}}return Br=e,Br}var Hr,vo;function Zc(){if(vo)return Hr;vo=1;var e=Xc(),t=e(Object.keys,Object);return Hr=t,Hr}var zr,bo;function Jc(){if(bo)return zr;bo=1;var e=Vc(),t=Zc(),n=Object.prototype,r=n.hasOwnProperty;function a(i){if(!e(i))return t(i);var o=[];for(var l in Object(i))r.call(i,l)&&l!="constructor"&&o.push(l);return o}return zr=a,zr}var Ur,_o;function Ye(){if(_o)return Ur;_o=1;var e=Ql(),t=ga();function n(r){return r!=null&&t(r.length)&&!e(r)}return Ur=n,Ur}var Gr,So;function Ve(){if(So)return Gr;So=1;var e=Yc(),t=Jc(),n=Ye();function r(a){return n(a)?e(a):t(a)}return Gr=r,Gr}var $r,xo;function Qc(){if(xo)return $r;xo=1;var e=Bc(),t=Uc(),n=Ve();function r(a){return e(a,n,t)}return $r=r,$r}var Kr,Ao;function ef(){if(Ao)return Kr;Ao=1;var e=Qc(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(i,o,l,s,u,f){var d=l&t,c=e(i),h=c.length,m=e(o),v=m.length;if(h!=v&&!d)return!1;for(var _=h;_--;){var p=c[_];if(!(d?p in o:r.call(o,p)))return!1}var b=f.get(i),y=f.get(o);if(b&&y)return b==o&&y==i;var S=!0;f.set(i,o),f.set(o,i);for(var q=d;++_<h;){p=c[_];var C=i[p],A=o[p];if(s)var E=d?s(A,C,p,o,i,f):s(C,A,p,i,o,f);if(!(E===void 0?C===A||u(C,A,l,s,f):E)){S=!1;break}q||(q=p=="constructor")}if(S&&!q){var P=i.constructor,L=o.constructor;P!=L&&"constructor"in i&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof L=="function"&&L instanceof L)&&(S=!1)}return f.delete(i),f.delete(o),S}return Kr=a,Kr}var Wr,Co;function tf(){if(Co)return Wr;Co=1;var e=ue(),t=ie(),n=e(t,"DataView");return Wr=n,Wr}var Yr,qo;function rf(){if(qo)return Yr;qo=1;var e=ue(),t=ie(),n=e(t,"Promise");return Yr=n,Yr}var Vr,Ro;function nf(){if(Ro)return Vr;Ro=1;var e=ue(),t=ie(),n=e(t,"Set");return Vr=n,Vr}var Xr,wo;function af(){if(wo)return Xr;wo=1;var e=ue(),t=ie(),n=e(t,"WeakMap");return Xr=n,Xr}var Zr,To;function of(){if(To)return Zr;To=1;var e=tf(),t=fa(),n=rf(),r=nf(),a=af(),i=Pe(),o=es(),l="[object Map]",s="[object Object]",u="[object Promise]",f="[object Set]",d="[object WeakMap]",c="[object DataView]",h=o(e),m=o(t),v=o(n),_=o(r),p=o(a),b=i;return(e&&b(new e(new ArrayBuffer(1)))!=c||t&&b(new t)!=l||n&&b(n.resolve())!=u||r&&b(new r)!=f||a&&b(new a)!=d)&&(b=function(y){var S=i(y),q=S==s?y.constructor:void 0,C=q?o(q):"";if(C)switch(C){case h:return c;case m:return l;case v:return u;case _:return f;case p:return d}return S}),Zr=b,Zr}var Jr,Mo;function lf(){if(Mo)return Jr;Mo=1;var e=rs(),t=ns(),n=jc(),r=ef(),a=of(),i=Q(),o=as(),l=os(),s=1,u="[object Arguments]",f="[object Array]",d="[object Object]",c=Object.prototype,h=c.hasOwnProperty;function m(v,_,p,b,y,S){var q=i(v),C=i(_),A=q?f:a(v),E=C?f:a(_);A=A==u?d:A,E=E==u?d:E;var P=A==d,L=E==d,w=A==E;if(w&&o(v)){if(!o(_))return!1;q=!0,P=!1}if(w&&!P)return S||(S=new e),q||l(v)?t(v,_,p,b,y,S):n(v,_,A,p,b,y,S);if(!(p&s)){var z=P&&h.call(v,"__wrapped__"),N=L&&h.call(_,"__wrapped__");if(z||N){var B=z?v.value():v,Y=N?_.value():_;return S||(S=new e),y(B,Y,p,b,S)}}return w?(S||(S=new e),r(v,_,p,b,y,S)):!1}return Jr=m,Jr}var Qr,Oo;function ls(){if(Oo)return Qr;Oo=1;var e=lf(),t=Le();function n(r,a,i,o,l){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,i,o,n,l)}return Qr=n,Qr}var en,Eo;function sf(){if(Eo)return en;Eo=1;var e=rs(),t=ls(),n=1,r=2;function a(i,o,l,s){var u=l.length,f=u,d=!s;if(i==null)return!f;for(i=Object(i);u--;){var c=l[u];if(d&&c[2]?c[1]!==i[c[0]]:!(c[0]in i))return!1}for(;++u<f;){c=l[u];var h=c[0],m=i[h],v=c[1];if(d&&c[2]){if(m===void 0&&!(h in i))return!1}else{var _=new e;if(s)var p=s(m,v,h,i,o,_);if(!(p===void 0?t(v,m,n|r,s,_):p))return!1}}return!0}return en=a,en}var tn,Do;function ss(){if(Do)return tn;Do=1;var e=De();function t(n){return n===n&&!e(n)}return tn=t,tn}var rn,Io;function uf(){if(Io)return rn;Io=1;var e=ss(),t=Ve();function n(r){for(var a=t(r),i=a.length;i--;){var o=a[i],l=r[o];a[i]=[o,l,e(l)]}return a}return rn=n,rn}var nn,Po;function us(){if(Po)return nn;Po=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return nn=e,nn}var an,Lo;function cf(){if(Lo)return an;Lo=1;var e=sf(),t=uf(),n=us();function r(a){var i=t(a);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return an=r,an}var on,ko;function ff(){if(ko)return on;ko=1;var e=ha();function t(n,r,a){var i=n==null?void 0:e(n,r);return i===void 0?a:i}return on=t,on}var ln,No;function df(){if(No)return ln;No=1;function e(t,n){return t!=null&&n in Object(t)}return ln=e,ln}var sn,Fo;function hf(){if(Fo)return sn;Fo=1;var e=ts(),t=sa(),n=Q(),r=pa(),a=ga(),i=We();function o(l,s,u){s=e(s,l);for(var f=-1,d=s.length,c=!1;++f<d;){var h=i(s[f]);if(!(c=l!=null&&u(l,h)))break;l=l[h]}return c||++f!=d?c:(d=l==null?0:l.length,!!d&&a(d)&&r(h,d)&&(n(l)||t(l)))}return sn=o,sn}var un,jo;function pf(){if(jo)return un;jo=1;var e=df(),t=hf();function n(r,a){return r!=null&&t(r,a,e)}return un=n,un}var cn,Bo;function gf(){if(Bo)return cn;Bo=1;var e=ls(),t=ff(),n=pf(),r=ua(),a=ss(),i=us(),o=We(),l=1,s=2;function u(f,d){return r(f)&&a(d)?i(o(f),d):function(c){var h=t(c,f);return h===void 0&&h===d?n(c,f):e(d,h,l|s)}}return cn=u,cn}var fn,Ho;function Xe(){if(Ho)return fn;Ho=1;function e(t){return t}return fn=e,fn}var dn,zo;function mf(){if(zo)return dn;zo=1;function e(t){return function(n){return n==null?void 0:n[t]}}return dn=e,dn}var hn,Uo;function yf(){if(Uo)return hn;Uo=1;var e=ha();function t(n){return function(r){return e(r,n)}}return hn=t,hn}var pn,Go;function vf(){if(Go)return pn;Go=1;var e=mf(),t=yf(),n=ua(),r=We();function a(i){return n(i)?e(r(i)):t(i)}return pn=a,pn}var gn,$o;function cs(){if($o)return gn;$o=1;var e=cf(),t=gf(),n=Xe(),r=Q(),a=vf();function i(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):a(o)}return gn=i,gn}var mn,Ko;function bf(){if(Ko)return mn;Ko=1;function e(t){return function(n,r,a){for(var i=-1,o=Object(n),l=a(n),s=l.length;s--;){var u=l[t?s:++i];if(r(o[u],u,o)===!1)break}return n}}return mn=e,mn}var yn,Wo;function _f(){if(Wo)return yn;Wo=1;var e=bf(),t=e();return yn=t,yn}var vn,Yo;function Sf(){if(Yo)return vn;Yo=1;var e=_f(),t=Ve();function n(r,a){return r&&e(r,a,t)}return vn=n,vn}var bn,Vo;function xf(){if(Vo)return bn;Vo=1;var e=Ye();function t(n,r){return function(a,i){if(a==null)return a;if(!e(a))return n(a,i);for(var o=a.length,l=r?o:-1,s=Object(a);(r?l--:++l<o)&&i(s[l],l,s)!==!1;);return a}}return bn=t,bn}var _n,Xo;function Af(){if(Xo)return _n;Xo=1;var e=Sf(),t=xf(),n=t(e);return _n=n,_n}var Sn,Zo;function fs(){if(Zo)return Sn;Zo=1;var e=Af(),t=Ye();function n(r,a){var i=-1,o=t(r)?Array(r.length):[];return e(r,function(l,s,u){o[++i]=a(l,s,u)}),o}return Sn=n,Sn}var xn,Jo;function Cf(){if(Jo)return xn;Jo=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return xn=e,xn}var An,Qo;function qf(){if(Qo)return An;Qo=1;var e=ke();function t(n,r){if(n!==r){var a=n!==void 0,i=n===null,o=n===n,l=e(n),s=r!==void 0,u=r===null,f=r===r,d=e(r);if(!u&&!d&&!l&&n>r||l&&s&&f&&!u&&!d||i&&s&&f||!a&&f||!o)return 1;if(!i&&!l&&!d&&n<r||d&&a&&o&&!i&&!l||u&&a&&o||!s&&o||!f)return-1}return 0}return An=t,An}var Cn,el;function Rf(){if(el)return Cn;el=1;var e=qf();function t(n,r,a){for(var i=-1,o=n.criteria,l=r.criteria,s=o.length,u=a.length;++i<s;){var f=e(o[i],l[i]);if(f){if(i>=u)return f;var d=a[i];return f*(d=="desc"?-1:1)}}return n.index-r.index}return Cn=t,Cn}var qn,tl;function wf(){if(tl)return qn;tl=1;var e=ze(),t=ha(),n=cs(),r=fs(),a=Cf(),i=is(),o=Rf(),l=Xe(),s=Q();function u(f,d,c){d.length?d=e(d,function(v){return s(v)?function(_){return t(_,v.length===1?v[0]:v)}:v}):d=[l];var h=-1;d=e(d,i(n));var m=r(f,function(v,_,p){var b=e(d,function(y){return y(v)});return{criteria:b,index:++h,value:v}});return a(m,function(v,_){return o(v,_,c)})}return qn=u,qn}var Rn,rl;function Tf(){if(rl)return Rn;rl=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Rn=e,Rn}var wn,nl;function Mf(){if(nl)return wn;nl=1;var e=Tf(),t=Math.max;function n(r,a,i){return a=t(a===void 0?r.length-1:a,0),function(){for(var o=arguments,l=-1,s=t(o.length-a,0),u=Array(s);++l<s;)u[l]=o[a+l];l=-1;for(var f=Array(a+1);++l<a;)f[l]=o[l];return f[a]=i(u),e(r,this,f)}}return wn=n,wn}var Tn,al;function Of(){if(al)return Tn;al=1;function e(t){return function(){return t}}return Tn=e,Tn}var Mn,il;function Ef(){if(il)return Mn;il=1;var e=ue(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Mn=t,Mn}var On,ol;function Df(){if(ol)return On;ol=1;var e=Of(),t=Ef(),n=Xe(),r=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return On=r,On}var En,ll;function If(){if(ll)return En;ll=1;var e=800,t=16,n=Date.now;function r(a){var i=0,o=0;return function(){var l=n(),s=t-(l-o);if(o=l,s>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return En=r,En}var Dn,sl;function Pf(){if(sl)return Dn;sl=1;var e=Df(),t=If(),n=t(e);return Dn=n,Dn}var In,ul;function Lf(){if(ul)return In;ul=1;var e=Xe(),t=Mf(),n=Pf();function r(a,i){return n(t(a,i,e),a+"")}return In=r,In}var Pn,cl;function ma(){if(cl)return Pn;cl=1;var e=ca(),t=Ye(),n=pa(),r=De();function a(i,o,l){if(!r(l))return!1;var s=typeof o;return(s=="number"?t(l)&&n(o,l.length):s=="string"&&o in l)?e(l[o],i):!1}return Pn=a,Pn}var Ln,fl;function kf(){if(fl)return Ln;fl=1;var e=Jl(),t=wf(),n=Lf(),r=ma(),a=n(function(i,o){if(i==null)return[];var l=o.length;return l>1&&r(i,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(i,e(o,1),[])});return Ln=a,Ln}var Nf=kf();const Ff=ye(Nf);var kn,dl;function jf(){if(dl)return kn;dl=1;function e(t){for(var n=-1,r=t==null?0:t.length,a={};++n<r;){var i=t[n];a[i[0]]=i[1]}return a}return kn=e,kn}var Bf=jf();const hl=ye(Bf);var Nn,pl;function Hf(){if(pl)return Nn;pl=1;var e=Math.ceil,t=Math.max;function n(r,a,i,o){for(var l=-1,s=t(e((a-r)/(i||1)),0),u=Array(s);s--;)u[o?s:++l]=r,r+=i;return u}return Nn=n,Nn}var Fn,gl;function zf(){if(gl)return Fn;gl=1;var e=Hf(),t=ma(),n=Yl();function r(a){return function(i,o,l){return l&&typeof l!="number"&&t(i,o,l)&&(o=l=void 0),i=n(i),o===void 0?(o=i,i=0):o=n(o),l=l===void 0?i<o?1:-1:n(l),e(i,o,l,a)}}return Fn=r,Fn}var jn,ml;function Uf(){if(ml)return jn;ml=1;var e=zf(),t=e();return jn=t,jn}var Gf=Uf();const $f=ye(Gf);var Bn,yl;function Kf(){if(yl)return Bn;yl=1;var e=ze(),t=cs(),n=fs(),r=Q();function a(i,o){var l=r(i)?e:n;return l(i,t(o,3))}return Bn=a,Bn}var Hn,vl;function Wf(){if(vl)return Hn;vl=1;var e=Jl(),t=Kf();function n(r,a){return e(t(r,a),1)}return Hn=n,Hn}var Yf=Wf();const Vf=ye(Yf);var zn,bl;function ds(){if(bl)return zn;bl=1;function e(t,n,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),n!==void 0&&(t=t>=n?t:n)),t}return zn=e,zn}var Un,_l;function Xf(){if(_l)return Un;_l=1;function e(t,n){var r=-1,a=t.length;for(n||(n=Array(a));++r<a;)n[r]=t[r];return n}return Un=e,Un}var Gn,Sl;function Zf(){if(Sl)return Gn;Sl=1;var e=Math.floor,t=Math.random;function n(r,a){return r+e(t()*(a-r+1))}return Gn=n,Gn}var $n,xl;function hs(){if(xl)return $n;xl=1;var e=Zf();function t(n,r){var a=-1,i=n.length,o=i-1;for(r=r===void 0?i:r;++a<r;){var l=e(a,o),s=n[l];n[l]=n[a],n[a]=s}return n.length=r,n}return $n=t,$n}var Kn,Al;function Jf(){if(Al)return Kn;Al=1;var e=ds(),t=Xf(),n=hs();function r(a,i){return n(t(a),e(i,0,a.length))}return Kn=r,Kn}var Wn,Cl;function Qf(){if(Cl)return Wn;Cl=1;var e=ze();function t(n,r){return e(r,function(a){return n[a]})}return Wn=t,Wn}var Yn,ql;function ed(){if(ql)return Yn;ql=1;var e=Qf(),t=Ve();function n(r){return r==null?[]:e(r,t(r))}return Yn=n,Yn}var Vn,Rl;function td(){if(Rl)return Vn;Rl=1;var e=ds(),t=hs(),n=ed();function r(a,i){var o=n(a);return t(o,e(i,0,o.length))}return Vn=r,Vn}var Xn,wl;function rd(){if(wl)return Xn;wl=1;var e=Jf(),t=td(),n=Q(),r=ma(),a=Vl();function i(o,l,s){(s?r(o,l,s):l===void 0)?l=1:l=a(l);var u=n(o)?e:t;return u(o,l)}return Xn=i,Xn}var nd=rd();const ad=ye(nd),id=e=>Qu(e,14),Tl=e=>Object.values(e).reduce((t,n)=>t+n,0),od=(e,t,n={})=>{const r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw new Error("vote distribution must contain at least one party");if(!Object.values(e).every(m=>typeof m=="number"&&m>=0))throw new Error("party vote counts must be non-negative integers");if(!Number.isInteger(t)||t<=0)throw new Error("seats must be a positive integer");if(typeof r.draw!="boolean")throw new Error("opt.draw must be a boolean");const a=Tl(e),i=hl(Object.entries(e).map(([m,v])=>{const _=Math.max(t-Object.keys(e).length,0),p=Math.round(_*v/a);return[m,p]})),o=hl(Object.entries(e).map(([m,v])=>{const _=t+Object.keys(e).length,p=Math.min(Math.round(_*v/a),t);return[m,p]})),l=Vf(Object.entries(e).map(([m,v])=>{const _=i[m],p=o[m];return $f(_,p).map(b=>{const y=id(v/(b+.5));return{party:m,quotient:y}})})),s=Tl(i),u=t-s,f=Ff(l,({quotient:m})=>-m),d=f[u-1].quotient,c=f.filter(({quotient:m})=>m>d),h=f.filter(({quotient:m})=>m===d);if(c.length+h.length===u)c.push(...h);else{if(!r.draw)throw new Error("result is ambiguous, a draw would need to be made, but opt.draw is disabled");c.push(...ad(h,u-c.length))}return c.reduce((m,{party:v})=>(m[v]+=1,m),i)},ps=(e=Ee)=>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:le.neoGrey[200]}),e("path",{d:"M0,2 L8,2",stroke:le.neoGrey[400],"stroke-width":.5}),e("path",{d:"M0,6 L8,6",stroke:le.neoGrey[400],"stroke-width":.5})]),gs=(e=Ee)=>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})]),ms=(e=Ee)=>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})]),$={greyHatch:{background:le.neoGrey[200],lines:le.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}},He=e=>Math.round(e*1e10)/1e10,ld=e=>e.reduce((t,n)=>t+n.seats,0),sd=e=>e.flat(),ud=(e,t,n)=>{const r=(Math.PI-n)/2,a=t/e+r-Math.PI;return{x:He(e*Math.cos(a)),y:He(e*Math.sin(a))}},ys=(e,t,n,r)=>{const a=r*t*n/(e-t),i=1+r*(t-1)*t/2/(e-t);return a/i},xe=(e,t,n,r)=>{const a=r/Math.PI*.7142857142857143;return Math.abs(ys(e,t,n,r)*t/n-a)},cd=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,a=xe(e,r,t,n),i=0;for(xe(e,r+1,t,n)<a&&(i=1),xe(e,r-1,t,n)<a&&r>1&&(i=-1);xe(e,r+i,t,n)<a&&r>0;)a=xe(e,r+i,t,n),r+=i;return r},fd=(e,t)=>{var a,i;let n,r;for(let o=0;o<e.length;o++)r=He((t[o]||0)/(((a=e[o])==null?void 0:a.length)??1)),(!n||r<n)&&(n=r);for(let o=0;o<e.length;o++)if(r=He((t[o]||0)/(((i=e[o])==null?void 0:i.length)??1)),r===n)return o;return 0},dd=(e,t,n)=>{const r=ld(e),a=cd(r,t,n),i=ys(r,a,t,n);let o={};for(let c=1;c<=a;c++)o[c]=t-(c-1)*i;o=od(o,r);const l=[];let s,u,f;for(let c=1;c<=a;c++){const h=[];s=t-(c-1)*i,u=n*s/((o[c]??1)-1||1);for(let m=0;m<=(o[c]??1)-1;m++)f={...ud(s,m*u,n),r:.4*i},h.push(f);l.push(h)}const d=Array(l.length).fill(0);for(const c of e)for(let h=0;h<c.seats;h++){const m=fd(l,d),v=l[m],_=d[m]??0,p=v==null?void 0:v[_];p&&(p.fill=c.colour,p.party=String(c.id)),d[m]=_+1}return sd(l)},hd=e=>t=>e("circle",{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),pd={seatCount:!1,arcAngle:180,hFunction:Ee},gd=(e,t={})=>{var _;const{seatCount:n,arcAngle:r,hFunction:a}=Object.assign({},pd,t);if(typeof n!="boolean")throw new Error("`seatCount` option must be a boolean");if(typeof a!="function")throw new Error("`hFunction` option must be a function");if(typeof r!="number"||r<=0||r>360)throw new Error("`arcAngle` option must be a number between 0 and 360");const i=r*Math.PI/180,o=20,l=dd(e,o,i),s=(((_=l[0])==null?void 0:_.r)??0)/.4||0,u=l.map(hd(a));n&&u.push(a("text",{x:0,y:0,"text-anchor":"middle",style:{"font-family":"Helvetica","font-size":.25*o+"px"},class:"seatNumber"},String(u.length)));const f=r<=180?o+s:o*(1+Math.sin((i-Math.PI)/2))+s,d=o+s,c=Math.max(f,d),h=r<=180?-o-s/2:-o*(1+Math.sin((i-Math.PI)/2))-s/2,m=a("defs",[ps(a),gs(a),ms(a)]);return a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:[-o-s/2,h,2*o+s,c].join(",")},[m,...u])},md={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:Ee},yd=(e,t={})=>{const n={...md,...t},{arcAngle:r,arcAngleFlexibility:a,radius:i,seatSize:o,minSeatSize:l,maxSeatSize:s,spacing:u,innerRadiusRatio:f,showLabels:d,hFunction:c}=n,h=i*f,m=e.reduce((M,H)=>M+H.seats,0);let v={seatSize:o,arcAngle:r,score:-1};const _=r-a,p=r+a;for(let M=_;M<=p;M+=2.5){const H=M*Math.PI/180;for(let F=s;F>=l;F-=.1){const V=F*2,Z=V*u,oe=Math.floor((i-h)/Z);for(let J=1;J<=Math.min(oe,10);J++){let G=0;for(let _e=0;_e<J;_e++){const Ze=h+(_e+.5)*Z,Se=V*u/Ze,Je=Math.floor(H/Se);G+=Je}if(G>=m){const _e=m/G,Ze=(F-l)/(s-l),Se=(G-m)/m,Je=Se<.15?1:Se<.3?.7:Se<.5?.4:.1,As=1-Math.abs(M-r)/a,ya=Je*.5+Ze*.3+_e*.15+As*.05;ya>v.score&&(v={seatSize:F,arcAngle:M,rings:J,score:ya})}}}}const b=v.seatSize,y=v.arcAngle,S=y*Math.PI/180,q=b*2,C=q*u,A=Math.floor((i-h)/C),E=[],P=-S/2-Math.PI/2,L=[];let w=0,z=[];for(let M=1;M<=A;M++){let H=0;const F=[];for(let V=0;V<M;V++){const Z=h+(V+.5)*C,oe=q*u/Z,J=Math.floor(S/oe);F.push(J),H+=J}if(H>=m){w=M,z=F;break}}if(w>0)L.push(...z);else for(let M=0;M<A;M++){const H=h+(M+.5)*C,F=q*u/H,V=Math.floor(S/F);L.push(V)}for(let M=0;M<L.length;M++){const H=h+(M+.5)*C,F=L[M]??0;if(F>0){const V=S/F;for(let Z=0;Z<F;Z++){const oe=P+(Z+.5)*V,J=Math.cos(oe)*H,G=Math.sin(oe)*H;E.push({ring:M,index:Z,angle:oe,x:J,y:G})}}}E.sort((M,H)=>{const F=M.angle-H.angle;return Math.abs(F)>.001?F:M.ring-H.ring});const N=[];let B=0;e.forEach(M=>{const H=[],F=Math.min(M.seats,E.length-B);let V=1/0,Z=-1/0;for(let J=0;J<F&&B<E.length;J++){const G=E[B++];G&&(V=Math.min(V,G.angle),Z=Math.max(Z,G.angle),Math.sqrt(G.x*G.x+G.y*G.y),H.push(c("circle",{fill:M.colour,stroke:M.colour,className:"circle seat-visual seat-hover-zone",transform:`translate(${G.x}, ${G.y})`,r:b,"data-party":M.name,"data-party-id":String(M.id),style:"pointer-events: all; cursor: pointer;"})))}const oe=H;N.push(c("g",{className:"party-group","data-party":M.name,style:"opacity: 1; outline: none;"},oe))});const Y=c("g",{className:"arc-bg"},[c("circle",{className:"outer",cx:0,cy:0,fill:"#ffffff",r:i}),c("circle",{className:"inner",cx:0,cy:0,fill:"#ffffff",r:h})]),ee=c("g",{className:"points-container"},N),ve=d?c("g",{className:"label-container",mask:"url(#label-clip)",style:"pointer-events: none;"},[c("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);"}),c("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,O=c("defs",[c("radialGradient",{id:"label-gradient"},[c("stop",{offset:"0%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),c("stop",{offset:"80%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),c("stop",{offset:"90%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"}),c("stop",{offset:"100%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0;"})]),c("mask",{id:"label-clip"},[c("circle",{fill:"url(#label-gradient)",r:h})]),ps(c),gs(c),ms(c)]),ne=c("g",{className:"arc-container",transform:`translate(${i}, ${i})`},[Y,ee,ve].filter(Boolean)),Ne=S/2;let be;if(y<=180)be=i*Math.sin(Ne)+b;else{const M=Ne-Math.PI/2;be=i*(1+Math.sin(M))+b}const ce=i+b,fe=i*2,de=Math.max(be,ce);return c("svg",{id:"chart-container","font-family":"Canva Sans Variable",viewBox:`0 0 ${fe} ${de}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},[ne,O])};function vs(e){return!e||!e.color?"#cccccc":e.color==="url(#hatchPattern)"?ge.COMPLETED:e.color==="url(#greyHatchPattern)"?$.greyHatch.lines:e.color}function ra(e,t){if(!e)return;const n=e.querySelectorAll(".party-group");n&&n.length>0&&n.forEach(r=>{if(!r)return;const a=r,i=a.getAttribute("data-party");t?i===t?a.style.opacity=K.animation.hoverOpacity.active:a.style.opacity=K.animation.hoverOpacity.dimmed:a.style.opacity="1"})}function na(e,t){e.forEach(n=>{const r=n,a=n.getAttribute("class")||"";t?a===t?(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1")):(r.setAttribute("fill-opacity",K.animation.hoverOpacity.dimmed),r.setAttribute("stroke-opacity","0.2")):(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1"))})}const vd=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:a,maxSeats:i,setHoveredData:o,activePartyName:l,setActivePartyName:s,chartConfig:u,seatSize:f})=>{D.useEffect(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);const d=n<=i?1:i/n,c=t.filter(y=>y.value>0).map(y=>{const S=n<=i?y.value:Math.max(1,Math.floor(y.value*d));return{id:String(y.id),name:y.label,seats:S,colour:y.color==="url(#hatchPattern)"?ge.COMPLETED:y.color}}),h=a?yd(c,{arcAngle:r,arcAngleFlexibility:u.arcAngleFlexibility,radius:u.radius,seatSize:f,minSeatSize:u.minSeatSize,maxSeatSize:u.maxSeatSize,spacing:u.spacing,innerRadiusRatio:u.innerRadiusRatio,showLabels:!0}):gd(c,{arcAngle:r});h.properties&&(h.properties.width="100%",h.properties.height="100%",h.properties.style="display: block; width: 100%; max-width: 100%; height: auto;",h.properties.preserveAspectRatio="xMidYMid meet");const m=ku(h),p=new DOMParser().parseFromString(m,"image/svg+xml").documentElement;if(!p)return;p.setAttribute("width","100%"),p.setAttribute("height","100%"),p.style.width="100%",p.style.height="auto",p.style.display="block",a?bd(p,c,t,o,l,s):_d(p,c,t,o,l,s);const b=()=>{if(o(null),s(null),a)ra(p,null);else{const y=p.querySelectorAll("circle");na(y,null)}};return p&&p.addEventListener("mouseleave",b),e.current.appendChild(p),()=>{if(p&&p.removeEventListener("mouseleave",b),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,a,i,o,l,s,e,u,f])};function bd(e,t,n,r,a,i){if(!e)return;const o=e.querySelectorAll(".seat-hover-zone"),l=e.querySelectorAll(".party-group circle.seat-visual");l&&l.length>0&&l.forEach(s=>{if(s){const u=s;u.style.stroke=K.colors.seatBorder,u.style.strokeWidth="0.5",u.setAttribute("fill-opacity","1"),u.style.transition=`fill-opacity ${K.animation.transitionDuration} ease, stroke-opacity ${K.animation.transitionDuration} ease`}}),o&&o.length>0&&o.forEach(s=>{if(!s)return;const u=s.getAttribute("data-party"),f=s.getAttribute("data-party-id"),d=()=>{if(u&&u!==a){const c=t.find(h=>h.name===u||String(h.id)===f);if(c){const h=n.find(m=>m.label===c.name||String(m.id)===c.id);if(h){const m=vs(h);r({label:h.label||"Unknown",value:h.value||0,color:m}),i(c.name),ra(e,c.name)}}}};s.addEventListener("mouseenter",d)}),a&&ra(e,a)}function _d(e,t,n,r,a,i){if(!e)return;const o=e.querySelectorAll("circle");if(o&&o.length>0&&(o.forEach(l=>{if(l){const s=l;s.style.cursor="pointer",s.style.stroke=K.colors.seatBorder,s.style.strokeWidth="0.5",s.setAttribute("fill-opacity","1"),s.style.transition=`fill-opacity ${K.animation.transitionDuration} ease, stroke-opacity ${K.animation.transitionDuration} ease`}}),o.forEach(l=>{if(!l)return;const s=l.getAttribute("class")||"",u=parseInt(s,10),f=t[u],d=()=>{if(f){const c=f.name;if(c&&c!==a){const h=n.find(m=>m.label===f.name||String(m.id)===f.id);if(h){const m=vs(h);r({label:h.label||"Unknown",value:h.value||0,color:m}),i(c),na(o,s)}}}};l.addEventListener("mouseenter",d)})),a){const l=t.find(s=>s.name===a);if(l){const s=t.indexOf(l);na(o,String(s))}}}const bs=[{minRepos:0,maxRepos:10,minArc:90,maxArc:90,minSeatSize:18,maxSeatSize:18},{minRepos:10,maxRepos:25,minArc:90,maxArc:110,minSeatSize:14,maxSeatSize:14},{minRepos:25,maxRepos:50,minArc:110,maxArc:120,minSeatSize:10,maxSeatSize:10},{minRepos:50,maxRepos:100,minArc:120,maxArc:150,minSeatSize:7,maxSeatSize:7},{minRepos:100,maxRepos:200,minArc:150,maxArc:180,minSeatSize:5.5,maxSeatSize:5.5},{minRepos:200,maxRepos:1/0,minArc:180,maxArc:180,minSeatSize:5,maxSeatSize:5}],_s=({repositoryCount:e})=>{const t=bs.find(l=>e>=l.minRepos&&e<l.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;const n=t.maxRepos-t.minRepos,a=(e-t.minRepos)/n,i=t.maxArc-t.minArc,o=t.minArc+i*a;return Math.round(o)},Ss=({repositoryCount:e})=>{const t=bs.find(l=>e>=l.minRepos&&e<l.maxRepos);if(!t)return 5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;const n=t.maxRepos-t.minRepos,a=(e-t.minRepos)/n,i=t.maxSeatSize-t.minSeatSize,o=t.minSeatSize+i*a;return Math.round(o*10)/10},Zn=["#4CA75A","#FDDA04","#FFC008","#FF9800","#F9A91B","#FF5C24","#ED4134","#CB3446"],Ml={[Re]:ge.NOT_APPLICABLE,[we]:ge.NO_LST,[Te]:ge.DATA_MISSING},Ae=(e,t,n)=>{if(e in Ml)return Ml[e];const r=n-1-t,a=Zn.length,i=Math.floor(r/Math.max(1,n-1)*(a-1)),o=Math.min(Math.max(0,i),a-1);return Zn[o]??Zn[0]??"#000000"},xs=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{const{special:a,regular:i}=e.reduce((h,m,v)=>([Re,we,Te].includes(m.label)?h.special.push({...m,originalIndex:v}):h.regular.push({...m,originalIndex:v}),h),{special:[],regular:[]}),o=i.reverse().map((h,m)=>({id:`measure-${m}`,label:h.label,value:h.value,color:Ae(h.label,i.length-1-m,i.length)})),l=a.map((h,m)=>({id:h.label.toLowerCase().replace(" ","-"),label:h.label,value:h.value,color:Ae(h.label,m,a.length)})),s=r,u={id:"no-lst",label:we,value:n,color:Ae(we,0,1)},f={id:"data-missing",label:Te,value:s,color:Ae(Te,0,1)},d={id:"n/a",label:Re,value:t,color:Ae(Re,0,1)},c=[...o,...l];return u.value>0&&c.push(u),f.value>0&&c.push(f),d.value>0&&c.push(d),c},Ol={"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."},Sd=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:a,arcAngle:i,useEnhanced:o=K.useEnhanced})=>{const l=D.useRef(null),[s,u]=D.useState(null),[f,d]=D.useState(null),h=xs({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:a}).map(y=>{const S=typeof y.color=="function"?y.color("arc"):y.color,q=typeof y.label=="function"?y.label("arc"):y.label;return{...y,color:S,label:q}}),m=i??_s({repositoryCount:t}),v=Ss({repositoryCount:t});vd({containerRef:l,processedData:h,totalRepositories:t,arcAngle:m,useEnhanced:o,maxSeats:K.maxSeats,setHoveredData:u,activePartyName:f,setActivePartyName:d,chartConfig:K.chartConfig,seatSize:v});const _=h.map(y=>{const S=y.value/t*100,q=S>0&&S<1?"< 1":S.toFixed(0);return{id:String(y.id),label:y.label,value:y.value,percentage:q,color:y.color}}),p=t>K.maxSeats,b=p?Math.round(t/K.maxSeats):1;return x.jsxs(T.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:[x.jsxs(T.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:[x.jsx(T.Box,{className:"parliament-chart-svg-container",ref:l,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"}}}}),x.jsxs(T.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:[s&&x.jsxs(D.Fragment,{children:[x.jsx(T.Typography,{sx:{color:"text.secondary",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:s.label}),x.jsxs(T.Typography,{sx:{fontWeight:"bold",color:s.color,lineHeight:1,fontSize:"clamp(1.1rem, 2.2vw, 1.3rem)","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"1rem"}},children:[s.value," ",s.value>1?"repos":"repo"]})]}),p&&x.jsxs(T.Box,{className:"parliament-chart-scaled-indicator",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,mt:s?.5:0,color:"text.secondary",fontSize:"clamp(0.65rem, 1.2vw, 0.72rem)"},children:[x.jsx(T.Box,{className:"parliament-chart-scaled-indicator-dot",sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"#888888",flexShrink:0}}),x.jsxs(T.Typography,{variant:"caption",sx:{fontSize:"inherit",fontStyle:"italic"},children:["= ~",b," repos"]})]})]})]}),x.jsx(T.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:()=>{u(null),d(null)},children:x.jsxs(T.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":{padding:"2px 8px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 11.5px)"}},children:[x.jsx("thead",{children:x.jsxs(T.TableRow,{children:[x.jsx(T.TableCell,{}),x.jsx(T.TableCell,{sx:{fontWeight:"bold"},children:"Category"}),x.jsx(T.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"# of repos"}),x.jsx(T.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"% of org"})]})}),x.jsx("tbody",{children:_.map(y=>{const S=y.color==="url(#greyHatchPattern)"?$.greyHatch.lines:y.color==="url(#dataMissingHatchPattern)"?$.dataMissingHatch.lines:y.color==="url(#noLstHatchPattern)"?$.noLstHatch.lines:y.color;return x.jsxs(T.TableRow,{onMouseEnter:()=>{d(y.label),u({label:y.label,value:y.value,color:y.color==="url(#greyHatchPattern)"?$.greyHatch.lines:y.color==="url(#dataMissingHatchPattern)"?$.dataMissingHatch.lines:y.color==="url(#noLstHatchPattern)"?$.noLstHatch.lines:y.color})},sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:f===y.label?`${S}15`:"transparent","&:hover":{backgroundColor:`${S}15`}},children:[x.jsx(T.TableCell,{align:"center",sx:{width:20},children:x.jsx(T.Box,{sx:{width:12,height:12,backgroundColor:y.color==="url(#greyHatchPattern)"?$.greyHatch.background:y.color==="url(#dataMissingHatchPattern)"?$.dataMissingHatch.background:y.color==="url(#noLstHatchPattern)"?$.noLstHatch.background:y.color,borderRadius:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:f===y.label?"scale(1.2)":"scale(1)",...y.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
47
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function dM(e,t,n,r){const i=r.schema,a=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=yf);const u=gM(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(s=!1),(u||!a||!lM(e,t,n))&&(o.push("<",e.tagName,u?" "+u:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(c),!s&&(!a||!vf(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function gM(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const a=mM(e,i,t[i]);a&&n.push(a)}}for(;++r<n.length;){const a=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&a!=='"'&&a!=="'"&&(n[r]+=" ")}return n.join("")}function mM(e,t,n){const r=Q0(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let s=e.quote,o;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"";const l=Jr(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wa.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?cT:hT)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(o=Jr(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wa.unquoted[i][a]}))),o!==n&&(e.settings.quoteSmart&&Xh(n,s)>Xh(n,e.alternative)&&(s=e.alternative),o=s+Jr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?wa.single:wa.double)[i][a],attribute:!0}))+s),l+(o&&"="+o))}const yM=["<","&"];function uy(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Jr(e.value,Object.assign({},r.settings.characterReferences,{subset:yM}))}function _M(e,t,n,r){return r.settings.allowDangerousHtml?e.value:uy(e,t,n,r)}function vM(e,t,n,r){return r.all(e)}const xM=MT("type",{invalid:bM,unknown:wM,handlers:{comment:jT,doctype:YT,element:dM,raw:_M,root:vM,text:uy}});function bM(e){throw new Error("Expected node, not `"+e+"`")}function wM(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const SM={},TM={},MM=[];function AM(e,t){const n=SM,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:CM,all:kM,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||TT,characterReferences:n.characterReferences||TM,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yf:J0,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function CM(e,t,n){return xM(e,t,n,this)}function kM(e){const t=[],n=e&&e.children||MM;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const Pe={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.1,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:"#f8f8f8",emptySeatsBorder:"#d8d8d8",seatBorder:"#fff"},animation:{transitionDuration:"0.2s",hoverOpacity:{active:"1",dimmed:"0.2",empty:"0.3"}},scaling:{enableScaling:!0,scaleThreshold:200}},ti={COMPLETED:cn.neoDigitalGreen[600],NOT_APPLICABLE:"url(#greyHatchPattern)",NO_LST:"url(#noLstHatchPattern)",DATA_MISSING:"url(#dataMissingHatchPattern)"},Bi="N/A",Ui="No LST",Hi="Data Missing";function RM(e,t,n,r="left-to-right",i=900,a){Rt.prototype.transition=Ic;const s=t*Math.PI/180,o=-s/2-Math.PI/2,l=s/2-Math.PI/2;let u=e.querySelector("defs");u||(u=document.createElementNS("http://www.w3.org/2000/svg","defs"),e.appendChild(u));const c="arc-sweep-clip";let f=u.querySelector(`#${c}`);f||(f=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),f.setAttribute("id",c),u.appendChild(f));const h=document.createElementNS("http://www.w3.org/2000/svg","path");f.innerHTML="",f.appendChild(h);const p=e.querySelector(".arc-container"),g=e.querySelector(".points-container");if(g&&p)if(g.setAttribute("clip-path",`url(#${c})`),r==="left-to-right"){const m=y=>{const x=n*1.5,_=Math.cos(y)*x,w=Math.sin(y)*x,S=Math.cos(l)*x,b=Math.sin(l)*x,T=l-y>Math.PI?1:0;return`M 0,0 L ${_},${w} A ${x},${x} 0 ${T},1 ${S},${b} Z`};h.setAttribute("d",m(o)),Rt(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const x=o+(l-o)*y;h.setAttribute("d",m(x))}).on("end",()=>{a&&a(),setTimeout(()=>{g.removeAttribute("clip-path")},50)})}else{const m=y=>{const x=n*1.5,_=Math.cos(y)*x,w=Math.sin(y)*x,S=Math.cos(l)*x,b=Math.sin(l)*x,T=l-y>Math.PI?1:0;return`M 0,0 L ${_},${w} A ${x},${x} 0 ${T},1 ${S},${b} Z`};h.setAttribute("d",m(l)),Rt(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const x=l-(l-o)*y;h.setAttribute("d",m(x))}).on("end",()=>{g.removeAttribute("clip-path"),a&&a()})}}var Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vs,Zh;function cy(){if(Zh)return Vs;Zh=1;var e=typeof Sa=="object"&&Sa&&Sa.Object===Object&&Sa;return Vs=e,Vs}var Zs,Qh;function kn(){if(Qh)return Zs;Qh=1;var e=cy(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Zs=n,Zs}var Qs,Jh;function EM(){if(Jh)return Qs;Jh=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qs=t,Qs}var Js,tp;function DM(){if(tp)return Js;tp=1;var e=EM(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Js=n,Js}var to,ep;function la(){if(ep)return to;ep=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return to=e,to}var eo,np;function ua(){if(np)return eo;np=1;var e=kn(),t=e.Symbol;return eo=t,eo}var no,rp;function OM(){if(rp)return no;rp=1;var e=ua(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(s){var o=n.call(s,i),l=s[i];try{s[i]=void 0;var u=!0}catch{}var c=r.call(s);return u&&(o?s[i]=l:delete s[i]),c}return no=a,no}var ro,ip;function PM(){if(ip)return ro;ip=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ro=n,ro}var io,ap;function ca(){if(ap)return io;ap=1;var e=ua(),t=OM(),n=PM(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(o){return o==null?o===void 0?i:r:a&&a in Object(o)?t(o):n(o)}return io=s,io}var ao,sp;function fa(){if(sp)return ao;sp=1;function e(t){return t!=null&&typeof t=="object"}return ao=e,ao}var so,op;function ha(){if(op)return so;op=1;var e=ca(),t=fa(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return so=r,so}var oo,lp;function fy(){if(lp)return oo;lp=1;var e=DM(),t=la(),n=ha(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):i.test(u)?r:+u}return oo=l,oo}var lo,up;function hy(){if(up)return lo;up=1;var e=fy(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return lo=r,lo}var uo,cp;function py(){if(cp)return uo;cp=1;var e=hy();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return uo=t,uo}var co,fp;function cs(){if(fp)return co;fp=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return co=e,co}var fo,hp;function fn(){if(hp)return fo;hp=1;var e=Array.isArray;return fo=e,fo}var ho,pp;function FM(){if(pp)return ho;pp=1;var e=ua(),t=cs(),n=fn(),r=ha(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function s(o){if(typeof o=="string")return o;if(n(o))return t(o,s)+"";if(r(o))return a?a.call(o):"";var l=o+"";return l=="0"&&1/o==-1/0?"-0":l}return ho=s,ho}var po,dp;function dy(){if(dp)return po;dp=1;var e=FM();function t(n){return n==null?"":e(n)}return po=t,po}var go,gp;function NM(){if(gp)return go;gp=1;var e=kn(),t=py(),n=fy(),r=dy(),i=e.isFinite,a=Math.min;function s(o){var l=Math[o];return function(u,c){if(u=n(u),c=c==null?0:a(t(c),292),c&&i(u)){var f=(r(u)+"e").split("e"),h=l(f[0]+"e"+(+f[1]+c));return f=(r(h)+"e").split("e"),+(f[0]+"e"+(+f[1]-c))}return l(u)}}return go=s,go}var mo,mp;function LM(){if(mp)return mo;mp=1;var e=NM(),t=e("round");return mo=t,mo}var qM=LM();const $M=di(qM);var yo,yp;function gy(){if(yp)return yo;yp=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return yo=e,yo}var _o,_p;function IM(){if(_p)return _o;_p=1;var e=ca(),t=fa(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return _o=r,_o}var vo,vp;function xf(){if(vp)return vo;vp=1;var e=IM(),t=fa(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(s){return t(s)&&r.call(s,"callee")&&!i.call(s,"callee")};return vo=a,vo}var xo,xp;function zM(){if(xp)return xo;xp=1;var e=ua(),t=xf(),n=fn(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return xo=i,xo}var bo,bp;function my(){if(bp)return bo;bp=1;var e=gy(),t=zM();function n(r,i,a,s,o){var l=-1,u=r.length;for(a||(a=t),o||(o=[]);++l<u;){var c=r[l];i>0&&a(c)?i>1?n(c,i-1,a,s,o):e(o,c):s||(o[o.length]=c)}return o}return bo=n,bo}var wo,wp;function bf(){if(wp)return wo;wp=1;var e=fn(),t=ha(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,s){if(e(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||s!=null&&a in Object(s)}return wo=i,wo}var So,Sp;function yy(){if(Sp)return So;Sp=1;var e=ca(),t=la(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(o){if(!t(o))return!1;var l=e(o);return l==r||l==i||l==n||l==a}return So=s,So}var To,Tp;function BM(){if(Tp)return To;Tp=1;var e=kn(),t=e["__core-js_shared__"];return To=t,To}var Mo,Mp;function UM(){if(Mp)return Mo;Mp=1;var e=BM(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Mo=n,Mo}var Ao,Ap;function _y(){if(Ap)return Ao;Ap=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ao=n,Ao}var Co,Cp;function HM(){if(Cp)return Co;Cp=1;var e=yy(),t=UM(),n=la(),r=_y(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,l=s.toString,u=o.hasOwnProperty,c=RegExp("^"+l.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!n(h)||t(h))return!1;var p=e(h)?c:a;return p.test(r(h))}return Co=f,Co}var ko,kp;function GM(){if(kp)return ko;kp=1;function e(t,n){return t==null?void 0:t[n]}return ko=e,ko}var Ro,Rp;function Or(){if(Rp)return Ro;Rp=1;var e=HM(),t=GM();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return Ro=n,Ro}var Eo,Ep;function fs(){if(Ep)return Eo;Ep=1;var e=Or(),t=e(Object,"create");return Eo=t,Eo}var Do,Dp;function jM(){if(Dp)return Do;Dp=1;var e=fs();function t(){this.__data__=e?e(null):{},this.size=0}return Do=t,Do}var Oo,Op;function YM(){if(Op)return Oo;Op=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Oo=e,Oo}var Po,Pp;function XM(){if(Pp)return Po;Pp=1;var e=fs(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var s=this.__data__;if(e){var o=s[a];return o===t?void 0:o}return r.call(s,a)?s[a]:void 0}return Po=i,Po}var Fo,Fp;function WM(){if(Fp)return Fo;Fp=1;var e=fs(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return Fo=r,Fo}var No,Np;function KM(){if(Np)return No;Np=1;var e=fs(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return No=n,No}var Lo,Lp;function VM(){if(Lp)return Lo;Lp=1;var e=jM(),t=YM(),n=XM(),r=WM(),i=KM();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Lo=a,Lo}var qo,qp;function ZM(){if(qp)return qo;qp=1;function e(){this.__data__=[],this.size=0}return qo=e,qo}var $o,$p;function wf(){if($p)return $o;$p=1;function e(t,n){return t===n||t!==t&&n!==n}return $o=e,$o}var Io,Ip;function hs(){if(Ip)return Io;Ip=1;var e=wf();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Io=t,Io}var zo,zp;function QM(){if(zp)return zo;zp=1;var e=hs(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,s=e(a,i);if(s<0)return!1;var o=a.length-1;return s==o?a.pop():n.call(a,s,1),--this.size,!0}return zo=r,zo}var Bo,Bp;function JM(){if(Bp)return Bo;Bp=1;var e=hs();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Bo=t,Bo}var Uo,Up;function tA(){if(Up)return Uo;Up=1;var e=hs();function t(n){return e(this.__data__,n)>-1}return Uo=t,Uo}var Ho,Hp;function eA(){if(Hp)return Ho;Hp=1;var e=hs();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return Ho=t,Ho}var Go,Gp;function ps(){if(Gp)return Go;Gp=1;var e=ZM(),t=QM(),n=JM(),r=tA(),i=eA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Go=a,Go}var jo,jp;function Sf(){if(jp)return jo;jp=1;var e=Or(),t=kn(),n=e(t,"Map");return jo=n,jo}var Yo,Yp;function nA(){if(Yp)return Yo;Yp=1;var e=VM(),t=ps(),n=Sf();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Yo=r,Yo}var Xo,Xp;function rA(){if(Xp)return Xo;Xp=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Xo=e,Xo}var Wo,Wp;function ds(){if(Wp)return Wo;Wp=1;var e=rA();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Wo=t,Wo}var Ko,Kp;function iA(){if(Kp)return Ko;Kp=1;var e=ds();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Ko=t,Ko}var Vo,Vp;function aA(){if(Vp)return Vo;Vp=1;var e=ds();function t(n){return e(this,n).get(n)}return Vo=t,Vo}var Zo,Zp;function sA(){if(Zp)return Zo;Zp=1;var e=ds();function t(n){return e(this,n).has(n)}return Zo=t,Zo}var Qo,Qp;function oA(){if(Qp)return Qo;Qp=1;var e=ds();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return Qo=t,Qo}var Jo,Jp;function Tf(){if(Jp)return Jo;Jp=1;var e=nA(),t=iA(),n=aA(),r=sA(),i=oA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Jo=a,Jo}var tl,td;function lA(){if(td)return tl;td=1;var e=Tf(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var s=arguments,o=i?i.apply(this,s):s[0],l=a.cache;if(l.has(o))return l.get(o);var u=r.apply(this,s);return a.cache=l.set(o,u)||l,u};return a.cache=new(n.Cache||e),a}return n.Cache=e,tl=n,tl}var el,ed;function uA(){if(ed)return el;ed=1;var e=lA(),t=500;function n(r){var i=e(r,function(s){return a.size===t&&a.clear(),s}),a=i.cache;return i}return el=n,el}var nl,nd;function cA(){if(nd)return nl;nd=1;var e=uA(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(s,o,l,u){a.push(l?u.replace(n,"$1"):o||s)}),a});return nl=r,nl}var rl,rd;function vy(){if(rd)return rl;rd=1;var e=fn(),t=bf(),n=cA(),r=dy();function i(a,s){return e(a)?a:t(a,s)?[a]:n(r(a))}return rl=i,rl}var il,id;function gs(){if(id)return il;id=1;var e=ha();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return il=t,il}var al,ad;function Mf(){if(ad)return al;ad=1;var e=vy(),t=gs();function n(r,i){i=e(i,r);for(var a=0,s=i.length;r!=null&&a<s;)r=r[t(i[a++])];return a&&a==s?r:void 0}return al=n,al}var sl,sd;function fA(){if(sd)return sl;sd=1;var e=ps();function t(){this.__data__=new e,this.size=0}return sl=t,sl}var ol,od;function hA(){if(od)return ol;od=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ol=e,ol}var ll,ld;function pA(){if(ld)return ll;ld=1;function e(t){return this.__data__.get(t)}return ll=e,ll}var ul,ud;function dA(){if(ud)return ul;ud=1;function e(t){return this.__data__.has(t)}return ul=e,ul}var cl,cd;function gA(){if(cd)return cl;cd=1;var e=ps(),t=Sf(),n=Tf(),r=200;function i(a,s){var o=this.__data__;if(o instanceof e){var l=o.__data__;if(!t||l.length<r-1)return l.push([a,s]),this.size=++o.size,this;o=this.__data__=new n(l)}return o.set(a,s),this.size=o.size,this}return cl=i,cl}var fl,fd;function xy(){if(fd)return fl;fd=1;var e=ps(),t=fA(),n=hA(),r=pA(),i=dA(),a=gA();function s(o){var l=this.__data__=new e(o);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,fl=s,fl}var hl,hd;function mA(){if(hd)return hl;hd=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return hl=t,hl}var pl,pd;function yA(){if(pd)return pl;pd=1;function e(t){return this.__data__.has(t)}return pl=e,pl}var dl,dd;function _A(){if(dd)return dl;dd=1;var e=Tf(),t=mA(),n=yA();function r(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new e;++a<s;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,dl=r,dl}var gl,gd;function vA(){if(gd)return gl;gd=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return gl=e,gl}var ml,md;function xA(){if(md)return ml;md=1;function e(t,n){return t.has(n)}return ml=e,ml}var yl,yd;function by(){if(yd)return yl;yd=1;var e=_A(),t=vA(),n=xA(),r=1,i=2;function a(s,o,l,u,c,f){var h=l&r,p=s.length,g=o.length;if(p!=g&&!(h&&g>p))return!1;var d=f.get(s),m=f.get(o);if(d&&m)return d==o&&m==s;var v=-1,y=!0,x=l&i?new e:void 0;for(f.set(s,o),f.set(o,s);++v<p;){var _=s[v],w=o[v];if(u)var S=h?u(w,_,v,o,s,f):u(_,w,v,s,o,f);if(S!==void 0){if(S)continue;y=!1;break}if(x){if(!t(o,function(b,T){if(!n(x,T)&&(_===b||c(_,b,l,u,f)))return x.push(T)})){y=!1;break}}else if(!(_===w||c(_,w,l,u,f))){y=!1;break}}return f.delete(s),f.delete(o),y}return yl=a,yl}var _l,_d;function bA(){if(_d)return _l;_d=1;var e=kn(),t=e.Uint8Array;return _l=t,_l}var vl,vd;function wA(){if(vd)return vl;vd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return vl=e,vl}var xl,xd;function SA(){if(xd)return xl;xd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return xl=e,xl}var bl,bd;function TA(){if(bd)return bl;bd=1;var e=ua(),t=bA(),n=wf(),r=by(),i=wA(),a=SA(),s=1,o=2,l="[object Boolean]",u="[object Date]",c="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",d="[object String]",m="[object Symbol]",v="[object ArrayBuffer]",y="[object DataView]",x=e?e.prototype:void 0,_=x?x.valueOf:void 0;function w(S,b,T,M,C,A,D){switch(T){case y:if(S.byteLength!=b.byteLength||S.byteOffset!=b.byteOffset)return!1;S=S.buffer,b=b.buffer;case v:return!(S.byteLength!=b.byteLength||!A(new t(S),new t(b)));case l:case u:case h:return n(+S,+b);case c:return S.name==b.name&&S.message==b.message;case p:case d:return S==b+"";case f:var k=i;case g:var N=M&s;if(k||(k=a),S.size!=b.size&&!N)return!1;var I=D.get(S);if(I)return I==b;M|=o,D.set(S,b);var P=r(k(S),k(b),M,C,A,D);return D.delete(S),P;case m:if(_)return _.call(S)==_.call(b)}return!1}return bl=w,bl}var wl,wd;function MA(){if(wd)return wl;wd=1;var e=gy(),t=fn();function n(r,i,a){var s=i(r);return t(r)?s:e(s,a(r))}return wl=n,wl}var Sl,Sd;function AA(){if(Sd)return Sl;Sd=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,s=[];++r<i;){var o=t[r];n(o,r,t)&&(s[a++]=o)}return s}return Sl=e,Sl}var Tl,Td;function CA(){if(Td)return Tl;Td=1;function e(){return[]}return Tl=e,Tl}var Ml,Md;function kA(){if(Md)return Ml;Md=1;var e=AA(),t=CA(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),e(i(s),function(o){return r.call(s,o)}))}:t;return Ml=a,Ml}var Al,Ad;function RA(){if(Ad)return Al;Ad=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Al=e,Al}var Di={exports:{}},Cl,Cd;function EA(){if(Cd)return Cl;Cd=1;function e(){return!1}return Cl=e,Cl}Di.exports;var kd;function wy(){return kd||(kd=1,(function(e,t){var n=kn(),r=EA(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?n.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||r;e.exports=u})(Di,Di.exports)),Di.exports}var kl,Rd;function Af(){if(Rd)return kl;Rd=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return kl=n,kl}var Rl,Ed;function Cf(){if(Ed)return Rl;Ed=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Rl=t,Rl}var El,Dd;function DA(){if(Dd)return El;Dd=1;var e=ca(),t=Cf(),n=fa(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",g="[object String]",d="[object WeakMap]",m="[object ArrayBuffer]",v="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",S="[object Int32Array]",b="[object Uint8Array]",T="[object Uint8ClampedArray]",M="[object Uint16Array]",C="[object Uint32Array]",A={};A[y]=A[x]=A[_]=A[w]=A[S]=A[b]=A[T]=A[M]=A[C]=!0,A[r]=A[i]=A[m]=A[a]=A[v]=A[s]=A[o]=A[l]=A[u]=A[c]=A[f]=A[h]=A[p]=A[g]=A[d]=!1;function D(k){return n(k)&&t(k.length)&&!!A[e(k)]}return El=D,El}var Dl,Od;function Sy(){if(Od)return Dl;Od=1;function e(t){return function(n){return t(n)}}return Dl=e,Dl}var Oi={exports:{}};Oi.exports;var Pd;function OA(){return Pd||(Pd=1,(function(e,t){var n=cy(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,s=a&&n.process,o=(function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})(Oi,Oi.exports)),Oi.exports}var Ol,Fd;function Ty(){if(Fd)return Ol;Fd=1;var e=DA(),t=Sy(),n=OA(),r=n&&n.isTypedArray,i=r?t(r):e;return Ol=i,Ol}var Pl,Nd;function PA(){if(Nd)return Pl;Nd=1;var e=RA(),t=xf(),n=fn(),r=wy(),i=Af(),a=Ty(),s=Object.prototype,o=s.hasOwnProperty;function l(u,c){var f=n(u),h=!f&&t(u),p=!f&&!h&&r(u),g=!f&&!h&&!p&&a(u),d=f||h||p||g,m=d?e(u.length,String):[],v=m.length;for(var y in u)(c||o.call(u,y))&&!(d&&(y=="length"||p&&(y=="offset"||y=="parent")||g&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,v)))&&m.push(y);return m}return Pl=l,Pl}var Fl,Ld;function FA(){if(Ld)return Fl;Ld=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Fl=t,Fl}var Nl,qd;function NA(){if(qd)return Nl;qd=1;function e(t,n){return function(r){return t(n(r))}}return Nl=e,Nl}var Ll,$d;function LA(){if($d)return Ll;$d=1;var e=NA(),t=e(Object.keys,Object);return Ll=t,Ll}var ql,Id;function qA(){if(Id)return ql;Id=1;var e=FA(),t=LA(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var s=[];for(var o in Object(a))r.call(a,o)&&o!="constructor"&&s.push(o);return s}return ql=i,ql}var $l,zd;function ms(){if(zd)return $l;zd=1;var e=yy(),t=Cf();function n(r){return r!=null&&t(r.length)&&!e(r)}return $l=n,$l}var Il,Bd;function ys(){if(Bd)return Il;Bd=1;var e=PA(),t=qA(),n=ms();function r(i){return n(i)?e(i):t(i)}return Il=r,Il}var zl,Ud;function $A(){if(Ud)return zl;Ud=1;var e=MA(),t=kA(),n=ys();function r(i){return e(i,n,t)}return zl=r,zl}var Bl,Hd;function IA(){if(Hd)return Bl;Hd=1;var e=$A(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,s,o,l,u,c){var f=o&t,h=e(a),p=h.length,g=e(s),d=g.length;if(p!=d&&!f)return!1;for(var m=p;m--;){var v=h[m];if(!(f?v in s:r.call(s,v)))return!1}var y=c.get(a),x=c.get(s);if(y&&x)return y==s&&x==a;var _=!0;c.set(a,s),c.set(s,a);for(var w=f;++m<p;){v=h[m];var S=a[v],b=s[v];if(l)var T=f?l(b,S,v,s,a,c):l(S,b,v,a,s,c);if(!(T===void 0?S===b||u(S,b,o,l,c):T)){_=!1;break}w||(w=v=="constructor")}if(_&&!w){var M=a.constructor,C=s.constructor;M!=C&&"constructor"in a&&"constructor"in s&&!(typeof M=="function"&&M instanceof M&&typeof C=="function"&&C instanceof C)&&(_=!1)}return c.delete(a),c.delete(s),_}return Bl=i,Bl}var Ul,Gd;function zA(){if(Gd)return Ul;Gd=1;var e=Or(),t=kn(),n=e(t,"DataView");return Ul=n,Ul}var Hl,jd;function BA(){if(jd)return Hl;jd=1;var e=Or(),t=kn(),n=e(t,"Promise");return Hl=n,Hl}var Gl,Yd;function UA(){if(Yd)return Gl;Yd=1;var e=Or(),t=kn(),n=e(t,"Set");return Gl=n,Gl}var jl,Xd;function HA(){if(Xd)return jl;Xd=1;var e=Or(),t=kn(),n=e(t,"WeakMap");return jl=n,jl}var Yl,Wd;function GA(){if(Wd)return Yl;Wd=1;var e=zA(),t=Sf(),n=BA(),r=UA(),i=HA(),a=ca(),s=_y(),o="[object Map]",l="[object Object]",u="[object Promise]",c="[object Set]",f="[object WeakMap]",h="[object DataView]",p=s(e),g=s(t),d=s(n),m=s(r),v=s(i),y=a;return(e&&y(new e(new ArrayBuffer(1)))!=h||t&&y(new t)!=o||n&&y(n.resolve())!=u||r&&y(new r)!=c||i&&y(new i)!=f)&&(y=function(x){var _=a(x),w=_==l?x.constructor:void 0,S=w?s(w):"";if(S)switch(S){case p:return h;case g:return o;case d:return u;case m:return c;case v:return f}return _}),Yl=y,Yl}var Xl,Kd;function jA(){if(Kd)return Xl;Kd=1;var e=xy(),t=by(),n=TA(),r=IA(),i=GA(),a=fn(),s=wy(),o=Ty(),l=1,u="[object Arguments]",c="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(d,m,v,y,x,_){var w=a(d),S=a(m),b=w?c:i(d),T=S?c:i(m);b=b==u?f:b,T=T==u?f:T;var M=b==f,C=T==f,A=b==T;if(A&&s(d)){if(!s(m))return!1;w=!0,M=!1}if(A&&!M)return _||(_=new e),w||o(d)?t(d,m,v,y,x,_):n(d,m,b,v,y,x,_);if(!(v&l)){var D=M&&p.call(d,"__wrapped__"),k=C&&p.call(m,"__wrapped__");if(D||k){var N=D?d.value():d,I=k?m.value():m;return _||(_=new e),x(N,I,v,y,_)}}return A?(_||(_=new e),r(d,m,v,y,x,_)):!1}return Xl=g,Xl}var Wl,Vd;function My(){if(Vd)return Wl;Vd=1;var e=jA(),t=fa();function n(r,i,a,s,o){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,s,n,o)}return Wl=n,Wl}var Kl,Zd;function YA(){if(Zd)return Kl;Zd=1;var e=xy(),t=My(),n=1,r=2;function i(a,s,o,l){var u=o.length,c=u,f=!l;if(a==null)return!c;for(a=Object(a);u--;){var h=o[u];if(f&&h[2]?h[1]!==a[h[0]]:!(h[0]in a))return!1}for(;++u<c;){h=o[u];var p=h[0],g=a[p],d=h[1];if(f&&h[2]){if(g===void 0&&!(p in a))return!1}else{var m=new e;if(l)var v=l(g,d,p,a,s,m);if(!(v===void 0?t(d,g,n|r,l,m):v))return!1}}return!0}return Kl=i,Kl}var Vl,Qd;function Ay(){if(Qd)return Vl;Qd=1;var e=la();function t(n){return n===n&&!e(n)}return Vl=t,Vl}var Zl,Jd;function XA(){if(Jd)return Zl;Jd=1;var e=Ay(),t=ys();function n(r){for(var i=t(r),a=i.length;a--;){var s=i[a],o=r[s];i[a]=[s,o,e(o)]}return i}return Zl=n,Zl}var Ql,tg;function Cy(){if(tg)return Ql;tg=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ql=e,Ql}var Jl,eg;function WA(){if(eg)return Jl;eg=1;var e=YA(),t=XA(),n=Cy();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(s){return s===i||e(s,i,a)}}return Jl=r,Jl}var tu,ng;function KA(){if(ng)return tu;ng=1;var e=Mf();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return tu=t,tu}var eu,rg;function VA(){if(rg)return eu;rg=1;function e(t,n){return t!=null&&n in Object(t)}return eu=e,eu}var nu,ig;function ZA(){if(ig)return nu;ig=1;var e=vy(),t=xf(),n=fn(),r=Af(),i=Cf(),a=gs();function s(o,l,u){l=e(l,o);for(var c=-1,f=l.length,h=!1;++c<f;){var p=a(l[c]);if(!(h=o!=null&&u(o,p)))break;o=o[p]}return h||++c!=f?h:(f=o==null?0:o.length,!!f&&i(f)&&r(p,f)&&(n(o)||t(o)))}return nu=s,nu}var ru,ag;function QA(){if(ag)return ru;ag=1;var e=VA(),t=ZA();function n(r,i){return r!=null&&t(r,i,e)}return ru=n,ru}var iu,sg;function JA(){if(sg)return iu;sg=1;var e=My(),t=KA(),n=QA(),r=bf(),i=Ay(),a=Cy(),s=gs(),o=1,l=2;function u(c,f){return r(c)&&i(f)?a(s(c),f):function(h){var p=t(h,c);return p===void 0&&p===f?n(h,c):e(f,p,o|l)}}return iu=u,iu}var au,og;function _s(){if(og)return au;og=1;function e(t){return t}return au=e,au}var su,lg;function tC(){if(lg)return su;lg=1;function e(t){return function(n){return n==null?void 0:n[t]}}return su=e,su}var ou,ug;function eC(){if(ug)return ou;ug=1;var e=Mf();function t(n){return function(r){return e(r,n)}}return ou=t,ou}var lu,cg;function nC(){if(cg)return lu;cg=1;var e=tC(),t=eC(),n=bf(),r=gs();function i(a){return n(a)?e(r(a)):t(a)}return lu=i,lu}var uu,fg;function ky(){if(fg)return uu;fg=1;var e=WA(),t=JA(),n=_s(),r=fn(),i=nC();function a(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):i(s)}return uu=a,uu}var cu,hg;function rC(){if(hg)return cu;hg=1;function e(t){return function(n,r,i){for(var a=-1,s=Object(n),o=i(n),l=o.length;l--;){var u=o[t?l:++a];if(r(s[u],u,s)===!1)break}return n}}return cu=e,cu}var fu,pg;function iC(){if(pg)return fu;pg=1;var e=rC(),t=e();return fu=t,fu}var hu,dg;function aC(){if(dg)return hu;dg=1;var e=iC(),t=ys();function n(r,i){return r&&e(r,i,t)}return hu=n,hu}var pu,gg;function sC(){if(gg)return pu;gg=1;var e=ms();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var s=i.length,o=r?s:-1,l=Object(i);(r?o--:++o<s)&&a(l[o],o,l)!==!1;);return i}}return pu=t,pu}var du,mg;function oC(){if(mg)return du;mg=1;var e=aC(),t=sC(),n=t(e);return du=n,du}var gu,yg;function Ry(){if(yg)return gu;yg=1;var e=oC(),t=ms();function n(r,i){var a=-1,s=t(r)?Array(r.length):[];return e(r,function(o,l,u){s[++a]=i(o,l,u)}),s}return gu=n,gu}var mu,_g;function lC(){if(_g)return mu;_g=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return mu=e,mu}var yu,vg;function uC(){if(vg)return yu;vg=1;var e=ha();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,s=n===n,o=e(n),l=r!==void 0,u=r===null,c=r===r,f=e(r);if(!u&&!f&&!o&&n>r||o&&l&&c&&!u&&!f||a&&l&&c||!i&&c||!s)return 1;if(!a&&!o&&!f&&n<r||f&&i&&s&&!a&&!o||u&&i&&s||!l&&s||!c)return-1}return 0}return yu=t,yu}var _u,xg;function cC(){if(xg)return _u;xg=1;var e=uC();function t(n,r,i){for(var a=-1,s=n.criteria,o=r.criteria,l=s.length,u=i.length;++a<l;){var c=e(s[a],o[a]);if(c){if(a>=u)return c;var f=i[a];return c*(f=="desc"?-1:1)}}return n.index-r.index}return _u=t,_u}var vu,bg;function fC(){if(bg)return vu;bg=1;var e=cs(),t=Mf(),n=ky(),r=Ry(),i=lC(),a=Sy(),s=cC(),o=_s(),l=fn();function u(c,f,h){f.length?f=e(f,function(d){return l(d)?function(m){return t(m,d.length===1?d[0]:d)}:d}):f=[o];var p=-1;f=e(f,a(n));var g=r(c,function(d,m,v){var y=e(f,function(x){return x(d)});return{criteria:y,index:++p,value:d}});return i(g,function(d,m){return s(d,m,h)})}return vu=u,vu}var xu,wg;function hC(){if(wg)return xu;wg=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return xu=e,xu}var bu,Sg;function pC(){if(Sg)return bu;Sg=1;var e=hC(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var s=arguments,o=-1,l=t(s.length-i,0),u=Array(l);++o<l;)u[o]=s[i+o];o=-1;for(var c=Array(i+1);++o<i;)c[o]=s[o];return c[i]=a(u),e(r,this,c)}}return bu=n,bu}var wu,Tg;function dC(){if(Tg)return wu;Tg=1;function e(t){return function(){return t}}return wu=e,wu}var Su,Mg;function gC(){if(Mg)return Su;Mg=1;var e=Or(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Su=t,Su}var Tu,Ag;function mC(){if(Ag)return Tu;Ag=1;var e=dC(),t=gC(),n=_s(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return Tu=r,Tu}var Mu,Cg;function yC(){if(Cg)return Mu;Cg=1;var e=800,t=16,n=Date.now;function r(i){var a=0,s=0;return function(){var o=n(),l=t-(o-s);if(s=o,l>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Mu=r,Mu}var Au,kg;function _C(){if(kg)return Au;kg=1;var e=mC(),t=yC(),n=t(e);return Au=n,Au}var Cu,Rg;function vC(){if(Rg)return Cu;Rg=1;var e=_s(),t=pC(),n=_C();function r(i,a){return n(t(i,a,e),i+"")}return Cu=r,Cu}var ku,Eg;function kf(){if(Eg)return ku;Eg=1;var e=wf(),t=ms(),n=Af(),r=la();function i(a,s,o){if(!r(o))return!1;var l=typeof s;return(l=="number"?t(o)&&n(s,o.length):l=="string"&&s in o)?e(o[s],a):!1}return ku=i,ku}var Ru,Dg;function xC(){if(Dg)return Ru;Dg=1;var e=my(),t=fC(),n=vC(),r=kf(),i=n(function(a,s){if(a==null)return[];var o=s.length;return o>1&&r(a,s[0],s[1])?s=[]:o>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(a,e(s,1),[])});return Ru=i,Ru}var bC=xC();const wC=di(bC);var Eu,Og;function SC(){if(Og)return Eu;Og=1;function e(t){for(var n=-1,r=t==null?0:t.length,i={};++n<r;){var a=t[n];i[a[0]]=a[1]}return i}return Eu=e,Eu}var TC=SC();const Pg=di(TC);var Du,Fg;function MC(){if(Fg)return Du;Fg=1;var e=Math.ceil,t=Math.max;function n(r,i,a,s){for(var o=-1,l=t(e((i-r)/(a||1)),0),u=Array(l);l--;)u[s?l:++o]=r,r+=a;return u}return Du=n,Du}var Ou,Ng;function AC(){if(Ng)return Ou;Ng=1;var e=MC(),t=kf(),n=hy();function r(i){return function(a,s,o){return o&&typeof o!="number"&&t(a,s,o)&&(s=o=void 0),a=n(a),s===void 0?(s=a,a=0):s=n(s),o=o===void 0?a<s?1:-1:n(o),e(a,s,o,i)}}return Ou=r,Ou}var Pu,Lg;function CC(){if(Lg)return Pu;Lg=1;var e=AC(),t=e();return Pu=t,Pu}var kC=CC();const RC=di(kC);var Fu,qg;function EC(){if(qg)return Fu;qg=1;var e=cs(),t=ky(),n=Ry(),r=fn();function i(a,s){var o=r(a)?e:n;return o(a,t(s,3))}return Fu=i,Fu}var Nu,$g;function DC(){if($g)return Nu;$g=1;var e=my(),t=EC();function n(r,i){return e(t(r,i),1)}return Nu=n,Nu}var OC=DC();const PC=di(OC);var Lu,Ig;function Ey(){if(Ig)return Lu;Ig=1;function e(t,n,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),n!==void 0&&(t=t>=n?t:n)),t}return Lu=e,Lu}var qu,zg;function FC(){if(zg)return qu;zg=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return qu=e,qu}var $u,Bg;function NC(){if(Bg)return $u;Bg=1;var e=Math.floor,t=Math.random;function n(r,i){return r+e(t()*(i-r+1))}return $u=n,$u}var Iu,Ug;function Dy(){if(Ug)return Iu;Ug=1;var e=NC();function t(n,r){var i=-1,a=n.length,s=a-1;for(r=r===void 0?a:r;++i<r;){var o=e(i,s),l=n[o];n[o]=n[i],n[i]=l}return n.length=r,n}return Iu=t,Iu}var zu,Hg;function LC(){if(Hg)return zu;Hg=1;var e=Ey(),t=FC(),n=Dy();function r(i,a){return n(t(i),e(a,0,i.length))}return zu=r,zu}var Bu,Gg;function qC(){if(Gg)return Bu;Gg=1;var e=cs();function t(n,r){return e(r,function(i){return n[i]})}return Bu=t,Bu}var Uu,jg;function $C(){if(jg)return Uu;jg=1;var e=qC(),t=ys();function n(r){return r==null?[]:e(r,t(r))}return Uu=n,Uu}var Hu,Yg;function IC(){if(Yg)return Hu;Yg=1;var e=Ey(),t=Dy(),n=$C();function r(i,a){var s=n(i);return t(s,e(a,0,s.length))}return Hu=r,Hu}var Gu,Xg;function zC(){if(Xg)return Gu;Xg=1;var e=LC(),t=IC(),n=fn(),r=kf(),i=py();function a(s,o,l){(l?r(s,o,l):o===void 0)?o=1:o=i(o);var u=n(s)?e:t;return u(s,o)}return Gu=a,Gu}var BC=zC();const UC=di(BC),HC=e=>$M(e,14),Wg=e=>Object.values(e).reduce((t,n)=>t+n,0),GC=(e,t,n={})=>{const r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw new Error("vote distribution must contain at least one party");if(!Object.values(e).every(g=>typeof g=="number"&&g>=0))throw new Error("party vote counts must be non-negative integers");if(!Number.isInteger(t)||t<=0)throw new Error("seats must be a positive integer");if(typeof r.draw!="boolean")throw new Error("opt.draw must be a boolean");const i=Wg(e),a=Pg(Object.entries(e).map(([g,d])=>{const m=Math.max(t-Object.keys(e).length,0),v=Math.round(m*d/i);return[g,v]})),s=Pg(Object.entries(e).map(([g,d])=>{const m=t+Object.keys(e).length,v=Math.min(Math.round(m*d/i),t);return[g,v]})),o=PC(Object.entries(e).map(([g,d])=>{const m=a[g],v=s[g];return RC(m,v).map(y=>{const x=HC(d/(y+.5));return{party:g,quotient:x}})})),l=Wg(a),u=t-l,c=wC(o,({quotient:g})=>-g),f=c[u-1].quotient,h=c.filter(({quotient:g})=>g>f),p=c.filter(({quotient:g})=>g===f);if(h.length+p.length===u)h.push(...p);else{if(!r.draw)throw new Error("result is ambiguous, a draw would need to be made, but opt.draw is disabled");h.push(...UC(p,u-h.length))}return h.reduce((g,{party:d})=>(g[d]+=1,g),a)},ts=e=>Math.round(e*1e10)/1e10,jC=e=>e.reduce((t,n)=>t+n.seats,0),YC=e=>e.flat(),XC=(e,t,n)=>{const r=(Math.PI-n)/2,i=t/e+r-Math.PI;return{x:ts(e*Math.cos(i)),y:ts(e*Math.sin(i))}},Oy=(e,t,n,r)=>{const i=r*t*n/(e-t),a=1+r*(t-1)*t/2/(e-t);return i/a},Ti=(e,t,n,r)=>{const i=r/Math.PI*.7142857142857143;return Math.abs(Oy(e,t,n,r)*t/n-i)},WC=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,i=Ti(e,r,t,n),a=0;for(Ti(e,r+1,t,n)<i&&(a=1),Ti(e,r-1,t,n)<i&&r>1&&(a=-1);Ti(e,r+a,t,n)<i&&r>0;)i=Ti(e,r+a,t,n),r+=a;return r},KC=(e,t)=>{var i,a;let n,r;for(let s=0;s<e.length;s++)r=ts((t[s]||0)/(((i=e[s])==null?void 0:i.length)??1)),(!n||r<n)&&(n=r);for(let s=0;s<e.length;s++)if(r=ts((t[s]||0)/(((a=e[s])==null?void 0:a.length)??1)),r===n)return s;return 0},VC=(e,t,n)=>{const r=jC(e),i=WC(r,t,n),a=Oy(r,i,t,n);let s={};for(let h=1;h<=i;h++)s[h]=t-(h-1)*a;s=GC(s,r);const o=[];let l,u,c;for(let h=1;h<=i;h++){const p=[];l=t-(h-1)*a,u=n*l/((s[h]??1)-1||1);for(let g=0;g<=(s[h]??1)-1;g++)c={...XC(l,g*u,n),r:.4*a},p.push(c);o.push(p)}const f=Array(o.length).fill(0);for(const h of e)for(let p=0;p<h.seats;p++){const g=KC(o,f),d=o[g],m=f[g]??0,v=d==null?void 0:d[m];v&&(v.fill=h.colour,v.party=String(h.id)),f[g]=m+1}return YC(o)},ZC=e=>t=>e("circle",{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),QC={seatCount:!1,arcAngle:180,hFunction:oa},JC=(e,t={})=>{var m;const{seatCount:n,arcAngle:r,hFunction:i}=Object.assign({},QC,t);if(typeof n!="boolean")throw new Error("`seatCount` option must be a boolean");if(typeof i!="function")throw new Error("`hFunction` option must be a function");if(typeof r!="number"||r<=0||r>360)throw new Error("`arcAngle` option must be a number between 0 and 360");const a=r*Math.PI/180,s=20,o=VC(e,s,a),l=(((m=o[0])==null?void 0:m.r)??0)/.4||0,u=o.map(ZC(i));n&&u.push(i("text",{x:0,y:0,"text-anchor":"middle",style:{"font-family":"Helvetica","font-size":.25*s+"px"},class:"seatNumber"},String(u.length)));const c=r<=180?s+l:s*(1+Math.sin((a-Math.PI)/2))+l,f=s+l,h=Math.max(c,f),p=r<=180?-s-l/2:-s*(1+Math.sin((a-Math.PI)/2))-l/2,g=i("defs",[ey(i),ny(i),ry(i)]);return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:[-s-l/2,p,2*s+l,h].join(",")},[g,...u])},tk={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:oa},ek=(e,t={})=>{const n={...tk,...t},{arcAngle:r,arcAngleFlexibility:i,radius:a,seatSize:s,minSeatSize:o,maxSeatSize:l,spacing:u,innerRadiusRatio:c,showLabels:f,hFunction:h}=n,p=a*c,g=e.reduce((j,E)=>j+E.seats,0);let d={seatSize:s,arcAngle:r,score:-1};const m=r-i,v=r+i;for(let j=m;j<=v;j+=2.5){const E=j*Math.PI/180;for(let z=l;z>=o;z-=.1){const q=z*2,R=q*u,it=Math.floor((a-p)/R);for(let G=1;G<=Math.min(it,10);G++){let K=0;for(let lt=0;lt<G;lt++){const nt=p+(lt+.5)*R,ft=q*u/nt,At=Math.floor(E/ft);K+=At}if(K>=g){const lt=g/K,nt=(z-o)/(l-o),ft=(K-g)/g,At=ft<.15?1:ft<.3?.7:ft<.5?.4:.1,st=1-Math.abs(j-r)/i,bt=At*.5+nt*.3+lt*.15+st*.05;bt>d.score&&(d={seatSize:z,arcAngle:j,rings:G,score:bt})}}}}const y=d.seatSize,x=d.arcAngle,_=x*Math.PI/180,w=y*2,S=w*u,b=Math.floor((a-p)/S),T=[],M=-_/2-Math.PI/2,C=[];let A=0,D=[];for(let j=1;j<=b;j++){let E=0;const z=[];for(let q=0;q<j;q++){const R=p+(q+.5)*S,it=w*u/R,G=Math.floor(_/it);z.push(G),E+=G}if(E>=g){A=j,D=z;break}}if(A>0)C.push(...D);else for(let j=0;j<b;j++){const E=p+(j+.5)*S,z=w*u/E,q=Math.floor(_/z);C.push(q)}for(let j=0;j<C.length;j++){const E=p+(j+.5)*S,z=C[j]??0;if(z>0){const q=_/z;for(let R=0;R<z;R++){const it=M+(R+.5)*q,G=Math.cos(it)*E,K=Math.sin(it)*E;T.push({ring:j,index:R,angle:it,x:G,y:K})}}}T.sort((j,E)=>{const z=j.angle-E.angle;return Math.abs(z)>.001?z:j.ring-E.ring});const k=[];let N=0;e.forEach(j=>{const E=[],z=Math.min(j.seats,T.length-N);let q=1/0,R=-1/0;for(let G=0;G<z&&N<T.length;G++){const K=T[N++];K&&(q=Math.min(q,K.angle),R=Math.max(R,K.angle),Math.sqrt(K.x*K.x+K.y*K.y),E.push(h("circle",{fill:j.colour,stroke:j.colour,className:"circle seat-visual seat-hover-zone",transform:`translate(${K.x}, ${K.y})`,r:y,"data-party":j.name,"data-party-id":String(j.id),style:"pointer-events: all; cursor: pointer;"})))}const it=E;k.push(h("g",{className:"party-group","data-party":j.name,style:"opacity: 1; outline: none;"},it))});const I=h("g",{className:"arc-bg"},[h("circle",{className:"outer",cx:0,cy:0,fill:"#ffffff",r:a}),h("circle",{className:"inner",cx:0,cy:0,fill:"#ffffff",r:p})]),P=h("g",{className:"points-container"},k),O=f?h("g",{className:"label-container",mask:"url(#label-clip)",style:"pointer-events: none;"},[h("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);"}),h("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,H=h("defs",[h("radialGradient",{id:"label-gradient"},[h("stop",{offset:"0%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"80%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"90%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"}),h("stop",{offset:"100%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0;"})]),h("mask",{id:"label-clip"},[h("circle",{fill:"url(#label-gradient)",r:p})]),ey(h),ny(h),ry(h)]),at=h("g",{className:"arc-container",transform:`translate(${a}, ${a})`},[I,P,O].filter(Boolean)),tt=_/2;let U;if(x<=180)U=a*Math.sin(tt)+y;else{const j=tt-Math.PI/2;U=a*(1+Math.sin(j))+y}const Q=a+y,L=a*2,W=Math.max(U,Q);return h("svg",{id:"chart-container","font-family":"Canva Sans Variable",viewBox:`0 0 ${L} ${W}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},[at,H])};function Py(e){return!e||!e.color?"#cccccc":e.color==="url(#hatchPattern)"?ti.COMPLETED:e.color==="url(#greyHatchPattern)"?Et.greyHatch.lines:e.color}function Rc(e,t){if(!e)return;const n=e.querySelectorAll(".party-group");n&&n.length>0&&n.forEach(r=>{if(!r)return;const i=r,a=i.getAttribute("data-party");t?a===t?i.style.opacity=Pe.animation.hoverOpacity.active:i.style.opacity=Pe.animation.hoverOpacity.dimmed:i.style.opacity="1"})}function Ec(e,t){e.forEach(n=>{const r=n,i=n.getAttribute("class")||"";t?i===t?(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1")):(r.setAttribute("fill-opacity",Pe.animation.hoverOpacity.dimmed),r.setAttribute("stroke-opacity","0.2")):(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1"))})}const nk=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:i,maxSeats:a,setHoveredData:s,activePartyName:o,setActivePartyName:l,chartConfig:u,seatSize:c,shouldAnimate:f=!1,animationDirection:h="left-to-right",onAnimationComplete:p})=>{V.useEffect(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);const g=n<=a?1:a/n,d=t.filter(S=>S.value>0).map(S=>{const b=n<=a?S.value:Math.max(1,Math.floor(S.value*g));return{id:String(S.id),name:S.label,seats:b,colour:S.color==="url(#hatchPattern)"?ti.COMPLETED:S.color}}),m=i?ek(d,{arcAngle:r,arcAngleFlexibility:u.arcAngleFlexibility,radius:u.radius,seatSize:c,minSeatSize:u.minSeatSize,maxSeatSize:u.maxSeatSize,spacing:u.spacing,innerRadiusRatio:u.innerRadiusRatio,showLabels:!0}):JC(d,{arcAngle:r});m.properties&&(m.properties.width="100%",m.properties.height="100%",m.properties.style="display: block; width: 100%; max-width: 100%; height: auto;",m.properties.preserveAspectRatio="xMidYMid meet");const v=AM(m),_=new DOMParser().parseFromString(v,"image/svg+xml").documentElement;if(!_)return;_.setAttribute("width","100%"),_.setAttribute("height","100%"),_.style.width="100%",_.style.height="auto",_.style.display="block",i?rk(_,d,t,s,o,l):ik(_,d,t,s,o,l);const w=()=>{if(s(null),l(null),i)Rc(_,null);else{const S=_.querySelectorAll("circle");Ec(S,null)}};return _&&_.addEventListener("mouseleave",w),e.current.appendChild(_),f&&_&&RM(_,r,u.radius,h,900,p),()=>{if(_&&_.removeEventListener("mouseleave",w),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,i,a,s,o,l,e,u,c,f,h,p])};function rk(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll(".seat-hover-zone"),o=e.querySelectorAll(".party-group circle.seat-visual");o&&o.length>0&&o.forEach(l=>{if(l){const u=l;u.style.stroke=Pe.colors.seatBorder,u.style.strokeWidth="0.5",u.setAttribute("fill-opacity","1"),u.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s&&s.length>0&&s.forEach(l=>{if(!l)return;const u=l.getAttribute("data-party"),c=l.getAttribute("data-party-id"),f=()=>{if(u&&u!==i){const h=t.find(p=>p.name===u||String(p.id)===c);if(h){const p=n.find(g=>g.label===h.name||String(g.id)===h.id);if(p){const g=Py(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h.name),Rc(e,h.name)}}}};l.addEventListener("mouseenter",f)}),i&&Rc(e,i)}function ik(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll("circle");if(s&&s.length>0&&(s.forEach(o=>{if(o){const l=o;l.style.cursor="pointer",l.style.stroke=Pe.colors.seatBorder,l.style.strokeWidth="0.5",l.setAttribute("fill-opacity","1"),l.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s.forEach(o=>{if(!o)return;const l=o.getAttribute("class")||"",u=parseInt(l,10),c=t[u],f=()=>{if(c){const h=c.name;if(h&&h!==i){const p=n.find(g=>g.label===c.name||String(g.id)===c.id);if(p){const g=Py(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h),Ec(s,l)}}}};o.addEventListener("mouseenter",f)})),i){const o=t.find(l=>l.name===i);if(o){const l=t.indexOf(o);Ec(s,String(l))}}}const ju=qi,Kg={[Bi]:ti.NOT_APPLICABLE,[Ui]:ti.NO_LST,[Hi]:ti.DATA_MISSING},Mi=(e,t,n)=>{if(e in Kg)return Kg[e];const r=n-1-t,i=ju.length,a=Math.floor(r/Math.max(1,n-1)*(i-1)),s=Math.min(Math.max(0,a),i-1);return ju[s]??ju[0]??"#000000"},Fy=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{const{special:i,regular:a}=e.reduce((p,g,d)=>([Bi,Ui,Hi].includes(g.label)?p.special.push({...g,originalIndex:d}):p.regular.push({...g,originalIndex:d}),p),{special:[],regular:[]}),s=a.reverse().map((p,g)=>({id:`measure-${g}`,label:p.label,value:p.value,color:Mi(p.label,a.length-1-g,a.length)})),o=i.map((p,g)=>({id:p.label.toLowerCase().replace(" ","-"),label:p.label,value:p.value,color:Mi(p.label,g,i.length)})),l=r,u={id:"no-lst",label:Ui,value:n,color:Mi(Ui,0,1)},c={id:"data-missing",label:Hi,value:l,color:Mi(Hi,0,1)},f={id:"n/a",label:Bi,value:t,color:Mi(Bi,0,1)},h=[];return f.value>0&&h.push(f),u.value>0&&h.push(u),c.value>0&&h.push(c),h.push(...o),h.push(...s),h},Vg={"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."},ak=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i,arcAngle:a,useEnhanced:s=Pe.useEnhanced,showTable:o=!0,shouldAnimate:l=!1,animationDirection:u="left-to-right",onAnimationComplete:c})=>{const f=V.useRef(null),[h,p]=V.useState(null),[g,d]=V.useState(null),v=Fy({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i}).map(b=>{const T=typeof b.color=="function"?b.color("arc"):b.color,M=typeof b.label=="function"?b.label("arc"):b.label;return{...b,color:T,label:M}}),y=a??df({repositoryCount:t}),x=gf({repositoryCount:t});nk({containerRef:f,processedData:v,totalRepositories:t,arcAngle:y,useEnhanced:s,maxSeats:Pe.maxSeats,setHoveredData:p,activePartyName:g,setActivePartyName:d,chartConfig:Pe.chartConfig,seatSize:x,shouldAnimate:l,animationDirection:u,onAnimationComplete:c});const _=v.map(b=>{const T=b.value/t*100,M=T>0&&T<1?"< 1":T.toFixed(0);return{id:String(b.id),label:b.label,value:b.value,percentage:M,color:b.color}}),w=t>Pe.maxSeats,S=w?Math.round(t/Pe.maxSeats):1;return F.jsxs(B.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:[F.jsxs(B.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:[F.jsx(B.Box,{className:"parliament-chart-svg-container",ref:f,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"}}}}),F.jsxs(B.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:[h&&F.jsxs(V.Fragment,{children:[F.jsx(B.Typography,{sx:{color:"text.secondary",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:h.label}),F.jsxs(B.Typography,{sx:{fontWeight:"bold",color:h.color,lineHeight:1,fontSize:"clamp(1.1rem, 2.2vw, 1.3rem)","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"1rem"}},children:[h.value," ",h.value>1?"repos":"repo"]})]}),w&&F.jsxs(B.Box,{className:"parliament-chart-scaled-indicator",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,mt:h?.5:0,color:"text.secondary",fontSize:"clamp(0.65rem, 1.2vw, 0.72rem)"},children:[F.jsx(B.Box,{className:"parliament-chart-scaled-indicator-dot",sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"#888888",flexShrink:0}}),F.jsxs(B.Typography,{variant:"caption",sx:{fontSize:"inherit",fontStyle:"italic"},children:["= ~",S," repos"]})]})]})]}),o&&F.jsx(B.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:()=>{p(null),d(null)},children:F.jsxs(B.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":{padding:"2px 8px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 11.5px)"}},children:[F.jsx("thead",{children:F.jsxs(B.TableRow,{children:[F.jsx(B.TableCell,{}),F.jsx(B.TableCell,{sx:{fontWeight:"bold"},children:"Category"}),F.jsx(B.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"# of repos"}),F.jsx(B.TableCell,{align:"right",sx:{fontWeight:"bold"},children:"% of org"})]})}),F.jsx("tbody",{children:_.map(b=>{const T=b.color==="url(#greyHatchPattern)"?Et.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Et.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Et.noLstHatch.lines:b.color;return F.jsxs(B.TableRow,{onMouseEnter:()=>{d(b.label),p({label:b.label,value:b.value,color:b.color==="url(#greyHatchPattern)"?Et.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Et.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Et.noLstHatch.lines:b.color})},sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:g===b.label?`${T}15`:"transparent","&:hover":{backgroundColor:`${T}15`}},children:[F.jsx(B.TableCell,{align:"center",sx:{width:20},children:F.jsx(B.Box,{sx:{width:12,height:12,backgroundColor:b.color==="url(#greyHatchPattern)"?Et.greyHatch.background:b.color==="url(#dataMissingHatchPattern)"?Et.dataMissingHatch.background:b.color==="url(#noLstHatchPattern)"?Et.noLstHatch.background:b.color,borderRadius:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:g===b.label?"scale(1.2)":"scale(1)",...b.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
10
48
|
0deg,
|
|
11
49
|
transparent,
|
|
12
50
|
transparent 3px,
|
|
13
|
-
${
|
|
14
|
-
${
|
|
15
|
-
)`,borderRadius:"50%"}},...
|
|
51
|
+
${Et.greyHatch.lines} 3px,
|
|
52
|
+
${Et.greyHatch.lines} 4px
|
|
53
|
+
)`,borderRadius:"50%"}},...b.label==="Data Missing"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
16
54
|
45deg,
|
|
17
55
|
transparent,
|
|
18
56
|
transparent 3px,
|
|
19
|
-
${
|
|
20
|
-
${
|
|
21
|
-
)`,borderRadius:"50%"}},...
|
|
57
|
+
${Et.dataMissingHatch.lines} 3px,
|
|
58
|
+
${Et.dataMissingHatch.lines} 4px
|
|
59
|
+
)`,borderRadius:"50%"}},...b.label==="No LST"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
22
60
|
-45deg,
|
|
23
61
|
transparent,
|
|
24
62
|
transparent 3px,
|
|
25
|
-
${
|
|
26
|
-
${
|
|
27
|
-
)`,borderRadius:"50%"}}}})}),x.jsx(T.TableCell,{children:x.jsxs(T.Stack,{direction:"row",alignItems:"center",gap:.5,children:[x.jsx("span",{children:y.label}),Ol[y.label]&&x.jsx(T.Tooltip,{title:Ol[y.label],placement:"right",arrow:!0,children:x.jsx(Cs.InfoOutlined,{sx:{fontSize:".875rem",color:"text.secondary"}})})]})}),x.jsx(T.TableCell,{align:"right",children:y.value}),x.jsxs(T.TableCell,{align:"right",children:[y.percentage,"%"]})]},y.id)})})]})})]})},ae={colors:{primary:"#992FB9",background:"#FFFFFF",border:"#9CA3AF",highlightBackground:"rgba(229, 231, 235, 0.5)",monthLabel:"#9ca3af",tooltipText:"#6b7280"},dimensions:{height:32,eventWidth:2}},re={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:ae.colors.monthLabel,mb:1}},monthLabel:{sx:{fontSize:"11px"}},timeline:{sx:{position:"relative",height:`${ae.dimensions.height}px`,backgroundColor:ae.colors.background,borderRadius:0,overflow:"hidden",border:`1px solid ${ae.colors.border}`}},event:{sx:{position:"absolute",top:0,width:`${ae.dimensions.eventWidth}px`,height:"100%",backgroundColor:ae.colors.primary,cursor:"pointer",transition:"transform 0.2s",transformOrigin:"center"}},selection:{sx:{position:"absolute",top:0,height:"100%",backgroundColor:ae.colors.highlightBackground,pointerEvents:"none"}},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 ${ae.colors.border}`}},tooltipEventName:{sx:{fontWeight:600}},tooltipDate:{sx:{color:ae.colors.tooltipText,fontSize:"11px"}}},xd=()=>{var e,t;try{return((t=(e=globalThis.process)==null?void 0:e.env)==null?void 0:t.NODE_ENV)==="development"}catch{return!1}},Ad=({events:e,selectedRange:t,onSelectionChange:n,enableZoom:r,zoomToSelection:a,visibleRange:i,onVisibleRangeChange:o})=>{xd()&&e.length>1&&(e.every((U,te)=>te===0||U.timestamp>=e[te-1].timestamp)||console.warn("TimelineChart: events array should be sorted by timestamp for optimal performance and correct behavior."));const[l,s]=D.useState(!1),[u,f]=D.useState(null),[d,c]=D.useState({start:null,end:null}),[h,m]=D.useState({start:null,end:null}),[v,_]=D.useState(null),p=t??d,b=i??h,y=D.useMemo(()=>{var O;return e.length>0?((O=e[0])==null?void 0:O.timestamp)??0:0},[e]),S=D.useMemo(()=>{var O;return e.length>0?((O=e[e.length-1])==null?void 0:O.timestamp)??0:0},[e]),q=D.useMemo(()=>a&&b.start&&b.end?b.start:y,[a,b,y]),C=D.useMemo(()=>a&&b.start&&b.end?b.end:S,[a,b,S]),A=D.useMemo(()=>C-q,[C,q]),E=D.useCallback(O=>A===0?0:(O-q)/A*100,[q,A]),P=D.useCallback((O,U)=>{const te=O/U*100;return q+te/100*A},[q,A]),L=D.useCallback(O=>{t===void 0&&c(O),n==null||n(O)},[t,n]),w=D.useCallback(O=>{const U=O.currentTarget.getBoundingClientRect(),te=O.clientX-U.left,ne=P(te,U.width);s(!0),f(ne),L({start:ne,end:ne})},[P,L]),z=D.useCallback(O=>{if(!l||u===null)return;const U=O.currentTarget.getBoundingClientRect(),te=O.clientX-U.left,ne=P(te,U.width);L({start:Math.min(u,ne),end:Math.max(u,ne)})},[l,u,P,L]),N=D.useCallback(()=>{const O=l;if(s(!1),O&&a&&p.start&&p.end&&p.start!==p.end){const U={start:p.start,end:p.end};i===void 0&&m(U),o==null||o(U)}},[l,a,p,i,o]),B=D.useCallback(O=>{if(O.preventDefault(),!r||!p.start||!p.end||A===0)return;const U=(p.start+p.end)/2,te=p.end-p.start,ne=O.deltaY>0?1.1:.9,Ne=Math.max(te*ne,A*.01),be=A*1.5,ce=Math.min(Ne,be);let fe=U-ce/2,de=U+ce/2;fe<q&&(fe=q,de=Math.min(q+ce,C)),de>C&&(de=C,fe=Math.max(C-ce,q)),L({start:fe,end:de})},[r,p,A,q,C,L]),Y=D.useCallback(()=>!p.start||!p.end?[]:e.filter(O=>O.timestamp>=p.start&&O.timestamp<=p.end),[e,p]),ee=D.useCallback(()=>{const O={start:y,end:S};i===void 0&&m({start:null,end:null}),o==null||o(O)},[y,S,i,o]),ve=D.useCallback(()=>{a&&ee()},[a,ee]);return{isDragging:l,dragStart:u,internalSelectedRange:p,internalVisibleRange:b,hoveredEvent:v,minDate:q,maxDate:C,timeSpan:A,getPositionFromTimestamp:E,getTimestampFromPosition:P,handleMouseDown:w,handleMouseMove:z,handleMouseUp:N,handleWheel:B,handleDoubleClick:ve,setHoveredEvent:_,getEventsInRange:Y,resetZoom:ee}},Cd=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),qd=e=>new Date(e).toLocaleDateString("en-US",{month:"short",year:"numeric"}),Rd=e=>{const t=e/864e5;return t>60?n=>new Date(n).toLocaleDateString("en-US",{month:"short",year:"numeric"}):t>7?n=>new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric"}):n=>new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",hour12:!0})},wd=()=>{var e,t;try{return((t=(e=globalThis.process)==null?void 0:e.env)==null?void 0:t.NODE_ENV)==="development"}catch{return!1}},Td=e=>({header:{...re.header,...e==null?void 0:e.header},title:{...re.title,...e==null?void 0:e.title},instructions:{...re.instructions,...e==null?void 0:e.instructions},monthLabelsContainer:{...re.monthLabelsContainer,...e==null?void 0:e.monthLabelsContainer},monthLabel:{...re.monthLabel,...e==null?void 0:e.monthLabel},timeline:{...re.timeline,...e==null?void 0:e.timeline},event:{...re.event,...e==null?void 0:e.event},selection:{...re.selection,...e==null?void 0:e.selection},tooltip:{...re.tooltip,...e==null?void 0:e.tooltip},tooltipEventName:{...re.tooltipEventName,...e==null?void 0:e.tooltipEventName},tooltipDate:{...re.tooltipDate,...e==null?void 0:e.tooltipDate}}),Md=({events:e,onSelectionChange:t,selectedRange:n,height:r=ae.dimensions.height,formatDate:a=Cd,formatMonthYear:i=qd,showMonthLabels:o=!0,monthLabelCount:l=6,enableZoom:s=!0,showHeader:u=!0,title:f="Event Timeline Selector",zoomToSelection:d=!1,visibleRange:c,onVisibleRangeChange:h,slotProps:m})=>{wd()&&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.`);const v=D.useMemo(()=>Td(m),[m]),{isDragging:_,internalSelectedRange:p,hoveredEvent:b,minDate:y,timeSpan:S,getPositionFromTimestamp:q,handleMouseDown:C,handleMouseMove:A,handleMouseUp:E,handleWheel:P,handleDoubleClick:L,setHoveredEvent:w,getEventsInRange:z}=Ad({events:e,selectedRange:n,onSelectionChange:t,enableZoom:s,zoomToSelection:d,visibleRange:c,onVisibleRangeChange:h}),N=p.start&&p.end?`Selected: ${a(p.start)} - ${a(p.end)} (${z().length} events)`:"Click and drag on the timeline below to select a date range. Use mouse wheel to zoom in/out.";return x.jsxs(T.Stack,{sx:{width:"100%"},children:[u&&x.jsxs(T.Stack,{spacing:1,sx:{mb:3},...v.header,children:[x.jsx(T.Typography,{variant:"h5",...v.title,children:f}),x.jsx(T.Typography,{variant:"body2",...v.instructions,children:N})]}),o&&x.jsx(T.Stack,{direction:"row",...v.monthLabelsContainer,children:Array.from({length:l},(B,Y)=>{const ee=y+S/(l-1)*Y,ve=Rd(S);return x.jsx(T.Typography,{variant:"caption",...v.monthLabel,children:ve(ee)},Y)})}),x.jsxs(T.Box,{...v.timeline,sx:{...v.timeline.sx,height:`${r}px`},children:[x.jsx(T.Box,{sx:{position:"absolute",top:0,left:0,right:0,height:"100%"},children:e.map((B,Y)=>{const ee=q(B.timestamp);return x.jsx(T.Box,{onMouseEnter:()=>w(B),onMouseLeave:()=>w(null),"aria-label":`Event: ${B.eventName} at ${a(B.timestamp)}`,...v.event,sx:{...v.event.sx,left:`${ee}%`,transform:(b==null?void 0:b.timestamp)===B.timestamp?"scaleX(2)":"scaleX(1)"}},`${B.timestamp}-${Y}`)})}),p.start&&p.end&&(!d||_)&&x.jsx(T.Box,{...v.selection,sx:{...v.selection.sx,left:`${q(p.start)}%`,width:`${q(p.end)-q(p.start)}%`}}),x.jsx(T.Box,{role:"application","aria-label":"Interactive timeline - click and drag to select date range","aria-describedby":u?void 0:"timeline-instructions",tabIndex:0,sx:{position:"absolute",top:0,left:0,right:0,height:"100%",cursor:"crosshair"},onMouseDown:C,onMouseMove:A,onMouseUp:E,onMouseLeave:E,onWheel:P,onDoubleClick:L}),!u&&x.jsx("span",{id:"timeline-instructions",style:{display:"none"},children:N}),b&&x.jsxs(T.Box,{role:"tooltip","aria-live":"polite",...v.tooltip,sx:{...v.tooltip.sx,left:`${q(b.timestamp)}%`,transform:"translateX(-50%)"},children:[x.jsx(T.Typography,{variant:"body2",...v.tooltipEventName,children:b.eventName}),x.jsx(T.Typography,{variant:"caption",...v.tooltipDate,children:a(b.timestamp)})]})]})]})},Od="#8b5cf6",Ed=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Dd=({events:e,title:t="Events in Selected Range",maxHeight:n="200px",formatDate:r=Ed,primaryColor:a=Od})=>e.length===0?null:x.jsxs("div",{style:{marginTop:"24px",padding:"20px",backgroundColor:"#f9fafb",borderRadius:"8px",border:"1px solid #e5e7eb"},children:[x.jsxs("h3",{style:{margin:"0 0 12px 0",fontSize:"16px",color:"#374151"},children:[t," (",e.length,")"]}),x.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:"8px",maxHeight:n,overflowY:"auto"},children:e.map((i,o)=>x.jsxs("div",{style:{padding:"8px 12px",backgroundColor:"white",borderRadius:"4px",fontSize:"13px",border:"1px solid #e5e7eb"},children:[x.jsx("div",{style:{fontWeight:500,color:a},children:i.eventName}),x.jsx("div",{style:{color:"#6b7280",fontSize:"12px",marginTop:"2px"},children:r(i.timestamp)})]},`${i.timestamp}-${o}`))})]});exports.CAMPAIGN_DATA_MISSING=Te;exports.CAMPAIGN_NOT_APPLICABLE=Re;exports.CAMPAIGN_NO_LST=we;exports.DEFAULT_CHART_COLORS=le;exports.DEFAULT_CHART_CONFIG=K;exports.MODERNE_VULNERABILITY_COLORS=ge;exports.ParliamentChart=Sd;exports.TimelineChart=Md;exports.TimelineSelectedEvents=Dd;exports.calculateDataSeries=xs;exports.calculateOptimalArcAngle=_s;exports.calculateOptimalSeatSize=Ss;
|
|
63
|
+
${Et.noLstHatch.lines} 3px,
|
|
64
|
+
${Et.noLstHatch.lines} 4px
|
|
65
|
+
)`,borderRadius:"50%"}}}})}),F.jsx(B.TableCell,{children:F.jsxs(B.Stack,{direction:"row",alignItems:"center",gap:.5,children:[F.jsx("span",{children:b.label}),Vg[b.label]&&F.jsx(B.Tooltip,{title:Vg[b.label],placement:"right",arrow:!0,children:F.jsx(Zg.InfoOutlined,{sx:{fontSize:".875rem",color:"text.secondary"}})})]})}),F.jsx(B.TableCell,{align:"right",children:b.value}),F.jsxs(B.TableCell,{align:"right",children:[b.percentage,"%"]})]},b.id)})})]})})]})},sk=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timelineEvents:s=[],showTimeline:o=!0,timelineHeight:l=40,timelineOffset:u=35,timeRange:c,showGrid:f=!0,showAxes:h=!0,axisLabelColor:p,axisLabelSize:g=14,enableBrush:d=!1,onTimeRangeChange:m,minAllowedTime:v,maxAllowedTime:y,brushColor:x="#69b3a2",formatDate:_,formatValue:w,markers:S=[],onHoveredDataChange:b,hoveredCategory:T,onTimelineEventHover:M})=>{const[C,A]=V.useState(null),[D,k]=V.useState(null),[N,I]=V.useState([]),P=V.useRef(`sawt-${Math.random().toString(36).substr(2,9)}`),O=V.useCallback(H=>{A(H),M==null||M(H)},[M]);return V.useEffect(()=>{if(!e.current||t.length===0||n.length===0)return;const H=Rt(e.current),X=r-a.left-a.right,et=i-a.top-a.bottom,at=P.current;H.selectAll("*").remove();const tt=`main-chart-group main-chart-group-${at}`,U=H.append("g").attr("class",tt).attr("transform",`translate(${a.left},${a.top})`),Q=`sawt-clip-${at}`;H.append("defs").append("clipPath").attr("id",Q).append("rect").attr("x",0).attr("y",0).attr("width",X).attr("height",et);const L=U.append("g").attr("clip-path",`url(#${Q})`),J=[...t.map(ot=>({timestamp:ot.timestamp,...ot.values}))].sort((ot,mt)=>ot.timestamp-mt.timestamp),j=n.map(ot=>ot.dataKey),E=ja().keys(j),z=E(J),q=t.map(ot=>ot.timestamp),R=c?c[0]:Math.min(...q),it=c?c[1]:Math.max(...q),G=Pi().domain([new Date(R),new Date(it)]).range([0,X]),K=J.filter(ot=>ot.timestamp>=R&&ot.timestamp<=it),lt=E(K),nt=lt.length>0?Math.max(...lt[lt.length-1].map(ot=>ot[1]??0)):0,ft=Xi().domain([0,nt*1.1]).range([et,0]).nice();f&&(L.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(br(G).ticks(6).tickSize(et).tickFormat(()=>"")),L.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(wr(ft).ticks(5).tickSize(-X).tickFormat(()=>"")));const At=ss().x(ot=>G(new Date(ot.data.timestamp))).y0(ot=>ft(ot[0])).y1(ot=>ft(ot[1])).curve(Cr),st=L.append("g").attr("class","areas");z.forEach((ot,mt)=>{const yt=n[mt];if(!yt)return;const xt=T===yt.dataKey,Ut=T!=null;st.append("path").datum(ot).attr("class",`area area-${yt.dataKey}`).attr("fill",yt.color).attr("fill-opacity",Ut?xt?.9:.3:.7).attr("stroke",yt.color).attr("stroke-width",xt?2:1.5).attr("d",At).on("mouseenter",()=>{const qt=K[K.length-1],Nt=qt?qt[yt.dataKey]??0:0;b==null||b({label:yt.label,value:Nt,color:yt.color})}).on("mouseleave",()=>{b==null||b(null)})});const bt=S.filter(ot=>ot.timestamp>=R&&ot.timestamp<=it).map(ot=>({...ot,x:G(new Date(ot.timestamp))}));I(ot=>ot.length!==bt.length||ot.some((mt,yt)=>{var xt,Ut;return mt.timestamp!==((xt=bt[yt])==null?void 0:xt.timestamp)||mt.x!==((Ut=bt[yt])==null?void 0:Ut.x)})?bt:ot);let Bt=null;if(bt.length>0&&(Bt=L.append("g").attr("class","markers"),bt.forEach(ot=>{Bt.append("line").attr("class","marker-line").attr("data-timestamp",ot.timestamp).attr("x1",ot.x).attr("x2",ot.x).attr("y1",0).attr("y2",et).attr("stroke",ot.color??"#131E7A").attr("stroke-width",2).attr("opacity",0)})),h){const mt=br(G).ticks(6).tickPadding(12);_&&mt.tickFormat(xt=>_(+xt)),U.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${et})`).call(mt).selectAll("text").attr("font-size",g).attr("fill",p??null);const yt=wr(ft).ticks(5);yt.tickFormat(xt=>+xt==0?"":w?w(+xt):String(xt)),U.append("g").attr("class","axis axis-y").call(yt).selectAll("text").attr("font-size",g).attr("fill",p??null)}if(d&&m){const ot=ra().extent([[0,0],[X,et]]).on("end",yt=>{if(!yt.selection)return;const[xt,Ut]=yt.selection,qt=[+G.invert(xt),+G.invert(Ut)];v!==void 0&&(qt[0]=Math.max(qt[0],v)),y!==void 0&&(qt[1]=Math.min(qt[1],y)),m(qt),H.select(".brush").call(ot.move,null)}),mt=L.append("g").attr("class","brush").call(ot);mt.selectAll(".selection").attr("fill",x).attr("fill-opacity",.2).attr("stroke",x).attr("stroke-width",1),mt.selectAll(".handle").attr("fill",x).attr("fill-opacity",.8)}if(o&&Ja({svg:H,events:s,xScale:G,chartHeight:et,chartWidth:X,timelineHeight:l,timelineOffset:u,instanceId:at,setHoveredTimelineEvent:O,enableBrush:d,onTimeRangeChange:m,minAllowedTime:v,maxAllowedTime:y,brushColor:x,mainGroupSelector:`.main-chart-group-${at}`}),bt.length>0&&Bt){let ot=null,mt;d?mt=L.select(".brush .overlay"):mt=U.append("rect").attr("class","marker-hover-overlay").attr("width",X).attr("height",et).attr("fill","none").attr("pointer-events","all");const yt=Bt,xt=qt=>{let Nt=null,le=1/0;if(bt.forEach(Lt=>{const Zt=Math.abs(qt-Lt.x);Zt<le&&(le=Zt,Nt=Lt)}),!Nt||le>50)return ot!==null&&(ot=null,yt.selectAll(".marker-line").attr("opacity",0),k(null)),!1;const vt=Nt;return ot===vt.timestamp||(ot=vt.timestamp,yt.selectAll(".marker-line").attr("opacity",0),yt.selectAll(".marker-line").filter(function(){return Rt(this).attr("data-timestamp")===String(vt.timestamp)}).attr("opacity",.6),k(vt)),!0},Ut=function(qt){const[Nt]=Sr(qt,this);xt(Nt)};mt.on("mouseenter",Ut),mt.on("mousemove",Ut),mt.on("mouseleave",function(){ot=null,yt.selectAll(".marker-line").attr("opacity",0),k(null)})}return()=>{H.selectAll("*").remove()}},[e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m,v,y,x,_,w,S,b,T,O]),{hoveredTimelineEvent:C,hoveredMarker:D,visibleMarkers:N}},ok=({data:e,categories:t,timelineEvents:n=[],showTimeline:r=!0,timelineHeight:i=40,timelineOffset:a,width:s=900,height:o=400,margin:l={top:10,right:30,bottom:40,left:60},showGrid:u=!0,showAxes:c=!0,axisLabelColor:f,axisLabelSize:h=14,formatDate:p,formatValue:g,timeRange:d,enableBrush:m=!1,onTimeRangeChange:v,minAllowedTime:y,maxAllowedTime:x,brushColor:_="#69b3a2",markers:w=[],onHoveredDataChange:S,hoveredCategory:b,onTimelineEventHover:T})=>{const M=V.useRef(null),C=12,D=a??6+C+h+C,k=r?o+i+D:o,{hoveredTimelineEvent:N,hoveredMarker:I,visibleMarkers:P}=sk({containerRef:M,data:e,categories:t,width:s,height:o,margin:l,timelineEvents:n,showTimeline:r,timelineHeight:i,timelineOffset:D,timeRange:d,showGrid:u,showAxes:c,axisLabelColor:f,axisLabelSize:h,enableBrush:m,onTimeRangeChange:v,minAllowedTime:y,maxAllowedTime:x,brushColor:_,formatDate:p,formatValue:g,markers:w,onHoveredDataChange:S,hoveredCategory:b,onTimelineEventHover:T});return F.jsxs(B.Box,{sx:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:[F.jsx("svg",{ref:M,viewBox:`0 0 ${s} ${k}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"auto",display:"block"}}),P.map(O=>{const H=(O.x+l.left)/s*100,X=l.top/k*100,et=new Date(O.timestamp),at=p?p(O.timestamp):et.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),tt=F.jsxs(B.Box,{children:[F.jsx(B.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:O.label?.5:0},children:at}),O.label&&F.jsx(B.Box,{sx:{color:"white",fontWeight:500},children:O.label})]});return F.jsx(B.Tooltip,{title:tt,open:(I==null?void 0:I.timestamp)===O.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:F.jsx(B.Box,{sx:{position:"absolute",left:`${H}%`,top:`${X}%`,width:"1px",height:`${(o-l.top-l.bottom)/k*100}%`,pointerEvents:"none"}})},O.timestamp)}),N&&r&&!I&&F.jsx(B.Tooltip,{title:F.jsxs(B.Box,{children:[F.jsx(B.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:.5},children:p?p(N.timestamp):new Date(N.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}),F.jsx(B.Box,{sx:{color:"white",fontWeight:500},children:N.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:F.jsx(B.Box,{sx:{position:"absolute",left:`${(N.x+l.left)/s*100}%`,top:`${(o+D+i/2)/k*100}%`,width:"1px",height:"1px",pointerEvents:"none"}})})]})},bn={colors:{primary:"#992FB9",background:"#FFFFFF",border:"#9CA3AF",highlightBackground:"rgba(31, 41, 55, 0.14)",monthLabel:"#9ca3af",tooltipText:"#6b7280"},dimensions:{height:32,eventWidth:2}},lk=(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}}}}),gn={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:bn.colors.monthLabel,mb:1}},monthLabel:{sx:{fontSize:"11px"}},timeline:{sx:{position:"relative",height:`${bn.dimensions.height}px`,backgroundColor:bn.colors.background,borderRadius:0,overflow:"visible",border:`1px solid ${bn.colors.border}`}},event:{sx:{position:"absolute",top:0,width:`${bn.dimensions.eventWidth}px`,height:"100%",backgroundColor:bn.colors.primary,cursor:"pointer",transition:"transform 0.2s",transformOrigin:"center"}},selection:{sx:{position:"absolute",top:0,height:"100%",backgroundColor:bn.colors.highlightBackground,pointerEvents:"none"}},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 ${bn.colors.border}`}},tooltipEventName:{sx:{fontWeight:600}},tooltipDate:{sx:{color:bn.colors.tooltipText,fontSize:"11px"}}},uk=(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%)`}}}}),ck=()=>{var e,t;try{return((t=(e=globalThis.process)==null?void 0:e.env)==null?void 0:t.NODE_ENV)==="development"}catch{return!1}},fk=({events:e,selectedRange:t,onSelectionChange:n,enableZoom:r,zoomToSelection:i,visibleRange:a,onVisibleRangeChange:s})=>{ck()&&e.length>1&&(e.every((W,J)=>J===0||W.timestamp>=e[J-1].timestamp)||console.warn("TimelineChart: events array should be sorted by timestamp for optimal performance and correct behavior."));const[o,l]=V.useState(!1),[u,c]=V.useState(null),[f,h]=V.useState(null),[p,g]=V.useState({start:null,end:null}),[d,m]=V.useState({start:null,end:null}),[v,y]=V.useState(null),x=V.useRef(null),_=t??p,w=a??d,S=V.useMemo(()=>{var L;return e.length>0?((L=e[0])==null?void 0:L.timestamp)??0:0},[e]),b=V.useMemo(()=>{var L;return e.length>0?((L=e[e.length-1])==null?void 0:L.timestamp)??0:0},[e]),T=V.useMemo(()=>i&&w.start&&w.end?w.start:S,[i,w,S]),M=V.useMemo(()=>i&&w.start&&w.end?w.end:b,[i,w,b]),C=V.useMemo(()=>M-T,[M,T]),A=V.useMemo(()=>!r&&_.start!==null&&_.end!==null,[r,_]),D=V.useCallback(L=>C===0?0:(L-T)/C*100,[T,C]),k=V.useCallback((L,W)=>{const J=L/W*100;return T+J/100*C},[T,C]),N=V.useCallback(L=>{t===void 0&&g(L),n==null||n(L)},[t,n]),I=V.useCallback(L=>{const W=L.currentTarget.getBoundingClientRect(),J=L.clientX-W.left,j=k(J,W.width);l(!0),c(j),N({start:j,end:j})},[k,N]),P=V.useCallback(L=>{if(!o||u===null)return;const W=L.currentTarget.getBoundingClientRect(),J=L.clientX-W.left,j=k(J,W.width);if(f==="start"){const E=Math.min(j,_.end-C*.01);N({start:Math.max(E,T),end:_.end})}else if(f==="end"){const E=Math.max(j,_.start+C*.01);N({start:_.start,end:Math.min(E,M)})}else if(f==="body"){const E=j-u,z=_.end-_.start;let q=_.start+E,R=_.end+E;q<T&&(q=T,R=T+z),R>M&&(R=M,q=M-z),N({start:q,end:R}),c(j)}else N({start:Math.min(u,j),end:Math.max(u,j)})},[o,u,f,_,C,T,M,k,N]),O=V.useCallback(()=>{const L=o;if(l(!1),h(null),L&&i&&_.start&&_.end&&_.start!==_.end){const W={start:_.start,end:_.end};a===void 0&&m(W),s==null||s(W)}},[o,i,_,a,s]);V.useEffect(()=>{if(!o||u===null||!x.current)return;const L=J=>{const j=x.current;if(!j)return;const E=j.getBoundingClientRect(),z=J.clientX-E.left,q=k(z,E.width);if(f==="start"){const R=Math.min(q,_.end-C*.01);N({start:Math.max(R,T),end:_.end})}else if(f==="end"){const R=Math.max(q,_.start+C*.01);N({start:_.start,end:Math.min(R,M)})}else if(f==="body"){const R=q-u,it=_.end-_.start;let G=_.start+R,K=_.end+R;G<T&&(G=T,K=T+it),K>M&&(K=M,G=M-it),N({start:G,end:K}),c(q)}else N({start:Math.min(u,q),end:Math.max(u,q)})},W=()=>{O()};return document.addEventListener("mousemove",L),document.addEventListener("mouseup",W),()=>{document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",W)}},[o,u,f,_,C,T,M,k,N,O]);const H=V.useCallback(L=>{L.stopPropagation(),_.start!==null&&(l(!0),c(_.start),h("start"))},[_]),X=V.useCallback(L=>{L.stopPropagation(),_.end!==null&&(l(!0),c(_.end),h("end"))},[_]),et=V.useCallback(L=>{L.stopPropagation();const W=x.current;if(!W)return;const J=W.getBoundingClientRect(),j=L.clientX-J.left,E=k(j,J.width);l(!0),c(E),h("body")},[k]),at=V.useCallback(L=>{if(L.cancelable&&r&&L.preventDefault(),!r||!_.start||!_.end||C===0)return;const W=(_.start+_.end)/2,J=_.end-_.start,j=L.deltaY>0?1.1:.9,E=Math.max(J*j,C*.01),z=C*1.5,q=Math.min(E,z);let R=W-q/2,it=W+q/2;R<T&&(R=T,it=Math.min(T+q,M)),it>M&&(it=M,R=Math.max(M-q,T)),N({start:R,end:it})},[r,_,C,T,M,N]),tt=V.useCallback(()=>!_.start||!_.end?[]:e.filter(L=>L.timestamp>=_.start&&L.timestamp<=_.end),[e,_]),U=V.useCallback(()=>{const L={start:S,end:b};a===void 0&&m({start:null,end:null}),s==null||s(L)},[S,b,a,s]),Q=V.useCallback(()=>{i&&U()},[i,U]);return{isDragging:o,dragStart:u,dragHandleType:f,internalSelectedRange:_,internalVisibleRange:w,hoveredEvent:v,minDate:T,maxDate:M,timeSpan:C,timelineContainerRef:x,getPositionFromTimestamp:D,getTimestampFromPosition:k,handleMouseDown:I,handleMouseMove:P,handleMouseUp:O,handleWheel:at,handleDoubleClick:Q,handleStartHandleMouseDown:H,handleEndHandleMouseDown:X,handleSelectionBodyMouseDown:et,setHoveredEvent:y,getEventsInRange:tt,resetZoom:U,showHandles:A}},hk=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),pk=e=>new Date(e).toLocaleDateString("en-US",{month:"short",year:"numeric"}),dk=e=>{const t=e/864e5;return t>60?n=>new Date(n).toLocaleDateString("en-US",{month:"short",year:"numeric"}):t>7?n=>new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric"}):n=>new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",hour12:!0})},gk=()=>{var e,t;try{return((t=(e=globalThis.process)==null?void 0:e.env)==null?void 0:t.NODE_ENV)==="development"}catch{return!1}},mk=(e,t="arrow",n)=>{const r=t==="grip"?uk(n||"#9CA3AF"):lk(n||"#4B5563");return{header:{...gn.header,...e==null?void 0:e.header},title:{...gn.title,...e==null?void 0:e.title},instructions:{...gn.instructions,...e==null?void 0:e.instructions},monthLabelsContainer:{...gn.monthLabelsContainer,...e==null?void 0:e.monthLabelsContainer},monthLabel:{...gn.monthLabel,...e==null?void 0:e.monthLabel},timeline:{...gn.timeline,...e==null?void 0:e.timeline},event:{...gn.event,...e==null?void 0:e.event},selection:{...gn.selection,...e==null?void 0:e.selection},startHandle:{...r.startHandle,...e==null?void 0:e.startHandle},endHandle:{...r.endHandle,...e==null?void 0:e.endHandle},tooltip:{...gn.tooltip,...e==null?void 0:e.tooltip},tooltipEventName:{...gn.tooltipEventName,...e==null?void 0:e.tooltipEventName},tooltipDate:{...gn.tooltipDate,...e==null?void 0:e.tooltipDate}}},yk=({events:e,onSelectionChange:t,selectedRange:n,height:r=bn.dimensions.height,margin:i={top:0,right:0,bottom:0,left:0},formatDate:a=hk,formatMonthYear:s=pk,showMonthLabels:o=!0,monthLabelCount:l=6,enableZoom:u=!0,dragHandleVariant:c="arrow",dragHandleColor:f,showHeader:h=!0,title:p="Event Timeline Selector",zoomToSelection:g=!1,visibleRange:d,onVisibleRangeChange:m,timeRange:v,onTimeRangeChange:y,slotProps:x})=>{const _=v?{start:v[0],end:v[1]}:d,w=y?L=>{L.start!==null&&L.end!==null&&y([L.start,L.end])}:m;gk()&&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.`);const S=V.useMemo(()=>mk(x,c,f),[x,c,f]),{isDragging:b,dragHandleType:T,internalSelectedRange:M,hoveredEvent:C,minDate:A,timeSpan:D,timelineContainerRef:k,getPositionFromTimestamp:N,handleMouseDown:I,handleWheel:P,handleDoubleClick:O,handleStartHandleMouseDown:H,handleEndHandleMouseDown:X,handleSelectionBodyMouseDown:et,setHoveredEvent:at,getEventsInRange:tt,showHandles:U}=fk({events:e,selectedRange:n,onSelectionChange:t,enableZoom:u,zoomToSelection:g,visibleRange:_,onVisibleRangeChange:w}),Q=M.start&&M.end?`Selected: ${a(M.start)} - ${a(M.end)} (${tt().length} events)`:"Click and drag on the timeline below to select a date range. Use mouse wheel to zoom in/out.";return F.jsxs(B.Stack,{sx:{width:"100%"},children:[h&&F.jsxs(B.Stack,{spacing:1,sx:{mb:3},...S.header,children:[F.jsx(B.Typography,{variant:"h5",...S.title,children:p}),F.jsx(B.Typography,{variant:"body2",...S.instructions,children:Q})]}),o&&F.jsx(B.Stack,{direction:"row",...S.monthLabelsContainer,sx:{...S.monthLabelsContainer.sx,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:Array.from({length:l},(L,W)=>{const J=A+D/(l-1)*W,j=dk(D);return F.jsx(B.Typography,{variant:"caption",...S.monthLabel,children:j(J)},W)})}),F.jsxs(B.Box,{...S.timeline,sx:{...S.timeline.sx,height:`${r}px`,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:[F.jsx(B.Box,{sx:{position:"absolute",top:i.top,left:0,right:0,bottom:i.bottom},children:e.map((L,W)=>{const J=N(L.timestamp);return F.jsx(B.Box,{onMouseEnter:()=>at(L),onMouseLeave:()=>at(null),"aria-label":`Event: ${L.eventName} at ${a(L.timestamp)}`,...S.event,sx:{...S.event.sx,left:`${J}%`,transform:(C==null?void 0:C.timestamp)===L.timestamp?"scaleX(2)":"scaleX(1)"}},`${L.timestamp}-${W}`)})}),M.start&&M.end&&(!g||b)&&F.jsx(B.Box,{...S.selection,onMouseDown:U&&!b?et:void 0,sx:{...S.selection.sx,left:`${N(M.start)}%`,width:`${N(M.end)-N(M.start)}%`,pointerEvents:U?"all":"none",zIndex:2,cursor:U&&!b?T==="body"?"grabbing":"grab":"default"},children:U&&!(b&&T===null)&&F.jsxs(F.Fragment,{children:[F.jsx(B.Box,{...S.startHandle,onMouseDown:H,sx:{...S.startHandle.sx,cursor:"ew-resize",opacity:b&&T!=="start"?.5:1},"aria-label":"Drag to adjust start of selection"}),F.jsx(B.Box,{...S.endHandle,onMouseDown:X,sx:{...S.endHandle.sx,cursor:"ew-resize",opacity:b&&T!=="end"?.5:1},"aria-label":"Drag to adjust end of selection"})]})}),F.jsx(B.Box,{ref:k,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:I,onWheel:P,onDoubleClick:O}),!h&&F.jsx("span",{id:"timeline-instructions",style:{display:"none"},children:Q}),C&&F.jsxs(B.Box,{role:"tooltip","aria-live":"polite",...S.tooltip,sx:{...S.tooltip.sx,left:`${N(C.timestamp)}%`,transform:"translateX(-50%)"},children:[F.jsx(B.Typography,{variant:"body2",...S.tooltipEventName,children:C.eventName}),F.jsx(B.Typography,{variant:"caption",...S.tooltipDate,children:a(C.timestamp)})]})]})]})},_k="#8b5cf6",vk=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),xk=({events:e,title:t="Events in Selected Range",maxHeight:n="200px",formatDate:r=vk,primaryColor:i=_k})=>e.length===0?null:F.jsxs("div",{style:{marginTop:"24px",padding:"20px",backgroundColor:"#f9fafb",borderRadius:"8px",border:"1px solid #e5e7eb"},children:[F.jsxs("h3",{style:{margin:"0 0 12px 0",fontSize:"16px",color:"#374151"},children:[t," (",e.length,")"]}),F.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:"8px",maxHeight:n,overflowY:"auto"},children:e.map((a,s)=>F.jsxs("div",{style:{padding:"8px 12px",backgroundColor:"white",borderRadius:"4px",fontSize:"13px",border:"1px solid #e5e7eb"},children:[F.jsx("div",{style:{fontWeight:500,color:i},children:a.eventName}),F.jsx("div",{style:{color:"#6b7280",fontSize:"12px",marginTop:"2px"},children:r(a.timestamp)})]},`${a.timestamp}-${s}`))})]});function bk(e,t){const n=t-1-e,r=qi.length,i=Math.floor(n/Math.max(1,t-1)*(r-1)),a=Math.min(Math.max(0,i),r-1);return qi[a]??qi[0]??"#000000"}function Ny(e){return Array.from({length:e},(t,n)=>bk(n,e))}const Hr=Ny(5),Fn={critical:"#dc3545",high:"#fd7e14",medium:"#ffc107",low:"#17a2b8",complete:cn.neoDigitalGreen[600],inProgress:"#007bff",farthest:Hr[0],far:Hr[1],close:Hr[2],closest:Hr[3],completed:Hr[4],primary:"#007bff",secondary:"#6c757d",success:cn.neoDigitalGreen[600],danger:"#dc3545",warning:"#ffc107",info:"#17a2b8",light:cn.neoGrey[200],dark:"#343a40"},wk={migration:Hr,severity:[Fn.critical,Fn.high,Fn.medium,Fn.low,Fn.info],status:[Fn.danger,Fn.warning,Fn.success],extended:["#e74c3c","#e67e22","#f39c12","#2ecc71","#3498db","#9b59b6","#1abc9c","#95a5a6"],colorblindSafe:["#0173B2","#DE8F05","#029E73","#CC78BC","#CA9161","#FBAFE4","#949494","#ECE133"]},Sk={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=Hi;exports.CAMPAIGN_NOT_APPLICABLE=Bi;exports.CAMPAIGN_NO_LST=Ui;exports.CATEGORY_LABELS=Sk;exports.ChronoChart=iy;exports.ChronoPerspectiveChart=iy;exports.D3StackedAreaChart=ST;exports.DEFAULT_CHART_COLORS=cn;exports.DEFAULT_CHART_CONFIG=Pe;exports.DEFAULT_STACKED_AREA_COLORS=Fn;exports.MEASURE_GRADIENT_COLORS=qi;exports.MODERNE_VULNERABILITY_COLORS=ti;exports.MorphChart=H0;exports.ParliamentChart=ak;exports.STACKED_AREA_PALETTES=wk;exports.StackedAreaWithTimeline=ok;exports.TimelineChart=yk;exports.TimelineSelectedEvents=xk;exports.calculateDataSeries=Fy;exports.calculateOptimalArcAngle=df;exports.calculateOptimalSeatSize=gf;exports.generateMeasureGradient=Ny;
|