ttnn-visualizer 0.38.2__py3-none-any.whl → 0.38.3__py3-none-any.whl

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.
Files changed (35) hide show
  1. ttnn_visualizer/__init__.py +1 -1
  2. ttnn_visualizer/app.py +1 -1
  3. ttnn_visualizer/csv_queries.py +1 -1
  4. ttnn_visualizer/decorators.py +1 -1
  5. ttnn_visualizer/enums.py +1 -1
  6. ttnn_visualizer/exceptions.py +1 -1
  7. ttnn_visualizer/extensions.py +1 -1
  8. ttnn_visualizer/file_uploads.py +1 -1
  9. ttnn_visualizer/instances.py +1 -1
  10. ttnn_visualizer/models.py +1 -1
  11. ttnn_visualizer/queries.py +1 -1
  12. ttnn_visualizer/remote_sqlite_setup.py +1 -1
  13. ttnn_visualizer/serializers.py +1 -1
  14. ttnn_visualizer/settings.py +1 -1
  15. ttnn_visualizer/sftp_operations.py +1 -1
  16. ttnn_visualizer/sockets.py +1 -1
  17. ttnn_visualizer/ssh_client.py +1 -1
  18. ttnn_visualizer/static/assets/{allPaths-Bl5zsQD8.js → allPaths-Ysrp65Ak.js} +1 -1
  19. ttnn_visualizer/static/assets/{allPathsLoader-62UMr_jj.js → allPathsLoader-RgZewRv3.js} +2 -2
  20. ttnn_visualizer/static/assets/{index-DCEh1A_0.js → index-DuZqnhYU.js} +2 -2
  21. ttnn_visualizer/static/assets/{splitPathsBySizeLoader-bCoYiAtQ.js → splitPathsBySizeLoader-CPmfblnz.js} +1 -1
  22. ttnn_visualizer/static/index.html +11 -3
  23. ttnn_visualizer/tests/__init__.py +1 -1
  24. ttnn_visualizer/tests/test_queries.py +1 -1
  25. ttnn_visualizer/tests/test_serializers.py +1 -1
  26. ttnn_visualizer/utils.py +1 -1
  27. ttnn_visualizer/views.py +1 -1
  28. {ttnn_visualizer-0.38.2.dist-info → ttnn_visualizer-0.38.3.dist-info}/METADATA +1 -1
  29. ttnn_visualizer-0.38.3.dist-info/RECORD +46 -0
  30. ttnn_visualizer-0.38.2.dist-info/RECORD +0 -46
  31. {ttnn_visualizer-0.38.2.dist-info → ttnn_visualizer-0.38.3.dist-info}/LICENSE +0 -0
  32. {ttnn_visualizer-0.38.2.dist-info → ttnn_visualizer-0.38.3.dist-info}/LICENSE_understanding.txt +0 -0
  33. {ttnn_visualizer-0.38.2.dist-info → ttnn_visualizer-0.38.3.dist-info}/WHEEL +0 -0
  34. {ttnn_visualizer-0.38.2.dist-info → ttnn_visualizer-0.38.3.dist-info}/entry_points.txt +0 -0
  35. {ttnn_visualizer-0.38.2.dist-info → ttnn_visualizer-0.38.3.dist-info}/top_level.txt +0 -0
@@ -69,7 +69,7 @@ Error generating stack: `+c.message+`
69
69
  Copyright (c) 2018 Jed Watson.
70
70
  Licensed under the MIT License (MIT), see
71
71
  http://jedwatson.github.io/classnames
72
- */(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var c="",s=0;s<arguments.length;s++){var h=arguments[s];h&&(c=a(c,n(h)))}return c}function n(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return r.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var s="";for(var h in c)e.call(c,h)&&c[h]&&(s=a(s,h));return s}function a(c,s){return s?c?c+" "+s:c+s:c}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(efe);var eEe=efe.exports;const Ti=U0(eEe);function rV(t,e){e===void 0&&(e=[]),mt.useEffect(function(){zy("production")||t()},e)}var tEe={defaultTabIndex:void 0,disabledTabIndex:-1};function tfe(t,e,r,n){n===void 0&&(n=tEe);var a=n.defaultTabIndex,c=n.disabledTabIndex,s=e.active,h=e.onClick,i=e.onFocus,l=e.onKeyDown,d=e.onKeyUp,o=e.onBlur,f=e.tabIndex,A=f===void 0?a:f,w=mt.useState(),I=w[0],m=w[1],u=mt.useState(!1),g=u[0],v=u[1],p=mt.useRef(null),C=mt.useCallback(function(P){g&&v(!1),o==null||o(P)},[g,o]),y=mt.useCallback(function(P){hT(P)&&(P.preventDefault(),P.key!==I&&v(!0)),m(P.key),l==null||l(P)},[I,l]),x=mt.useCallback(function(P){var b;hT(P)&&(v(!1),(b=p.current)===null||b===void 0||b.click()),m(void 0),d==null||d(P)},[d,p]),T=t&&(s||g);return[T,{onBlur:C,onClick:t?h:void 0,onFocus:t?i:void 0,onKeyDown:y,onKeyUp:x,ref:Q1(p,r),tabIndex:t?A:c}]}function rEe(t){return t.toLowerCase()}var nEe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],iEe=/[^A-Z0-9]+/gi;function rfe(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,n=r===void 0?nEe:r,a=e.stripRegexp,c=a===void 0?iEe:a,s=e.transform,h=s===void 0?rEe:s,i=e.delimiter,l=i===void 0?" ":i,d=BX(BX(t,n,"$1\0$2"),c,"\0"),o=0,f=d.length;d.charAt(o)==="\0";)o++;for(;d.charAt(f-1)==="\0";)f--;return d.slice(o,f).split("\0").map(h).join(l)}function BX(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(n,a){return n.replace(a,r)},t)}function aEe(t,e){var r=t.charAt(0),n=t.substr(1).toLowerCase();return e>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function oEe(t,e){return e===void 0&&(e={}),rfe(t,Gn({delimiter:"",transform:aEe},e))}function sEe(t,e){return e===void 0&&(e={}),rfe(t,Gn({delimiter:"."},e))}function lEe(t,e){return e===void 0&&(e={}),sEe(t,Gn({delimiter:"_"},e))}var ga;(function(t){t[t.STANDARD=16]="STANDARD",t[t.LARGE=20]="LARGE"})(ga||(ga={}));const uEe="modulepreload",cEe=function(t){return"/"+t},$X={},UX=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),h=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=Promise.allSettled(r.map(i=>{if(i=cEe(i),i in $X)return;$X[i]=!0;const l=i.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${d}`))return;const o=document.createElement("link");if(o.rel=l?"stylesheet":uEe,l||(o.as="script"),o.crossOrigin="",o.href=i,h&&o.setAttribute("nonce",h),document.head.appendChild(o),l)return new Promise((f,A)=>{o.addEventListener("load",f),o.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${i}`)))})}))}function c(s){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=s,window.dispatchEvent(h),!h.defaultPrevented)throw s}return a.then(s=>{for(const h of s||[])h.status==="rejected"&&c(h.reason);return e().catch(c)})};var Kt,Xt;(function(t){t.AddChild="add-child",t.AddClip="add-clip",t.AddColumnLeft="add-column-left",t.AddColumnRight="add-column-right",t.AddLocation="add-location",t.AddParent="add-parent",t.AddRowBottom="add-row-bottom",t.AddRowTop="add-row-top",t.AddToArtifact="add-to-artifact",t.AddToFolder="add-to-folder",t.Add="add",t.AimpointsTarget="aimpoints-target",t.Airplane="airplane",t.AlignCenter="align-center",t.AlignJustify="align-justify",t.AlignLeft="align-left",t.AlignRight="align-right",t.AlignmentBottom="alignment-bottom",t.AlignmentHorizontalCenter="alignment-horizontal-center",t.AlignmentLeft="alignment-left",t.AlignmentRight="alignment-right",t.AlignmentTop="alignment-top",t.AlignmentVerticalCenter="alignment-vertical-center",t.Ammunition="ammunition",t.Anchor="anchor",t.Annotation="annotation",t.Announcement="announcement",t.Antenna="antenna",t.AppHeader="app-header",t.Application="application",t.Applications="applications",t.Archive="archive",t.AreaOfInterest="area-of-interest",t.ArrayBoolean="array-boolean",t.ArrayDate="array-date",t.ArrayFloatingPoint="array-floating-point",t.ArrayNumeric="array-numeric",t.ArrayObject="array-object",t.ArrayString="array-string",t.ArrayTimestamp="array-timestamp",t.Array="array",t.ArrowBottomLeft="arrow-bottom-left",t.ArrowBottomRight="arrow-bottom-right",t.ArrowDown="arrow-down",t.ArrowLeft="arrow-left",t.ArrowRight="arrow-right",t.ArrowTopLeft="arrow-top-left",t.ArrowTopRight="arrow-top-right",t.ArrowUp="arrow-up",t.ArrowsArc="arrows-arc",t.ArrowsHorizontal="arrows-horizontal",t.ArrowsVertical="arrows-vertical",t.Asterisk="asterisk",t.At="at",t.AutomaticUpdates="automatic-updates",t.Axle="axle",t.Backlink="backlink",t.BackwardTen="backward-ten",t.Badge="badge",t.BanCircle="ban-circle",t.BankAccount="bank-account",t.Barcode="barcode",t.BinaryNumber="binary-number",t.Blank="blank",t.BlockPromote="block-promote",t.BlockedPerson="blocked-person",t.Bold="bold",t.Book="book",t.Bookmark="bookmark",t.Box="box",t.Briefcase="briefcase",t.BringData="bring-data",t.BringForward="bring-forward",t.BritishPound="british-pound",t.Bug="bug",t.Buggy="buggy",t.Build="build",t.Bullseye="bullseye",t.Calculator="calculator",t.Calendar="calendar",t.Camera="camera",t.CaretDown="caret-down",t.CaretLeft="caret-left",t.CaretRight="caret-right",t.CaretUp="caret-up",t.CargoShip="cargo-ship",t.CellTower="cell-tower",t.Changes="changes",t.Chart="chart",t.Chat="chat",t.ChevronBackward="chevron-backward",t.ChevronDown="chevron-down",t.ChevronForward="chevron-forward",t.ChevronLeft="chevron-left",t.ChevronRight="chevron-right",t.ChevronUp="chevron-up",t.CircleArrowDown="circle-arrow-down",t.CircleArrowLeft="circle-arrow-left",t.CircleArrowRight="circle-arrow-right",t.CircleArrowUp="circle-arrow-up",t.Circle="circle",t.Citation="citation",t.Clean="clean",t.Clip="clip",t.ClipboardFile="clipboard-file",t.Clipboard="clipboard",t.CloudDownload="cloud-download",t.CloudServer="cloud-server",t.CloudTick="cloud-tick",t.CloudUpload="cloud-upload",t.Cloud="cloud",t.CodeBlock="code-block",t.Code="code",t.Cog="cog",t.CollapseAll="collapse-all",t.ColorFill="color-fill",t.ColumnLayout="column-layout",t.Comment="comment",t.Comparison="comparison",t.Compass="compass",t.Compressed="compressed",t.Confirm="confirm",t.Console="console",t.Construction="construction",t.Contrast="contrast",t.Control="control",t.CreditCard="credit-card",t.Crop="crop",t.CrossCircle="cross-circle",t.Cross="cross",t.Crown="crown",t.CssStyle="css-style",t.CubeAdd="cube-add",t.CubeEdit="cube-edit",t.CubeRemove="cube-remove",t.Cube="cube",t.Cubes="cubes",t.CurlyBraces="curly-braces",t.CurvedRangeChart="curved-range-chart",t.Cut="cut",t.Cycle="cycle",t.Dashboard="dashboard",t.DataCloud="data-cloud",t.DataConnection="data-connection",t.DataLineage="data-lineage",t.DataSearch="data-search",t.DataSync="data-sync",t.Database="database",t.DeleteClip="delete-clip",t.Delete="delete",t.Delta="delta",t.DeriveColumn="derive-column",t.Desktop="desktop",t.Detection="detection",t.Diagnosis="diagnosis",t.DiagramTree="diagram-tree",t.DirectionLeft="direction-left",t.DirectionRight="direction-right",t.Disable="disable",t.Divide="divide",t.DocumentCode="document-code",t.DocumentLocked="document-locked",t.DocumentOpen="document-open",t.DocumentShare="document-share",t.Document="document",t.Dollar="dollar",t.Dot="dot",t.DoubleCaretHorizontal="double-caret-horizontal",t.DoubleCaretVertical="double-caret-vertical",t.DoubleChevronDown="double-chevron-down",t.DoubleChevronLeft="double-chevron-left",t.DoubleChevronRight="double-chevron-right",t.DoubleChevronUp="double-chevron-up",t.DoughnutChart="doughnut-chart",t.Download="download",t.DragHandleHorizontal="drag-handle-horizontal",t.DragHandleVertical="drag-handle-vertical",t.Draw="draw",t.DrawerLeftFilled="drawer-left-filled",t.DrawerLeft="drawer-left",t.DrawerRightFilled="drawer-right-filled",t.DrawerRight="drawer-right",t.DriveTime="drive-time",t.Duplicate="duplicate",t.Edit="edit",t.Eject="eject",t.Emoji="emoji",t.Endnote="endnote",t.Endorsed="endorsed",t.Envelope="envelope",t.Equals="equals",t.Eraser="eraser",t.Error="error",t.Euro="euro",t.Excavator="excavator",t.Exchange="exchange",t.ExcludeRow="exclude-row",t.ExpandAll="expand-all",t.Explain="explain",t.Export="export",t.EyeOff="eye-off",t.EyeOn="eye-on",t.EyeOpen="eye-open",t.FastBackward="fast-backward",t.FastForward="fast-forward",t.FeedSubscribed="feed-subscribed",t.Feed="feed",t.FighterJet="fighter-jet",t.Film="film",t.FilterKeep="filter-keep",t.FilterList="filter-list",t.FilterOpen="filter-open",t.FilterRemove="filter-remove",t.FilterSortAsc="filter-sort-asc",t.FilterSortDesc="filter-sort-desc",t.Filter="filter",t.Flag="flag",t.Flame="flame",t.Flash="flash",t.FloatingPoint="floating-point",t.FloppyDisk="floppy-disk",t.FlowBranch="flow-branch",t.FlowEnd="flow-end",t.FlowLinear="flow-linear",t.FlowReviewBranch="flow-review-branch",t.FlowReview="flow-review",t.Flows="flows",t.FolderClose="folder-close",t.FolderNew="folder-new",t.FolderOpen="folder-open",t.FolderSharedOpen="folder-shared-open",t.FolderShared="folder-shared",t.Follower="follower",t.Following="following",t.Font="font",t.Fork="fork",t.Form="form",t.ForwardTen="forward-ten",t.Fuel="fuel",t.FullCircle="full-circle",t.FullStackedChart="full-stacked-chart",t.Fullscreen="fullscreen",t.Function="function",t.GanttChart="gantt-chart",t.Generate="generate",t.Geofence="geofence",t.Geolocation="geolocation",t.Geosearch="geosearch",t.Geotime="geotime",t.GiftBox="gift-box",t.GitBranch="git-branch",t.GitCommit="git-commit",t.GitMerge="git-merge",t.GitNewBranch="git-new-branch",t.GitPull="git-pull",t.GitPush="git-push",t.GitRepo="git-repo",t.Glass="glass",t.GlobeNetworkAdd="globe-network-add",t.GlobeNetwork="globe-network",t.Globe="globe",t.GraphRemove="graph-remove",t.Graph="graph",t.GreaterThanOrEqualTo="greater-than-or-equal-to",t.GreaterThan="greater-than",t.GridView="grid-view",t.Grid="grid",t.GroupItem="group-item",t.GroupObjects="group-objects",t.GroupedBarChart="grouped-bar-chart",t.HandDown="hand-down",t.HandLeft="hand-left",t.HandRight="hand-right",t.HandUp="hand-up",t.Hand="hand",t.Hat="hat",t.HeaderOne="header-one",t.HeaderThree="header-three",t.HeaderTwo="header-two",t.Header="header",t.Headset="headset",t.HeartBroken="heart-broken",t.Heart="heart",t.HeatGrid="heat-grid",t.Heatmap="heatmap",t.Helicopter="helicopter",t.Help="help",t.HelperManagement="helper-management",t.Hexagon="hexagon",t.HighPriority="high-priority",t.HighVoltagePole="high-voltage-pole",t.Highlight="highlight",t.History="history",t.Home="home",t.HorizontalBarChartAsc="horizontal-bar-chart-asc",t.HorizontalBarChartDesc="horizontal-bar-chart-desc",t.HorizontalBarChart="horizontal-bar-chart",t.HorizontalDistribution="horizontal-distribution",t.HorizontalInbetween="horizontal-inbetween",t.Hurricane="hurricane",t.IdNumber="id-number",t.ImageRotateLeft="image-rotate-left",t.ImageRotateRight="image-rotate-right",t.Import="import",t.InboxFiltered="inbox-filtered",t.InboxGeo="inbox-geo",t.InboxSearch="inbox-search",t.InboxUpdate="inbox-update",t.Inbox="inbox",t.InfoSign="info-sign",t.Inheritance="inheritance",t.InheritedGroup="inherited-group",t.InnerJoin="inner-join",t.Input="input",t.Insert="insert",t.Intelligence="intelligence",t.Intersection="intersection",t.IpAddress="ip-address",t.IssueClosed="issue-closed",t.IssueNew="issue-new",t.Issue="issue",t.Italic="italic",t.JoinTable="join-table",t.KeyBackspace="key-backspace",t.KeyCommand="key-command",t.KeyControl="key-control",t.KeyDelete="key-delete",t.KeyEnter="key-enter",t.KeyEscape="key-escape",t.KeyOption="key-option",t.KeyShift="key-shift",t.KeyTab="key-tab",t.Key="key",t.KnownVehicle="known-vehicle",t.LabTest="lab-test",t.Label="label",t.LayerOutline="layer-outline",t.Layer="layer",t.Layers="layers",t.LayoutAuto="layout-auto",t.LayoutBalloon="layout-balloon",t.LayoutBottomRowThreeTiles="layout-bottom-row-three-tiles",t.LayoutBottomRowTwoTiles="layout-bottom-row-two-tiles",t.LayoutCircle="layout-circle",t.LayoutGrid="layout-grid",t.LayoutGroupBy="layout-group-by",t.LayoutHierarchy="layout-hierarchy",t.LayoutLeftColumnThreeTiles="layout-left-column-three-tiles",t.LayoutLeftColumnTwoTiles="layout-left-column-two-tiles",t.LayoutLinear="layout-linear",t.LayoutRightColumnThreeTiles="layout-right-column-three-tiles",t.LayoutRightColumnTwoTiles="layout-right-column-two-tiles",t.LayoutSkewGrid="layout-skew-grid",t.LayoutSortedClusters="layout-sorted-clusters",t.LayoutThreeColumns="layout-three-columns",t.LayoutThreeRows="layout-three-rows",t.LayoutTopRowThreeTiles="layout-top-row-three-tiles",t.LayoutTopRowTwoTiles="layout-top-row-two-tiles",t.LayoutTwoColumns="layout-two-columns",t.LayoutTwoRows="layout-two-rows",t.Layout="layout",t.Learning="learning",t.LeftJoin="left-join",t.LengthenText="lengthen-text",t.LessThanOrEqualTo="less-than-or-equal-to",t.LessThan="less-than",t.Lifesaver="lifesaver",t.Lightbulb="lightbulb",t.Lightning="lightning",t.Link="link",t.LinkedSquares="linked-squares",t.ListColumns="list-columns",t.ListDetailView="list-detail-view",t.List="list",t.Locate="locate",t.Lock="lock",t.Locomotive="locomotive",t.LogIn="log-in",t.LogOut="log-out",t.LowVoltagePole="low-voltage-pole",t.Manual="manual",t.ManuallyEnteredData="manually-entered-data",t.ManyToMany="many-to-many",t.ManyToOne="many-to-one",t.MapCreate="map-create",t.MapMarker="map-marker",t.Map="map",t.Maximize="maximize",t.Media="media",t.MenuClosed="menu-closed",t.MenuOpen="menu-open",t.Menu="menu",t.MergeColumns="merge-columns",t.MergeLinks="merge-links",t.Microphone="microphone",t.Minimize="minimize",t.Minus="minus",t.MobilePhone="mobile-phone",t.MobileVideo="mobile-video",t.ModalFilled="modal-filled",t.Modal="modal",t.Model="model",t.Moon="moon",t.More="more",t.Mountain="mountain",t.Move="move",t.Mugshot="mugshot",t.MultiSelect="multi-select",t.Music="music",t.Nest="nest",t.NewDrawing="new-drawing",t.NewGridItem="new-grid-item",t.NewLayer="new-layer",t.NewLayers="new-layers",t.NewLink="new-link",t.NewObject="new-object",t.NewPerson="new-person",t.NewPrescription="new-prescription",t.NewShield="new-shield",t.NewTextBox="new-text-box",t.Ninja="ninja",t.NotEqualTo="not-equal-to",t.NotificationsAdd="notifications-add",t.NotificationsSnooze="notifications-snooze",t.NotificationsUpdated="notifications-updated",t.Notifications="notifications",t.NumberedList="numbered-list",t.Numerical="numerical",t.ObjectView="object-view",t.Office="office",t.Offline="offline",t.OilField="oil-field",t.OneColumn="one-column",t.OneToMany="one-to-many",t.OneToOne="one-to-one",t.OpenApplication="open-application",t.Outdated="outdated",t.Output="output",t.Package="package",t.PageBreak="page-break",t.PageLayout="page-layout",t.PanelStats="panel-stats",t.PanelTable="panel-table",t.Panel="panel",t.Paperclip="paperclip",t.Paragraph="paragraph",t.PasteVariable="paste-variable",t.PathSearch="path-search",t.Path="path",t.Pause="pause",t.People="people",t.Percentage="percentage",t.Person="person",t.PhoneCall="phone-call",t.PhoneForward="phone-forward",t.PhoneSearch="phone-search",t.Phone="phone",t.PieChart="pie-chart",t.Pill="pill",t.Pin="pin",t.Pistol="pistol",t.PivotTable="pivot-table",t.Pivot="pivot",t.Play="play",t.Playbook="playbook",t.Plus="plus",t.PolygonFilter="polygon-filter",t.Power="power",t.PredictiveAnalysis="predictive-analysis",t.Prescription="prescription",t.Presentation="presentation",t.Print="print",t.Projects="projects",t.Properties="properties",t.Property="property",t.PublishFunction="publish-function",t.Pulse="pulse",t.Rain="rain",t.Random="random",t.RangeRing="range-ring",t.Record="record",t.RectHeight="rect-height",t.RectWidth="rect-width",t.Rectangle="rectangle",t.Redo="redo",t.Refresh="refresh",t.Regex="regex",t.RegressionChart="regression-chart",t.RemoveColumnLeft="remove-column-left",t.RemoveColumnRight="remove-column-right",t.RemoveColumn="remove-column",t.RemoveRowBottom="remove-row-bottom",t.RemoveRowTop="remove-row-top",t.Remove="remove",t.Repeat="repeat",t.Reset="reset",t.Resolve="resolve",t.Rig="rig",t.RightJoin="right-join",t.Ring="ring",t.RocketSlant="rocket-slant",t.Rocket="rocket",t.RootFolder="root-folder",t.RotateCcw="rotate-ccw",t.RotateCw="rotate-cw",t.RotateDocument="rotate-document",t.RotatePage="rotate-page",t.Route="route",t.RunHistory="run-history",t.Satellite="satellite",t.Saved="saved",t.ScatterPlot="scatter-plot",t.SearchAround="search-around",t.SearchTemplate="search-template",t.SearchText="search-text",t.Search="search",t.SegmentedControl="segmented-control",t.Select="select",t.SelectionBoxAdd="selection-box-add",t.SelectionBoxEdit="selection-box-edit",t.SelectionBox="selection-box",t.Selection="selection",t.SendBackward="send-backward",t.SendMessage="send-message",t.SendToGraph="send-to-graph",t.SendToMap="send-to-map",t.SendTo="send-to",t.Sensor="sensor",t.SeriesAdd="series-add",t.SeriesConfiguration="series-configuration",t.SeriesDerived="series-derived",t.SeriesFiltered="series-filtered",t.SeriesSearch="series-search",t.ServerInstall="server-install",t.Server="server",t.Settings="settings",t.Shapes="shapes",t.Share="share",t.SharedFilter="shared-filter",t.Shield="shield",t.Ship="ship",t.Shop="shop",t.ShoppingCart="shopping-cart",t.ShortenText="shorten-text",t.SignalSearch="signal-search",t.SimCard="sim-card",t.Slash="slash",t.SmallCross="small-cross",t.SmallInfoSign="small-info-sign",t.SmallMinus="small-minus",t.SmallPlus="small-plus",t.SmallSquare="small-square",t.SmallTick="small-tick",t.Snowflake="snowflake",t.SoccerBall="soccer-ball",t.SocialMedia="social-media",t.SortAlphabeticalDesc="sort-alphabetical-desc",t.SortAlphabetical="sort-alphabetical",t.SortAsc="sort-asc",t.SortDesc="sort-desc",t.SortNumericalDesc="sort-numerical-desc",t.SortNumerical="sort-numerical",t.Sort="sort",t.SpellCheck="spell-check",t.SplitColumns="split-columns",t.SportsStadium="sports-stadium",t.Square="square",t.StackedChart="stacked-chart",t.StadiumGeometry="stadium-geometry",t.StarEmpty="star-empty",t.Star="star",t.StepBackward="step-backward",t.StepChart="step-chart",t.StepForward="step-forward",t.Stop="stop",t.Stopwatch="stopwatch",t.Strikethrough="strikethrough",t.Style="style",t.Subscript="subscript",t.SubtractRightJoin="subtract-right-join",t.Superscript="superscript",t.SwapHorizontal="swap-horizontal",t.SwapVertical="swap-vertical",t.Sweep="sweep",t.Switch="switch",t.SymbolCircle="symbol-circle",t.SymbolCross="symbol-cross",t.SymbolDiamond="symbol-diamond",t.SymbolRectangle="symbol-rectangle",t.SymbolSquare="symbol-square",t.SymbolTriangleDown="symbol-triangle-down",t.SymbolTriangleUp="symbol-triangle-up",t.Syringe="syringe",t.TableSync="table-sync",t.TagAdd="tag-add",t.TagPromote="tag-promote",t.TagRefresh="tag-refresh",t.TagUndo="tag-undo",t.Tag="tag",t.Tags="tags",t.TakeAction="take-action",t.Tank="tank",t.Target="target",t.Taxi="taxi",t.Team="team",t.Temperature="temperature",t.TextHighlight="text-highlight",t.ThAdd="th-add",t.ThDerived="th-derived",t.ThDisconnect="th-disconnect",t.ThFiltered="th-filtered",t.ThListAdd="th-list-add",t.ThList="th-list",t.ThVirtualAdd="th-virtual-add",t.ThVirtual="th-virtual",t.Th="th",t.ThirdParty="third-party",t.ThumbsDown="thumbs-down",t.ThumbsUp="thumbs-up",t.TickCircle="tick-circle",t.Tick="tick",t.Time="time",t.TimelineAreaChart="timeline-area-chart",t.TimelineBarChart="timeline-bar-chart",t.TimelineEvents="timeline-events",t.TimelineLineChart="timeline-line-chart",t.Tint="tint",t.Torch="torch",t.Tractor="tractor",t.Train="train",t.Translate="translate",t.Trash="trash",t.Tree="tree",t.TrendingDown="trending-down",t.TrendingUp="trending-up",t.Trophy="trophy",t.Truck="truck",t.TwoColumns="two-columns",t.Unarchive="unarchive",t.Underline="underline",t.Undo="undo",t.UngroupObjects="ungroup-objects",t.UnknownVehicle="unknown-vehicle",t.Unlink="unlink",t.Unlock="unlock",t.Unpin="unpin",t.Unresolve="unresolve",t.Updated="updated",t.Upload="upload",t.User="user",t.Variable="variable",t.Vector="vector",t.VerticalBarChartAsc="vertical-bar-chart-asc",t.VerticalBarChartDesc="vertical-bar-chart-desc",t.VerticalDistribution="vertical-distribution",t.VerticalInbetween="vertical-inbetween",t.Video="video",t.Virus="virus",t.VolumeDown="volume-down",t.VolumeOff="volume-off",t.VolumeUp="volume-up",t.Walk="walk",t.WarningSign="warning-sign",t.WaterfallChart="waterfall-chart",t.Waves="waves",t.WidgetButton="widget-button",t.WidgetFooter="widget-footer",t.WidgetHeader="widget-header",t.Widget="widget",t.Wind="wind",t.WrenchRedo="wrench-redo",t.WrenchSnooze="wrench-snooze",t.WrenchTime="wrench-time",t.Wrench="wrench",t.ZoomIn="zoom-in",t.ZoomOut="zoom-out",t.ZoomToFit="zoom-to-fit"})(Xt||(Xt={}));Kt={},Kt[Xt.AddChild]="62365",Kt[Xt.AddClip]="61697",Kt[Xt.AddColumnLeft]="61698",Kt[Xt.AddColumnRight]="61699",Kt[Xt.AddLocation]="61700",Kt[Xt.AddParent]="62366",Kt[Xt.AddRowBottom]="61701",Kt[Xt.AddRowTop]="61702",Kt[Xt.AddToArtifact]="61703",Kt[Xt.AddToFolder]="61704",Kt[Xt.Add]="61705",Kt[Xt.AimpointsTarget]="62261",Kt[Xt.Airplane]="61706",Kt[Xt.AlignCenter]="61707",Kt[Xt.AlignJustify]="61708",Kt[Xt.AlignLeft]="61709",Kt[Xt.AlignRight]="61710",Kt[Xt.AlignmentBottom]="61711",Kt[Xt.AlignmentHorizontalCenter]="61712",Kt[Xt.AlignmentLeft]="61713",Kt[Xt.AlignmentRight]="61714",Kt[Xt.AlignmentTop]="61715",Kt[Xt.AlignmentVerticalCenter]="61716",Kt[Xt.Ammunition]="62274",Kt[Xt.Anchor]="62256",Kt[Xt.Annotation]="61717",Kt[Xt.Announcement]="62358",Kt[Xt.Antenna]="61718",Kt[Xt.AppHeader]="61719",Kt[Xt.Application]="61720",Kt[Xt.Applications]="61721",Kt[Xt.Archive]="61722",Kt[Xt.AreaOfInterest]="61723",Kt[Xt.ArrayBoolean]="61724",Kt[Xt.ArrayDate]="61725",Kt[Xt.ArrayFloatingPoint]="62253",Kt[Xt.ArrayNumeric]="61726",Kt[Xt.ArrayObject]="62356",Kt[Xt.ArrayString]="61727",Kt[Xt.ArrayTimestamp]="61728",Kt[Xt.Array]="61729",Kt[Xt.ArrowBottomLeft]="61730",Kt[Xt.ArrowBottomRight]="61731",Kt[Xt.ArrowDown]="61732",Kt[Xt.ArrowLeft]="61733",Kt[Xt.ArrowRight]="61734",Kt[Xt.ArrowTopLeft]="61735",Kt[Xt.ArrowTopRight]="61736",Kt[Xt.ArrowUp]="61737",Kt[Xt.ArrowsArc]="62343",Kt[Xt.ArrowsHorizontal]="61738",Kt[Xt.ArrowsVertical]="61739",Kt[Xt.Asterisk]="61740",Kt[Xt.At]="62257",Kt[Xt.AutomaticUpdates]="61741",Kt[Xt.Axle]="62264",Kt[Xt.Backlink]="61742",Kt[Xt.BackwardTen]="62300",Kt[Xt.Badge]="61743",Kt[Xt.BanCircle]="61744",Kt[Xt.BankAccount]="61745",Kt[Xt.Barcode]="61746",Kt[Xt.BinaryNumber]="62295",Kt[Xt.Blank]="61747",Kt[Xt.BlockPromote]="62322",Kt[Xt.BlockedPerson]="61748",Kt[Xt.Bold]="61749",Kt[Xt.Book]="61750",Kt[Xt.Bookmark]="61751",Kt[Xt.Box]="61752",Kt[Xt.Briefcase]="61753",Kt[Xt.BringData]="61754",Kt[Xt.BringForward]="62292",Kt[Xt.BritishPound]="62342",Kt[Xt.Bug]="62254",Kt[Xt.Buggy]="61755",Kt[Xt.Build]="61756",Kt[Xt.Bullseye]="62297",Kt[Xt.Calculator]="61757",Kt[Xt.Calendar]="61758",Kt[Xt.Camera]="61759",Kt[Xt.CaretDown]="61760",Kt[Xt.CaretLeft]="61761",Kt[Xt.CaretRight]="61762",Kt[Xt.CaretUp]="61763",Kt[Xt.CargoShip]="61764",Kt[Xt.CellTower]="61765",Kt[Xt.Changes]="61766",Kt[Xt.Chart]="61767",Kt[Xt.Chat]="61768",Kt[Xt.ChevronBackward]="61769",Kt[Xt.ChevronDown]="61770",Kt[Xt.ChevronForward]="61771",Kt[Xt.ChevronLeft]="61772",Kt[Xt.ChevronRight]="61773",Kt[Xt.ChevronUp]="61774",Kt[Xt.CircleArrowDown]="61775",Kt[Xt.CircleArrowLeft]="61776",Kt[Xt.CircleArrowRight]="61777",Kt[Xt.CircleArrowUp]="61778",Kt[Xt.Circle]="61779",Kt[Xt.Citation]="61780",Kt[Xt.Clean]="61781",Kt[Xt.Clip]="61782",Kt[Xt.ClipboardFile]="62299",Kt[Xt.Clipboard]="61783",Kt[Xt.CloudDownload]="61784",Kt[Xt.CloudServer]="62298",Kt[Xt.CloudTick]="62286",Kt[Xt.CloudUpload]="61785",Kt[Xt.Cloud]="61786",Kt[Xt.CodeBlock]="61787",Kt[Xt.Code]="61788",Kt[Xt.Cog]="61789",Kt[Xt.CollapseAll]="61790",Kt[Xt.ColorFill]="62248",Kt[Xt.ColumnLayout]="61791",Kt[Xt.Comment]="61792",Kt[Xt.Comparison]="61793",Kt[Xt.Compass]="61794",Kt[Xt.Compressed]="61795",Kt[Xt.Confirm]="61796",Kt[Xt.Console]="61797",Kt[Xt.Construction]="62357",Kt[Xt.Contrast]="61798",Kt[Xt.Control]="61799",Kt[Xt.CreditCard]="61800",Kt[Xt.Crop]="62291",Kt[Xt.CrossCircle]="62262",Kt[Xt.Cross]="61801",Kt[Xt.Crown]="61802",Kt[Xt.CssStyle]="62315",Kt[Xt.CubeAdd]="61803",Kt[Xt.CubeEdit]="62339",Kt[Xt.CubeRemove]="61804",Kt[Xt.Cube]="61805",Kt[Xt.Cubes]="62323",Kt[Xt.CurlyBraces]="62296",Kt[Xt.CurvedRangeChart]="61806",Kt[Xt.Cut]="61807",Kt[Xt.Cycle]="61808",Kt[Xt.Dashboard]="61809",Kt[Xt.DataCloud]="62353",Kt[Xt.DataConnection]="61810",Kt[Xt.DataLineage]="61811",Kt[Xt.DataSearch]="62319",Kt[Xt.DataSync]="62316",Kt[Xt.Database]="61812",Kt[Xt.DeleteClip]="62371",Kt[Xt.Delete]="61813",Kt[Xt.Delta]="61814",Kt[Xt.DeriveColumn]="61815",Kt[Xt.Desktop]="61816",Kt[Xt.Detection]="62273",Kt[Xt.Diagnosis]="61817",Kt[Xt.DiagramTree]="61818",Kt[Xt.DirectionLeft]="61819",Kt[Xt.DirectionRight]="61820",Kt[Xt.Disable]="61821",Kt[Xt.Divide]="62247",Kt[Xt.DocumentCode]="62368",Kt[Xt.DocumentLocked]="62369",Kt[Xt.DocumentOpen]="61822",Kt[Xt.DocumentShare]="61823",Kt[Xt.Document]="61824",Kt[Xt.Dollar]="61825",Kt[Xt.Dot]="61826",Kt[Xt.DoubleCaretHorizontal]="61827",Kt[Xt.DoubleCaretVertical]="61828",Kt[Xt.DoubleChevronDown]="61829",Kt[Xt.DoubleChevronLeft]="61830",Kt[Xt.DoubleChevronRight]="61831",Kt[Xt.DoubleChevronUp]="61832",Kt[Xt.DoughnutChart]="61833",Kt[Xt.Download]="61834",Kt[Xt.DragHandleHorizontal]="61835",Kt[Xt.DragHandleVertical]="61836",Kt[Xt.Draw]="61837",Kt[Xt.DrawerLeftFilled]="61838",Kt[Xt.DrawerLeft]="61839",Kt[Xt.DrawerRightFilled]="61840",Kt[Xt.DrawerRight]="61841",Kt[Xt.DriveTime]="61842",Kt[Xt.Duplicate]="61843",Kt[Xt.Edit]="61844",Kt[Xt.Eject]="61845",Kt[Xt.Emoji]="61846",Kt[Xt.Endnote]="62294",Kt[Xt.Endorsed]="61847",Kt[Xt.Envelope]="61848",Kt[Xt.Equals]="61849",Kt[Xt.Eraser]="61850",Kt[Xt.Error]="61851",Kt[Xt.Euro]="61852",Kt[Xt.Excavator]="62317",Kt[Xt.Exchange]="61853",Kt[Xt.ExcludeRow]="61854",Kt[Xt.ExpandAll]="61855",Kt[Xt.Explain]="62285",Kt[Xt.Export]="61856",Kt[Xt.EyeOff]="61857",Kt[Xt.EyeOn]="61858",Kt[Xt.EyeOpen]="61859",Kt[Xt.FastBackward]="61860",Kt[Xt.FastForward]="61861",Kt[Xt.FeedSubscribed]="61862",Kt[Xt.Feed]="61863",Kt[Xt.FighterJet]="62340",Kt[Xt.Film]="61864",Kt[Xt.FilterKeep]="61865",Kt[Xt.FilterList]="61866",Kt[Xt.FilterOpen]="61867",Kt[Xt.FilterRemove]="61868",Kt[Xt.FilterSortAsc]="62350",Kt[Xt.FilterSortDesc]="62351",Kt[Xt.Filter]="61869",Kt[Xt.Flag]="61870",Kt[Xt.Flame]="61871",Kt[Xt.Flash]="61872",Kt[Xt.FloatingPoint]="62252",Kt[Xt.FloppyDisk]="61873",Kt[Xt.FlowBranch]="61874",Kt[Xt.FlowEnd]="61875",Kt[Xt.FlowLinear]="61876",Kt[Xt.FlowReviewBranch]="61877",Kt[Xt.FlowReview]="61878",Kt[Xt.Flows]="61879",Kt[Xt.FolderClose]="61880",Kt[Xt.FolderNew]="61881",Kt[Xt.FolderOpen]="61882",Kt[Xt.FolderSharedOpen]="61883",Kt[Xt.FolderShared]="61884",Kt[Xt.Follower]="61885",Kt[Xt.Following]="61886",Kt[Xt.Font]="61887",Kt[Xt.Fork]="61888",Kt[Xt.Form]="61889",Kt[Xt.ForwardTen]="62301",Kt[Xt.Fuel]="62243",Kt[Xt.FullCircle]="61890",Kt[Xt.FullStackedChart]="61891",Kt[Xt.Fullscreen]="61892",Kt[Xt.Function]="61893",Kt[Xt.GanttChart]="61894",Kt[Xt.Generate]="62284",Kt[Xt.Geofence]="61895",Kt[Xt.Geolocation]="61896",Kt[Xt.Geosearch]="61897",Kt[Xt.Geotime]="62276",Kt[Xt.GiftBox]="62370",Kt[Xt.GitBranch]="61898",Kt[Xt.GitCommit]="61899",Kt[Xt.GitMerge]="61900",Kt[Xt.GitNewBranch]="61901",Kt[Xt.GitPull]="61902",Kt[Xt.GitPush]="61903",Kt[Xt.GitRepo]="61904",Kt[Xt.Glass]="61905",Kt[Xt.GlobeNetworkAdd]="62338",Kt[Xt.GlobeNetwork]="61906",Kt[Xt.Globe]="61907",Kt[Xt.GraphRemove]="61908",Kt[Xt.Graph]="61909",Kt[Xt.GreaterThanOrEqualTo]="61910",Kt[Xt.GreaterThan]="61911",Kt[Xt.GridView]="61912",Kt[Xt.Grid]="61913",Kt[Xt.GroupItem]="62282",Kt[Xt.GroupObjects]="61914",Kt[Xt.GroupedBarChart]="61915",Kt[Xt.HandDown]="61916",Kt[Xt.HandLeft]="61917",Kt[Xt.HandRight]="61918",Kt[Xt.HandUp]="61919",Kt[Xt.Hand]="61920",Kt[Xt.Hat]="61921",Kt[Xt.HeaderOne]="61922",Kt[Xt.HeaderThree]="61923",Kt[Xt.HeaderTwo]="61924",Kt[Xt.Header]="61925",Kt[Xt.Headset]="61926",Kt[Xt.HeartBroken]="61927",Kt[Xt.Heart]="61928",Kt[Xt.HeatGrid]="61929",Kt[Xt.Heatmap]="61930",Kt[Xt.Helicopter]="61931",Kt[Xt.Help]="61932",Kt[Xt.HelperManagement]="61933",Kt[Xt.Hexagon]="62324",Kt[Xt.HighPriority]="61934",Kt[Xt.HighVoltagePole]="62259",Kt[Xt.Highlight]="61935",Kt[Xt.History]="61936",Kt[Xt.Home]="61937",Kt[Xt.HorizontalBarChartAsc]="61938",Kt[Xt.HorizontalBarChartDesc]="61939",Kt[Xt.HorizontalBarChart]="61940",Kt[Xt.HorizontalDistribution]="61941",Kt[Xt.HorizontalInbetween]="62249",Kt[Xt.Hurricane]="61942",Kt[Xt.IdNumber]="61943",Kt[Xt.ImageRotateLeft]="61944",Kt[Xt.ImageRotateRight]="61945",Kt[Xt.Import]="61946",Kt[Xt.InboxFiltered]="61947",Kt[Xt.InboxGeo]="61948",Kt[Xt.InboxSearch]="61949",Kt[Xt.InboxUpdate]="61950",Kt[Xt.Inbox]="61951",Kt[Xt.InfoSign]="61952",Kt[Xt.Inheritance]="61953",Kt[Xt.InheritedGroup]="61954",Kt[Xt.InnerJoin]="61955",Kt[Xt.Input]="62283",Kt[Xt.Insert]="61956",Kt[Xt.Intelligence]="62263",Kt[Xt.Intersection]="61957",Kt[Xt.IpAddress]="61958",Kt[Xt.IssueClosed]="61959",Kt[Xt.IssueNew]="61960",Kt[Xt.Issue]="61961",Kt[Xt.Italic]="61962",Kt[Xt.JoinTable]="61963",Kt[Xt.KeyBackspace]="61964",Kt[Xt.KeyCommand]="61965",Kt[Xt.KeyControl]="61966",Kt[Xt.KeyDelete]="61967",Kt[Xt.KeyEnter]="61968",Kt[Xt.KeyEscape]="61969",Kt[Xt.KeyOption]="61970",Kt[Xt.KeyShift]="61971",Kt[Xt.KeyTab]="61972",Kt[Xt.Key]="61973",Kt[Xt.KnownVehicle]="61974",Kt[Xt.LabTest]="61975",Kt[Xt.Label]="61976",Kt[Xt.LayerOutline]="61977",Kt[Xt.Layer]="61978",Kt[Xt.Layers]="61979",Kt[Xt.LayoutAuto]="61980",Kt[Xt.LayoutBalloon]="61981",Kt[Xt.LayoutBottomRowThreeTiles]="62308",Kt[Xt.LayoutBottomRowTwoTiles]="62307",Kt[Xt.LayoutCircle]="61982",Kt[Xt.LayoutGrid]="61983",Kt[Xt.LayoutGroupBy]="61984",Kt[Xt.LayoutHierarchy]="61985",Kt[Xt.LayoutLeftColumnThreeTiles]="62310",Kt[Xt.LayoutLeftColumnTwoTiles]="62309",Kt[Xt.LayoutLinear]="61986",Kt[Xt.LayoutRightColumnThreeTiles]="62312",Kt[Xt.LayoutRightColumnTwoTiles]="62311",Kt[Xt.LayoutSkewGrid]="61987",Kt[Xt.LayoutSortedClusters]="61988",Kt[Xt.LayoutThreeColumns]="62305",Kt[Xt.LayoutThreeRows]="62306",Kt[Xt.LayoutTopRowThreeTiles]="62314",Kt[Xt.LayoutTopRowTwoTiles]="62313",Kt[Xt.LayoutTwoColumns]="62303",Kt[Xt.LayoutTwoRows]="62304",Kt[Xt.Layout]="61989",Kt[Xt.Learning]="61990",Kt[Xt.LeftJoin]="61991",Kt[Xt.LengthenText]="62270",Kt[Xt.LessThanOrEqualTo]="61992",Kt[Xt.LessThan]="61993",Kt[Xt.Lifesaver]="61994",Kt[Xt.Lightbulb]="61995",Kt[Xt.Lightning]="61996",Kt[Xt.Link]="61997",Kt[Xt.LinkedSquares]="62341",Kt[Xt.ListColumns]="61998",Kt[Xt.ListDetailView]="61999",Kt[Xt.List]="62000",Kt[Xt.Locate]="62001",Kt[Xt.Lock]="62002",Kt[Xt.Locomotive]="62267",Kt[Xt.LogIn]="62003",Kt[Xt.LogOut]="62004",Kt[Xt.LowVoltagePole]="62258",Kt[Xt.Manual]="62005",Kt[Xt.ManuallyEnteredData]="62006",Kt[Xt.ManyToMany]="62007",Kt[Xt.ManyToOne]="62008",Kt[Xt.MapCreate]="62009",Kt[Xt.MapMarker]="62010",Kt[Xt.Map]="62011",Kt[Xt.Maximize]="62012",Kt[Xt.Media]="62013",Kt[Xt.MenuClosed]="62014",Kt[Xt.MenuOpen]="62015",Kt[Xt.Menu]="62016",Kt[Xt.MergeColumns]="62017",Kt[Xt.MergeLinks]="62018",Kt[Xt.Microphone]="62275",Kt[Xt.Minimize]="62019",Kt[Xt.Minus]="62020",Kt[Xt.MobilePhone]="62021",Kt[Xt.MobileVideo]="62022",Kt[Xt.ModalFilled]="62023",Kt[Xt.Modal]="62024",Kt[Xt.Model]="62269",Kt[Xt.Moon]="62025",Kt[Xt.More]="62026",Kt[Xt.Mountain]="62027",Kt[Xt.Move]="62028",Kt[Xt.Mugshot]="62029",Kt[Xt.MultiSelect]="62030",Kt[Xt.Music]="62031",Kt[Xt.Nest]="62032",Kt[Xt.NewDrawing]="62033",Kt[Xt.NewGridItem]="62034",Kt[Xt.NewLayer]="62035",Kt[Xt.NewLayers]="62036",Kt[Xt.NewLink]="62037",Kt[Xt.NewObject]="62038",Kt[Xt.NewPerson]="62039",Kt[Xt.NewPrescription]="62040",Kt[Xt.NewShield]="62281",Kt[Xt.NewTextBox]="62041",Kt[Xt.Ninja]="62042",Kt[Xt.NotEqualTo]="62043",Kt[Xt.NotificationsAdd]="62360",Kt[Xt.NotificationsSnooze]="62044",Kt[Xt.NotificationsUpdated]="62045",Kt[Xt.Notifications]="62046",Kt[Xt.NumberedList]="62047",Kt[Xt.Numerical]="62048",Kt[Xt.ObjectView]="62352",Kt[Xt.Office]="62049",Kt[Xt.Offline]="62050",Kt[Xt.OilField]="62051",Kt[Xt.OneColumn]="62052",Kt[Xt.OneToMany]="62053",Kt[Xt.OneToOne]="62054",Kt[Xt.OpenApplication]="62251",Kt[Xt.Outdated]="62055",Kt[Xt.Output]="62320",Kt[Xt.Package]="62325",Kt[Xt.PageBreak]="62373",Kt[Xt.PageLayout]="62056",Kt[Xt.PanelStats]="62057",Kt[Xt.PanelTable]="62058",Kt[Xt.Panel]="62337",Kt[Xt.Paperclip]="62059",Kt[Xt.Paragraph]="62060",Kt[Xt.PasteVariable]="62278",Kt[Xt.PathSearch]="62061",Kt[Xt.Path]="62062",Kt[Xt.Pause]="62063",Kt[Xt.People]="62064",Kt[Xt.Percentage]="62065",Kt[Xt.Person]="62066",Kt[Xt.PhoneCall]="62279",Kt[Xt.PhoneForward]="62280",Kt[Xt.PhoneSearch]="62359",Kt[Xt.Phone]="62067",Kt[Xt.PieChart]="62068",Kt[Xt.Pill]="62326",Kt[Xt.Pin]="62069",Kt[Xt.Pistol]="62364",Kt[Xt.PivotTable]="62070",Kt[Xt.Pivot]="62071",Kt[Xt.Play]="62072",Kt[Xt.Playbook]="62244",Kt[Xt.Plus]="62073",Kt[Xt.PolygonFilter]="62074",Kt[Xt.Power]="62075",Kt[Xt.PredictiveAnalysis]="62076",Kt[Xt.Prescription]="62077",Kt[Xt.Presentation]="62078",Kt[Xt.Print]="62079",Kt[Xt.Projects]="62080",Kt[Xt.Properties]="62081",Kt[Xt.Property]="62082",Kt[Xt.PublishFunction]="62083",Kt[Xt.Pulse]="62084",Kt[Xt.Rain]="62085",Kt[Xt.Random]="62086",Kt[Xt.RangeRing]="62321",Kt[Xt.Record]="62087",Kt[Xt.RectHeight]="62245",Kt[Xt.RectWidth]="62246",Kt[Xt.Rectangle]="62241",Kt[Xt.Redo]="62088",Kt[Xt.Refresh]="62089",Kt[Xt.Regex]="62255",Kt[Xt.RegressionChart]="62090",Kt[Xt.RemoveColumnLeft]="62091",Kt[Xt.RemoveColumnRight]="62092",Kt[Xt.RemoveColumn]="62093",Kt[Xt.RemoveRowBottom]="62094",Kt[Xt.RemoveRowTop]="62095",Kt[Xt.Remove]="62096",Kt[Xt.Repeat]="62097",Kt[Xt.Reset]="62098",Kt[Xt.Resolve]="62099",Kt[Xt.Rig]="62100",Kt[Xt.RightJoin]="62101",Kt[Xt.Ring]="62102",Kt[Xt.RocketSlant]="62103",Kt[Xt.Rocket]="62104",Kt[Xt.RootFolder]="62367",Kt[Xt.RotateCcw]="62345",Kt[Xt.RotateCw]="62344",Kt[Xt.RotateDocument]="62105",Kt[Xt.RotatePage]="62106",Kt[Xt.Route]="62107",Kt[Xt.RunHistory]="62355",Kt[Xt.Satellite]="62108",Kt[Xt.Saved]="62109",Kt[Xt.ScatterPlot]="62110",Kt[Xt.SearchAround]="62111",Kt[Xt.SearchTemplate]="62112",Kt[Xt.SearchText]="62113",Kt[Xt.Search]="62114",Kt[Xt.SegmentedControl]="62115",Kt[Xt.Select]="62116",Kt[Xt.SelectionBoxAdd]="62362",Kt[Xt.SelectionBoxEdit]="62363",Kt[Xt.SelectionBox]="62361",Kt[Xt.Selection]="62117",Kt[Xt.SendBackward]="62293",Kt[Xt.SendMessage]="62118",Kt[Xt.SendToGraph]="62119",Kt[Xt.SendToMap]="62120",Kt[Xt.SendTo]="62121",Kt[Xt.Sensor]="62268",Kt[Xt.SeriesAdd]="62122",Kt[Xt.SeriesConfiguration]="62123",Kt[Xt.SeriesDerived]="62124",Kt[Xt.SeriesFiltered]="62125",Kt[Xt.SeriesSearch]="62126",Kt[Xt.ServerInstall]="62327",Kt[Xt.Server]="62328",Kt[Xt.Settings]="62127",Kt[Xt.Shapes]="62128",Kt[Xt.Share]="62129",Kt[Xt.SharedFilter]="62130",Kt[Xt.Shield]="62131",Kt[Xt.Ship]="62132",Kt[Xt.Shop]="62133",Kt[Xt.ShoppingCart]="62134",Kt[Xt.ShortenText]="62271",Kt[Xt.SignalSearch]="62135",Kt[Xt.SimCard]="62136",Kt[Xt.Slash]="62137",Kt[Xt.SmallCross]="62138",Kt[Xt.SmallInfoSign]="62260",Kt[Xt.SmallMinus]="62139",Kt[Xt.SmallPlus]="62140",Kt[Xt.SmallSquare]="62141",Kt[Xt.SmallTick]="62142",Kt[Xt.Snowflake]="62143",Kt[Xt.SoccerBall]="62288",Kt[Xt.SocialMedia]="62144",Kt[Xt.SortAlphabeticalDesc]="62145",Kt[Xt.SortAlphabetical]="62146",Kt[Xt.SortAsc]="62147",Kt[Xt.SortDesc]="62148",Kt[Xt.SortNumericalDesc]="62149",Kt[Xt.SortNumerical]="62150",Kt[Xt.Sort]="62151",Kt[Xt.SpellCheck]="62272",Kt[Xt.SplitColumns]="62152",Kt[Xt.SportsStadium]="62289",Kt[Xt.Square]="62153",Kt[Xt.StackedChart]="62154",Kt[Xt.StadiumGeometry]="62155",Kt[Xt.StarEmpty]="62156",Kt[Xt.Star]="62157",Kt[Xt.StepBackward]="62158",Kt[Xt.StepChart]="62159",Kt[Xt.StepForward]="62160",Kt[Xt.Stop]="62161",Kt[Xt.Stopwatch]="62162",Kt[Xt.Strikethrough]="62163",Kt[Xt.Style]="62164",Kt[Xt.Subscript]="62265",Kt[Xt.SubtractRightJoin]="62354",Kt[Xt.Superscript]="62266",Kt[Xt.SwapHorizontal]="62165",Kt[Xt.SwapVertical]="62166",Kt[Xt.Sweep]="62372",Kt[Xt.Switch]="62167",Kt[Xt.SymbolCircle]="62168",Kt[Xt.SymbolCross]="62169",Kt[Xt.SymbolDiamond]="62170",Kt[Xt.SymbolRectangle]="62242",Kt[Xt.SymbolSquare]="62171",Kt[Xt.SymbolTriangleDown]="62172",Kt[Xt.SymbolTriangleUp]="62173",Kt[Xt.Syringe]="62174",Kt[Xt.TableSync]="62318",Kt[Xt.TagAdd]="62329",Kt[Xt.TagPromote]="62330",Kt[Xt.TagRefresh]="62331",Kt[Xt.TagUndo]="62332",Kt[Xt.Tag]="62175",Kt[Xt.Tags]="62333",Kt[Xt.TakeAction]="62176",Kt[Xt.Tank]="62177",Kt[Xt.Target]="62178",Kt[Xt.Taxi]="62179",Kt[Xt.Team]="62290",Kt[Xt.Temperature]="62180",Kt[Xt.TextHighlight]="62181",Kt[Xt.ThAdd]="62346",Kt[Xt.ThDerived]="62182",Kt[Xt.ThDisconnect]="62183",Kt[Xt.ThFiltered]="62184",Kt[Xt.ThListAdd]="62347",Kt[Xt.ThList]="62185",Kt[Xt.ThVirtualAdd]="62349",Kt[Xt.ThVirtual]="62348",Kt[Xt.Th]="62186",Kt[Xt.ThirdParty]="62187",Kt[Xt.ThumbsDown]="62188",Kt[Xt.ThumbsUp]="62189",Kt[Xt.TickCircle]="62190",Kt[Xt.Tick]="62191",Kt[Xt.Time]="62192",Kt[Xt.TimelineAreaChart]="62193",Kt[Xt.TimelineBarChart]="62194",Kt[Xt.TimelineEvents]="62195",Kt[Xt.TimelineLineChart]="62196",Kt[Xt.Tint]="62197",Kt[Xt.Torch]="62198",Kt[Xt.Tractor]="62199",Kt[Xt.Train]="62200",Kt[Xt.Translate]="62201",Kt[Xt.Trash]="62202",Kt[Xt.Tree]="62203",Kt[Xt.TrendingDown]="62204",Kt[Xt.TrendingUp]="62205",Kt[Xt.Trophy]="62287",Kt[Xt.Truck]="62206",Kt[Xt.TwoColumns]="62207",Kt[Xt.Unarchive]="62208",Kt[Xt.Underline]="62209",Kt[Xt.Undo]="62210",Kt[Xt.UngroupObjects]="62211",Kt[Xt.UnknownVehicle]="62212",Kt[Xt.Unlink]="62277",Kt[Xt.Unlock]="62213",Kt[Xt.Unpin]="62214",Kt[Xt.Unresolve]="62215",Kt[Xt.Updated]="62216",Kt[Xt.Upload]="62217",Kt[Xt.User]="62218",Kt[Xt.Variable]="62219",Kt[Xt.Vector]="62302",Kt[Xt.VerticalBarChartAsc]="62220",Kt[Xt.VerticalBarChartDesc]="62221",Kt[Xt.VerticalDistribution]="62222",Kt[Xt.VerticalInbetween]="62250",Kt[Xt.Video]="62223",Kt[Xt.Virus]="62224",Kt[Xt.VolumeDown]="62225",Kt[Xt.VolumeOff]="62226",Kt[Xt.VolumeUp]="62227",Kt[Xt.Walk]="62228",Kt[Xt.WarningSign]="62229",Kt[Xt.WaterfallChart]="62230",Kt[Xt.Waves]="62231",Kt[Xt.WidgetButton]="62232",Kt[Xt.WidgetFooter]="62233",Kt[Xt.WidgetHeader]="62234",Kt[Xt.Widget]="62235",Kt[Xt.Wind]="62236",Kt[Xt.WrenchRedo]="62334",Kt[Xt.WrenchSnooze]="62335",Kt[Xt.WrenchTime]="62336",Kt[Xt.Wrench]="62237",Kt[Xt.ZoomIn]="62238",Kt[Xt.ZoomOut]="62239",Kt[Xt.ZoomToFit]="62240";var nfe={},ife={};for(var vN=0,HX=Object.values(Xt);vN<HX.length;vN++){var dP=HX[vN];nfe[oEe(dP)]=dP,ife[lEe(dP).toUpperCase()]=dP}var Si=Gn(Gn({},nfe),ife),fEe=new Set(Object.values(Si));function hEe(t){return typeof NODE_ENV<"u"&&NODE_ENV===t}function dEe(t,e){return d2(this,void 0,void 0,function(){var r,n,a;return g2(this,function(c){switch(c.label){case 0:return r=hEe("development")&&typeof performance<"u",r&&(n=performance.now(),console.info("Started '".concat(t,"'..."))),[4,e()];case 1:return c.sent(),r&&(a=Math.round(performance.now()-n),console.info("Finished '".concat(t,"' in ").concat(a,"ms"))),[2]}})})}function gEe(t){return d2(this,void 0,void 0,function(){var e,r;return g2(this,function(n){switch(n.label){case 0:return e=t.loader,r=e===void 0?Xw.defaultLoader:e,typeof r!="function"?[3,1]:[2,r];case 1:return r!=="all"?[3,3]:[4,UX(()=>import("./allPathsLoader-62UMr_jj.js"),[])];case 2:return[2,n.sent().allPathsLoader];case 3:return[4,UX(()=>import("./splitPathsBySizeLoader-bCoYiAtQ.js"),[])];case 4:return[2,n.sent().splitPathsBySizeLoader]}})})}var q_=function(){function t(){this.defaultLoader="split-by-size",this.loadedIconPaths16=new Map,this.loadedIconPaths20=new Map}return t.setLoaderOptions=function(e){e.loader!==void 0&&(Xw.defaultLoader=e.loader)},t.load=function(e,r,n){return d2(this,void 0,void 0,function(){var a=this;return g2(this,function(c){switch(c.label){case 0:return Array.isArray(e)||(e=[e]),[4,Promise.all(e.map(function(s){return a.loadImpl(s,r,n)}))];case 1:return c.sent(),[2]}})})},t.loadAll=function(e){return d2(this,void 0,void 0,function(){var r,n=this;return g2(this,function(a){return r=Object.values(Si),dEe("[Blueprint] loading all icons",function(){return d2(n,void 0,void 0,function(){return g2(this,function(c){switch(c.label){case 0:return[4,Promise.all([this.load(r,ga.STANDARD,e),this.load(r,ga.LARGE,e)])];case 1:return c.sent(),[2]}})})}),[2]})})},t.getPaths=function(e,r){if(this.isValidIconName(e)){var n=r<ga.LARGE?Xw.loadedIconPaths16:Xw.loadedIconPaths20;return n.get(e)}},t.loadImpl=function(e,r,n){return n===void 0&&(n={}),d2(this,void 0,void 0,function(){var a,c,s,h,i;return g2(this,function(l){switch(l.label){case 0:return this.isValidIconName(e)?(a=r<ga.LARGE?Xw.loadedIconPaths16:Xw.loadedIconPaths20,a.has(e)?[2]:[4,gEe(n)]):(console.error("[Blueprint] Unknown icon '".concat(e,"'")),[2]);case 1:c=l.sent(),l.label=2;case 2:return l.trys.push([2,4,,5]),s=r<ga.LARGE?ga.STANDARD:ga.LARGE,[4,c(e,s)];case 3:return h=l.sent(),a.set(e,h),[3,5];case 4:return i=l.sent(),console.error("[Blueprint] Unable to load ".concat(r,"px icon '").concat(e,"'"),i),[3,5];case 5:return[2]}})})},t.isValidIconName=function(e){return fEe.has(e)},t}(),Xw=new q_,vEe="bp5",jX="".concat(vEe,"-icon"),VX=new Map;function pEe(t){var e,r=(e=VX.get(t))!==null&&e!==void 0?e:0;return VX.set(t,r+1),"".concat(t,"-").concat(r)}var Ic=mt.forwardRef(function(t,e){var r=t.children,n=t.className,a=t.color,c=t.htmlTitle,s=t.iconName,h=t.size,i=h===void 0?ga.STANDARD:h,l=t.svgProps,d=t.tagName,o=d===void 0?"span":d,f=t.title,A=ys(t,["children","className","color","htmlTitle","iconName","size","svgProps","tagName","title"]),w=i>=ga.LARGE,I=w?ga.LARGE:ga.STANDARD,m="0 0 ".concat(I," ").concat(I),u=pEe("iconTitle"),g=Gn({fill:a,height:i,role:"img",viewBox:m,width:i},l);return o===null?mt.createElement("svg",Gn({"aria-labelledby":f?u:void 0,"data-icon":s,ref:e},g,A,{className:Ti(n,l==null?void 0:l.className)}),f&&mt.createElement("title",{id:u},f),r):mt.createElement(o,Gn(Gn({"aria-hidden":f?void 0:!0},A),{className:Ti(jX,"".concat(jX,"-").concat(s),n),ref:e,title:c}),mt.createElement("svg",Gn({"data-icon":s},g,{className:l==null?void 0:l.className}),f&&mt.createElement("title",null,f),r))});Ic.displayName="Blueprint5.SVGIconContainer";var nV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-down",ref:e},t),mt.createElement("path",{d:r?"M320 180C314 180 310 178 306 174L220 88V360C220 370 212 380 200 380S180 370 180 360V88L94 174C90 178 86 180 80 180C70 180 60 172 60 160C60 154 62 150 66 146L186 26C190 22 194 20 200 20S210 22 214 26L334 146C338 150 340 154 340 160C340 172 330 180 320 180L320 180z":"M260 160C254 160 250 158 246 154L180 88V280C180 290 172 300 160 300S140 290 140 280V88L74 154C70 158 66 160 60 160C50 160 40 150 40 140C40 134 42 130 46 126L146 26C150 22 154 20 160 20S170 22 174 26L274 126C278 130 280 134 280 140C280 152 272 160 260 160L260 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});nV.defaultProps={size:ga.STANDARD};nV.displayName="Blueprint5.Icon.ArrowDown";var iV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-left",ref:e},t),mt.createElement("path",{d:r?"M360 220H88.2L174 305.8C177.8 309.4 180 314.4 180 320C180 331 171 340 160 340C154.4 340 149.4 337.8 145.8 334.2L25.8 214.2C22.2 210.6 20 205.6 20 200C20 194.4 22.2 189.4 25.8 185.8L145.8 65.8C149.4 62.2 154.4 60 160 60C171 60 180 69 180 80C180 85.6 177.8 90.6 174.2 94.2000000000001L88.2 180H360C371 180 380 189 380 200C380 211 371 220 360 220z":"M279.8 180.2H88.2L154 246C157.6 249.6 159.8 254.6 159.8 260.2C159.8 271.2 150.8 280.2 139.8 280.2C134.2 280.2 129.2 278 125.6 274.4L25.6 174.4C22 170.6 19.8 165.6 19.8 160.2S22 149.6 25.6 146L125.6 46C129.2 42.4 134.2 40.2 139.8 40.2C150.8 40.2 159.8 49.2 159.8 60.2000000000001C159.8 65.8 157.6 70.8 154 74.4L88.2 140.2H280C291 140.2 300 149.2 300 160.2S290.8 180.2 279.8 180.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});iV.defaultProps={size:ga.STANDARD};iV.displayName="Blueprint5.Icon.ArrowLeft";var aV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-right",ref:e},t),mt.createElement("path",{d:r?"M374.2000000000001 214.2L254.2 334.2000000000001C250.6 337.8 245.6 340 240 340C229 340 220 331 220 320C220 314.4 222.2 309.4 225.8 305.8L311.8 220H40C29 220 20 211 20 200C20 189 29 180 40 180H311.8L226 94.2000000000001C222.2 90.6 220 85.6 220 80C220 69 229 60 240 60C245.6 60 250.6 62.2 254.2 65.8L374.2000000000001 185.8C377.8 189.4 380 194.4 380 200C380 205.6 377.8 210.6 374.2000000000001 214.2z":"M294 174.2L194 274.2C190.4 278 185.4 280.2 179.8 280.2C168.8 280.2 159.8 271.2 159.8 260.2C159.8 254.6 162 249.6 165.6 246L231.4 180.2H39.8C28.8 180.2 19.8 171.2 19.8 160.2S28.8 140.2 39.8 140.2H231.6L165.8 74.4C162.2 70.8 160 65.8 160 60.1999999999999C160 49.1999999999999 169 40.1999999999999 180 40.1999999999999C185.6 40.1999999999999 190.6 42.4 194.2 45.9999999999999L294.2000000000001 146C297.8 149.5999999999999 300 154.5999999999999 300 160.1999999999999S297.6 170.6 294 174.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});aV.defaultProps={size:ga.STANDARD};aV.displayName="Blueprint5.Icon.ArrowRight";var oV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-up",ref:e},t),mt.createElement("path",{d:r?"M334 254L214 374C210 378 206 380 200 380S190 378 186 374L66 254C62 250 60 246 60 240C60 228 70 220 80 220C86 220 90 222 94 226L180 312V40C180 30 188 20 200 20S220 30 220 40V312L306 226C310 222 314 220 320 220C330 220 340 228 340 240C340 246 338 250 334 254L334 254z":"M274 194L174 294C170 298 166 300 160 300S150 298 146 294L46 194C42 190 40 186 40 180C40 168 50 160 60 160C66 160 70 162 74 166L140 232V40C140 28 148 20 160 20S180 28 180 40V232L246 166C250 162 254 160 260 160C272 160 280 168 280 180C280 186 278 190 274 194L274 194z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});oV.defaultProps={size:ga.STANDARD};oV.displayName="Blueprint5.Icon.ArrowUp";var sV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"caret-right",ref:e},t),mt.createElement("path",{d:r?"M280 200C280 206.2 277 211.4 272.6 215.2L272.8 215.4L152.8 315.4L152.6 315.2C149.2 318 144.8 320 140 320C129 320 120 311 120 300V100C120 89 129 80 140 80C144.8 80 149.2 82 152.6 84.8L152.8 84.6L272.8 184.6L272.6 184.8C277 188.6 280 193.8 280 200z":"M220 160C220 163 218.6 165.6 216.6 167.4L216.6 167.4L136.6 237.4L136.6 237.4C134.8 239 132.6 240 130 240C124.4 240 120 235.6 120 230V90C120 84.4 124.4 80 130 80C132.6 80 134.8 81 136.6 82.6C136.6 82.6 136.6 82.6 136.6 82.6L216.6 152.6L216.6 152.6C218.6 154.4 220 157 220 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});sV.defaultProps={size:ga.STANDARD};sV.displayName="Blueprint5.Icon.CaretRight";var AD=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"cross",ref:e},t),mt.createElement("path",{d:r?"M228.2 200L314 285.8C317.8 289.4 320 294.4 320 300C320 311 311 320 300 320C294.4000000000001 320 289.4000000000001 317.8 285.8 314.2L200 228.2L114.2 314.2C110.6 317.8 105.6 320 100 320C89 320 80 311 80 300C80 294.4 82.2 289.4 85.8 285.8L171.8 200L86 114.2000000000001C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L200 171.8L285.8 86C289.4000000000001 82.2 294.4000000000001 80 300 80C311 80 320 89 320 100C320 105.6 317.8 110.6 314.2000000000001 114.2000000000001L228.2 200z":"M188.2 160L254 225.8C257.8 229.4 260 234.4 260 240C260 251 251 260 240 260C234.4 260 229.4 257.8 225.8 254.2L160 188.2L94.2 254.2C90.6 257.8 85.6 260 80 260C69 260 60 251 60 240C60 234.4 62.2 229.4 65.8 225.8L131.8 160L66 94.2C62.2 90.6 60 85.6 60 80C60 69 69 60 80 60C85.6 60 90.6 62.2 94.2 65.8L160 131.8L225.8 66C229.4 62.2 234.4 60 240 60C251 60 260 69 260 80C260 85.6 257.8 90.6 254.2 94.2L188.2 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});AD.defaultProps={size:ga.STANDARD};AD.displayName="Blueprint5.Icon.Cross";var lV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"drag-handle-vertical",ref:e},t),mt.createElement("path",{d:r?"M150 280C133.4 280 120 266.6 120 250S133.4 220 150 220S180 233.4 180 250S166.6 280 150 280zM150 180C133.4 180 120 166.6 120 150S133.4 120 150 120S180 133.4 180 150S166.6 180 150 180zM150 80C133.4 80 120 66.6 120 50S133.4 20 150 20S180 33.4 180 50S166.6 80 150 80zM250 320C266.6 320 280 333.4 280 350S266.6 380 250 380S220 366.6 220 350S233.4 320 250 320zM150 380C133.4 380 120 366.6 120 350S133.4 320 150 320S180 333.4 180 350S166.6 380 150 380zM250 180C233.4 180 220 166.6 220 150S233.4 120 250 120S280 133.4 280 150S266.6 180 250 180zM250 80C233.4 80 220 66.6 220 50S233.4 20 250 20S280 33.4 280 50S266.6 80 250 80zM250 280C233.4 280 220 266.6 220 250S233.4 220 250 220S280 233.4 280 250S266.6 280 250 280z":"M120 140C109 140 100 131 100 120C100 109 109 100 120 100S140 109 140 120C140 131 131 140 120 140zM200 260C211 260 220 269 220 280C220 291 211 300 200 300S180 291 180 280C180 269 189 260 200 260zM120 60C109 60 100 51 100 40C100 29 109 20 120 20S140 29 140 40C140 51 131 60 120 60zM120 220C109 220 100 211 100 200C100 189 109 180 120 180S140 189 140 200C140 211 131 220 120 220zM120 300C109 300 100 291 100 280C100 269 109 260 120 260S140 269 140 280C140 291 131 300 120 300zM200 140C189 140 180 131 180 120C180 109 189 100 200 100S220 109 220 120C220 131 211 140 200 140zM200 220C189 220 180 211 180 200C180 189 189 180 200 180S220 189 220 200C220 211 211 220 200 220zM200 60C189 60 180 51 180 40C180 29 189 20 200 20S220 29 220 40C220 51 211 60 200 60z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});lV.defaultProps={size:ga.STANDARD};lV.displayName="Blueprint5.Icon.DragHandleVertical";var uV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"error",ref:e},t),mt.createElement("path",{d:r?"M200 400C89.6 400 0 310.4 0 200C0 89.6 89.6 0 200 0S400 89.6 400 200C400 310.4 310.4 400 200 400zM220 80H180V120H220V80zM220 140H180V320H220V140z":"M159.8 320.2C71.4 320.2 -0.2 248.6 -0.2 160.2S71.4 0.2 159.8 0.2S319.8 71.8 319.8 160.2S248.2 320.2 159.8 320.2zM179.8 60.2H139.8V100.2H179.8V60.2zM179.8 120.2H139.8V260.2H179.8V120.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});uV.defaultProps={size:ga.STANDARD};uV.displayName="Blueprint5.Icon.Error";var cV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"info-sign",ref:e},t),mt.createElement("path",{d:r?"M200 400C89.6 400 0 310.4 0 200C0 89.6 89.6 0 200 0S400 89.6 400 200C400 310.4 310.4 400 200 400zM180 320H220V280H180V320zM260 80H140V100H180V240H160V260H220V100H260V80z":"M160 320C71.6 320 0 248.4 0 160S71.6 0 160 0S320 71.6 320 160S248.4 320 160 320zM140 260H180V220H140V260zM200 60H120V80H140V180H120V200H180V80H200V60z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});cV.defaultProps={size:ga.STANDARD};cV.displayName="Blueprint5.Icon.InfoSign";var OL=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-command",ref:e},t),mt.createElement("path",{d:r?"M310 160H280V240H310C348.6 240 380 271.4 380 310S348.6 380 310 380S240 348.6 240 310V280H160V310C160 348.6 128.6 380 90 380S20 348.6 20 310S51.4 240 90 240H120V160H90C51.4 160 20 128.6 20 90S51.4 20 90 20S160 51.4 160 90V120H240V90C240 51.4 271.4 20 310 20S380 51.4 380 90S348.6 160 310 160zM310 340C326.6 340 340 326.6 340 310S326.6 280 310 280S280 293.4 280 310S293.4 340 310 340zM90 60C73.4 60 60 73.4 60 90S73.4 120 90 120S120 106.6 120 90S106.6 60 90 60zM90 280C73.4 280 60 293.4 60 310S73.4 340 90 340S120 326.6 120 310S106.6 280 90 280zM240 160H160V240H240V160zM310 60C293.4 60 280 73.4 280 90S293.4 120 310 120S340 106.6 340 90S326.6 60 310 60z":"M240 140H220V180H240C273.2 180 300 206.8 300 240S273.2 300 240 300S180 273.2 180 240V220H140V240C140 273.2 113.2 300 80 300S20 273.2 20 240S46.8 180 80 180H100V140H80C46.8 140 20 113.2 20 80S46.8 20 80 20S140 46.8 140 80V100H180V80C180 46.8 206.8 20 240 20S300 46.8 300 80S273.2 140 240 140zM240 260C251 260 260 251 260 240C260 229 251 220 240 220S220 229 220 240C220 251 229 260 240 260zM80 60C69 60 60 69 60 80C60 91 69 100 80 100S100 91 100 80C100 69 91 60 80 60zM80 220C69 220 60 229 60 240C60 251 69 260 80 260S100 251 100 240C100 229 91 220 80 220zM180 140H140V180H180V140zM240 60C229 60 220 69 220 80C220 91 229 100 240 100S260 91 260 80C260 69 251 60 240 60z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});OL.defaultProps={size:ga.STANDARD};OL.displayName="Blueprint5.Icon.KeyCommand";var fV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-control",ref:e},t),mt.createElement("path",{d:r?"M334.2000000000001 254.2L214.2 374.2C210.6 377.8 205.6 380 200 380S189.4 377.8 185.8 374.2L65.8 254.2C62.2 250.6 60 245.6 60 240C60 229 69 220 80 220C85.6 220 90.6 222.2 94.2 225.8L200 331.8L305.8 226C309.4000000000001 222.2 314.4000000000001 220 320 220C331 220 340 229 340 240C340 245.6 337.8 250.6 334.2000000000001 254.2z":"M254.2 214.2L174.2 294.2C170.6 297.8 165.6 300 160 300S149.4 297.8 145.8 294.2L65.8 214.2C62.2 210.6 60 205.6 60 200C60 189 69 180 80 180C85.6 180 90.6 182.2 94.2 185.8L160 251.8L225.8 186C229.4 182.2 234.4 180 240 180C251 180 260 189 260 200C260 205.6 257.8 210.6 254.2 214.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});fV.defaultProps={size:ga.STANDARD};fV.displayName="Blueprint5.Icon.KeyControl";var hV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-delete",ref:e},t),mt.createElement("path",{d:r?"M394.2000000000001 214.2L274.2000000000001 334.2000000000001C270.6 337.8 265.6 340 260 340H20C9 340 0 331 0 320V80C0 69 9 60 20 60H260C265.6 60 270.6 62.2 274.2000000000001 65.8L394.2000000000001 185.8C397.8 189.4 400 194.4 400 200C400 205.6 397.8 210.6 394.2000000000001 214.2zM214.2 154.2C217.8 150.6 220 145.6 220 140C220 129 211 120 200 120C194.4 120 189.4 122.2 185.8 125.8L140 171.8L94.2 126C90.6 122.2 85.6 120 80 120C69 120 60 129 60 140C60 145.6 62.2 150.6 65.8 154.2L111.8 200L65.8 245.8C62.2 249.4 60 254.4 60 260C60 271 69 280 80 280C85.6 280 90.6 277.8 94.2 274.2L140 228.2L185.8 274C189.4 277.8 194.4 280 200 280C211 280 220 271 220 260C220 254.4 217.8 249.4 214.2 245.8L168.2 200L214.2 154.2z":"M314.2000000000001 174.2L214.2 274.2C210.6 277.8 205.6 280 200 280H20C9 280 0 271 0 260V60C0 49 9 40 20 40H200C205.6 40 210.6 42.2 214.2 45.8L314.2000000000001 145.8C317.8 149.4 320 154.4 320 160C320 165.6 317.8 170.6 314.2000000000001 174.2zM174.2 134.2C177.8 130.6 180 125.6 180 120C180 109 171 100 160 100C154.4 100 149.4 102.2 145.8 105.8L120 131.8L94.2 106C90.6 102.2 85.6 100 80 100C69 100 60 109 60 120C60 125.6 62.2 130.6 65.8 134.2L91.8 160L65.8 185.8C62.2 189.4 60 194.4 60 200C60 211 69 220 80 220C85.6 220 90.6 217.8 94.2 214.2L120 188.2L145.8 214C149.4 217.8 154.4 220 160 220C171 220 180 211 180 200C180 194.4 177.8 189.4 174.2 185.8L148.2 160L174.2 134.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});hV.defaultProps={size:ga.STANDARD};hV.displayName="Blueprint5.Icon.KeyDelete";var dV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-enter",ref:e},t),mt.createElement("path",{d:r?"M360 360C349 360 340 351 340 340V240C340 195.8 304.2000000000001 160 260 160H88.2L134 205.8C137.8 209.4 140 214.4 140 220C140 231 131 240 120 240C114.4 240 109.4 237.8 105.8 234.2L25.8 154.2C22.2 150.6 20 145.6 20 140C20 134.4 22.2 129.4 25.8 125.8L105.8 45.8C109.4 42.2 114.4 40 120 40C131 40 140 49 140 60C140 65.6 137.8 70.6 134.2 74.2000000000001L88.2 120H260C326.2 120 380 173.8 380 240V340C380 351 371 360 360 360z":"M280 280C269 280 260 271 260 260V200C260 166.8 233.2 140 200 140H88.2L114 165.8C117.8 169.4 120 174.4 120 180C120 191 111 200 100 200C94.4 200 89.4 197.8 85.8 194.2L25.8 134.2C22.2 130.6 20 125.6 20 120C20 114.4 22.2 109.4 25.8 105.8L85.8 45.8C89.4 42.2 94.4 40 100 40C111 40 120 49 120 60C120 65.6 117.8 70.6 114.2 74.2L88.2 100H200C255.2 100 300 144.8 300 200V260C300 271 291 280 280 280z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});dV.defaultProps={size:ga.STANDARD};dV.displayName="Blueprint5.Icon.KeyEnter";var gV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-option",ref:e},t),mt.createElement("path",{d:r?"M260 320H380C391 320 400 329 400 340C400 351 391 360 380 360H260C249 360 240 351 240 340C240 329 249 320 260 320zM380 80H291.6L137.4 350L137 349.8C133.6 355.8 127.4 360 120 360H20C9 360 0 351 0 340C0 329 9 320 20 320H108.4L262.6 50L262.8 50.2C266.4 44.2 272.6 40 280 40H380C391 40 400 49 400 60C400 71 391 80 380 80z":"M220 240H300C311 240 320 249 320 260C320 271 311 280 300 280H220C209 280 200 271 200 260C200 249 209 240 220 240zM300 80H231.4L117.2 270.2L116.8 270.2C113.4 276 107.2 280 100 280H20C9 280 0 271 0 260C0 249 9 240 20 240H88.6L202.8 49.8L203 50C206.6 44 212.8 40 220 40H300C311 40 320 49 320 60C320 71 311 80 300 80z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});gV.defaultProps={size:ga.STANDARD};gV.displayName="Blueprint5.Icon.KeyOption";var vV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-shift",ref:e},t),mt.createElement("path",{d:r?"M354.8 193L354.8 193L215 353.2L214.8 353C211.2 357.2 206 360 200 360S188.8 357.2 185.2 353L185 353.2L45 193.2L45.2 193C42 189.6 40 185 40 180C40 169 49 160 60 160H120V60C120 49 129 40 140 40H260C271 40 280 49 280 60V160H340C351 160 360 169 360 180C360 185 358 189.6 354.8 193z":"M274.2000000000001 174.2L174.2 274.2C170.6 277.8 165.6 280 160 280S149.4 277.8 145.8 274.2L45.8 174.2C42.2 170.6 40 165.6 40 160C40 149 49 140 60 140H100V60C100 49 109 40 120 40H200C211 40 220 49 220 60V140H260C271 140 280 149 280 160C280 165.6 277.8 170.6 274.2000000000001 174.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});vV.defaultProps={size:ga.STANDARD};vV.displayName="Blueprint5.Icon.KeyShift";var DL=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"more",ref:e},t),mt.createElement("path",{d:r?"M20 190A50 50 0 0 1 120 190A50 50 0 0 1 20 190M300 190A50 50 0 0 1 400 190A50 50 0 0 1 300 190M160 190A50 50 0 0 1 260 190A50 50 0 0 1 160 190":"M0 159.4A40 40 0 0 1 80 159.4A40 40 0 0 1 0 159.4M240 159.4A40 40 0 0 1 320 159.4A40 40 0 0 1 240 159.4M120 159.4A40 40 0 0 1 200 159.4A40 40 0 0 1 120 159.4",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});DL.defaultProps={size:ga.STANDARD};DL.displayName="Blueprint5.Icon.More";var pV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"search",ref:e},t),mt.createElement("path",{d:r?"M391.2 51.2L292.4 150C309.8 175.8 320 206.6 320 240C320 328.4 248.4 400 160 400S0 328.4 0 240S71.6 80 160 80C193.4 80 224.2 90.2 250 107.6L348.8 8.8C354.2000000000001 3.4 361.8 0 370 0C386.6 0 400 13.4 400 30C400 38.2 396.6 45.8 391.2 51.2zM160 120C93.8 120 40 173.8 40 240S93.8 360 160 360S280 306.2000000000001 280 240S226.2 120 160 120z":"M311 51.4L257.6 105C271.6 126.8 279.8 152.6 279.8 180.2C279.8 257.6 217.2 320.2 139.8 320.2S-0.2 257.6 -0.2 180.2S62.4 40.2 139.8 40.2C167.6 40.2 193.4 48.6 215 62.4L268.6 9C274 3.6 281.6 0.2 289.8 0.2C306.4 0.2 319.8 13.6 319.8 30.2C319.8 38.4 316.4 46 311 51.4zM139.8 80.2C84.6 80.2 39.8 125 39.8 180.2S84.6 280.2 139.8 280.2S239.8 235.4 239.8 180.2S195 80.2 139.8 80.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});pV.defaultProps={size:ga.STANDARD};pV.displayName="Blueprint5.Icon.Search";var CD=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"small-cross",ref:e},t),mt.createElement("path",{d:r?"M228.2 200L294 265.8C297.8 269.4 300 274.4 300 280C300 291 291 300 280 300C274.4000000000001 300 269.4000000000001 297.8 265.8 294.2L200 228.2L134.2 294.2C130.6 297.8 125.6 300 120 300C109 300 100 291 100 280C100 274.4 102.2 269.4 105.8 265.8L171.8 200L106 134.2000000000001C102.2 130.6 100 125.6 100 120C100 109 109 100 120 100C125.6 100 130.6 102.2 134.2 105.8L200 171.8L265.8 106C269.4000000000001 102.2 274.4000000000001 100 280 100C291 100 300 109 300 120C300 125.6 297.8 130.6 294.2000000000001 134.2000000000001L228.2 200z":"M188.2 160L234 205.8C237.8 209.4 240 214.4 240 220C240 231 231 240 220 240C214.4 240 209.4 237.8 205.8 234.2L160 188.2L114.2 234.2C110.6 237.8 105.6 240 100 240C89 240 80 231 80 220C80 214.4 82.2 209.4 85.8 205.8L131.8 160L86 114.2C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L160 131.8L205.8 86C209.4 82.2 214.4 80 220 80C231 80 240 89 240 100C240 105.6 237.8 110.6 234.2 114.2L188.2 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});CD.defaultProps={size:ga.STANDARD};CD.displayName="Blueprint5.Icon.SmallCross";var mV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"small-tick",ref:e},t),mt.createElement("path",{d:r?"M300 300C294.4000000000001 300 289.4000000000001 297.8 285.8 294.2L160 168.2L114.2 214.2C110.6 217.8 105.6 220 100 220C89 220 80 211 80 200C80 194.4 82.2 189.4 85.8 185.8L145.8 125.8C149.4 122.2 154.4 120 160 120S170.6 122.2 174.2 125.8L314.2000000000001 265.8C317.8 269.4 320 274.4 320 280C320 291 311 300 300 300z":"M240 220C234.4 220 229.4 217.8 225.8 214.2L140 128.2L94.2 174.2C90.6 177.8 85.6 180 80 180C69 180 60 171 60 160C60 154.4 62.2 149.4 65.8 145.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L254.2 185.8C257.8 189.4 260 194.4 260 200C260 211 251 220 240 220z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});mV.defaultProps={size:ga.STANDARD};mV.displayName="Blueprint5.Icon.SmallTick";var yV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"tick",ref:e},t),mt.createElement("path",{d:r?"M340 320C334.4 320 329.4 317.8 325.8 314.2L140 128.2L74.2 194C70.6 197.8 65.6 200 60 200C49 200 40 191 40 180C40 174.4 42.2 169.4 45.8 165.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L354.2000000000001 285.8C357.8 289.4 360 294.4 360 300C360 311 351 320 340 320z":"M280 260C274.4000000000001 260 269.4000000000001 257.8 265.8 254.2L120 108.2L54.2 174.2C50.6 177.8 45.6 180 40 180C29 180 20 171 20 160C20 154.4 22.2 149.4 25.8 145.8L105.8 65.8C109.4 62.2 114.4 60 120 60S130.6 62.2 134.2 65.8L294.2000000000001 225.8C297.8 229.4 300 234.4 300 240C300 251 291 260 280 260z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});yV.defaultProps={size:ga.STANDARD};yV.displayName="Blueprint5.Icon.Tick";var AV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"warning-sign",ref:e},t),mt.createElement("path",{d:r?"M397.2 49.6C397.2 49.6 397.4000000000001 49.8000000000001 397.4000000000001 49.8000000000001L217.4 369.8000000000001C217.4 369.8000000000001 217.2 369.6 217.2 369.6C213.8 375.8 207.4 380 200 380S186.2 375.8 182.8 369.6L182.6 369.8L2.6 49.8L2.8 49.5999999999999C1.2 46.8 0 43.6 0 40C0 29 9 20 20 20H380C391 20 400 29 400 40C400 43.6 398.8 46.8 397.2 49.6zM220 60H180V100H220V60zM220 120H180V280H220V120z":"M316.8 50L317 50.2L177 290.2L176.8 290C173.4 296 167.2 300 159.8 300S146.4 296 142.8 290C142.8 290 142.6 290.2 142.6 290.2L2.6 50.2L2.8 50C1 47 -0.2 43.8 -0.2 40C-0.2 29 8.8 20 19.8 20H299.8C310.8 20 319.8 29 319.8 40C319.8 43.8 318.6 47 316.8 50zM179.8 60.2H139.8V100.2H179.8V60.2zM179.8 120.2H139.8V220.2H179.8V120.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});AV.defaultProps={size:ga.STANDARD};AV.displayName="Blueprint5.Icon.WarningSign";var _s=mt.forwardRef(function(t,e){var r,n,a=t.autoLoad,c=a===void 0?!0:a,s=t.className,h=t.color,i=t.icon,l=t.intent,d=t.tagName,o=d===void 0?"span":d,f=t.svgProps,A=t.title,w=t.htmlTitle,I=ys(t,["autoLoad","className","color","icon","intent","tagName","svgProps","title","htmlTitle"]),m=(n=(r=t.iconSize)!==null&&r!==void 0?r:t.size)!==null&&n!==void 0?n:ga.STANDARD,u=mt.useState(function(){return typeof i=="string"?q_.getPaths(i,m):void 0}),g=u[0],v=u[1];if(mt.useEffect(function(){var y=!1;if(typeof i=="string"){var x=q_.getPaths(i,m);x!==void 0?v(x):c?q_.load(i,m).then(function(){y||v(q_.getPaths(i,m))}).catch(function(T){console.error("[Blueprint] Icon '".concat(i,"' (").concat(m,"px) could not be loaded."),T)}):console.error("[Blueprint] Icon '".concat(i,"' (").concat(m,"px) is not loaded yet and autoLoad={false}, did you call Icons.load('").concat(i,"', ").concat(m,")?"))}return function(){y=!0}},[c,i,m]),i==null||typeof i=="boolean")return null;if(typeof i!="string")return i;if(g==null){var p=m===ga.STANDARD?K_e:m===ga.LARGE?Q_e:void 0;return mt.createElement(o||"span",Gn(Gn({"aria-hidden":A?void 0:!0},KC(I)),{className:Ti(Qj,p,J_e(i),Yh(l),s),"data-icon":i,ref:e,title:w}))}else{var C=g.map(function(y,x){return mt.createElement("path",{d:y,key:x,fillRule:"evenodd"})});return mt.createElement(Ic,Gn({children:C,className:Ti(Yh(l),s),color:h,htmlTitle:w,iconName:i,ref:e,size:m,svgProps:f,tagName:o,title:A},KC(I)))}});_s.displayName="".concat(Eo,".Icon");var Nb;(function(t){t[t.SMALL=20]="SMALL",t[t.STANDARD=50]="STANDARD",t[t.LARGE=100]="LARGE"})(Nb||(Nb={}));var XA=45,GX="M 50,50 m 0,-".concat(XA," a ").concat(XA,",").concat(XA," 0 1 1 0,").concat(XA*2," a ").concat(XA,",").concat(XA," 0 1 1 0,-").concat(XA*2),T_=280,mEe=10,yEe=4,AEe=16,CV=function(t){var e,r=t.className,n=r===void 0?"":r,a=t.intent,c=t.value,s=t.tagName,h=s===void 0?"div":s,i=t.size,l=ys(t,["className","intent","value","tagName","size"]);rV(function(){var w=i!=null,I=n.indexOf(RL)>=0||n.indexOf(sT)>=0;w&&I&&console.warn(zSe)},[n,i]);var d=CEe(i,n),o=Math.min(AEe,yEe*Nb.LARGE/d),f=T_-T_*(c==null?.25:XT(c,0,1)),A=Ti(vD,Yh(a),(e={},e[$_e]=c!=null,e),n);return mt.createElement(h,Gn({"aria-label":"loading","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c===void 0?void 0:c*100,className:A,role:"progressbar"},l),mt.createElement(h,{className:z_e},mt.createElement("svg",{width:d,height:d,strokeWidth:o.toFixed(2),viewBox:IEe(o)},mt.createElement("path",{className:U_e,d:GX}),mt.createElement("path",{className:B_e,d:GX,pathLength:T_,strokeDasharray:"".concat(T_," ").concat(T_),strokeDashoffset:f}))))};CV.displayName="".concat(Eo,".Spinner");var CEe=function(t,e){return t==null?e.indexOf(RL)>=0?Nb.SMALL:e.indexOf(sT)>=0?Nb.LARGE:Nb.STANDARD:Math.max(mEe,t)},IEe=function(t){var e=XA+t/2,r=(50-e).toFixed(2),n=(e*2).toFixed(2);return"".concat(r," ").concat(r," ").concat(n," ").concat(n)},bEe=Kce()?mt.useLayoutEffect:mt.useEffect,ID=mt.forwardRef(function(t,e){var r,n=t.children,a=t.tagName,c=a===void 0?"div":a,s=t.title,h=t.className,i=t.ellipsize,l=i===void 0?!1:i,d=ys(t,["children","tagName","title","className","ellipsize"]),o=mt.useRef(),f=mt.useMemo(function(){return Q1(o,e)},[e]),A=mt.useState(""),w=A[0],I=A[1],m=mt.useState(),u=m[0],g=m[1];return bEe(function(){var v;((v=o.current)===null||v===void 0?void 0:v.textContent)!=null&&(g(l&&o.current.scrollWidth>o.current.clientWidth),I(o.current.textContent))},[o,n,l]),mt.createElement(c,Gn(Gn({},d),{className:Ti((r={},r[v3e]=l,r),h),ref:f,title:s??(u?w:void 0)}),n)});ID.displayName="".concat(Eo,".Text");var Ma=mt.forwardRef(function(t,e){var r=afe(t,e);return mt.createElement("button",Gn({type:"button"},KC(t),r),ofe(t))});Ma.displayName="".concat(Eo,".Button");var fx=mt.forwardRef(function(t,e){var r=t.href,n=afe(t,e,{defaultTabIndex:0,disabledTabIndex:-1});return mt.createElement("a",Gn({role:"button"},KC(t),n,{"aria-disabled":n.disabled,href:n.disabled?void 0:r}),ofe(t))});fx.displayName="".concat(Eo,".AnchorButton");function afe(t,e,r){var n,a=t.alignText,c=t.fill,s=t.large,h=t.loading,i=h===void 0?!1:h,l=t.minimal,d=t.outlined,o=t.size,f=o===void 0?"medium":o,A=t.small,w=t.variant,I=w===void 0?"solid":w,m=t.disabled||i,u=tfe(!m,t,e,r),g=u[0],v=u[1],p=Ti(c5,(n={},n[lx]=g,n[cA]=m,n[Hv]=c,n[Wj]=i,n),pD(a),Yh(t.intent),dA(f,{large:s,small:A}),Xce(I,{minimal:l,outlined:d}),t.className);return Gn(Gn({},v),{className:p,disabled:m})}function ofe(t){var e=t.children,r=t.ellipsizeText,n=t.endIcon,a=t.icon,c=t.loading,s=t.rightIcon,h=t.text,i=t.textClassName,l=!fT(h)||!fT(e);return mt.createElement(mt.Fragment,null,c&&mt.createElement(CV,{className:x3e,size:Nb.SMALL}),mt.createElement(_s,{icon:a}),l&&mt.createElement(ID,{className:Ti(w3e,i),ellipsize:r,tagName:"span"},h,e),mt.createElement(_s,{icon:n??s}))}function Dm(t,e){return mt.forwardRef(function(r,n){var a=r.className,c=r.children,s=ys(r,["className","children"]);return mt.createElement(t,Gn(Gn({},s),{className:Ti(e,a),ref:n}),c)})}Dm("h1",WT);Dm("h2",WT);Dm("h3",WT);var xEe=Dm("h4",WT),wEe=Dm("h5",WT),TEe=Dm("h6",WT);Dm("blockquote",p3e);Dm("code",m3e);Dm("pre",y3e);var _Ee=Dm("label",zce);Dm("ol",Pce);Dm("ul",Pce);function IV(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var sfe={exports:{}},SEe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",EEe=SEe,MEe=EEe;function lfe(){}function ufe(){}ufe.resetWarningCache=lfe;var PEe=function(){function t(n,a,c,s,h,i){if(i!==MEe){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ufe,resetWarningCache:lfe};return r.PropTypes=r,r};sfe.exports=PEe();var REe=sfe.exports;function LEe(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function OEe(t,e){t.classList?t.classList.add(e):LEe(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function WX(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function DEe(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=WX(t.className,e):t.setAttribute("class",WX(t.className&&t.className.baseVal||"",e))}const ZX={disabled:!1},kL=no.createContext(null);var cfe=function(e){return e.scrollTop},eS="unmounted",cb="exited",fb="entering",Kw="entered",y$="exiting",gA=function(t){uI(e,t);function e(n,a){var c;c=t.call(this,n,a)||this;var s=a,h=s&&!s.isMounting?n.enter:n.appear,i;return c.appearStatus=null,n.in?h?(i=cb,c.appearStatus=fb):i=Kw:n.unmountOnExit||n.mountOnEnter?i=eS:i=cb,c.state={status:i},c.nextCallback=null,c}e.getDerivedStateFromProps=function(a,c){var s=a.in;return s&&c.status===eS?{status:cb}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var c=null;if(a!==this.props){var s=this.state.status;this.props.in?s!==fb&&s!==Kw&&(c=fb):(s===fb||s===Kw)&&(c=y$)}this.updateStatus(!1,c)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,c,s,h;return c=s=h=a,a!=null&&typeof a!="number"&&(c=a.exit,s=a.enter,h=a.appear!==void 0?a.appear:s),{exit:c,enter:s,appear:h}},r.updateStatus=function(a,c){if(a===void 0&&(a=!1),c!==null)if(this.cancelNextCallback(),c===fb){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Q_.findDOMNode(this);s&&cfe(s)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===cb&&this.setState({status:eS})},r.performEnter=function(a){var c=this,s=this.props.enter,h=this.context?this.context.isMounting:a,i=this.props.nodeRef?[h]:[Q_.findDOMNode(this),h],l=i[0],d=i[1],o=this.getTimeouts(),f=h?o.appear:o.enter;if(!a&&!s||ZX.disabled){this.safeSetState({status:Kw},function(){c.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:fb},function(){c.props.onEntering(l,d),c.onTransitionEnd(f,function(){c.safeSetState({status:Kw},function(){c.props.onEntered(l,d)})})})},r.performExit=function(){var a=this,c=this.props.exit,s=this.getTimeouts(),h=this.props.nodeRef?void 0:Q_.findDOMNode(this);if(!c||ZX.disabled){this.safeSetState({status:cb},function(){a.props.onExited(h)});return}this.props.onExit(h),this.safeSetState({status:y$},function(){a.props.onExiting(h),a.onTransitionEnd(s.exit,function(){a.safeSetState({status:cb},function(){a.props.onExited(h)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,c){c=this.setNextCallback(c),this.setState(a,c)},r.setNextCallback=function(a){var c=this,s=!0;return this.nextCallback=function(h){s&&(s=!1,c.nextCallback=null,a(h))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(a,c){this.setNextCallback(c);var s=this.props.nodeRef?this.props.nodeRef.current:Q_.findDOMNode(this),h=a==null&&!this.props.addEndListener;if(!s||h){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=i[0],d=i[1];this.props.addEndListener(l,d)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===eS)return null;var c=this.props,s=c.children;c.in,c.mountOnEnter,c.unmountOnExit,c.appear,c.enter,c.exit,c.timeout,c.addEndListener,c.onEnter,c.onEntering,c.onEntered,c.onExit,c.onExiting,c.onExited,c.nodeRef;var h=IV(c,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return no.createElement(kL.Provider,{value:null},typeof s=="function"?s(a,h):no.cloneElement(no.Children.only(s),h))},e}(no.Component);gA.contextType=kL;gA.propTypes={};function ww(){}gA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ww,onEntering:ww,onEntered:ww,onExit:ww,onExiting:ww,onExited:ww};gA.UNMOUNTED=eS;gA.EXITED=cb;gA.ENTERING=fb;gA.ENTERED=Kw;gA.EXITING=y$;var kEe=function(e,r){return e&&r&&r.split(" ").forEach(function(n){return OEe(e,n)})},pN=function(e,r){return e&&r&&r.split(" ").forEach(function(n){return DEe(e,n)})},wS=function(t){uI(e,t);function e(){for(var n,a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=t.call.apply(t,[this].concat(c))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(h,i){var l=n.resolveArguments(h,i),d=l[0],o=l[1];n.removeClasses(d,"exit"),n.addClass(d,o?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(h,i)},n.onEntering=function(h,i){var l=n.resolveArguments(h,i),d=l[0],o=l[1],f=o?"appear":"enter";n.addClass(d,f,"active"),n.props.onEntering&&n.props.onEntering(h,i)},n.onEntered=function(h,i){var l=n.resolveArguments(h,i),d=l[0],o=l[1],f=o?"appear":"enter";n.removeClasses(d,f),n.addClass(d,f,"done"),n.props.onEntered&&n.props.onEntered(h,i)},n.onExit=function(h){var i=n.resolveArguments(h),l=i[0];n.removeClasses(l,"appear"),n.removeClasses(l,"enter"),n.addClass(l,"exit","base"),n.props.onExit&&n.props.onExit(h)},n.onExiting=function(h){var i=n.resolveArguments(h),l=i[0];n.addClass(l,"exit","active"),n.props.onExiting&&n.props.onExiting(h)},n.onExited=function(h){var i=n.resolveArguments(h),l=i[0];n.removeClasses(l,"exit"),n.addClass(l,"exit","done"),n.props.onExited&&n.props.onExited(h)},n.resolveArguments=function(h,i){return n.props.nodeRef?[n.props.nodeRef.current,h]:[h,i]},n.getClassNames=function(h){var i=n.props.classNames,l=typeof i=="string",d=l&&i?i+"-":"",o=l?""+d+h:i[h],f=l?o+"-active":i[h+"Active"],A=l?o+"-done":i[h+"Done"];return{baseClassName:o,activeClassName:f,doneClassName:A}},n}var r=e.prototype;return r.addClass=function(a,c,s){var h=this.getClassNames(c)[s+"ClassName"],i=this.getClassNames("enter"),l=i.doneClassName;c==="appear"&&s==="done"&&l&&(h+=" "+l),s==="active"&&a&&cfe(a),h&&(this.appliedClasses[c][s]=h,kEe(a,h))},r.removeClasses=function(a,c){var s=this.appliedClasses[c],h=s.base,i=s.active,l=s.done;this.appliedClasses[c]={},h&&pN(a,h),i&&pN(a,i),l&&pN(a,l)},r.render=function(){var a=this.props;a.classNames;var c=IV(a,["classNames"]);return no.createElement(gA,Tl({},c,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(no.Component);wS.defaultProps={classNames:""};wS.propTypes={};function NEe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bV(t,e){var r=function(c){return e&&mt.isValidElement(c)?e(c):c},n=Object.create(null);return t&&mt.Children.map(t,function(a){return a}).forEach(function(a){n[a.key]=r(a)}),n}function FEe(t,e){t=t||{},e=e||{};function r(d){return d in e?e[d]:t[d]}var n=Object.create(null),a=[];for(var c in t)c in e?a.length&&(n[c]=a,a=[]):a.push(c);var s,h={};for(var i in e){if(n[i])for(s=0;s<n[i].length;s++){var l=n[i][s];h[n[i][s]]=r(l)}h[i]=r(i)}for(s=0;s<a.length;s++)h[a[s]]=r(a[s]);return h}function wb(t,e,r){return r[e]!=null?r[e]:t.props[e]}function zEe(t,e){return bV(t.children,function(r){return mt.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:wb(r,"appear",t),enter:wb(r,"enter",t),exit:wb(r,"exit",t)})})}function BEe(t,e,r){var n=bV(t.children),a=FEe(e,n);return Object.keys(a).forEach(function(c){var s=a[c];if(mt.isValidElement(s)){var h=c in e,i=c in n,l=e[c],d=mt.isValidElement(l)&&!l.props.in;i&&(!h||d)?a[c]=mt.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:wb(s,"exit",t),enter:wb(s,"enter",t)}):!i&&h&&!d?a[c]=mt.cloneElement(s,{in:!1}):i&&h&&mt.isValidElement(l)&&(a[c]=mt.cloneElement(s,{onExited:r.bind(null,s),in:l.props.in,exit:wb(s,"exit",t),enter:wb(s,"enter",t)}))}}),a}var $Ee=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},UEe={component:"div",childFactory:function(e){return e}},xV=function(t){uI(e,t);function e(n,a){var c;c=t.call(this,n,a)||this;var s=c.handleExited.bind(NEe(c));return c.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},c}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(a,c){var s=c.children,h=c.handleExited,i=c.firstRender;return{children:i?zEe(a,h):BEe(a,s,h),firstRender:!1}},r.handleExited=function(a,c){var s=bV(this.props.children);a.key in s||(a.props.onExited&&a.props.onExited(c),this.mounted&&this.setState(function(h){var i=Tl({},h.children);return delete i[a.key],{children:i}}))},r.render=function(){var a=this.props,c=a.component,s=a.childFactory,h=IV(a,["component","childFactory"]),i=this.state.contextValue,l=$Ee(this.state.children).map(s);return delete h.appear,delete h.enter,delete h.exit,c===null?no.createElement(kL.Provider,{value:i},l):no.createElement(kL.Provider,{value:i},no.createElement(c,h,l))},e}(no.Component);xV.propTypes={};xV.defaultProps=UEe;var HEe=function(){var t=1,e=new WeakMap,r=function(n,a){return typeof n=="number"||typeof n=="string"?a?"idx-".concat(a):"val-".concat(n):e.has(n)?"uid"+e.get(n):(e.set(n,t++),r(n))};return r},ffe=function(t){return t===void 0&&(t=""),{value:1,prefix:t,uid:HEe()}},jEe=ffe(),VEe=mt.createContext(ffe()),GEe=function(t){return t.value++},WEe=function(t){return t?t.prefix:""},ZEe=function(t){var e=t||jEe,r=WEe(e),n=GEe(e),a=r+n,c=function(s){return a+e.uid(s)};return{uid:a,gen:c}},YEe=function(){var t=mt.useContext(VEe),e=mt.useState(function(){return ZEe(t)})[0];return e},XEe=function(){var t=YEe().uid;return t},hfe=mt.createContext({hasProvider:!1,stack:{current:[]}}),KEe=function(t){var e=t.children,r=mt.useRef([]),n=mt.useMemo(function(){return{hasProvider:!0,stack:r}},[r]);return mt.createElement(hfe.Provider,{value:n},e)},dfe={exports:{}},gfe={};/**
72
+ */(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var c="",s=0;s<arguments.length;s++){var h=arguments[s];h&&(c=a(c,n(h)))}return c}function n(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return r.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var s="";for(var h in c)e.call(c,h)&&c[h]&&(s=a(s,h));return s}function a(c,s){return s?c?c+" "+s:c+s:c}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(efe);var eEe=efe.exports;const Ti=U0(eEe);function rV(t,e){e===void 0&&(e=[]),mt.useEffect(function(){zy("production")||t()},e)}var tEe={defaultTabIndex:void 0,disabledTabIndex:-1};function tfe(t,e,r,n){n===void 0&&(n=tEe);var a=n.defaultTabIndex,c=n.disabledTabIndex,s=e.active,h=e.onClick,i=e.onFocus,l=e.onKeyDown,d=e.onKeyUp,o=e.onBlur,f=e.tabIndex,A=f===void 0?a:f,w=mt.useState(),I=w[0],m=w[1],u=mt.useState(!1),g=u[0],v=u[1],p=mt.useRef(null),C=mt.useCallback(function(P){g&&v(!1),o==null||o(P)},[g,o]),y=mt.useCallback(function(P){hT(P)&&(P.preventDefault(),P.key!==I&&v(!0)),m(P.key),l==null||l(P)},[I,l]),x=mt.useCallback(function(P){var b;hT(P)&&(v(!1),(b=p.current)===null||b===void 0||b.click()),m(void 0),d==null||d(P)},[d,p]),T=t&&(s||g);return[T,{onBlur:C,onClick:t?h:void 0,onFocus:t?i:void 0,onKeyDown:y,onKeyUp:x,ref:Q1(p,r),tabIndex:t?A:c}]}function rEe(t){return t.toLowerCase()}var nEe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],iEe=/[^A-Z0-9]+/gi;function rfe(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,n=r===void 0?nEe:r,a=e.stripRegexp,c=a===void 0?iEe:a,s=e.transform,h=s===void 0?rEe:s,i=e.delimiter,l=i===void 0?" ":i,d=BX(BX(t,n,"$1\0$2"),c,"\0"),o=0,f=d.length;d.charAt(o)==="\0";)o++;for(;d.charAt(f-1)==="\0";)f--;return d.slice(o,f).split("\0").map(h).join(l)}function BX(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(n,a){return n.replace(a,r)},t)}function aEe(t,e){var r=t.charAt(0),n=t.substr(1).toLowerCase();return e>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function oEe(t,e){return e===void 0&&(e={}),rfe(t,Gn({delimiter:"",transform:aEe},e))}function sEe(t,e){return e===void 0&&(e={}),rfe(t,Gn({delimiter:"."},e))}function lEe(t,e){return e===void 0&&(e={}),sEe(t,Gn({delimiter:"_"},e))}var ga;(function(t){t[t.STANDARD=16]="STANDARD",t[t.LARGE=20]="LARGE"})(ga||(ga={}));const uEe="modulepreload",cEe=function(t){return"/"+t},$X={},UX=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),h=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=Promise.allSettled(r.map(i=>{if(i=cEe(i),i in $X)return;$X[i]=!0;const l=i.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${d}`))return;const o=document.createElement("link");if(o.rel=l?"stylesheet":uEe,l||(o.as="script"),o.crossOrigin="",o.href=i,h&&o.setAttribute("nonce",h),document.head.appendChild(o),l)return new Promise((f,A)=>{o.addEventListener("load",f),o.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${i}`)))})}))}function c(s){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=s,window.dispatchEvent(h),!h.defaultPrevented)throw s}return a.then(s=>{for(const h of s||[])h.status==="rejected"&&c(h.reason);return e().catch(c)})};var Kt,Xt;(function(t){t.AddChild="add-child",t.AddClip="add-clip",t.AddColumnLeft="add-column-left",t.AddColumnRight="add-column-right",t.AddLocation="add-location",t.AddParent="add-parent",t.AddRowBottom="add-row-bottom",t.AddRowTop="add-row-top",t.AddToArtifact="add-to-artifact",t.AddToFolder="add-to-folder",t.Add="add",t.AimpointsTarget="aimpoints-target",t.Airplane="airplane",t.AlignCenter="align-center",t.AlignJustify="align-justify",t.AlignLeft="align-left",t.AlignRight="align-right",t.AlignmentBottom="alignment-bottom",t.AlignmentHorizontalCenter="alignment-horizontal-center",t.AlignmentLeft="alignment-left",t.AlignmentRight="alignment-right",t.AlignmentTop="alignment-top",t.AlignmentVerticalCenter="alignment-vertical-center",t.Ammunition="ammunition",t.Anchor="anchor",t.Annotation="annotation",t.Announcement="announcement",t.Antenna="antenna",t.AppHeader="app-header",t.Application="application",t.Applications="applications",t.Archive="archive",t.AreaOfInterest="area-of-interest",t.ArrayBoolean="array-boolean",t.ArrayDate="array-date",t.ArrayFloatingPoint="array-floating-point",t.ArrayNumeric="array-numeric",t.ArrayObject="array-object",t.ArrayString="array-string",t.ArrayTimestamp="array-timestamp",t.Array="array",t.ArrowBottomLeft="arrow-bottom-left",t.ArrowBottomRight="arrow-bottom-right",t.ArrowDown="arrow-down",t.ArrowLeft="arrow-left",t.ArrowRight="arrow-right",t.ArrowTopLeft="arrow-top-left",t.ArrowTopRight="arrow-top-right",t.ArrowUp="arrow-up",t.ArrowsArc="arrows-arc",t.ArrowsHorizontal="arrows-horizontal",t.ArrowsVertical="arrows-vertical",t.Asterisk="asterisk",t.At="at",t.AutomaticUpdates="automatic-updates",t.Axle="axle",t.Backlink="backlink",t.BackwardTen="backward-ten",t.Badge="badge",t.BanCircle="ban-circle",t.BankAccount="bank-account",t.Barcode="barcode",t.BinaryNumber="binary-number",t.Blank="blank",t.BlockPromote="block-promote",t.BlockedPerson="blocked-person",t.Bold="bold",t.Book="book",t.Bookmark="bookmark",t.Box="box",t.Briefcase="briefcase",t.BringData="bring-data",t.BringForward="bring-forward",t.BritishPound="british-pound",t.Bug="bug",t.Buggy="buggy",t.Build="build",t.Bullseye="bullseye",t.Calculator="calculator",t.Calendar="calendar",t.Camera="camera",t.CaretDown="caret-down",t.CaretLeft="caret-left",t.CaretRight="caret-right",t.CaretUp="caret-up",t.CargoShip="cargo-ship",t.CellTower="cell-tower",t.Changes="changes",t.Chart="chart",t.Chat="chat",t.ChevronBackward="chevron-backward",t.ChevronDown="chevron-down",t.ChevronForward="chevron-forward",t.ChevronLeft="chevron-left",t.ChevronRight="chevron-right",t.ChevronUp="chevron-up",t.CircleArrowDown="circle-arrow-down",t.CircleArrowLeft="circle-arrow-left",t.CircleArrowRight="circle-arrow-right",t.CircleArrowUp="circle-arrow-up",t.Circle="circle",t.Citation="citation",t.Clean="clean",t.Clip="clip",t.ClipboardFile="clipboard-file",t.Clipboard="clipboard",t.CloudDownload="cloud-download",t.CloudServer="cloud-server",t.CloudTick="cloud-tick",t.CloudUpload="cloud-upload",t.Cloud="cloud",t.CodeBlock="code-block",t.Code="code",t.Cog="cog",t.CollapseAll="collapse-all",t.ColorFill="color-fill",t.ColumnLayout="column-layout",t.Comment="comment",t.Comparison="comparison",t.Compass="compass",t.Compressed="compressed",t.Confirm="confirm",t.Console="console",t.Construction="construction",t.Contrast="contrast",t.Control="control",t.CreditCard="credit-card",t.Crop="crop",t.CrossCircle="cross-circle",t.Cross="cross",t.Crown="crown",t.CssStyle="css-style",t.CubeAdd="cube-add",t.CubeEdit="cube-edit",t.CubeRemove="cube-remove",t.Cube="cube",t.Cubes="cubes",t.CurlyBraces="curly-braces",t.CurvedRangeChart="curved-range-chart",t.Cut="cut",t.Cycle="cycle",t.Dashboard="dashboard",t.DataCloud="data-cloud",t.DataConnection="data-connection",t.DataLineage="data-lineage",t.DataSearch="data-search",t.DataSync="data-sync",t.Database="database",t.DeleteClip="delete-clip",t.Delete="delete",t.Delta="delta",t.DeriveColumn="derive-column",t.Desktop="desktop",t.Detection="detection",t.Diagnosis="diagnosis",t.DiagramTree="diagram-tree",t.DirectionLeft="direction-left",t.DirectionRight="direction-right",t.Disable="disable",t.Divide="divide",t.DocumentCode="document-code",t.DocumentLocked="document-locked",t.DocumentOpen="document-open",t.DocumentShare="document-share",t.Document="document",t.Dollar="dollar",t.Dot="dot",t.DoubleCaretHorizontal="double-caret-horizontal",t.DoubleCaretVertical="double-caret-vertical",t.DoubleChevronDown="double-chevron-down",t.DoubleChevronLeft="double-chevron-left",t.DoubleChevronRight="double-chevron-right",t.DoubleChevronUp="double-chevron-up",t.DoughnutChart="doughnut-chart",t.Download="download",t.DragHandleHorizontal="drag-handle-horizontal",t.DragHandleVertical="drag-handle-vertical",t.Draw="draw",t.DrawerLeftFilled="drawer-left-filled",t.DrawerLeft="drawer-left",t.DrawerRightFilled="drawer-right-filled",t.DrawerRight="drawer-right",t.DriveTime="drive-time",t.Duplicate="duplicate",t.Edit="edit",t.Eject="eject",t.Emoji="emoji",t.Endnote="endnote",t.Endorsed="endorsed",t.Envelope="envelope",t.Equals="equals",t.Eraser="eraser",t.Error="error",t.Euro="euro",t.Excavator="excavator",t.Exchange="exchange",t.ExcludeRow="exclude-row",t.ExpandAll="expand-all",t.Explain="explain",t.Export="export",t.EyeOff="eye-off",t.EyeOn="eye-on",t.EyeOpen="eye-open",t.FastBackward="fast-backward",t.FastForward="fast-forward",t.FeedSubscribed="feed-subscribed",t.Feed="feed",t.FighterJet="fighter-jet",t.Film="film",t.FilterKeep="filter-keep",t.FilterList="filter-list",t.FilterOpen="filter-open",t.FilterRemove="filter-remove",t.FilterSortAsc="filter-sort-asc",t.FilterSortDesc="filter-sort-desc",t.Filter="filter",t.Flag="flag",t.Flame="flame",t.Flash="flash",t.FloatingPoint="floating-point",t.FloppyDisk="floppy-disk",t.FlowBranch="flow-branch",t.FlowEnd="flow-end",t.FlowLinear="flow-linear",t.FlowReviewBranch="flow-review-branch",t.FlowReview="flow-review",t.Flows="flows",t.FolderClose="folder-close",t.FolderNew="folder-new",t.FolderOpen="folder-open",t.FolderSharedOpen="folder-shared-open",t.FolderShared="folder-shared",t.Follower="follower",t.Following="following",t.Font="font",t.Fork="fork",t.Form="form",t.ForwardTen="forward-ten",t.Fuel="fuel",t.FullCircle="full-circle",t.FullStackedChart="full-stacked-chart",t.Fullscreen="fullscreen",t.Function="function",t.GanttChart="gantt-chart",t.Generate="generate",t.Geofence="geofence",t.Geolocation="geolocation",t.Geosearch="geosearch",t.Geotime="geotime",t.GiftBox="gift-box",t.GitBranch="git-branch",t.GitCommit="git-commit",t.GitMerge="git-merge",t.GitNewBranch="git-new-branch",t.GitPull="git-pull",t.GitPush="git-push",t.GitRepo="git-repo",t.Glass="glass",t.GlobeNetworkAdd="globe-network-add",t.GlobeNetwork="globe-network",t.Globe="globe",t.GraphRemove="graph-remove",t.Graph="graph",t.GreaterThanOrEqualTo="greater-than-or-equal-to",t.GreaterThan="greater-than",t.GridView="grid-view",t.Grid="grid",t.GroupItem="group-item",t.GroupObjects="group-objects",t.GroupedBarChart="grouped-bar-chart",t.HandDown="hand-down",t.HandLeft="hand-left",t.HandRight="hand-right",t.HandUp="hand-up",t.Hand="hand",t.Hat="hat",t.HeaderOne="header-one",t.HeaderThree="header-three",t.HeaderTwo="header-two",t.Header="header",t.Headset="headset",t.HeartBroken="heart-broken",t.Heart="heart",t.HeatGrid="heat-grid",t.Heatmap="heatmap",t.Helicopter="helicopter",t.Help="help",t.HelperManagement="helper-management",t.Hexagon="hexagon",t.HighPriority="high-priority",t.HighVoltagePole="high-voltage-pole",t.Highlight="highlight",t.History="history",t.Home="home",t.HorizontalBarChartAsc="horizontal-bar-chart-asc",t.HorizontalBarChartDesc="horizontal-bar-chart-desc",t.HorizontalBarChart="horizontal-bar-chart",t.HorizontalDistribution="horizontal-distribution",t.HorizontalInbetween="horizontal-inbetween",t.Hurricane="hurricane",t.IdNumber="id-number",t.ImageRotateLeft="image-rotate-left",t.ImageRotateRight="image-rotate-right",t.Import="import",t.InboxFiltered="inbox-filtered",t.InboxGeo="inbox-geo",t.InboxSearch="inbox-search",t.InboxUpdate="inbox-update",t.Inbox="inbox",t.InfoSign="info-sign",t.Inheritance="inheritance",t.InheritedGroup="inherited-group",t.InnerJoin="inner-join",t.Input="input",t.Insert="insert",t.Intelligence="intelligence",t.Intersection="intersection",t.IpAddress="ip-address",t.IssueClosed="issue-closed",t.IssueNew="issue-new",t.Issue="issue",t.Italic="italic",t.JoinTable="join-table",t.KeyBackspace="key-backspace",t.KeyCommand="key-command",t.KeyControl="key-control",t.KeyDelete="key-delete",t.KeyEnter="key-enter",t.KeyEscape="key-escape",t.KeyOption="key-option",t.KeyShift="key-shift",t.KeyTab="key-tab",t.Key="key",t.KnownVehicle="known-vehicle",t.LabTest="lab-test",t.Label="label",t.LayerOutline="layer-outline",t.Layer="layer",t.Layers="layers",t.LayoutAuto="layout-auto",t.LayoutBalloon="layout-balloon",t.LayoutBottomRowThreeTiles="layout-bottom-row-three-tiles",t.LayoutBottomRowTwoTiles="layout-bottom-row-two-tiles",t.LayoutCircle="layout-circle",t.LayoutGrid="layout-grid",t.LayoutGroupBy="layout-group-by",t.LayoutHierarchy="layout-hierarchy",t.LayoutLeftColumnThreeTiles="layout-left-column-three-tiles",t.LayoutLeftColumnTwoTiles="layout-left-column-two-tiles",t.LayoutLinear="layout-linear",t.LayoutRightColumnThreeTiles="layout-right-column-three-tiles",t.LayoutRightColumnTwoTiles="layout-right-column-two-tiles",t.LayoutSkewGrid="layout-skew-grid",t.LayoutSortedClusters="layout-sorted-clusters",t.LayoutThreeColumns="layout-three-columns",t.LayoutThreeRows="layout-three-rows",t.LayoutTopRowThreeTiles="layout-top-row-three-tiles",t.LayoutTopRowTwoTiles="layout-top-row-two-tiles",t.LayoutTwoColumns="layout-two-columns",t.LayoutTwoRows="layout-two-rows",t.Layout="layout",t.Learning="learning",t.LeftJoin="left-join",t.LengthenText="lengthen-text",t.LessThanOrEqualTo="less-than-or-equal-to",t.LessThan="less-than",t.Lifesaver="lifesaver",t.Lightbulb="lightbulb",t.Lightning="lightning",t.Link="link",t.LinkedSquares="linked-squares",t.ListColumns="list-columns",t.ListDetailView="list-detail-view",t.List="list",t.Locate="locate",t.Lock="lock",t.Locomotive="locomotive",t.LogIn="log-in",t.LogOut="log-out",t.LowVoltagePole="low-voltage-pole",t.Manual="manual",t.ManuallyEnteredData="manually-entered-data",t.ManyToMany="many-to-many",t.ManyToOne="many-to-one",t.MapCreate="map-create",t.MapMarker="map-marker",t.Map="map",t.Maximize="maximize",t.Media="media",t.MenuClosed="menu-closed",t.MenuOpen="menu-open",t.Menu="menu",t.MergeColumns="merge-columns",t.MergeLinks="merge-links",t.Microphone="microphone",t.Minimize="minimize",t.Minus="minus",t.MobilePhone="mobile-phone",t.MobileVideo="mobile-video",t.ModalFilled="modal-filled",t.Modal="modal",t.Model="model",t.Moon="moon",t.More="more",t.Mountain="mountain",t.Move="move",t.Mugshot="mugshot",t.MultiSelect="multi-select",t.Music="music",t.Nest="nest",t.NewDrawing="new-drawing",t.NewGridItem="new-grid-item",t.NewLayer="new-layer",t.NewLayers="new-layers",t.NewLink="new-link",t.NewObject="new-object",t.NewPerson="new-person",t.NewPrescription="new-prescription",t.NewShield="new-shield",t.NewTextBox="new-text-box",t.Ninja="ninja",t.NotEqualTo="not-equal-to",t.NotificationsAdd="notifications-add",t.NotificationsSnooze="notifications-snooze",t.NotificationsUpdated="notifications-updated",t.Notifications="notifications",t.NumberedList="numbered-list",t.Numerical="numerical",t.ObjectView="object-view",t.Office="office",t.Offline="offline",t.OilField="oil-field",t.OneColumn="one-column",t.OneToMany="one-to-many",t.OneToOne="one-to-one",t.OpenApplication="open-application",t.Outdated="outdated",t.Output="output",t.Package="package",t.PageBreak="page-break",t.PageLayout="page-layout",t.PanelStats="panel-stats",t.PanelTable="panel-table",t.Panel="panel",t.Paperclip="paperclip",t.Paragraph="paragraph",t.PasteVariable="paste-variable",t.PathSearch="path-search",t.Path="path",t.Pause="pause",t.People="people",t.Percentage="percentage",t.Person="person",t.PhoneCall="phone-call",t.PhoneForward="phone-forward",t.PhoneSearch="phone-search",t.Phone="phone",t.PieChart="pie-chart",t.Pill="pill",t.Pin="pin",t.Pistol="pistol",t.PivotTable="pivot-table",t.Pivot="pivot",t.Play="play",t.Playbook="playbook",t.Plus="plus",t.PolygonFilter="polygon-filter",t.Power="power",t.PredictiveAnalysis="predictive-analysis",t.Prescription="prescription",t.Presentation="presentation",t.Print="print",t.Projects="projects",t.Properties="properties",t.Property="property",t.PublishFunction="publish-function",t.Pulse="pulse",t.Rain="rain",t.Random="random",t.RangeRing="range-ring",t.Record="record",t.RectHeight="rect-height",t.RectWidth="rect-width",t.Rectangle="rectangle",t.Redo="redo",t.Refresh="refresh",t.Regex="regex",t.RegressionChart="regression-chart",t.RemoveColumnLeft="remove-column-left",t.RemoveColumnRight="remove-column-right",t.RemoveColumn="remove-column",t.RemoveRowBottom="remove-row-bottom",t.RemoveRowTop="remove-row-top",t.Remove="remove",t.Repeat="repeat",t.Reset="reset",t.Resolve="resolve",t.Rig="rig",t.RightJoin="right-join",t.Ring="ring",t.RocketSlant="rocket-slant",t.Rocket="rocket",t.RootFolder="root-folder",t.RotateCcw="rotate-ccw",t.RotateCw="rotate-cw",t.RotateDocument="rotate-document",t.RotatePage="rotate-page",t.Route="route",t.RunHistory="run-history",t.Satellite="satellite",t.Saved="saved",t.ScatterPlot="scatter-plot",t.SearchAround="search-around",t.SearchTemplate="search-template",t.SearchText="search-text",t.Search="search",t.SegmentedControl="segmented-control",t.Select="select",t.SelectionBoxAdd="selection-box-add",t.SelectionBoxEdit="selection-box-edit",t.SelectionBox="selection-box",t.Selection="selection",t.SendBackward="send-backward",t.SendMessage="send-message",t.SendToGraph="send-to-graph",t.SendToMap="send-to-map",t.SendTo="send-to",t.Sensor="sensor",t.SeriesAdd="series-add",t.SeriesConfiguration="series-configuration",t.SeriesDerived="series-derived",t.SeriesFiltered="series-filtered",t.SeriesSearch="series-search",t.ServerInstall="server-install",t.Server="server",t.Settings="settings",t.Shapes="shapes",t.Share="share",t.SharedFilter="shared-filter",t.Shield="shield",t.Ship="ship",t.Shop="shop",t.ShoppingCart="shopping-cart",t.ShortenText="shorten-text",t.SignalSearch="signal-search",t.SimCard="sim-card",t.Slash="slash",t.SmallCross="small-cross",t.SmallInfoSign="small-info-sign",t.SmallMinus="small-minus",t.SmallPlus="small-plus",t.SmallSquare="small-square",t.SmallTick="small-tick",t.Snowflake="snowflake",t.SoccerBall="soccer-ball",t.SocialMedia="social-media",t.SortAlphabeticalDesc="sort-alphabetical-desc",t.SortAlphabetical="sort-alphabetical",t.SortAsc="sort-asc",t.SortDesc="sort-desc",t.SortNumericalDesc="sort-numerical-desc",t.SortNumerical="sort-numerical",t.Sort="sort",t.SpellCheck="spell-check",t.SplitColumns="split-columns",t.SportsStadium="sports-stadium",t.Square="square",t.StackedChart="stacked-chart",t.StadiumGeometry="stadium-geometry",t.StarEmpty="star-empty",t.Star="star",t.StepBackward="step-backward",t.StepChart="step-chart",t.StepForward="step-forward",t.Stop="stop",t.Stopwatch="stopwatch",t.Strikethrough="strikethrough",t.Style="style",t.Subscript="subscript",t.SubtractRightJoin="subtract-right-join",t.Superscript="superscript",t.SwapHorizontal="swap-horizontal",t.SwapVertical="swap-vertical",t.Sweep="sweep",t.Switch="switch",t.SymbolCircle="symbol-circle",t.SymbolCross="symbol-cross",t.SymbolDiamond="symbol-diamond",t.SymbolRectangle="symbol-rectangle",t.SymbolSquare="symbol-square",t.SymbolTriangleDown="symbol-triangle-down",t.SymbolTriangleUp="symbol-triangle-up",t.Syringe="syringe",t.TableSync="table-sync",t.TagAdd="tag-add",t.TagPromote="tag-promote",t.TagRefresh="tag-refresh",t.TagUndo="tag-undo",t.Tag="tag",t.Tags="tags",t.TakeAction="take-action",t.Tank="tank",t.Target="target",t.Taxi="taxi",t.Team="team",t.Temperature="temperature",t.TextHighlight="text-highlight",t.ThAdd="th-add",t.ThDerived="th-derived",t.ThDisconnect="th-disconnect",t.ThFiltered="th-filtered",t.ThListAdd="th-list-add",t.ThList="th-list",t.ThVirtualAdd="th-virtual-add",t.ThVirtual="th-virtual",t.Th="th",t.ThirdParty="third-party",t.ThumbsDown="thumbs-down",t.ThumbsUp="thumbs-up",t.TickCircle="tick-circle",t.Tick="tick",t.Time="time",t.TimelineAreaChart="timeline-area-chart",t.TimelineBarChart="timeline-bar-chart",t.TimelineEvents="timeline-events",t.TimelineLineChart="timeline-line-chart",t.Tint="tint",t.Torch="torch",t.Tractor="tractor",t.Train="train",t.Translate="translate",t.Trash="trash",t.Tree="tree",t.TrendingDown="trending-down",t.TrendingUp="trending-up",t.Trophy="trophy",t.Truck="truck",t.TwoColumns="two-columns",t.Unarchive="unarchive",t.Underline="underline",t.Undo="undo",t.UngroupObjects="ungroup-objects",t.UnknownVehicle="unknown-vehicle",t.Unlink="unlink",t.Unlock="unlock",t.Unpin="unpin",t.Unresolve="unresolve",t.Updated="updated",t.Upload="upload",t.User="user",t.Variable="variable",t.Vector="vector",t.VerticalBarChartAsc="vertical-bar-chart-asc",t.VerticalBarChartDesc="vertical-bar-chart-desc",t.VerticalDistribution="vertical-distribution",t.VerticalInbetween="vertical-inbetween",t.Video="video",t.Virus="virus",t.VolumeDown="volume-down",t.VolumeOff="volume-off",t.VolumeUp="volume-up",t.Walk="walk",t.WarningSign="warning-sign",t.WaterfallChart="waterfall-chart",t.Waves="waves",t.WidgetButton="widget-button",t.WidgetFooter="widget-footer",t.WidgetHeader="widget-header",t.Widget="widget",t.Wind="wind",t.WrenchRedo="wrench-redo",t.WrenchSnooze="wrench-snooze",t.WrenchTime="wrench-time",t.Wrench="wrench",t.ZoomIn="zoom-in",t.ZoomOut="zoom-out",t.ZoomToFit="zoom-to-fit"})(Xt||(Xt={}));Kt={},Kt[Xt.AddChild]="62365",Kt[Xt.AddClip]="61697",Kt[Xt.AddColumnLeft]="61698",Kt[Xt.AddColumnRight]="61699",Kt[Xt.AddLocation]="61700",Kt[Xt.AddParent]="62366",Kt[Xt.AddRowBottom]="61701",Kt[Xt.AddRowTop]="61702",Kt[Xt.AddToArtifact]="61703",Kt[Xt.AddToFolder]="61704",Kt[Xt.Add]="61705",Kt[Xt.AimpointsTarget]="62261",Kt[Xt.Airplane]="61706",Kt[Xt.AlignCenter]="61707",Kt[Xt.AlignJustify]="61708",Kt[Xt.AlignLeft]="61709",Kt[Xt.AlignRight]="61710",Kt[Xt.AlignmentBottom]="61711",Kt[Xt.AlignmentHorizontalCenter]="61712",Kt[Xt.AlignmentLeft]="61713",Kt[Xt.AlignmentRight]="61714",Kt[Xt.AlignmentTop]="61715",Kt[Xt.AlignmentVerticalCenter]="61716",Kt[Xt.Ammunition]="62274",Kt[Xt.Anchor]="62256",Kt[Xt.Annotation]="61717",Kt[Xt.Announcement]="62358",Kt[Xt.Antenna]="61718",Kt[Xt.AppHeader]="61719",Kt[Xt.Application]="61720",Kt[Xt.Applications]="61721",Kt[Xt.Archive]="61722",Kt[Xt.AreaOfInterest]="61723",Kt[Xt.ArrayBoolean]="61724",Kt[Xt.ArrayDate]="61725",Kt[Xt.ArrayFloatingPoint]="62253",Kt[Xt.ArrayNumeric]="61726",Kt[Xt.ArrayObject]="62356",Kt[Xt.ArrayString]="61727",Kt[Xt.ArrayTimestamp]="61728",Kt[Xt.Array]="61729",Kt[Xt.ArrowBottomLeft]="61730",Kt[Xt.ArrowBottomRight]="61731",Kt[Xt.ArrowDown]="61732",Kt[Xt.ArrowLeft]="61733",Kt[Xt.ArrowRight]="61734",Kt[Xt.ArrowTopLeft]="61735",Kt[Xt.ArrowTopRight]="61736",Kt[Xt.ArrowUp]="61737",Kt[Xt.ArrowsArc]="62343",Kt[Xt.ArrowsHorizontal]="61738",Kt[Xt.ArrowsVertical]="61739",Kt[Xt.Asterisk]="61740",Kt[Xt.At]="62257",Kt[Xt.AutomaticUpdates]="61741",Kt[Xt.Axle]="62264",Kt[Xt.Backlink]="61742",Kt[Xt.BackwardTen]="62300",Kt[Xt.Badge]="61743",Kt[Xt.BanCircle]="61744",Kt[Xt.BankAccount]="61745",Kt[Xt.Barcode]="61746",Kt[Xt.BinaryNumber]="62295",Kt[Xt.Blank]="61747",Kt[Xt.BlockPromote]="62322",Kt[Xt.BlockedPerson]="61748",Kt[Xt.Bold]="61749",Kt[Xt.Book]="61750",Kt[Xt.Bookmark]="61751",Kt[Xt.Box]="61752",Kt[Xt.Briefcase]="61753",Kt[Xt.BringData]="61754",Kt[Xt.BringForward]="62292",Kt[Xt.BritishPound]="62342",Kt[Xt.Bug]="62254",Kt[Xt.Buggy]="61755",Kt[Xt.Build]="61756",Kt[Xt.Bullseye]="62297",Kt[Xt.Calculator]="61757",Kt[Xt.Calendar]="61758",Kt[Xt.Camera]="61759",Kt[Xt.CaretDown]="61760",Kt[Xt.CaretLeft]="61761",Kt[Xt.CaretRight]="61762",Kt[Xt.CaretUp]="61763",Kt[Xt.CargoShip]="61764",Kt[Xt.CellTower]="61765",Kt[Xt.Changes]="61766",Kt[Xt.Chart]="61767",Kt[Xt.Chat]="61768",Kt[Xt.ChevronBackward]="61769",Kt[Xt.ChevronDown]="61770",Kt[Xt.ChevronForward]="61771",Kt[Xt.ChevronLeft]="61772",Kt[Xt.ChevronRight]="61773",Kt[Xt.ChevronUp]="61774",Kt[Xt.CircleArrowDown]="61775",Kt[Xt.CircleArrowLeft]="61776",Kt[Xt.CircleArrowRight]="61777",Kt[Xt.CircleArrowUp]="61778",Kt[Xt.Circle]="61779",Kt[Xt.Citation]="61780",Kt[Xt.Clean]="61781",Kt[Xt.Clip]="61782",Kt[Xt.ClipboardFile]="62299",Kt[Xt.Clipboard]="61783",Kt[Xt.CloudDownload]="61784",Kt[Xt.CloudServer]="62298",Kt[Xt.CloudTick]="62286",Kt[Xt.CloudUpload]="61785",Kt[Xt.Cloud]="61786",Kt[Xt.CodeBlock]="61787",Kt[Xt.Code]="61788",Kt[Xt.Cog]="61789",Kt[Xt.CollapseAll]="61790",Kt[Xt.ColorFill]="62248",Kt[Xt.ColumnLayout]="61791",Kt[Xt.Comment]="61792",Kt[Xt.Comparison]="61793",Kt[Xt.Compass]="61794",Kt[Xt.Compressed]="61795",Kt[Xt.Confirm]="61796",Kt[Xt.Console]="61797",Kt[Xt.Construction]="62357",Kt[Xt.Contrast]="61798",Kt[Xt.Control]="61799",Kt[Xt.CreditCard]="61800",Kt[Xt.Crop]="62291",Kt[Xt.CrossCircle]="62262",Kt[Xt.Cross]="61801",Kt[Xt.Crown]="61802",Kt[Xt.CssStyle]="62315",Kt[Xt.CubeAdd]="61803",Kt[Xt.CubeEdit]="62339",Kt[Xt.CubeRemove]="61804",Kt[Xt.Cube]="61805",Kt[Xt.Cubes]="62323",Kt[Xt.CurlyBraces]="62296",Kt[Xt.CurvedRangeChart]="61806",Kt[Xt.Cut]="61807",Kt[Xt.Cycle]="61808",Kt[Xt.Dashboard]="61809",Kt[Xt.DataCloud]="62353",Kt[Xt.DataConnection]="61810",Kt[Xt.DataLineage]="61811",Kt[Xt.DataSearch]="62319",Kt[Xt.DataSync]="62316",Kt[Xt.Database]="61812",Kt[Xt.DeleteClip]="62371",Kt[Xt.Delete]="61813",Kt[Xt.Delta]="61814",Kt[Xt.DeriveColumn]="61815",Kt[Xt.Desktop]="61816",Kt[Xt.Detection]="62273",Kt[Xt.Diagnosis]="61817",Kt[Xt.DiagramTree]="61818",Kt[Xt.DirectionLeft]="61819",Kt[Xt.DirectionRight]="61820",Kt[Xt.Disable]="61821",Kt[Xt.Divide]="62247",Kt[Xt.DocumentCode]="62368",Kt[Xt.DocumentLocked]="62369",Kt[Xt.DocumentOpen]="61822",Kt[Xt.DocumentShare]="61823",Kt[Xt.Document]="61824",Kt[Xt.Dollar]="61825",Kt[Xt.Dot]="61826",Kt[Xt.DoubleCaretHorizontal]="61827",Kt[Xt.DoubleCaretVertical]="61828",Kt[Xt.DoubleChevronDown]="61829",Kt[Xt.DoubleChevronLeft]="61830",Kt[Xt.DoubleChevronRight]="61831",Kt[Xt.DoubleChevronUp]="61832",Kt[Xt.DoughnutChart]="61833",Kt[Xt.Download]="61834",Kt[Xt.DragHandleHorizontal]="61835",Kt[Xt.DragHandleVertical]="61836",Kt[Xt.Draw]="61837",Kt[Xt.DrawerLeftFilled]="61838",Kt[Xt.DrawerLeft]="61839",Kt[Xt.DrawerRightFilled]="61840",Kt[Xt.DrawerRight]="61841",Kt[Xt.DriveTime]="61842",Kt[Xt.Duplicate]="61843",Kt[Xt.Edit]="61844",Kt[Xt.Eject]="61845",Kt[Xt.Emoji]="61846",Kt[Xt.Endnote]="62294",Kt[Xt.Endorsed]="61847",Kt[Xt.Envelope]="61848",Kt[Xt.Equals]="61849",Kt[Xt.Eraser]="61850",Kt[Xt.Error]="61851",Kt[Xt.Euro]="61852",Kt[Xt.Excavator]="62317",Kt[Xt.Exchange]="61853",Kt[Xt.ExcludeRow]="61854",Kt[Xt.ExpandAll]="61855",Kt[Xt.Explain]="62285",Kt[Xt.Export]="61856",Kt[Xt.EyeOff]="61857",Kt[Xt.EyeOn]="61858",Kt[Xt.EyeOpen]="61859",Kt[Xt.FastBackward]="61860",Kt[Xt.FastForward]="61861",Kt[Xt.FeedSubscribed]="61862",Kt[Xt.Feed]="61863",Kt[Xt.FighterJet]="62340",Kt[Xt.Film]="61864",Kt[Xt.FilterKeep]="61865",Kt[Xt.FilterList]="61866",Kt[Xt.FilterOpen]="61867",Kt[Xt.FilterRemove]="61868",Kt[Xt.FilterSortAsc]="62350",Kt[Xt.FilterSortDesc]="62351",Kt[Xt.Filter]="61869",Kt[Xt.Flag]="61870",Kt[Xt.Flame]="61871",Kt[Xt.Flash]="61872",Kt[Xt.FloatingPoint]="62252",Kt[Xt.FloppyDisk]="61873",Kt[Xt.FlowBranch]="61874",Kt[Xt.FlowEnd]="61875",Kt[Xt.FlowLinear]="61876",Kt[Xt.FlowReviewBranch]="61877",Kt[Xt.FlowReview]="61878",Kt[Xt.Flows]="61879",Kt[Xt.FolderClose]="61880",Kt[Xt.FolderNew]="61881",Kt[Xt.FolderOpen]="61882",Kt[Xt.FolderSharedOpen]="61883",Kt[Xt.FolderShared]="61884",Kt[Xt.Follower]="61885",Kt[Xt.Following]="61886",Kt[Xt.Font]="61887",Kt[Xt.Fork]="61888",Kt[Xt.Form]="61889",Kt[Xt.ForwardTen]="62301",Kt[Xt.Fuel]="62243",Kt[Xt.FullCircle]="61890",Kt[Xt.FullStackedChart]="61891",Kt[Xt.Fullscreen]="61892",Kt[Xt.Function]="61893",Kt[Xt.GanttChart]="61894",Kt[Xt.Generate]="62284",Kt[Xt.Geofence]="61895",Kt[Xt.Geolocation]="61896",Kt[Xt.Geosearch]="61897",Kt[Xt.Geotime]="62276",Kt[Xt.GiftBox]="62370",Kt[Xt.GitBranch]="61898",Kt[Xt.GitCommit]="61899",Kt[Xt.GitMerge]="61900",Kt[Xt.GitNewBranch]="61901",Kt[Xt.GitPull]="61902",Kt[Xt.GitPush]="61903",Kt[Xt.GitRepo]="61904",Kt[Xt.Glass]="61905",Kt[Xt.GlobeNetworkAdd]="62338",Kt[Xt.GlobeNetwork]="61906",Kt[Xt.Globe]="61907",Kt[Xt.GraphRemove]="61908",Kt[Xt.Graph]="61909",Kt[Xt.GreaterThanOrEqualTo]="61910",Kt[Xt.GreaterThan]="61911",Kt[Xt.GridView]="61912",Kt[Xt.Grid]="61913",Kt[Xt.GroupItem]="62282",Kt[Xt.GroupObjects]="61914",Kt[Xt.GroupedBarChart]="61915",Kt[Xt.HandDown]="61916",Kt[Xt.HandLeft]="61917",Kt[Xt.HandRight]="61918",Kt[Xt.HandUp]="61919",Kt[Xt.Hand]="61920",Kt[Xt.Hat]="61921",Kt[Xt.HeaderOne]="61922",Kt[Xt.HeaderThree]="61923",Kt[Xt.HeaderTwo]="61924",Kt[Xt.Header]="61925",Kt[Xt.Headset]="61926",Kt[Xt.HeartBroken]="61927",Kt[Xt.Heart]="61928",Kt[Xt.HeatGrid]="61929",Kt[Xt.Heatmap]="61930",Kt[Xt.Helicopter]="61931",Kt[Xt.Help]="61932",Kt[Xt.HelperManagement]="61933",Kt[Xt.Hexagon]="62324",Kt[Xt.HighPriority]="61934",Kt[Xt.HighVoltagePole]="62259",Kt[Xt.Highlight]="61935",Kt[Xt.History]="61936",Kt[Xt.Home]="61937",Kt[Xt.HorizontalBarChartAsc]="61938",Kt[Xt.HorizontalBarChartDesc]="61939",Kt[Xt.HorizontalBarChart]="61940",Kt[Xt.HorizontalDistribution]="61941",Kt[Xt.HorizontalInbetween]="62249",Kt[Xt.Hurricane]="61942",Kt[Xt.IdNumber]="61943",Kt[Xt.ImageRotateLeft]="61944",Kt[Xt.ImageRotateRight]="61945",Kt[Xt.Import]="61946",Kt[Xt.InboxFiltered]="61947",Kt[Xt.InboxGeo]="61948",Kt[Xt.InboxSearch]="61949",Kt[Xt.InboxUpdate]="61950",Kt[Xt.Inbox]="61951",Kt[Xt.InfoSign]="61952",Kt[Xt.Inheritance]="61953",Kt[Xt.InheritedGroup]="61954",Kt[Xt.InnerJoin]="61955",Kt[Xt.Input]="62283",Kt[Xt.Insert]="61956",Kt[Xt.Intelligence]="62263",Kt[Xt.Intersection]="61957",Kt[Xt.IpAddress]="61958",Kt[Xt.IssueClosed]="61959",Kt[Xt.IssueNew]="61960",Kt[Xt.Issue]="61961",Kt[Xt.Italic]="61962",Kt[Xt.JoinTable]="61963",Kt[Xt.KeyBackspace]="61964",Kt[Xt.KeyCommand]="61965",Kt[Xt.KeyControl]="61966",Kt[Xt.KeyDelete]="61967",Kt[Xt.KeyEnter]="61968",Kt[Xt.KeyEscape]="61969",Kt[Xt.KeyOption]="61970",Kt[Xt.KeyShift]="61971",Kt[Xt.KeyTab]="61972",Kt[Xt.Key]="61973",Kt[Xt.KnownVehicle]="61974",Kt[Xt.LabTest]="61975",Kt[Xt.Label]="61976",Kt[Xt.LayerOutline]="61977",Kt[Xt.Layer]="61978",Kt[Xt.Layers]="61979",Kt[Xt.LayoutAuto]="61980",Kt[Xt.LayoutBalloon]="61981",Kt[Xt.LayoutBottomRowThreeTiles]="62308",Kt[Xt.LayoutBottomRowTwoTiles]="62307",Kt[Xt.LayoutCircle]="61982",Kt[Xt.LayoutGrid]="61983",Kt[Xt.LayoutGroupBy]="61984",Kt[Xt.LayoutHierarchy]="61985",Kt[Xt.LayoutLeftColumnThreeTiles]="62310",Kt[Xt.LayoutLeftColumnTwoTiles]="62309",Kt[Xt.LayoutLinear]="61986",Kt[Xt.LayoutRightColumnThreeTiles]="62312",Kt[Xt.LayoutRightColumnTwoTiles]="62311",Kt[Xt.LayoutSkewGrid]="61987",Kt[Xt.LayoutSortedClusters]="61988",Kt[Xt.LayoutThreeColumns]="62305",Kt[Xt.LayoutThreeRows]="62306",Kt[Xt.LayoutTopRowThreeTiles]="62314",Kt[Xt.LayoutTopRowTwoTiles]="62313",Kt[Xt.LayoutTwoColumns]="62303",Kt[Xt.LayoutTwoRows]="62304",Kt[Xt.Layout]="61989",Kt[Xt.Learning]="61990",Kt[Xt.LeftJoin]="61991",Kt[Xt.LengthenText]="62270",Kt[Xt.LessThanOrEqualTo]="61992",Kt[Xt.LessThan]="61993",Kt[Xt.Lifesaver]="61994",Kt[Xt.Lightbulb]="61995",Kt[Xt.Lightning]="61996",Kt[Xt.Link]="61997",Kt[Xt.LinkedSquares]="62341",Kt[Xt.ListColumns]="61998",Kt[Xt.ListDetailView]="61999",Kt[Xt.List]="62000",Kt[Xt.Locate]="62001",Kt[Xt.Lock]="62002",Kt[Xt.Locomotive]="62267",Kt[Xt.LogIn]="62003",Kt[Xt.LogOut]="62004",Kt[Xt.LowVoltagePole]="62258",Kt[Xt.Manual]="62005",Kt[Xt.ManuallyEnteredData]="62006",Kt[Xt.ManyToMany]="62007",Kt[Xt.ManyToOne]="62008",Kt[Xt.MapCreate]="62009",Kt[Xt.MapMarker]="62010",Kt[Xt.Map]="62011",Kt[Xt.Maximize]="62012",Kt[Xt.Media]="62013",Kt[Xt.MenuClosed]="62014",Kt[Xt.MenuOpen]="62015",Kt[Xt.Menu]="62016",Kt[Xt.MergeColumns]="62017",Kt[Xt.MergeLinks]="62018",Kt[Xt.Microphone]="62275",Kt[Xt.Minimize]="62019",Kt[Xt.Minus]="62020",Kt[Xt.MobilePhone]="62021",Kt[Xt.MobileVideo]="62022",Kt[Xt.ModalFilled]="62023",Kt[Xt.Modal]="62024",Kt[Xt.Model]="62269",Kt[Xt.Moon]="62025",Kt[Xt.More]="62026",Kt[Xt.Mountain]="62027",Kt[Xt.Move]="62028",Kt[Xt.Mugshot]="62029",Kt[Xt.MultiSelect]="62030",Kt[Xt.Music]="62031",Kt[Xt.Nest]="62032",Kt[Xt.NewDrawing]="62033",Kt[Xt.NewGridItem]="62034",Kt[Xt.NewLayer]="62035",Kt[Xt.NewLayers]="62036",Kt[Xt.NewLink]="62037",Kt[Xt.NewObject]="62038",Kt[Xt.NewPerson]="62039",Kt[Xt.NewPrescription]="62040",Kt[Xt.NewShield]="62281",Kt[Xt.NewTextBox]="62041",Kt[Xt.Ninja]="62042",Kt[Xt.NotEqualTo]="62043",Kt[Xt.NotificationsAdd]="62360",Kt[Xt.NotificationsSnooze]="62044",Kt[Xt.NotificationsUpdated]="62045",Kt[Xt.Notifications]="62046",Kt[Xt.NumberedList]="62047",Kt[Xt.Numerical]="62048",Kt[Xt.ObjectView]="62352",Kt[Xt.Office]="62049",Kt[Xt.Offline]="62050",Kt[Xt.OilField]="62051",Kt[Xt.OneColumn]="62052",Kt[Xt.OneToMany]="62053",Kt[Xt.OneToOne]="62054",Kt[Xt.OpenApplication]="62251",Kt[Xt.Outdated]="62055",Kt[Xt.Output]="62320",Kt[Xt.Package]="62325",Kt[Xt.PageBreak]="62373",Kt[Xt.PageLayout]="62056",Kt[Xt.PanelStats]="62057",Kt[Xt.PanelTable]="62058",Kt[Xt.Panel]="62337",Kt[Xt.Paperclip]="62059",Kt[Xt.Paragraph]="62060",Kt[Xt.PasteVariable]="62278",Kt[Xt.PathSearch]="62061",Kt[Xt.Path]="62062",Kt[Xt.Pause]="62063",Kt[Xt.People]="62064",Kt[Xt.Percentage]="62065",Kt[Xt.Person]="62066",Kt[Xt.PhoneCall]="62279",Kt[Xt.PhoneForward]="62280",Kt[Xt.PhoneSearch]="62359",Kt[Xt.Phone]="62067",Kt[Xt.PieChart]="62068",Kt[Xt.Pill]="62326",Kt[Xt.Pin]="62069",Kt[Xt.Pistol]="62364",Kt[Xt.PivotTable]="62070",Kt[Xt.Pivot]="62071",Kt[Xt.Play]="62072",Kt[Xt.Playbook]="62244",Kt[Xt.Plus]="62073",Kt[Xt.PolygonFilter]="62074",Kt[Xt.Power]="62075",Kt[Xt.PredictiveAnalysis]="62076",Kt[Xt.Prescription]="62077",Kt[Xt.Presentation]="62078",Kt[Xt.Print]="62079",Kt[Xt.Projects]="62080",Kt[Xt.Properties]="62081",Kt[Xt.Property]="62082",Kt[Xt.PublishFunction]="62083",Kt[Xt.Pulse]="62084",Kt[Xt.Rain]="62085",Kt[Xt.Random]="62086",Kt[Xt.RangeRing]="62321",Kt[Xt.Record]="62087",Kt[Xt.RectHeight]="62245",Kt[Xt.RectWidth]="62246",Kt[Xt.Rectangle]="62241",Kt[Xt.Redo]="62088",Kt[Xt.Refresh]="62089",Kt[Xt.Regex]="62255",Kt[Xt.RegressionChart]="62090",Kt[Xt.RemoveColumnLeft]="62091",Kt[Xt.RemoveColumnRight]="62092",Kt[Xt.RemoveColumn]="62093",Kt[Xt.RemoveRowBottom]="62094",Kt[Xt.RemoveRowTop]="62095",Kt[Xt.Remove]="62096",Kt[Xt.Repeat]="62097",Kt[Xt.Reset]="62098",Kt[Xt.Resolve]="62099",Kt[Xt.Rig]="62100",Kt[Xt.RightJoin]="62101",Kt[Xt.Ring]="62102",Kt[Xt.RocketSlant]="62103",Kt[Xt.Rocket]="62104",Kt[Xt.RootFolder]="62367",Kt[Xt.RotateCcw]="62345",Kt[Xt.RotateCw]="62344",Kt[Xt.RotateDocument]="62105",Kt[Xt.RotatePage]="62106",Kt[Xt.Route]="62107",Kt[Xt.RunHistory]="62355",Kt[Xt.Satellite]="62108",Kt[Xt.Saved]="62109",Kt[Xt.ScatterPlot]="62110",Kt[Xt.SearchAround]="62111",Kt[Xt.SearchTemplate]="62112",Kt[Xt.SearchText]="62113",Kt[Xt.Search]="62114",Kt[Xt.SegmentedControl]="62115",Kt[Xt.Select]="62116",Kt[Xt.SelectionBoxAdd]="62362",Kt[Xt.SelectionBoxEdit]="62363",Kt[Xt.SelectionBox]="62361",Kt[Xt.Selection]="62117",Kt[Xt.SendBackward]="62293",Kt[Xt.SendMessage]="62118",Kt[Xt.SendToGraph]="62119",Kt[Xt.SendToMap]="62120",Kt[Xt.SendTo]="62121",Kt[Xt.Sensor]="62268",Kt[Xt.SeriesAdd]="62122",Kt[Xt.SeriesConfiguration]="62123",Kt[Xt.SeriesDerived]="62124",Kt[Xt.SeriesFiltered]="62125",Kt[Xt.SeriesSearch]="62126",Kt[Xt.ServerInstall]="62327",Kt[Xt.Server]="62328",Kt[Xt.Settings]="62127",Kt[Xt.Shapes]="62128",Kt[Xt.Share]="62129",Kt[Xt.SharedFilter]="62130",Kt[Xt.Shield]="62131",Kt[Xt.Ship]="62132",Kt[Xt.Shop]="62133",Kt[Xt.ShoppingCart]="62134",Kt[Xt.ShortenText]="62271",Kt[Xt.SignalSearch]="62135",Kt[Xt.SimCard]="62136",Kt[Xt.Slash]="62137",Kt[Xt.SmallCross]="62138",Kt[Xt.SmallInfoSign]="62260",Kt[Xt.SmallMinus]="62139",Kt[Xt.SmallPlus]="62140",Kt[Xt.SmallSquare]="62141",Kt[Xt.SmallTick]="62142",Kt[Xt.Snowflake]="62143",Kt[Xt.SoccerBall]="62288",Kt[Xt.SocialMedia]="62144",Kt[Xt.SortAlphabeticalDesc]="62145",Kt[Xt.SortAlphabetical]="62146",Kt[Xt.SortAsc]="62147",Kt[Xt.SortDesc]="62148",Kt[Xt.SortNumericalDesc]="62149",Kt[Xt.SortNumerical]="62150",Kt[Xt.Sort]="62151",Kt[Xt.SpellCheck]="62272",Kt[Xt.SplitColumns]="62152",Kt[Xt.SportsStadium]="62289",Kt[Xt.Square]="62153",Kt[Xt.StackedChart]="62154",Kt[Xt.StadiumGeometry]="62155",Kt[Xt.StarEmpty]="62156",Kt[Xt.Star]="62157",Kt[Xt.StepBackward]="62158",Kt[Xt.StepChart]="62159",Kt[Xt.StepForward]="62160",Kt[Xt.Stop]="62161",Kt[Xt.Stopwatch]="62162",Kt[Xt.Strikethrough]="62163",Kt[Xt.Style]="62164",Kt[Xt.Subscript]="62265",Kt[Xt.SubtractRightJoin]="62354",Kt[Xt.Superscript]="62266",Kt[Xt.SwapHorizontal]="62165",Kt[Xt.SwapVertical]="62166",Kt[Xt.Sweep]="62372",Kt[Xt.Switch]="62167",Kt[Xt.SymbolCircle]="62168",Kt[Xt.SymbolCross]="62169",Kt[Xt.SymbolDiamond]="62170",Kt[Xt.SymbolRectangle]="62242",Kt[Xt.SymbolSquare]="62171",Kt[Xt.SymbolTriangleDown]="62172",Kt[Xt.SymbolTriangleUp]="62173",Kt[Xt.Syringe]="62174",Kt[Xt.TableSync]="62318",Kt[Xt.TagAdd]="62329",Kt[Xt.TagPromote]="62330",Kt[Xt.TagRefresh]="62331",Kt[Xt.TagUndo]="62332",Kt[Xt.Tag]="62175",Kt[Xt.Tags]="62333",Kt[Xt.TakeAction]="62176",Kt[Xt.Tank]="62177",Kt[Xt.Target]="62178",Kt[Xt.Taxi]="62179",Kt[Xt.Team]="62290",Kt[Xt.Temperature]="62180",Kt[Xt.TextHighlight]="62181",Kt[Xt.ThAdd]="62346",Kt[Xt.ThDerived]="62182",Kt[Xt.ThDisconnect]="62183",Kt[Xt.ThFiltered]="62184",Kt[Xt.ThListAdd]="62347",Kt[Xt.ThList]="62185",Kt[Xt.ThVirtualAdd]="62349",Kt[Xt.ThVirtual]="62348",Kt[Xt.Th]="62186",Kt[Xt.ThirdParty]="62187",Kt[Xt.ThumbsDown]="62188",Kt[Xt.ThumbsUp]="62189",Kt[Xt.TickCircle]="62190",Kt[Xt.Tick]="62191",Kt[Xt.Time]="62192",Kt[Xt.TimelineAreaChart]="62193",Kt[Xt.TimelineBarChart]="62194",Kt[Xt.TimelineEvents]="62195",Kt[Xt.TimelineLineChart]="62196",Kt[Xt.Tint]="62197",Kt[Xt.Torch]="62198",Kt[Xt.Tractor]="62199",Kt[Xt.Train]="62200",Kt[Xt.Translate]="62201",Kt[Xt.Trash]="62202",Kt[Xt.Tree]="62203",Kt[Xt.TrendingDown]="62204",Kt[Xt.TrendingUp]="62205",Kt[Xt.Trophy]="62287",Kt[Xt.Truck]="62206",Kt[Xt.TwoColumns]="62207",Kt[Xt.Unarchive]="62208",Kt[Xt.Underline]="62209",Kt[Xt.Undo]="62210",Kt[Xt.UngroupObjects]="62211",Kt[Xt.UnknownVehicle]="62212",Kt[Xt.Unlink]="62277",Kt[Xt.Unlock]="62213",Kt[Xt.Unpin]="62214",Kt[Xt.Unresolve]="62215",Kt[Xt.Updated]="62216",Kt[Xt.Upload]="62217",Kt[Xt.User]="62218",Kt[Xt.Variable]="62219",Kt[Xt.Vector]="62302",Kt[Xt.VerticalBarChartAsc]="62220",Kt[Xt.VerticalBarChartDesc]="62221",Kt[Xt.VerticalDistribution]="62222",Kt[Xt.VerticalInbetween]="62250",Kt[Xt.Video]="62223",Kt[Xt.Virus]="62224",Kt[Xt.VolumeDown]="62225",Kt[Xt.VolumeOff]="62226",Kt[Xt.VolumeUp]="62227",Kt[Xt.Walk]="62228",Kt[Xt.WarningSign]="62229",Kt[Xt.WaterfallChart]="62230",Kt[Xt.Waves]="62231",Kt[Xt.WidgetButton]="62232",Kt[Xt.WidgetFooter]="62233",Kt[Xt.WidgetHeader]="62234",Kt[Xt.Widget]="62235",Kt[Xt.Wind]="62236",Kt[Xt.WrenchRedo]="62334",Kt[Xt.WrenchSnooze]="62335",Kt[Xt.WrenchTime]="62336",Kt[Xt.Wrench]="62237",Kt[Xt.ZoomIn]="62238",Kt[Xt.ZoomOut]="62239",Kt[Xt.ZoomToFit]="62240";var nfe={},ife={};for(var vN=0,HX=Object.values(Xt);vN<HX.length;vN++){var dP=HX[vN];nfe[oEe(dP)]=dP,ife[lEe(dP).toUpperCase()]=dP}var Si=Gn(Gn({},nfe),ife),fEe=new Set(Object.values(Si));function hEe(t){return typeof NODE_ENV<"u"&&NODE_ENV===t}function dEe(t,e){return d2(this,void 0,void 0,function(){var r,n,a;return g2(this,function(c){switch(c.label){case 0:return r=hEe("development")&&typeof performance<"u",r&&(n=performance.now(),console.info("Started '".concat(t,"'..."))),[4,e()];case 1:return c.sent(),r&&(a=Math.round(performance.now()-n),console.info("Finished '".concat(t,"' in ").concat(a,"ms"))),[2]}})})}function gEe(t){return d2(this,void 0,void 0,function(){var e,r;return g2(this,function(n){switch(n.label){case 0:return e=t.loader,r=e===void 0?Xw.defaultLoader:e,typeof r!="function"?[3,1]:[2,r];case 1:return r!=="all"?[3,3]:[4,UX(()=>import("./allPathsLoader-RgZewRv3.js"),[])];case 2:return[2,n.sent().allPathsLoader];case 3:return[4,UX(()=>import("./splitPathsBySizeLoader-CPmfblnz.js"),[])];case 4:return[2,n.sent().splitPathsBySizeLoader]}})})}var q_=function(){function t(){this.defaultLoader="split-by-size",this.loadedIconPaths16=new Map,this.loadedIconPaths20=new Map}return t.setLoaderOptions=function(e){e.loader!==void 0&&(Xw.defaultLoader=e.loader)},t.load=function(e,r,n){return d2(this,void 0,void 0,function(){var a=this;return g2(this,function(c){switch(c.label){case 0:return Array.isArray(e)||(e=[e]),[4,Promise.all(e.map(function(s){return a.loadImpl(s,r,n)}))];case 1:return c.sent(),[2]}})})},t.loadAll=function(e){return d2(this,void 0,void 0,function(){var r,n=this;return g2(this,function(a){return r=Object.values(Si),dEe("[Blueprint] loading all icons",function(){return d2(n,void 0,void 0,function(){return g2(this,function(c){switch(c.label){case 0:return[4,Promise.all([this.load(r,ga.STANDARD,e),this.load(r,ga.LARGE,e)])];case 1:return c.sent(),[2]}})})}),[2]})})},t.getPaths=function(e,r){if(this.isValidIconName(e)){var n=r<ga.LARGE?Xw.loadedIconPaths16:Xw.loadedIconPaths20;return n.get(e)}},t.loadImpl=function(e,r,n){return n===void 0&&(n={}),d2(this,void 0,void 0,function(){var a,c,s,h,i;return g2(this,function(l){switch(l.label){case 0:return this.isValidIconName(e)?(a=r<ga.LARGE?Xw.loadedIconPaths16:Xw.loadedIconPaths20,a.has(e)?[2]:[4,gEe(n)]):(console.error("[Blueprint] Unknown icon '".concat(e,"'")),[2]);case 1:c=l.sent(),l.label=2;case 2:return l.trys.push([2,4,,5]),s=r<ga.LARGE?ga.STANDARD:ga.LARGE,[4,c(e,s)];case 3:return h=l.sent(),a.set(e,h),[3,5];case 4:return i=l.sent(),console.error("[Blueprint] Unable to load ".concat(r,"px icon '").concat(e,"'"),i),[3,5];case 5:return[2]}})})},t.isValidIconName=function(e){return fEe.has(e)},t}(),Xw=new q_,vEe="bp5",jX="".concat(vEe,"-icon"),VX=new Map;function pEe(t){var e,r=(e=VX.get(t))!==null&&e!==void 0?e:0;return VX.set(t,r+1),"".concat(t,"-").concat(r)}var Ic=mt.forwardRef(function(t,e){var r=t.children,n=t.className,a=t.color,c=t.htmlTitle,s=t.iconName,h=t.size,i=h===void 0?ga.STANDARD:h,l=t.svgProps,d=t.tagName,o=d===void 0?"span":d,f=t.title,A=ys(t,["children","className","color","htmlTitle","iconName","size","svgProps","tagName","title"]),w=i>=ga.LARGE,I=w?ga.LARGE:ga.STANDARD,m="0 0 ".concat(I," ").concat(I),u=pEe("iconTitle"),g=Gn({fill:a,height:i,role:"img",viewBox:m,width:i},l);return o===null?mt.createElement("svg",Gn({"aria-labelledby":f?u:void 0,"data-icon":s,ref:e},g,A,{className:Ti(n,l==null?void 0:l.className)}),f&&mt.createElement("title",{id:u},f),r):mt.createElement(o,Gn(Gn({"aria-hidden":f?void 0:!0},A),{className:Ti(jX,"".concat(jX,"-").concat(s),n),ref:e,title:c}),mt.createElement("svg",Gn({"data-icon":s},g,{className:l==null?void 0:l.className}),f&&mt.createElement("title",null,f),r))});Ic.displayName="Blueprint5.SVGIconContainer";var nV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-down",ref:e},t),mt.createElement("path",{d:r?"M320 180C314 180 310 178 306 174L220 88V360C220 370 212 380 200 380S180 370 180 360V88L94 174C90 178 86 180 80 180C70 180 60 172 60 160C60 154 62 150 66 146L186 26C190 22 194 20 200 20S210 22 214 26L334 146C338 150 340 154 340 160C340 172 330 180 320 180L320 180z":"M260 160C254 160 250 158 246 154L180 88V280C180 290 172 300 160 300S140 290 140 280V88L74 154C70 158 66 160 60 160C50 160 40 150 40 140C40 134 42 130 46 126L146 26C150 22 154 20 160 20S170 22 174 26L274 126C278 130 280 134 280 140C280 152 272 160 260 160L260 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});nV.defaultProps={size:ga.STANDARD};nV.displayName="Blueprint5.Icon.ArrowDown";var iV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-left",ref:e},t),mt.createElement("path",{d:r?"M360 220H88.2L174 305.8C177.8 309.4 180 314.4 180 320C180 331 171 340 160 340C154.4 340 149.4 337.8 145.8 334.2L25.8 214.2C22.2 210.6 20 205.6 20 200C20 194.4 22.2 189.4 25.8 185.8L145.8 65.8C149.4 62.2 154.4 60 160 60C171 60 180 69 180 80C180 85.6 177.8 90.6 174.2 94.2000000000001L88.2 180H360C371 180 380 189 380 200C380 211 371 220 360 220z":"M279.8 180.2H88.2L154 246C157.6 249.6 159.8 254.6 159.8 260.2C159.8 271.2 150.8 280.2 139.8 280.2C134.2 280.2 129.2 278 125.6 274.4L25.6 174.4C22 170.6 19.8 165.6 19.8 160.2S22 149.6 25.6 146L125.6 46C129.2 42.4 134.2 40.2 139.8 40.2C150.8 40.2 159.8 49.2 159.8 60.2000000000001C159.8 65.8 157.6 70.8 154 74.4L88.2 140.2H280C291 140.2 300 149.2 300 160.2S290.8 180.2 279.8 180.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});iV.defaultProps={size:ga.STANDARD};iV.displayName="Blueprint5.Icon.ArrowLeft";var aV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-right",ref:e},t),mt.createElement("path",{d:r?"M374.2000000000001 214.2L254.2 334.2000000000001C250.6 337.8 245.6 340 240 340C229 340 220 331 220 320C220 314.4 222.2 309.4 225.8 305.8L311.8 220H40C29 220 20 211 20 200C20 189 29 180 40 180H311.8L226 94.2000000000001C222.2 90.6 220 85.6 220 80C220 69 229 60 240 60C245.6 60 250.6 62.2 254.2 65.8L374.2000000000001 185.8C377.8 189.4 380 194.4 380 200C380 205.6 377.8 210.6 374.2000000000001 214.2z":"M294 174.2L194 274.2C190.4 278 185.4 280.2 179.8 280.2C168.8 280.2 159.8 271.2 159.8 260.2C159.8 254.6 162 249.6 165.6 246L231.4 180.2H39.8C28.8 180.2 19.8 171.2 19.8 160.2S28.8 140.2 39.8 140.2H231.6L165.8 74.4C162.2 70.8 160 65.8 160 60.1999999999999C160 49.1999999999999 169 40.1999999999999 180 40.1999999999999C185.6 40.1999999999999 190.6 42.4 194.2 45.9999999999999L294.2000000000001 146C297.8 149.5999999999999 300 154.5999999999999 300 160.1999999999999S297.6 170.6 294 174.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});aV.defaultProps={size:ga.STANDARD};aV.displayName="Blueprint5.Icon.ArrowRight";var oV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"arrow-up",ref:e},t),mt.createElement("path",{d:r?"M334 254L214 374C210 378 206 380 200 380S190 378 186 374L66 254C62 250 60 246 60 240C60 228 70 220 80 220C86 220 90 222 94 226L180 312V40C180 30 188 20 200 20S220 30 220 40V312L306 226C310 222 314 220 320 220C330 220 340 228 340 240C340 246 338 250 334 254L334 254z":"M274 194L174 294C170 298 166 300 160 300S150 298 146 294L46 194C42 190 40 186 40 180C40 168 50 160 60 160C66 160 70 162 74 166L140 232V40C140 28 148 20 160 20S180 28 180 40V232L246 166C250 162 254 160 260 160C272 160 280 168 280 180C280 186 278 190 274 194L274 194z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});oV.defaultProps={size:ga.STANDARD};oV.displayName="Blueprint5.Icon.ArrowUp";var sV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"caret-right",ref:e},t),mt.createElement("path",{d:r?"M280 200C280 206.2 277 211.4 272.6 215.2L272.8 215.4L152.8 315.4L152.6 315.2C149.2 318 144.8 320 140 320C129 320 120 311 120 300V100C120 89 129 80 140 80C144.8 80 149.2 82 152.6 84.8L152.8 84.6L272.8 184.6L272.6 184.8C277 188.6 280 193.8 280 200z":"M220 160C220 163 218.6 165.6 216.6 167.4L216.6 167.4L136.6 237.4L136.6 237.4C134.8 239 132.6 240 130 240C124.4 240 120 235.6 120 230V90C120 84.4 124.4 80 130 80C132.6 80 134.8 81 136.6 82.6C136.6 82.6 136.6 82.6 136.6 82.6L216.6 152.6L216.6 152.6C218.6 154.4 220 157 220 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});sV.defaultProps={size:ga.STANDARD};sV.displayName="Blueprint5.Icon.CaretRight";var AD=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"cross",ref:e},t),mt.createElement("path",{d:r?"M228.2 200L314 285.8C317.8 289.4 320 294.4 320 300C320 311 311 320 300 320C294.4000000000001 320 289.4000000000001 317.8 285.8 314.2L200 228.2L114.2 314.2C110.6 317.8 105.6 320 100 320C89 320 80 311 80 300C80 294.4 82.2 289.4 85.8 285.8L171.8 200L86 114.2000000000001C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L200 171.8L285.8 86C289.4000000000001 82.2 294.4000000000001 80 300 80C311 80 320 89 320 100C320 105.6 317.8 110.6 314.2000000000001 114.2000000000001L228.2 200z":"M188.2 160L254 225.8C257.8 229.4 260 234.4 260 240C260 251 251 260 240 260C234.4 260 229.4 257.8 225.8 254.2L160 188.2L94.2 254.2C90.6 257.8 85.6 260 80 260C69 260 60 251 60 240C60 234.4 62.2 229.4 65.8 225.8L131.8 160L66 94.2C62.2 90.6 60 85.6 60 80C60 69 69 60 80 60C85.6 60 90.6 62.2 94.2 65.8L160 131.8L225.8 66C229.4 62.2 234.4 60 240 60C251 60 260 69 260 80C260 85.6 257.8 90.6 254.2 94.2L188.2 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});AD.defaultProps={size:ga.STANDARD};AD.displayName="Blueprint5.Icon.Cross";var lV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"drag-handle-vertical",ref:e},t),mt.createElement("path",{d:r?"M150 280C133.4 280 120 266.6 120 250S133.4 220 150 220S180 233.4 180 250S166.6 280 150 280zM150 180C133.4 180 120 166.6 120 150S133.4 120 150 120S180 133.4 180 150S166.6 180 150 180zM150 80C133.4 80 120 66.6 120 50S133.4 20 150 20S180 33.4 180 50S166.6 80 150 80zM250 320C266.6 320 280 333.4 280 350S266.6 380 250 380S220 366.6 220 350S233.4 320 250 320zM150 380C133.4 380 120 366.6 120 350S133.4 320 150 320S180 333.4 180 350S166.6 380 150 380zM250 180C233.4 180 220 166.6 220 150S233.4 120 250 120S280 133.4 280 150S266.6 180 250 180zM250 80C233.4 80 220 66.6 220 50S233.4 20 250 20S280 33.4 280 50S266.6 80 250 80zM250 280C233.4 280 220 266.6 220 250S233.4 220 250 220S280 233.4 280 250S266.6 280 250 280z":"M120 140C109 140 100 131 100 120C100 109 109 100 120 100S140 109 140 120C140 131 131 140 120 140zM200 260C211 260 220 269 220 280C220 291 211 300 200 300S180 291 180 280C180 269 189 260 200 260zM120 60C109 60 100 51 100 40C100 29 109 20 120 20S140 29 140 40C140 51 131 60 120 60zM120 220C109 220 100 211 100 200C100 189 109 180 120 180S140 189 140 200C140 211 131 220 120 220zM120 300C109 300 100 291 100 280C100 269 109 260 120 260S140 269 140 280C140 291 131 300 120 300zM200 140C189 140 180 131 180 120C180 109 189 100 200 100S220 109 220 120C220 131 211 140 200 140zM200 220C189 220 180 211 180 200C180 189 189 180 200 180S220 189 220 200C220 211 211 220 200 220zM200 60C189 60 180 51 180 40C180 29 189 20 200 20S220 29 220 40C220 51 211 60 200 60z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});lV.defaultProps={size:ga.STANDARD};lV.displayName="Blueprint5.Icon.DragHandleVertical";var uV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"error",ref:e},t),mt.createElement("path",{d:r?"M200 400C89.6 400 0 310.4 0 200C0 89.6 89.6 0 200 0S400 89.6 400 200C400 310.4 310.4 400 200 400zM220 80H180V120H220V80zM220 140H180V320H220V140z":"M159.8 320.2C71.4 320.2 -0.2 248.6 -0.2 160.2S71.4 0.2 159.8 0.2S319.8 71.8 319.8 160.2S248.2 320.2 159.8 320.2zM179.8 60.2H139.8V100.2H179.8V60.2zM179.8 120.2H139.8V260.2H179.8V120.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});uV.defaultProps={size:ga.STANDARD};uV.displayName="Blueprint5.Icon.Error";var cV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"info-sign",ref:e},t),mt.createElement("path",{d:r?"M200 400C89.6 400 0 310.4 0 200C0 89.6 89.6 0 200 0S400 89.6 400 200C400 310.4 310.4 400 200 400zM180 320H220V280H180V320zM260 80H140V100H180V240H160V260H220V100H260V80z":"M160 320C71.6 320 0 248.4 0 160S71.6 0 160 0S320 71.6 320 160S248.4 320 160 320zM140 260H180V220H140V260zM200 60H120V80H140V180H120V200H180V80H200V60z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});cV.defaultProps={size:ga.STANDARD};cV.displayName="Blueprint5.Icon.InfoSign";var OL=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-command",ref:e},t),mt.createElement("path",{d:r?"M310 160H280V240H310C348.6 240 380 271.4 380 310S348.6 380 310 380S240 348.6 240 310V280H160V310C160 348.6 128.6 380 90 380S20 348.6 20 310S51.4 240 90 240H120V160H90C51.4 160 20 128.6 20 90S51.4 20 90 20S160 51.4 160 90V120H240V90C240 51.4 271.4 20 310 20S380 51.4 380 90S348.6 160 310 160zM310 340C326.6 340 340 326.6 340 310S326.6 280 310 280S280 293.4 280 310S293.4 340 310 340zM90 60C73.4 60 60 73.4 60 90S73.4 120 90 120S120 106.6 120 90S106.6 60 90 60zM90 280C73.4 280 60 293.4 60 310S73.4 340 90 340S120 326.6 120 310S106.6 280 90 280zM240 160H160V240H240V160zM310 60C293.4 60 280 73.4 280 90S293.4 120 310 120S340 106.6 340 90S326.6 60 310 60z":"M240 140H220V180H240C273.2 180 300 206.8 300 240S273.2 300 240 300S180 273.2 180 240V220H140V240C140 273.2 113.2 300 80 300S20 273.2 20 240S46.8 180 80 180H100V140H80C46.8 140 20 113.2 20 80S46.8 20 80 20S140 46.8 140 80V100H180V80C180 46.8 206.8 20 240 20S300 46.8 300 80S273.2 140 240 140zM240 260C251 260 260 251 260 240C260 229 251 220 240 220S220 229 220 240C220 251 229 260 240 260zM80 60C69 60 60 69 60 80C60 91 69 100 80 100S100 91 100 80C100 69 91 60 80 60zM80 220C69 220 60 229 60 240C60 251 69 260 80 260S100 251 100 240C100 229 91 220 80 220zM180 140H140V180H180V140zM240 60C229 60 220 69 220 80C220 91 229 100 240 100S260 91 260 80C260 69 251 60 240 60z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});OL.defaultProps={size:ga.STANDARD};OL.displayName="Blueprint5.Icon.KeyCommand";var fV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-control",ref:e},t),mt.createElement("path",{d:r?"M334.2000000000001 254.2L214.2 374.2C210.6 377.8 205.6 380 200 380S189.4 377.8 185.8 374.2L65.8 254.2C62.2 250.6 60 245.6 60 240C60 229 69 220 80 220C85.6 220 90.6 222.2 94.2 225.8L200 331.8L305.8 226C309.4000000000001 222.2 314.4000000000001 220 320 220C331 220 340 229 340 240C340 245.6 337.8 250.6 334.2000000000001 254.2z":"M254.2 214.2L174.2 294.2C170.6 297.8 165.6 300 160 300S149.4 297.8 145.8 294.2L65.8 214.2C62.2 210.6 60 205.6 60 200C60 189 69 180 80 180C85.6 180 90.6 182.2 94.2 185.8L160 251.8L225.8 186C229.4 182.2 234.4 180 240 180C251 180 260 189 260 200C260 205.6 257.8 210.6 254.2 214.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});fV.defaultProps={size:ga.STANDARD};fV.displayName="Blueprint5.Icon.KeyControl";var hV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-delete",ref:e},t),mt.createElement("path",{d:r?"M394.2000000000001 214.2L274.2000000000001 334.2000000000001C270.6 337.8 265.6 340 260 340H20C9 340 0 331 0 320V80C0 69 9 60 20 60H260C265.6 60 270.6 62.2 274.2000000000001 65.8L394.2000000000001 185.8C397.8 189.4 400 194.4 400 200C400 205.6 397.8 210.6 394.2000000000001 214.2zM214.2 154.2C217.8 150.6 220 145.6 220 140C220 129 211 120 200 120C194.4 120 189.4 122.2 185.8 125.8L140 171.8L94.2 126C90.6 122.2 85.6 120 80 120C69 120 60 129 60 140C60 145.6 62.2 150.6 65.8 154.2L111.8 200L65.8 245.8C62.2 249.4 60 254.4 60 260C60 271 69 280 80 280C85.6 280 90.6 277.8 94.2 274.2L140 228.2L185.8 274C189.4 277.8 194.4 280 200 280C211 280 220 271 220 260C220 254.4 217.8 249.4 214.2 245.8L168.2 200L214.2 154.2z":"M314.2000000000001 174.2L214.2 274.2C210.6 277.8 205.6 280 200 280H20C9 280 0 271 0 260V60C0 49 9 40 20 40H200C205.6 40 210.6 42.2 214.2 45.8L314.2000000000001 145.8C317.8 149.4 320 154.4 320 160C320 165.6 317.8 170.6 314.2000000000001 174.2zM174.2 134.2C177.8 130.6 180 125.6 180 120C180 109 171 100 160 100C154.4 100 149.4 102.2 145.8 105.8L120 131.8L94.2 106C90.6 102.2 85.6 100 80 100C69 100 60 109 60 120C60 125.6 62.2 130.6 65.8 134.2L91.8 160L65.8 185.8C62.2 189.4 60 194.4 60 200C60 211 69 220 80 220C85.6 220 90.6 217.8 94.2 214.2L120 188.2L145.8 214C149.4 217.8 154.4 220 160 220C171 220 180 211 180 200C180 194.4 177.8 189.4 174.2 185.8L148.2 160L174.2 134.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});hV.defaultProps={size:ga.STANDARD};hV.displayName="Blueprint5.Icon.KeyDelete";var dV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-enter",ref:e},t),mt.createElement("path",{d:r?"M360 360C349 360 340 351 340 340V240C340 195.8 304.2000000000001 160 260 160H88.2L134 205.8C137.8 209.4 140 214.4 140 220C140 231 131 240 120 240C114.4 240 109.4 237.8 105.8 234.2L25.8 154.2C22.2 150.6 20 145.6 20 140C20 134.4 22.2 129.4 25.8 125.8L105.8 45.8C109.4 42.2 114.4 40 120 40C131 40 140 49 140 60C140 65.6 137.8 70.6 134.2 74.2000000000001L88.2 120H260C326.2 120 380 173.8 380 240V340C380 351 371 360 360 360z":"M280 280C269 280 260 271 260 260V200C260 166.8 233.2 140 200 140H88.2L114 165.8C117.8 169.4 120 174.4 120 180C120 191 111 200 100 200C94.4 200 89.4 197.8 85.8 194.2L25.8 134.2C22.2 130.6 20 125.6 20 120C20 114.4 22.2 109.4 25.8 105.8L85.8 45.8C89.4 42.2 94.4 40 100 40C111 40 120 49 120 60C120 65.6 117.8 70.6 114.2 74.2L88.2 100H200C255.2 100 300 144.8 300 200V260C300 271 291 280 280 280z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});dV.defaultProps={size:ga.STANDARD};dV.displayName="Blueprint5.Icon.KeyEnter";var gV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-option",ref:e},t),mt.createElement("path",{d:r?"M260 320H380C391 320 400 329 400 340C400 351 391 360 380 360H260C249 360 240 351 240 340C240 329 249 320 260 320zM380 80H291.6L137.4 350L137 349.8C133.6 355.8 127.4 360 120 360H20C9 360 0 351 0 340C0 329 9 320 20 320H108.4L262.6 50L262.8 50.2C266.4 44.2 272.6 40 280 40H380C391 40 400 49 400 60C400 71 391 80 380 80z":"M220 240H300C311 240 320 249 320 260C320 271 311 280 300 280H220C209 280 200 271 200 260C200 249 209 240 220 240zM300 80H231.4L117.2 270.2L116.8 270.2C113.4 276 107.2 280 100 280H20C9 280 0 271 0 260C0 249 9 240 20 240H88.6L202.8 49.8L203 50C206.6 44 212.8 40 220 40H300C311 40 320 49 320 60C320 71 311 80 300 80z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});gV.defaultProps={size:ga.STANDARD};gV.displayName="Blueprint5.Icon.KeyOption";var vV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"key-shift",ref:e},t),mt.createElement("path",{d:r?"M354.8 193L354.8 193L215 353.2L214.8 353C211.2 357.2 206 360 200 360S188.8 357.2 185.2 353L185 353.2L45 193.2L45.2 193C42 189.6 40 185 40 180C40 169 49 160 60 160H120V60C120 49 129 40 140 40H260C271 40 280 49 280 60V160H340C351 160 360 169 360 180C360 185 358 189.6 354.8 193z":"M274.2000000000001 174.2L174.2 274.2C170.6 277.8 165.6 280 160 280S149.4 277.8 145.8 274.2L45.8 174.2C42.2 170.6 40 165.6 40 160C40 149 49 140 60 140H100V60C100 49 109 40 120 40H200C211 40 220 49 220 60V140H260C271 140 280 149 280 160C280 165.6 277.8 170.6 274.2000000000001 174.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});vV.defaultProps={size:ga.STANDARD};vV.displayName="Blueprint5.Icon.KeyShift";var DL=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"more",ref:e},t),mt.createElement("path",{d:r?"M20 190A50 50 0 0 1 120 190A50 50 0 0 1 20 190M300 190A50 50 0 0 1 400 190A50 50 0 0 1 300 190M160 190A50 50 0 0 1 260 190A50 50 0 0 1 160 190":"M0 159.4A40 40 0 0 1 80 159.4A40 40 0 0 1 0 159.4M240 159.4A40 40 0 0 1 320 159.4A40 40 0 0 1 240 159.4M120 159.4A40 40 0 0 1 200 159.4A40 40 0 0 1 120 159.4",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});DL.defaultProps={size:ga.STANDARD};DL.displayName="Blueprint5.Icon.More";var pV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"search",ref:e},t),mt.createElement("path",{d:r?"M391.2 51.2L292.4 150C309.8 175.8 320 206.6 320 240C320 328.4 248.4 400 160 400S0 328.4 0 240S71.6 80 160 80C193.4 80 224.2 90.2 250 107.6L348.8 8.8C354.2000000000001 3.4 361.8 0 370 0C386.6 0 400 13.4 400 30C400 38.2 396.6 45.8 391.2 51.2zM160 120C93.8 120 40 173.8 40 240S93.8 360 160 360S280 306.2000000000001 280 240S226.2 120 160 120z":"M311 51.4L257.6 105C271.6 126.8 279.8 152.6 279.8 180.2C279.8 257.6 217.2 320.2 139.8 320.2S-0.2 257.6 -0.2 180.2S62.4 40.2 139.8 40.2C167.6 40.2 193.4 48.6 215 62.4L268.6 9C274 3.6 281.6 0.2 289.8 0.2C306.4 0.2 319.8 13.6 319.8 30.2C319.8 38.4 316.4 46 311 51.4zM139.8 80.2C84.6 80.2 39.8 125 39.8 180.2S84.6 280.2 139.8 280.2S239.8 235.4 239.8 180.2S195 80.2 139.8 80.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});pV.defaultProps={size:ga.STANDARD};pV.displayName="Blueprint5.Icon.Search";var CD=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"small-cross",ref:e},t),mt.createElement("path",{d:r?"M228.2 200L294 265.8C297.8 269.4 300 274.4 300 280C300 291 291 300 280 300C274.4000000000001 300 269.4000000000001 297.8 265.8 294.2L200 228.2L134.2 294.2C130.6 297.8 125.6 300 120 300C109 300 100 291 100 280C100 274.4 102.2 269.4 105.8 265.8L171.8 200L106 134.2000000000001C102.2 130.6 100 125.6 100 120C100 109 109 100 120 100C125.6 100 130.6 102.2 134.2 105.8L200 171.8L265.8 106C269.4000000000001 102.2 274.4000000000001 100 280 100C291 100 300 109 300 120C300 125.6 297.8 130.6 294.2000000000001 134.2000000000001L228.2 200z":"M188.2 160L234 205.8C237.8 209.4 240 214.4 240 220C240 231 231 240 220 240C214.4 240 209.4 237.8 205.8 234.2L160 188.2L114.2 234.2C110.6 237.8 105.6 240 100 240C89 240 80 231 80 220C80 214.4 82.2 209.4 85.8 205.8L131.8 160L86 114.2C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L160 131.8L205.8 86C209.4 82.2 214.4 80 220 80C231 80 240 89 240 100C240 105.6 237.8 110.6 234.2 114.2L188.2 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});CD.defaultProps={size:ga.STANDARD};CD.displayName="Blueprint5.Icon.SmallCross";var mV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"small-tick",ref:e},t),mt.createElement("path",{d:r?"M300 300C294.4000000000001 300 289.4000000000001 297.8 285.8 294.2L160 168.2L114.2 214.2C110.6 217.8 105.6 220 100 220C89 220 80 211 80 200C80 194.4 82.2 189.4 85.8 185.8L145.8 125.8C149.4 122.2 154.4 120 160 120S170.6 122.2 174.2 125.8L314.2000000000001 265.8C317.8 269.4 320 274.4 320 280C320 291 311 300 300 300z":"M240 220C234.4 220 229.4 217.8 225.8 214.2L140 128.2L94.2 174.2C90.6 177.8 85.6 180 80 180C69 180 60 171 60 160C60 154.4 62.2 149.4 65.8 145.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L254.2 185.8C257.8 189.4 260 194.4 260 200C260 211 251 220 240 220z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});mV.defaultProps={size:ga.STANDARD};mV.displayName="Blueprint5.Icon.SmallTick";var yV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"tick",ref:e},t),mt.createElement("path",{d:r?"M340 320C334.4 320 329.4 317.8 325.8 314.2L140 128.2L74.2 194C70.6 197.8 65.6 200 60 200C49 200 40 191 40 180C40 174.4 42.2 169.4 45.8 165.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L354.2000000000001 285.8C357.8 289.4 360 294.4 360 300C360 311 351 320 340 320z":"M280 260C274.4000000000001 260 269.4000000000001 257.8 265.8 254.2L120 108.2L54.2 174.2C50.6 177.8 45.6 180 40 180C29 180 20 171 20 160C20 154.4 22.2 149.4 25.8 145.8L105.8 65.8C109.4 62.2 114.4 60 120 60S130.6 62.2 134.2 65.8L294.2000000000001 225.8C297.8 229.4 300 234.4 300 240C300 251 291 260 280 260z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});yV.defaultProps={size:ga.STANDARD};yV.displayName="Blueprint5.Icon.Tick";var AV=mt.forwardRef(function(t,e){var r=t.size>=ga.LARGE,n=r?ga.LARGE:ga.STANDARD,a="".concat(-1*n/.05/2),c={transformOrigin:"center"};return mt.createElement(Ic,Gn({iconName:"warning-sign",ref:e},t),mt.createElement("path",{d:r?"M397.2 49.6C397.2 49.6 397.4000000000001 49.8000000000001 397.4000000000001 49.8000000000001L217.4 369.8000000000001C217.4 369.8000000000001 217.2 369.6 217.2 369.6C213.8 375.8 207.4 380 200 380S186.2 375.8 182.8 369.6L182.6 369.8L2.6 49.8L2.8 49.5999999999999C1.2 46.8 0 43.6 0 40C0 29 9 20 20 20H380C391 20 400 29 400 40C400 43.6 398.8 46.8 397.2 49.6zM220 60H180V100H220V60zM220 120H180V280H220V120z":"M316.8 50L317 50.2L177 290.2L176.8 290C173.4 296 167.2 300 159.8 300S146.4 296 142.8 290C142.8 290 142.6 290.2 142.6 290.2L2.6 50.2L2.8 50C1 47 -0.2 43.8 -0.2 40C-0.2 29 8.8 20 19.8 20H299.8C310.8 20 319.8 29 319.8 40C319.8 43.8 318.6 47 316.8 50zM179.8 60.2H139.8V100.2H179.8V60.2zM179.8 120.2H139.8V220.2H179.8V120.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:c}))});AV.defaultProps={size:ga.STANDARD};AV.displayName="Blueprint5.Icon.WarningSign";var _s=mt.forwardRef(function(t,e){var r,n,a=t.autoLoad,c=a===void 0?!0:a,s=t.className,h=t.color,i=t.icon,l=t.intent,d=t.tagName,o=d===void 0?"span":d,f=t.svgProps,A=t.title,w=t.htmlTitle,I=ys(t,["autoLoad","className","color","icon","intent","tagName","svgProps","title","htmlTitle"]),m=(n=(r=t.iconSize)!==null&&r!==void 0?r:t.size)!==null&&n!==void 0?n:ga.STANDARD,u=mt.useState(function(){return typeof i=="string"?q_.getPaths(i,m):void 0}),g=u[0],v=u[1];if(mt.useEffect(function(){var y=!1;if(typeof i=="string"){var x=q_.getPaths(i,m);x!==void 0?v(x):c?q_.load(i,m).then(function(){y||v(q_.getPaths(i,m))}).catch(function(T){console.error("[Blueprint] Icon '".concat(i,"' (").concat(m,"px) could not be loaded."),T)}):console.error("[Blueprint] Icon '".concat(i,"' (").concat(m,"px) is not loaded yet and autoLoad={false}, did you call Icons.load('").concat(i,"', ").concat(m,")?"))}return function(){y=!0}},[c,i,m]),i==null||typeof i=="boolean")return null;if(typeof i!="string")return i;if(g==null){var p=m===ga.STANDARD?K_e:m===ga.LARGE?Q_e:void 0;return mt.createElement(o||"span",Gn(Gn({"aria-hidden":A?void 0:!0},KC(I)),{className:Ti(Qj,p,J_e(i),Yh(l),s),"data-icon":i,ref:e,title:w}))}else{var C=g.map(function(y,x){return mt.createElement("path",{d:y,key:x,fillRule:"evenodd"})});return mt.createElement(Ic,Gn({children:C,className:Ti(Yh(l),s),color:h,htmlTitle:w,iconName:i,ref:e,size:m,svgProps:f,tagName:o,title:A},KC(I)))}});_s.displayName="".concat(Eo,".Icon");var Nb;(function(t){t[t.SMALL=20]="SMALL",t[t.STANDARD=50]="STANDARD",t[t.LARGE=100]="LARGE"})(Nb||(Nb={}));var XA=45,GX="M 50,50 m 0,-".concat(XA," a ").concat(XA,",").concat(XA," 0 1 1 0,").concat(XA*2," a ").concat(XA,",").concat(XA," 0 1 1 0,-").concat(XA*2),T_=280,mEe=10,yEe=4,AEe=16,CV=function(t){var e,r=t.className,n=r===void 0?"":r,a=t.intent,c=t.value,s=t.tagName,h=s===void 0?"div":s,i=t.size,l=ys(t,["className","intent","value","tagName","size"]);rV(function(){var w=i!=null,I=n.indexOf(RL)>=0||n.indexOf(sT)>=0;w&&I&&console.warn(zSe)},[n,i]);var d=CEe(i,n),o=Math.min(AEe,yEe*Nb.LARGE/d),f=T_-T_*(c==null?.25:XT(c,0,1)),A=Ti(vD,Yh(a),(e={},e[$_e]=c!=null,e),n);return mt.createElement(h,Gn({"aria-label":"loading","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c===void 0?void 0:c*100,className:A,role:"progressbar"},l),mt.createElement(h,{className:z_e},mt.createElement("svg",{width:d,height:d,strokeWidth:o.toFixed(2),viewBox:IEe(o)},mt.createElement("path",{className:U_e,d:GX}),mt.createElement("path",{className:B_e,d:GX,pathLength:T_,strokeDasharray:"".concat(T_," ").concat(T_),strokeDashoffset:f}))))};CV.displayName="".concat(Eo,".Spinner");var CEe=function(t,e){return t==null?e.indexOf(RL)>=0?Nb.SMALL:e.indexOf(sT)>=0?Nb.LARGE:Nb.STANDARD:Math.max(mEe,t)},IEe=function(t){var e=XA+t/2,r=(50-e).toFixed(2),n=(e*2).toFixed(2);return"".concat(r," ").concat(r," ").concat(n," ").concat(n)},bEe=Kce()?mt.useLayoutEffect:mt.useEffect,ID=mt.forwardRef(function(t,e){var r,n=t.children,a=t.tagName,c=a===void 0?"div":a,s=t.title,h=t.className,i=t.ellipsize,l=i===void 0?!1:i,d=ys(t,["children","tagName","title","className","ellipsize"]),o=mt.useRef(),f=mt.useMemo(function(){return Q1(o,e)},[e]),A=mt.useState(""),w=A[0],I=A[1],m=mt.useState(),u=m[0],g=m[1];return bEe(function(){var v;((v=o.current)===null||v===void 0?void 0:v.textContent)!=null&&(g(l&&o.current.scrollWidth>o.current.clientWidth),I(o.current.textContent))},[o,n,l]),mt.createElement(c,Gn(Gn({},d),{className:Ti((r={},r[v3e]=l,r),h),ref:f,title:s??(u?w:void 0)}),n)});ID.displayName="".concat(Eo,".Text");var Ma=mt.forwardRef(function(t,e){var r=afe(t,e);return mt.createElement("button",Gn({type:"button"},KC(t),r),ofe(t))});Ma.displayName="".concat(Eo,".Button");var fx=mt.forwardRef(function(t,e){var r=t.href,n=afe(t,e,{defaultTabIndex:0,disabledTabIndex:-1});return mt.createElement("a",Gn({role:"button"},KC(t),n,{"aria-disabled":n.disabled,href:n.disabled?void 0:r}),ofe(t))});fx.displayName="".concat(Eo,".AnchorButton");function afe(t,e,r){var n,a=t.alignText,c=t.fill,s=t.large,h=t.loading,i=h===void 0?!1:h,l=t.minimal,d=t.outlined,o=t.size,f=o===void 0?"medium":o,A=t.small,w=t.variant,I=w===void 0?"solid":w,m=t.disabled||i,u=tfe(!m,t,e,r),g=u[0],v=u[1],p=Ti(c5,(n={},n[lx]=g,n[cA]=m,n[Hv]=c,n[Wj]=i,n),pD(a),Yh(t.intent),dA(f,{large:s,small:A}),Xce(I,{minimal:l,outlined:d}),t.className);return Gn(Gn({},v),{className:p,disabled:m})}function ofe(t){var e=t.children,r=t.ellipsizeText,n=t.endIcon,a=t.icon,c=t.loading,s=t.rightIcon,h=t.text,i=t.textClassName,l=!fT(h)||!fT(e);return mt.createElement(mt.Fragment,null,c&&mt.createElement(CV,{className:x3e,size:Nb.SMALL}),mt.createElement(_s,{icon:a}),l&&mt.createElement(ID,{className:Ti(w3e,i),ellipsize:r,tagName:"span"},h,e),mt.createElement(_s,{icon:n??s}))}function Dm(t,e){return mt.forwardRef(function(r,n){var a=r.className,c=r.children,s=ys(r,["className","children"]);return mt.createElement(t,Gn(Gn({},s),{className:Ti(e,a),ref:n}),c)})}Dm("h1",WT);Dm("h2",WT);Dm("h3",WT);var xEe=Dm("h4",WT),wEe=Dm("h5",WT),TEe=Dm("h6",WT);Dm("blockquote",p3e);Dm("code",m3e);Dm("pre",y3e);var _Ee=Dm("label",zce);Dm("ol",Pce);Dm("ul",Pce);function IV(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var sfe={exports:{}},SEe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",EEe=SEe,MEe=EEe;function lfe(){}function ufe(){}ufe.resetWarningCache=lfe;var PEe=function(){function t(n,a,c,s,h,i){if(i!==MEe){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ufe,resetWarningCache:lfe};return r.PropTypes=r,r};sfe.exports=PEe();var REe=sfe.exports;function LEe(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function OEe(t,e){t.classList?t.classList.add(e):LEe(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function WX(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function DEe(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=WX(t.className,e):t.setAttribute("class",WX(t.className&&t.className.baseVal||"",e))}const ZX={disabled:!1},kL=no.createContext(null);var cfe=function(e){return e.scrollTop},eS="unmounted",cb="exited",fb="entering",Kw="entered",y$="exiting",gA=function(t){uI(e,t);function e(n,a){var c;c=t.call(this,n,a)||this;var s=a,h=s&&!s.isMounting?n.enter:n.appear,i;return c.appearStatus=null,n.in?h?(i=cb,c.appearStatus=fb):i=Kw:n.unmountOnExit||n.mountOnEnter?i=eS:i=cb,c.state={status:i},c.nextCallback=null,c}e.getDerivedStateFromProps=function(a,c){var s=a.in;return s&&c.status===eS?{status:cb}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var c=null;if(a!==this.props){var s=this.state.status;this.props.in?s!==fb&&s!==Kw&&(c=fb):(s===fb||s===Kw)&&(c=y$)}this.updateStatus(!1,c)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,c,s,h;return c=s=h=a,a!=null&&typeof a!="number"&&(c=a.exit,s=a.enter,h=a.appear!==void 0?a.appear:s),{exit:c,enter:s,appear:h}},r.updateStatus=function(a,c){if(a===void 0&&(a=!1),c!==null)if(this.cancelNextCallback(),c===fb){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Q_.findDOMNode(this);s&&cfe(s)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===cb&&this.setState({status:eS})},r.performEnter=function(a){var c=this,s=this.props.enter,h=this.context?this.context.isMounting:a,i=this.props.nodeRef?[h]:[Q_.findDOMNode(this),h],l=i[0],d=i[1],o=this.getTimeouts(),f=h?o.appear:o.enter;if(!a&&!s||ZX.disabled){this.safeSetState({status:Kw},function(){c.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:fb},function(){c.props.onEntering(l,d),c.onTransitionEnd(f,function(){c.safeSetState({status:Kw},function(){c.props.onEntered(l,d)})})})},r.performExit=function(){var a=this,c=this.props.exit,s=this.getTimeouts(),h=this.props.nodeRef?void 0:Q_.findDOMNode(this);if(!c||ZX.disabled){this.safeSetState({status:cb},function(){a.props.onExited(h)});return}this.props.onExit(h),this.safeSetState({status:y$},function(){a.props.onExiting(h),a.onTransitionEnd(s.exit,function(){a.safeSetState({status:cb},function(){a.props.onExited(h)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,c){c=this.setNextCallback(c),this.setState(a,c)},r.setNextCallback=function(a){var c=this,s=!0;return this.nextCallback=function(h){s&&(s=!1,c.nextCallback=null,a(h))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(a,c){this.setNextCallback(c);var s=this.props.nodeRef?this.props.nodeRef.current:Q_.findDOMNode(this),h=a==null&&!this.props.addEndListener;if(!s||h){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=i[0],d=i[1];this.props.addEndListener(l,d)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===eS)return null;var c=this.props,s=c.children;c.in,c.mountOnEnter,c.unmountOnExit,c.appear,c.enter,c.exit,c.timeout,c.addEndListener,c.onEnter,c.onEntering,c.onEntered,c.onExit,c.onExiting,c.onExited,c.nodeRef;var h=IV(c,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return no.createElement(kL.Provider,{value:null},typeof s=="function"?s(a,h):no.cloneElement(no.Children.only(s),h))},e}(no.Component);gA.contextType=kL;gA.propTypes={};function ww(){}gA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ww,onEntering:ww,onEntered:ww,onExit:ww,onExiting:ww,onExited:ww};gA.UNMOUNTED=eS;gA.EXITED=cb;gA.ENTERING=fb;gA.ENTERED=Kw;gA.EXITING=y$;var kEe=function(e,r){return e&&r&&r.split(" ").forEach(function(n){return OEe(e,n)})},pN=function(e,r){return e&&r&&r.split(" ").forEach(function(n){return DEe(e,n)})},wS=function(t){uI(e,t);function e(){for(var n,a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=t.call.apply(t,[this].concat(c))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(h,i){var l=n.resolveArguments(h,i),d=l[0],o=l[1];n.removeClasses(d,"exit"),n.addClass(d,o?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(h,i)},n.onEntering=function(h,i){var l=n.resolveArguments(h,i),d=l[0],o=l[1],f=o?"appear":"enter";n.addClass(d,f,"active"),n.props.onEntering&&n.props.onEntering(h,i)},n.onEntered=function(h,i){var l=n.resolveArguments(h,i),d=l[0],o=l[1],f=o?"appear":"enter";n.removeClasses(d,f),n.addClass(d,f,"done"),n.props.onEntered&&n.props.onEntered(h,i)},n.onExit=function(h){var i=n.resolveArguments(h),l=i[0];n.removeClasses(l,"appear"),n.removeClasses(l,"enter"),n.addClass(l,"exit","base"),n.props.onExit&&n.props.onExit(h)},n.onExiting=function(h){var i=n.resolveArguments(h),l=i[0];n.addClass(l,"exit","active"),n.props.onExiting&&n.props.onExiting(h)},n.onExited=function(h){var i=n.resolveArguments(h),l=i[0];n.removeClasses(l,"exit"),n.addClass(l,"exit","done"),n.props.onExited&&n.props.onExited(h)},n.resolveArguments=function(h,i){return n.props.nodeRef?[n.props.nodeRef.current,h]:[h,i]},n.getClassNames=function(h){var i=n.props.classNames,l=typeof i=="string",d=l&&i?i+"-":"",o=l?""+d+h:i[h],f=l?o+"-active":i[h+"Active"],A=l?o+"-done":i[h+"Done"];return{baseClassName:o,activeClassName:f,doneClassName:A}},n}var r=e.prototype;return r.addClass=function(a,c,s){var h=this.getClassNames(c)[s+"ClassName"],i=this.getClassNames("enter"),l=i.doneClassName;c==="appear"&&s==="done"&&l&&(h+=" "+l),s==="active"&&a&&cfe(a),h&&(this.appliedClasses[c][s]=h,kEe(a,h))},r.removeClasses=function(a,c){var s=this.appliedClasses[c],h=s.base,i=s.active,l=s.done;this.appliedClasses[c]={},h&&pN(a,h),i&&pN(a,i),l&&pN(a,l)},r.render=function(){var a=this.props;a.classNames;var c=IV(a,["classNames"]);return no.createElement(gA,Tl({},c,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(no.Component);wS.defaultProps={classNames:""};wS.propTypes={};function NEe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bV(t,e){var r=function(c){return e&&mt.isValidElement(c)?e(c):c},n=Object.create(null);return t&&mt.Children.map(t,function(a){return a}).forEach(function(a){n[a.key]=r(a)}),n}function FEe(t,e){t=t||{},e=e||{};function r(d){return d in e?e[d]:t[d]}var n=Object.create(null),a=[];for(var c in t)c in e?a.length&&(n[c]=a,a=[]):a.push(c);var s,h={};for(var i in e){if(n[i])for(s=0;s<n[i].length;s++){var l=n[i][s];h[n[i][s]]=r(l)}h[i]=r(i)}for(s=0;s<a.length;s++)h[a[s]]=r(a[s]);return h}function wb(t,e,r){return r[e]!=null?r[e]:t.props[e]}function zEe(t,e){return bV(t.children,function(r){return mt.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:wb(r,"appear",t),enter:wb(r,"enter",t),exit:wb(r,"exit",t)})})}function BEe(t,e,r){var n=bV(t.children),a=FEe(e,n);return Object.keys(a).forEach(function(c){var s=a[c];if(mt.isValidElement(s)){var h=c in e,i=c in n,l=e[c],d=mt.isValidElement(l)&&!l.props.in;i&&(!h||d)?a[c]=mt.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:wb(s,"exit",t),enter:wb(s,"enter",t)}):!i&&h&&!d?a[c]=mt.cloneElement(s,{in:!1}):i&&h&&mt.isValidElement(l)&&(a[c]=mt.cloneElement(s,{onExited:r.bind(null,s),in:l.props.in,exit:wb(s,"exit",t),enter:wb(s,"enter",t)}))}}),a}var $Ee=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},UEe={component:"div",childFactory:function(e){return e}},xV=function(t){uI(e,t);function e(n,a){var c;c=t.call(this,n,a)||this;var s=c.handleExited.bind(NEe(c));return c.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},c}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(a,c){var s=c.children,h=c.handleExited,i=c.firstRender;return{children:i?zEe(a,h):BEe(a,s,h),firstRender:!1}},r.handleExited=function(a,c){var s=bV(this.props.children);a.key in s||(a.props.onExited&&a.props.onExited(c),this.mounted&&this.setState(function(h){var i=Tl({},h.children);return delete i[a.key],{children:i}}))},r.render=function(){var a=this.props,c=a.component,s=a.childFactory,h=IV(a,["component","childFactory"]),i=this.state.contextValue,l=$Ee(this.state.children).map(s);return delete h.appear,delete h.enter,delete h.exit,c===null?no.createElement(kL.Provider,{value:i},l):no.createElement(kL.Provider,{value:i},no.createElement(c,h,l))},e}(no.Component);xV.propTypes={};xV.defaultProps=UEe;var HEe=function(){var t=1,e=new WeakMap,r=function(n,a){return typeof n=="number"||typeof n=="string"?a?"idx-".concat(a):"val-".concat(n):e.has(n)?"uid"+e.get(n):(e.set(n,t++),r(n))};return r},ffe=function(t){return t===void 0&&(t=""),{value:1,prefix:t,uid:HEe()}},jEe=ffe(),VEe=mt.createContext(ffe()),GEe=function(t){return t.value++},WEe=function(t){return t?t.prefix:""},ZEe=function(t){var e=t||jEe,r=WEe(e),n=GEe(e),a=r+n,c=function(s){return a+e.uid(s)};return{uid:a,gen:c}},YEe=function(){var t=mt.useContext(VEe),e=mt.useState(function(){return ZEe(t)})[0];return e},XEe=function(){var t=YEe().uid;return t},hfe=mt.createContext({hasProvider:!1,stack:{current:[]}}),KEe=function(t){var e=t.children,r=mt.useRef([]),n=mt.useMemo(function(){return{hasProvider:!0,stack:r}},[r]);return mt.createElement(hfe.Provider,{value:n},e)},dfe={exports:{}},gfe={};/**
73
73
  * @license React
74
74
  * use-sync-external-store-shim.production.js
75
75
  *
@@ -5225,4 +5225,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5225
5225
  `);const n=String(e).split(`
5226
5226
  `),a=n.length;if(r.multi)for(let c=0;c<a;c++){const s=this.splitBlocks(n[c],r.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(r.maxWdt>0)for(let h=0;h<s.length;h++){const i=s[h].mod,l=s[h].text;this.splitStringIntoLines(l,i,!0)}else for(let h=0;h<s.length;h++){const i=s[h].mod,l=s[h].text;this.lines.append(l,i)}this.lines.newLine()}}else if(r.maxWdt>0)for(let c=0;c<a;c++)this.splitStringIntoLines(n[c]);else for(let c=0;c<a;c++)this.lines.newLine(n[c]);return this.lines.finalize()}decodeMarkupSystem(e){let r="none";return e==="markdown"||e==="md"?r="markdown":(e===!0||e==="html")&&(r="html"),r}splitHtmlBlocks(e){const r=new Roe(e),n=a=>/&/.test(a)?(r.replace(r.text,"&lt;","<")||r.replace(r.text,"&amp;","&")||r.add("&"),!0):!1;for(;r.position<r.text.length;){const a=r.text.charAt(r.position);r.parseWS(a)||/</.test(a)&&(r.parseStartTag("bold","<b>")||r.parseStartTag("ital","<i>")||r.parseStartTag("mono","<code>")||r.parseEndTag("bold","</b>")||r.parseEndTag("ital","</i>")||r.parseEndTag("mono","</code>"))||n(a)||r.add(a),r.position++}return r.emitBlock(),r.blocks}splitMarkdownBlocks(e){const r=new Roe(e);let n=!0;const a=c=>/\\/.test(c)?(r.position<this.text.length+1&&(r.position++,c=this.text.charAt(r.position),/ \t/.test(c)?r.spacing=!0:(r.add(c),n=!1)),!0):!1;for(;r.position<r.text.length;){const c=r.text.charAt(r.position);r.parseWS(c)||a(c)||(n||r.spacing)&&(r.parseStartTag("bold","*")||r.parseStartTag("ital","_")||r.parseStartTag("mono","`"))||r.parseEndTag("bold","*","afterBold")||r.parseEndTag("ital","_","afterItal")||r.parseEndTag("mono","`","afterMono")||(r.add(c),n=!1),r.position++}return r.emitBlock(),r.blocks}splitBlocks(e,r){const n=this.decodeMarkupSystem(r);if(n==="none")return[{text:e,mod:"normal"}];if(n==="markdown")return this.splitMarkdownBlocks(e);if(n==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){const r=this.ctx.measureText(e).width;return this.lines.curWidth()+r>this.parent.fontOptions.maxWdt}getLongestFit(e){let r="",n=0;for(;n<e.length;){const c=r+(r===""?"":" ")+e[n];if(this.overMaxWidth(c))break;r=c,n++}return n}getLongestFitWord(e){let r=0;for(;r<e.length&&!this.overMaxWidth(Iy(e).call(e,0,r));)r++;return r}splitStringIntoLines(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,r),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let a=e.split("\r");for(;a.length>0;){let c=this.getLongestFit(a);if(c===0){const s=a[0],h=this.getLongestFitWord(s);this.lines.newLine(Iy(s).call(s,0,h),r),a[0]=Iy(s).call(s,h)}else{let s=c;a[c-1]===" "?c--:a[s]===" "&&s++;const h=Iy(a).call(a,0,c).join("");c==a.length&&n?this.lines.append(h,r):this.lines.newLine(h,r),a=Iy(a).call(a,s)}}}}const H_=["bold","ital","boldital","mono"];class Y2{constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(r),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),jO(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const r=e.font.size;r!==void 0&&(this.baseSize=r)}}}initFontOptions(e){if(tl(H_,r=>{this.fontOptions[r]={}}),Y2.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}tl(e,(r,n)=>{r!=null&&typeof r!="object"&&(this.fontOptions[n]=r)})}static parseFontString(e,r){if(!r||typeof r!="string")return!1;const n=r.split(" ");return e.size=+n[0].replace("px",""),e.face=n[1],e.color=n[2],!0}constrain(e){const r={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=sC(e,"widthConstraint");if(typeof n=="number")r.maxWdt=Number(n),r.minWdt=Number(n);else if(typeof n=="object"){const c=sC(e,["widthConstraint","maximum"]);typeof c=="number"&&(r.maxWdt=Number(c));const s=sC(e,["widthConstraint","minimum"]);typeof s=="number"&&(r.minWdt=Number(s))}const a=sC(e,"heightConstraint");if(typeof a=="number")r.minHgt=Number(a);else if(typeof a=="object"){const c=sC(e,["heightConstraint","minimum"]);typeof c=="number"&&(r.minHgt=Number(c));const s=sC(e,["heightConstraint","valign"]);typeof s=="string"&&(s==="top"||s==="bottom")&&(r.valign=s)}return r}update(e,r){this.setOptions(e,!0),this.propagateFonts(r),Ru(this.fontOptions,this.constrain(r)),this.fontOptions.chooser=PZ("label",r)}adjustSizes(e){const r=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=r,this.fontOptions.minWdt-=r);const n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}addFontOptionsToPile(e,r){for(let n=0;n<r.length;++n)this.addFontToPile(e,r[n])}addFontToPile(e,r){if(r===void 0||r.font===void 0||r.font===null)return;const n=r.font;e.push(n)}getBasicOptions(e){const r={};for(let n=0;n<e.length;++n){let a=e[n];const c={};Y2.parseFontString(c,a)&&(a=c),tl(a,(s,h)=>{s!==void 0&&(Object.prototype.hasOwnProperty.call(r,h)||(Bl(H_).call(H_,h)!==-1?r[h]={}:r[h]=s))})}return r}getFontOption(e,r,n){let a;for(let c=0;c<e.length;++c){const s=e[c];if(Object.prototype.hasOwnProperty.call(s,r)){if(a=s[r],a==null)continue;const h={};if(Y2.parseFontString(h,a)&&(a=h),Object.prototype.hasOwnProperty.call(a,n))return a[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}getFontOptions(e,r){const n={},a=["color","size","face","mod","vadjust"];for(let c=0;c<a.length;++c){const s=a[c];n[s]=this.getFontOption(e,r,s)}return n}propagateFonts(e){const r=[];this.addFontOptionsToPile(r,e),this.fontOptions=this.getBasicOptions(r);for(let n=0;n<H_.length;++n){const a=H_[n],c=this.fontOptions[a],s=this.getFontOptions(r,a);tl(s,(h,i)=>{c[i]=h}),c.size=Number(c.size),c.vadjust=Number(c.vadjust)}}draw(e,r,n,a,c){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let h=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&h<this.elementOptions.scaling.label.drawThreshold-1||(h>=this.elementOptions.scaling.label.maxVisible&&(h=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,c,r,n,s),this._drawBackground(e),this._drawText(e,r,this.size.yLine,s,h))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const r=this.getSize();e.fillRect(r.left,r.top,r.width,r.height)}}_drawText(e,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",c=arguments.length>4?arguments[4]:void 0;[r,n]=this._setAlignment(e,r,n,a),e.textAlign="left",r=r-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(let s=0;s<this.lineCount;s++){const h=this.lines[s];if(h&&h.blocks){let i=0;this.isEdgeLabel||this.fontOptions.align==="center"?i+=(this.size.width-h.width)/2:this.fontOptions.align==="right"&&(i+=this.size.width-h.width);for(let l=0;l<h.blocks.length;l++){const d=h.blocks[l];e.font=d.font;const[o,f]=this._getColor(d.color,c,d.strokeColor);d.strokeWidth>0&&(e.lineWidth=d.strokeWidth,e.strokeStyle=f,e.lineJoin="round"),e.fillStyle=o,d.strokeWidth>0&&e.strokeText(d.text,r+i,n+d.vadjust),e.fillText(d.text,r+i,n+d.vadjust),i+=d.width}n+=h.height}}}_setAlignment(e,r,n,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){r=0,n=0;const c=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*c):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*c):e.textBaseline="middle"}else e.textBaseline=a;return[r,n]}_getColor(e,r,n){let a=e||"#000000",c=n||"#ffffff";if(r<=this.elementOptions.scaling.label.drawThreshold){const s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-r)));a=Im(a,s),c=Im(c,s)}return[a,c]}getTextSize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,r,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let r=this.size.left,n=this.size.top-.5*2;if(this.isEdgeLabel){const c=-this.size.width*.5;switch(this.fontOptions.align){case"middle":r=c,n=-this.size.height*.5;break;case"top":r=c,n=-(this.size.height+2);break;case"bottom":r=c,n=2;break}}return{left:r,top:n,width:this.size.width,height:this.size.height}}calculateLabelSize(e,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,r,n),this.size.left=a-this.size.width*.5,this.size.top=c-this.size.height*.5,this.size.yLine=c+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,r,n,a){const c=function(i,l,d){return l==="normal"?d==="mod"?"":i[d]:i[l][d]!==void 0?i[l][d]:i[d]},s={color:c(this.fontOptions,a,"color"),size:c(this.fontOptions,a,"size"),face:c(this.fontOptions,a,"face"),mod:c(this.fontOptions,a,"mod"),vadjust:c(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(r||n)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,r,n));let h="";return s.mod!==void 0&&s.mod!==""&&(h+=s.mod+" "),h+=s.size+"px "+s.face,e.font=h.replace(/"/g,""),s.font=e.font,s.height=s.size,s}differentState(e,r){return e!==this.selectedState||r!==this.hoverState}_processLabelText(e,r,n,a){return new vzt(e,this,r,n).process(a)}_processLabel(e,r,n){if(this.labelDirty===!1&&!this.differentState(r,n))return;const a=this._processLabelText(e,r,n,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width<this.fontOptions.minWdt&&(a.width=this.fontOptions.minWdt),this.size.labelHeight=a.height,this.fontOptions.minHgt>0&&a.height<this.fontOptions.minHgt&&(a.height=this.fontOptions.minHgt),this.lines=a.lines,this.lineCount=a.lines.length,this.size.width=a.width,this.size.height=a.height,this.selectedState=r,this.hoverState=n,this.labelDirty=!1}visible(){return!(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0||this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}class Qx{constructor(e,r,n){this.body=r,this.labelModule=n,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}setOptions(e){this.options=e}_setMargins(e){this.margin={},this.options.margin&&(typeof this.options.margin=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}_distanceToBorder(e,r){const n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(r)),Math.abs(this.height/2/Math.sin(r)))+n}enableShadow(e,r){r.shadow&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}disableShadow(e,r){r.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}enableBorderDashes(e,r){if(r.borderDashes!==!1)if(e.setLineDash!==void 0){let n=r.borderDashes;n===!0&&(n=[5,15]),e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,r.borderDashes=!1}disableBorderDashes(e,r){r.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,r.borderDashes=!1))}needsRefresh(e,r){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,r)}initContextForDraw(e,r){const n=r.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=r.borderColor,e.fillStyle=r.color}performStroke(e,r){const n=r.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,r),e.stroke(),this.disableBorderDashes(e,r)),e.restore()}performFill(e,r){e.save(),e.fillStyle=r.color,this.enableShadow(e,r),jM(e).call(e),this.disableShadow(e,r),e.restore(),this.performStroke(e,r)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,r,n,a,c){n!==void 0&&this.resize(n,a,c),this.left=e-this.width/2,this.top=r-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,r,n,a,c){this._updateBoundingBox(e,r,n,a,c)}getDimensionsFromLabel(e,r,n){this.textSize=this.labelModule.getTextSize(e,r,n);let a=this.textSize.width,c=this.textSize.height;const s=14;return a===0&&(a=s,c=s),{width:a,height:c}}}let pzt=class extends Qx{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,n)){const a=this.getDimensionsFromLabel(e,r,n);this.width=a.width+this.margin.right+this.margin.left,this.height=a.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,r,n,a,c,s){this.resize(e,a,c),this.left=r-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,s),EAe(e,this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(e,s),this.updateBoundingBox(r,n,e,a,c),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,a,c)}updateBoundingBox(e,r,n,a,c){this._updateBoundingBox(e,r,n,a,c);const s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}distanceToBorder(e,r){e&&this.resize(e);const n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(r)),Math.abs(this.height/2/Math.sin(r)))+n}};class RZ extends Qx{constructor(e,r,n){super(e,r,n),this.labelOffset=0,this.selected=!1}setOptions(e,r,n){this.options=e,r===void 0&&n===void 0||this.setImages(r,n)}setImages(e,r){r&&this.selected?(this.imageObj=r,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=r)}switchImages(e){const r=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&r){const n=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=n}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const r=this.options.imagePadding;typeof r=="object"?(e.top=r.top,e.right=r.right,e.bottom=r.bottom,e.left=r.left):(e.top=r,e.right=r,e.bottom=r,e.left=r)}return e}_resizeImage(){let e,r;if(this.options.shapeProperties.useImageSize===!1){let n=1,a=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:a=this.imageObj.height/this.imageObj.width),e=this.options.size*2*n,r=this.options.size*2*a}else{const n=this._getImagePadding();e=this.imageObj.width+n.left+n.right,r=this.imageObj.height+n.top+n.bottom}this.width=e,this.height=r,this.radius=.5*this.width}_drawRawCircle(e,r,n,a){this.initContextForDraw(e,a),JW(e,r,n,a.size),this.performFill(e,a)}_drawImageAtPosition(e,r){if(this.imageObj.width!=0){e.globalAlpha=r.opacity!==void 0?r.opacity:1,this.enableShadow(e,r);let n=1;this.options.shapeProperties.interpolation===!0&&(n=this.imageObj.width/this.width/this.body.view.scale);const a=this._getImagePadding(),c=this.left+a.left,s=this.top+a.top,h=this.width-a.left-a.right,i=this.height-a.top-a.bottom;this.imageObj.drawImageAtPosition(e,n,c,s,h,i),this.disableShadow(e,r)}}_drawImageLabel(e,r,n,a,c){let s=0;if(this.height!==void 0){s=this.height*.5;const i=this.labelModule.getTextSize(e,a,c);i.lineCount>=1&&(s+=i.height/2)}const h=n+s;this.options.label&&(this.labelOffset=s),this.labelModule.draw(e,r,h,a,c,"hanging")}}let mzt=class extends RZ{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,n)){const a=this.getDimensionsFromLabel(e,r,n),c=Math.max(a.width+this.margin.right+this.margin.left,a.height+this.margin.top+this.margin.bottom);this.options.size=c/2,this.width=c,this.height=c,this.radius=this.width/2}}draw(e,r,n,a,c,s){this.resize(e,a,c),this.left=r-this.width/2,this.top=n-this.height/2,this._drawRawCircle(e,r,n,s),this.updateBoundingBox(r,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,n,a,c)}updateBoundingBox(e,r){this.boundingBox.top=r-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=r+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class yzt extends RZ{constructor(e,r,n,a,c){super(e,r,n),this.setImages(a,c)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const c=this.options.size*2;this.width=c,this.height=c,this.radius=.5*this.width;return}this.needsRefresh(r,n)&&this._resizeImage()}draw(e,r,n,a,c,s){this.switchImages(a),this.resize();let h=r,i=n;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=r,this.top=n,h+=this.width/2,i+=this.height/2):(this.left=r-this.width/2,this.top=n-this.height/2),this._drawRawCircle(e,h,i,s),e.save(),e.clip(),this._drawImageAtPosition(e,s),e.restore(),this._drawImageLabel(e,h,i,a,c),this.updateBoundingBox(r,n)}updateBoundingBox(e,r){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=r,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=r+this.options.size*2):(this.boundingBox.top=r-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=r+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class CI extends Qx{constructor(e,r,n){super(e,r,n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(r,n)){var c,s;this.labelModule.getTextSize(e,r,n);const h=2*a.size;this.width=(c=this.customSizeWidth)!==null&&c!==void 0?c:h,this.height=(s=this.customSizeHeight)!==null&&s!==void 0?s:h,this.radius=.5*this.width}}_drawShape(e,r,n,a,c,s,h,i){return this.resize(e,s,h,i),this.left=a-this.width/2,this.top=c-this.height/2,this.initContextForDraw(e,i),nEt(r)(e,a,c,i.size),this.performFill(e,i),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(s?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,a,c)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,s,h,a,c,"hanging");const l=c+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,a,l,s,h,"hanging")}this.updateBoundingBox(a,c)}}}updateBoundingBox(e,r){this.boundingBox.top=r-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=r+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function Loe(t,e){var r=Fc(t);if(rI){var n=rI(t);e&&(n=Lv(n).call(n,function(a){return AI(t,a).enumerable})),r.push.apply(r,n)}return r}function Azt(t){for(var e=1;e<arguments.length;e++){var r,n,a=arguments[e]!=null?arguments[e]:{};e%2?Au(r=Loe(Object(a),!0)).call(r,function(c){hk(t,c,a[c])}):nI?dk(t,nI(a)):Au(n=Loe(Object(a))).call(n,function(c){gk(t,c,AI(a,c))})}return t}class Czt extends CI{constructor(e,r,n,a){super(e,r,n,a),this.ctxRenderer=a}draw(e,r,n,a,c,s){this.resize(e,a,c,s),this.left=r-this.width/2,this.top=n-this.height/2,e.save();const h=this.ctxRenderer({ctx:e,id:this.options.id,x:r,y:n,state:{selected:a,hover:c},style:Azt({},s),label:this.options.label});if(h.drawNode!=null&&h.drawNode(),e.restore(),h.drawExternalLabel){const i=h.drawExternalLabel;h.drawExternalLabel=()=>{e.save(),i(),e.restore()}}return h.nodeDimensions&&(this.customSizeWidth=h.nodeDimensions.width,this.customSizeHeight=h.nodeDimensions.height),h}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class Izt extends Qx{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e,r,n){if(this.needsRefresh(r,n)){const c=this.getDimensionsFromLabel(e,r,n).width+this.margin.right+this.margin.left;this.width=c,this.height=c,this.radius=this.width/2}}draw(e,r,n,a,c,s){this.resize(e,a,c),this.left=r-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,s),MAe(e,r-this.width/2,n-this.height/2,this.width,this.height),this.performFill(e,s),this.updateBoundingBox(r,n,e,a,c),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,a,c)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}let bzt=class extends CI{constructor(e,r,n){super(e,r,n)}draw(e,r,n,a,c,s){return this._drawShape(e,"diamond",4,r,n,a,c,s)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}};class xzt extends CI{constructor(e,r,n){super(e,r,n)}draw(e,r,n,a,c,s){return this._drawShape(e,"circle",2,r,n,a,c,s)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class Ooe extends Qx{constructor(e,r,n){super(e,r,n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,n)){const a=this.getDimensionsFromLabel(e,r,n);this.height=a.height*2,this.width=a.width+a.height,this.radius=.5*this.width}}draw(e,r,n,a,c,s){this.resize(e,a,c),this.left=r-this.width*.5,this.top=n-this.height*.5,this.initContextForDraw(e,s),uH(e,this.left,this.top,this.width,this.height),this.performFill(e,s),this.updateBoundingBox(r,n,e,a,c),this.labelModule.draw(e,r,n,a,c)}distanceToBorder(e,r){e&&this.resize(e);const n=this.width*.5,a=this.height*.5,c=Math.sin(r)*n,s=Math.cos(r)*a;return n*a/Math.sqrt(c*c+s*s)}}class wzt extends Qx{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e,r,n){this.needsRefresh(r,n)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,r,n,a,c,s){return this.resize(e,a,c),this.options.icon.size=this.options.icon.size||50,this.left=r-this.width/2,this.top=n-this.height/2,this._icon(e,r,n,a,c,s),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,n+this.height/2+5,a),this.updateBoundingBox(r,n)}}}updateBoundingBox(e,r){this.boundingBox.top=r-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=r+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,r,n,a,c,s){const h=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:a?"bold":"",(this.options.icon.weight!=null&&a?5:0)+h+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,s),e.fillText(this.options.icon.code,r,n),this.disableShadow(e,s)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}let Tzt=class extends RZ{constructor(e,r,n,a,c){super(e,r,n),this.setImages(a,c)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const c=this.options.size*2;this.width=c,this.height=c;return}this.needsRefresh(r,n)&&this._resizeImage()}draw(e,r,n,a,c,s){e.save(),this.switchImages(a),this.resize();let h=r,i=n;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=r,this.top=n,h+=this.width/2,i+=this.height/2):(this.left=r-this.width/2,this.top=n-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,d=this.options.borderWidthSelected||2*this.options.borderWidth,o=(a?d:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,o),e.beginPath();let f=a?this.options.color.highlight.border:c?this.options.color.hover.border:this.options.color.border,A=a?this.options.color.highlight.background:c?this.options.color.hover.background:this.options.color.background;s.opacity!==void 0&&(f=Im(f,s.opacity),A=Im(A,s.opacity)),e.strokeStyle=f,e.fillStyle=A,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),jM(e).call(e),this.performStroke(e,s),e.closePath()}this._drawImageAtPosition(e,s),this._drawImageLabel(e,h,i,a,c),this.updateBoundingBox(r,n),e.restore()}updateBoundingBox(e,r){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=r):(this.left=e-this.width/2,this.top=r-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,r){return this._distanceToBorder(e,r)}};class _zt extends CI{constructor(e,r,n){super(e,r,n)}draw(e,r,n,a,c,s){return this._drawShape(e,"square",2,r,n,a,c,s)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class Szt extends CI{constructor(e,r,n){super(e,r,n)}draw(e,r,n,a,c,s){return this._drawShape(e,"hexagon",4,r,n,a,c,s)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class Ezt extends CI{constructor(e,r,n){super(e,r,n)}draw(e,r,n,a,c,s){return this._drawShape(e,"star",4,r,n,a,c,s)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class Mzt extends Qx{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e,r,n){this.needsRefresh(r,n)&&(this.textSize=this.labelModule.getTextSize(e,r,n),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,r,n,a,c,s){this.resize(e,a,c),this.left=r-this.width/2,this.top=n-this.height/2,this.enableShadow(e,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,a,c),this.disableShadow(e,s),this.updateBoundingBox(r,n,e,a,c)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}let Pzt=class extends CI{constructor(e,r,n){super(e,r,n)}draw(e,r,n,a,c,s){return this._drawShape(e,"triangle",3,r,n,a,c,s)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}};class Rzt extends CI{constructor(e,r,n){super(e,r,n)}draw(e,r,n,a,c,s){return this._drawShape(e,"triangleDown",3,r,n,a,c,s)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}function Doe(t,e){var r=Fc(t);if(rI){var n=rI(t);e&&(n=Lv(n).call(n,function(a){return AI(t,a).enumerable})),r.push.apply(r,n)}return r}function koe(t){for(var e=1;e<arguments.length;e++){var r,n,a=arguments[e]!=null?arguments[e]:{};e%2?Au(r=Doe(Object(a),!0)).call(r,function(c){hk(t,c,a[c])}):nI?dk(t,nI(a)):Au(n=Doe(Object(a))).call(n,function(c){gk(t,c,AI(a,c))})}return t}let wp=class f0{constructor(e,r,n,a,c,s){this.options=jC(c),this.globalOptions=c,this.defaultOptions=s,this.body=r,this.edges=[],this.id=void 0,this.imagelist=n,this.grouplist=a,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new Y2(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var r;Bl(r=this.edges).call(r,e)===-1&&this.edges.push(e)}detachEdge(e){var r;const n=Bl(r=this.edges).call(r,e);if(n!=-1){var a;j1(a=this.edges).call(a,n,1)}}setOptions(e){const r=this.options.shape;if(!e)return;if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");f0.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=x0(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=x0(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=BIe(e.value)),f0.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);const n=[e,this.options,this.defaultOptions];return this.chooser=PZ("node",n),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&f0.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(r),e.hidden!==void 0||e.physics!==void 0}_load_images(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e==="center"||e==="top-left"}static updateGroupOptions(e,r,n){var a;if(n===void 0)return;const c=e.group;if(r!==void 0&&r.group!==void 0&&c!==r.group)throw new Error("updateGroupOptions: group values in options don't match.");if(!(typeof c=="number"||typeof c=="string"&&c!=""))return;const h=n.get(c);h.opacity!==void 0&&r.opacity===void 0&&(f0.checkOpacity(h.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+h.opacity),h.opacity=void 0));const i=Lv(a=C7t(r)).call(a,l=>r[l]!=null);i.push("font"),BO(i,e,h),e.color=EH(e.color)}static parseOptions(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0;if(BO(["color","fixed","shadow"],e,r,n),f0.checkMass(r),e.opacity!==void 0&&(f0.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),r.opacity!==void 0&&(f0.checkOpacity(r.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+r.opacity),r.opacity=void 0)),r.shapeProperties&&!f0.checkCoordinateOrigin(r.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+r.shapeProperties.coordinateOrigin),vm(e,r,"shadow",a),r.color!==void 0&&r.color!==null){const h=EH(r.color);cIe(e.color,h)}else n===!0&&r.color===null&&(e.color=jC(a.color));r.fixed!==void 0&&r.fixed!==null&&(typeof r.fixed=="boolean"?(e.fixed.x=r.fixed,e.fixed.y=r.fixed):(r.fixed.x!==void 0&&typeof r.fixed.x=="boolean"&&(e.fixed.x=r.fixed.x),r.fixed.y!==void 0&&typeof r.fixed.y=="boolean"&&(e.fixed.y=r.fixed.y))),n===!0&&r.font===null&&(e.font=jC(a.font)),f0.updateGroupOptions(e,r,c),r.scaling!==void 0&&vm(e.scaling,r.scaling,"label",a.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const r=this.options.opacity;e.borderColor=Im(e.borderColor,r),e.color=Im(e.color,r),e.shadowColor=Im(e.shadowColor,r)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),f0.updateGroupOptions(this.options,koe(koe({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const r=this.grouplist.get(this.options.group,!1),n=[e,this.options,r,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new pzt(this.options,this.body,this.labelModule);break;case"circle":this.shape=new mzt(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new yzt(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Czt(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Izt(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new bzt(this.options,this.body,this.labelModule);break;case"dot":this.shape=new xzt(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new Ooe(this.options,this.body,this.labelModule);break;case"icon":this.shape=new wzt(this.options,this.body,this.labelModule);break;case"image":this.shape=new Tzt(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new _zt(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Szt(this.options,this.body,this.labelModule);break;case"star":this.shape=new Ezt(this.options,this.body,this.labelModule);break;case"text":this.shape=new Mzt(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Pzt(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Rzt(this.options,this.body,this.labelModule);break;default:this.shape=new Ooe(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,r){return this.shape.distanceToBorder(e,r)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,r,n){if(this.options.value!==void 0){const a=this.options.scaling.customScalingFunction(e,r,n,this.options.value),c=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.size=this.options.scaling.min+a*c}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const r=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,r)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const r=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,r)}getItemsOnPoint(e){const r=[];return this.labelModule.visible()&&OH(this.labelModule.getSize(),e)&&r.push({nodeId:this.id,labelId:0}),OH(this.shape.boundingBox,e)&&r.push({nodeId:this.id}),r}isOverlappingWith(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}static checkMass(e,r){if(e.mass!==void 0&&e.mass<=0){let n="";r!==void 0&&(n=" in node id: "+r),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",gIe),e.mass=1}}};class Lzt{constructor(e,r,n,a){var c;if(this.body=e,this.images=r,this.groups=n,this.layoutEngine=a,this.body.functions.createNode=ka(c=this.create).call(c,this),this.nodesListeners={add:(s,h)=>{this.add(h.items)},update:(s,h)=>{this.update(h.items,h.data,h.oldData)},remove:(s,h)=>{this.remove(h.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,h,i,l){if(h===s)return .5;{const d=1/(h-s);return Math.max(0,(l-s)*d)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=jC(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,r;this.body.emitter.on("refreshNodes",ka(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",ka(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",()=>{tl(this.nodesListeners,(n,a)=>{this.body.data.nodes&&this.body.data.nodes.off(a,n)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(wp.parseOptions(this.options,e),e.opacity!==void 0&&(LH(e.opacity)||!Lb(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.body.nodes[r].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const r of Fc(this.body.nodes))this.body.nodes[r].updateLabelModule(),this.body.nodes[r].needsRefresh();if(e.size!==void 0)for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.body.nodes[r].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.data.nodes;if(uAe("id",e))this.body.data.nodes=e;else if($c(e))this.body.data.nodes=new VE,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new VE;else throw new TypeError("Array or DataSet expected");if(n&&tl(this.nodesListeners,function(a,c){n.off(c,a)}),this.body.nodes={},this.body.data.nodes){const a=this;tl(this.nodesListeners,function(s,h){a.body.data.nodes.on(h,s)});const c=this.body.data.nodes.getIds();this.add(c,!0)}r===!1&&this.body.emitter.emit("_dataChanged")}add(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const a=[];for(let c=0;c<e.length;c++){n=e[c];const s=this.body.data.nodes.get(n),h=this.create(s);a.push(h),this.body.nodes[n]=h}this.layoutEngine.positionInitially(a),r===!1&&this.body.emitter.emit("_dataChanged")}update(e,r,n){const a=this.body.nodes;let c=!1;for(let s=0;s<e.length;s++){const h=e[s];let i=a[h];const l=r[s];i!==void 0?i.setOptions(l)&&(c=!0):(c=!0,i=this.create(l),a[h]=i)}!c&&n!==void 0&&(c=NNt(r).call(r,function(s,h){const i=n[h];return i&&i.level!==s.level})),c===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}remove(e){const r=this.body.nodes;for(let n=0;n<e.length;n++){const a=e[n];delete r[a]}this.body.emitter.emit("_dataChanged")}create(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wp;return new r(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;tl(this.body.nodes,(r,n)=>{const a=this.body.data.nodes.get(n);a!==void 0&&(e===!0&&r.setOptions({x:null,y:null}),r.setOptions({fixed:!1}),r.setOptions(a))})}getPositions(e){const r={};if(e!==void 0){if($c(e)===!0){for(let n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){const a=this.body.nodes[e[n]];r[e[n]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){const n=this.body.nodes[e];r[e]={x:Math.round(n.x),y:Math.round(n.y)}}}else for(let n=0;n<this.body.nodeIndices.length;n++){const a=this.body.nodes[this.body.nodeIndices[n]];r[this.body.nodeIndices[n]]={x:Math.round(a.x),y:Math.round(a.y)}}return r}getPosition(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){const e=[],r=this.body.data.nodes.getDataSet();for(const n of r.get()){const a=n.id,c=this.body.nodes[a],s=Math.round(c.x),h=Math.round(c.y);(n.x!==s||n.y!==h)&&e.push({id:a,x:s,y:h})}r.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,r){const n=[];if(this.body.nodes[e]!==void 0){const a=this.body.nodes[e],c={};for(let s=0;s<a.edges.length;s++){const h=a.edges[s];r!=="to"&&h.toId==a.id?c[h.fromId]===void 0&&(n.push(h.fromId),c[h.fromId]=!0):r!=="from"&&h.fromId==a.id&&c[h.toId]===void 0&&(n.push(h.toId),c[h.toId]=!0)}}return n}getConnectedEdges(e){const r=[];if(this.body.nodes[e]!==void 0){const n=this.body.nodes[e];for(let a=0;a<n.edges.length;a++)r.push(n.edges[a].id)}else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return r}moveNode(e,r,n){this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(r),this.body.nodes[e].y=Number(n),Ny(()=>{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var Ozt=Cs,Noe=Math.hypot,Dzt=Math.abs,kzt=Math.sqrt,Nzt=!!Noe&&Noe(1/0,NaN)!==1/0;Ozt({target:"Math",stat:!0,forced:Nzt},{hypot:function(e,r){for(var n=0,a=0,c=arguments.length,s=0,h,i;a<c;)h=Dzt(arguments[a++]),s<h?(i=s/h,n=n*i*i+1,s=h):h>0?(i=h/s,n+=i*i):n+=h;return s===1/0?1/0:s*kzt(n)}});var Fzt=au,zzt=Fzt.Math.hypot,Bzt=zzt,$zt=Bzt,Uzt=$zt,Hzt=Is(Uzt);class bf{static transform(e,r){$c(e)||(e=[e]);const n=r.point.x,a=r.point.y,c=r.angle,s=r.length;for(let h=0;h<e.length;++h){const i=e[h],l=i.x*Math.cos(c)-i.y*Math.sin(c),d=i.x*Math.sin(c)+i.y*Math.cos(c);i.x=n+s*l,i.y=a+s*d}}static drawPath(e,r){e.beginPath(),e.moveTo(r[0].x,r[0].y);for(let n=1;n<r.length;++n)e.lineTo(r[n].x,r[n].y);e.closePath()}}let jzt=class extends bf{static draw(e,r){if(r.image){e.save(),e.translate(r.point.x,r.point.y),e.rotate(Math.PI/2+r.angle);const n=r.imageWidth!=null?r.imageWidth:r.image.width,a=r.imageHeight!=null?r.imageHeight:r.image.height;r.image.drawImageAtPosition(e,1,-n/2,0,n,a),e.restore()}return!1}};class Vzt extends bf{static draw(e,r){const n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class Gzt{static draw(e,r){const n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class Wzt{static draw(e,r){const n={x:-.4,y:0};bf.transform(n,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const a=Math.PI,c=r.angle-a/2,s=r.angle+a/2;return e.beginPath(),e.arc(n.x,n.y,r.length*.4,c,s,!1),e.stroke(),!0}}class Zzt{static draw(e,r){const n={x:-.3,y:0};bf.transform(n,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const a=Math.PI,c=r.angle+a/2,s=r.angle+3*a/2;return e.beginPath(),e.arc(n.x,n.y,r.length*.4,c,s,!1),e.stroke(),!0}}class Yzt{static draw(e,r){const n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class Xzt{static draw(e,r){const n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class Kzt{static draw(e,r){const n={x:-.4,y:0};return bf.transform(n,r),JW(e,n.x,n.y,r.length*.4),!0}}class Qzt{static draw(e,r){const n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class Jzt{static draw(e,r){const n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class qzt{static draw(e,r){const n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class eBt{static draw(e,r){const n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return bf.transform(n,r),bf.drawPath(e,n),!0}}class YIe{static draw(e,r){let n;switch(r.type&&(n=r.type.toLowerCase()),n){case"image":return jzt.draw(e,r);case"circle":return Kzt.draw(e,r);case"box":return Jzt.draw(e,r);case"crow":return Gzt.draw(e,r);case"curve":return Wzt.draw(e,r);case"diamond":return qzt.draw(e,r);case"inv_curve":return Zzt.draw(e,r);case"triangle":return Yzt.draw(e,r);case"inv_triangle":return Xzt.draw(e,r);case"bar":return Qzt.draw(e,r);case"vee":return eBt.draw(e,r);case"arrow":default:return Vzt.draw(e,r)}}}function Foe(t,e){var r=Fc(t);if(rI){var n=rI(t);e&&(n=Lv(n).call(n,function(a){return AI(t,a).enumerable})),r.push.apply(r,n)}return r}function zoe(t){for(var e=1;e<arguments.length;e++){var r,n,a=arguments[e]!=null?arguments[e]:{};e%2?Au(r=Foe(Object(a),!0)).call(r,function(c){hk(t,c,a[c])}):nI?dk(t,nI(a)):Au(n=Foe(Object(a))).call(n,function(c){gk(t,c,AI(a,c))})}return t}class XIe{constructor(e,r,n){this._body=r,this._labelModule=n,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}cleanup(){return!1}setOptions(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}drawLine(e,r,n,a){let c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,r),e.lineWidth=r.width,r.dashes!==!1?this._drawDashedLine(e,r,c):this._drawLine(e,r,c)}_drawLine(e,r,n,a,c){if(this.from!=this.to)this._line(e,r,n,a,c);else{const[s,h,i]=this._getCircleData(e);this._circle(e,r,s,h,i)}}_drawDashedLine(e,r,n,a,c){e.lineCap="round";const s=$c(r.dashes)?r.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,r,n);else{const[h,i,l]=this._getCircleData(e);this._circle(e,r,h,i,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)PAe(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{const[h,i,l]=this._getCircleData(e);this._circle(e,r,h,i,l)}this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}}findBorderPosition(e,r,n){return this.from!=this.to?this._findBorderPosition(e,r,n):this._findBorderPositionCircle(e,r,n)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var r;const[n,a]=Iy(r=this._getCircleData(e)).call(r,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:.6,high:.8,direction:1})}}}_getCircleData(e){const r=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const n=WIe(e,this.options.selfReference.angle,r,this.from);return[n.x,n.y,r]}_pointOnCircle(e,r,n,a){const c=a*2*Math.PI;return{x:e+n*Math.cos(c),y:r-n*Math.sin(c)}}_findBorderPositionCircle(e,r,n){const a=n.x,c=n.y;let s=n.low,h=n.high;const i=n.direction,l=10,d=this.options.selfReference.size,o=.05;let f,A=(s+h)*.5,w=0;this.options.arrowStrikethrough===!0&&(i===-1?w=this.options.endPointOffset.from:i===1&&(w=this.options.endPointOffset.to));let I=0;do{A=(s+h)*.5,f=this._pointOnCircle(a,c,d,A);const m=Math.atan2(e.y-f.y,e.x-f.x),u=e.distanceToBorder(r,m)+w,g=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),v=u-g;if(Math.abs(v)<o)break;v>0?i>0?s=A:h=A:i>0?h=A:s=A,++I}while(s<=h&&I<l);return zoe(zoe({},f),{},{t:A})}getLineWidth(e,r){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):r===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}getColor(e,r){if(r.inheritsColor!==!1){if(r.inheritsColor==="both"&&this.from.id!==this.to.id){const n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y);let a=this.from.options.color.highlight.border,c=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(a=Im(this.from.options.color.border,r.opacity),c=Im(this.to.options.color.border,r.opacity)):this.from.selected===!0&&this.to.selected===!1?c=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(a=this.from.options.color.border),n.addColorStop(0,a),n.addColorStop(1,c),n}return r.inheritsColor==="to"?Im(this.to.options.color.border,r.opacity):Im(this.from.options.color.border,r.opacity)}else return Im(r.color,r.opacity)}_circle(e,r,n,a,c){this.enableShadow(e,r);let s=0,h=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){const i=this.options.selfReference.angle,l=this.options.selfReference.angle+Math.PI,d=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:i,high:l,direction:-1}),o=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:i,high:l,direction:1});s=Math.atan2(d.y-a,d.x-n),h=Math.atan2(o.y-a,o.x-n)}e.beginPath(),e.arc(n,a,c,s,h,!1),e.stroke(),this.disableShadow(e,r)}getDistanceToEdge(e,r,n,a,c,s){if(this.from!=this.to)return this._getDistanceToEdge(e,r,n,a,c,s);{const[h,i,l]=this._getCircleData(void 0),d=h-c,o=i-s;return Math.abs(Math.sqrt(d*d+o*o)-l)}}_getDistanceToLine(e,r,n,a,c,s){const h=n-e,i=a-r,l=h*h+i*i;let d=((c-e)*h+(s-r)*i)/l;d>1?d=1:d<0&&(d=0);const o=e+d*h,f=r+d*i,A=o-c,w=f-s;return Math.sqrt(A*A+w*w)}getArrowData(e,r,n,a,c,s){let h,i,l,d,o,f,A;const w=s.width;r==="from"?(l=this.from,d=this.to,o=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),A=s.fromArrowType):r==="to"?(l=this.to,d=this.from,o=s.toArrowScale<0,f=Math.abs(s.toArrowScale),A=s.toArrowType):(l=this.to,d=this.from,o=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),A=s.middleArrowType);const I=15*f+3*w;if(l!=d){const v=Hzt(l.x-d.x,l.y-d.y),p=I/v;if(r!=="middle")if(this.options.smooth.enabled===!0){const C=this._findBorderPosition(l,e,{via:n}),y=this.getPoint(C.t+p*(r==="from"?1:-1),n);h=Math.atan2(C.y-y.y,C.x-y.x),i=C}else h=Math.atan2(l.y-d.y,l.x-d.x),i=this._findBorderPosition(l,e);else{const C=(o?-p:p)/2,y=this.getPoint(.5+C,n),x=this.getPoint(.5-C,n);h=Math.atan2(y.y-x.y,y.x-x.x),i=this.getPoint(.5,n)}}else{const[v,p,C]=this._getCircleData(e);if(r==="from"){const y=this.options.selfReference.angle,x=this.options.selfReference.angle+Math.PI,T=this._findBorderPositionCircle(this.from,e,{x:v,y:p,low:y,high:x,direction:-1});h=T.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,i=T}else if(r==="to"){const y=this.options.selfReference.angle,x=this.options.selfReference.angle+Math.PI,T=this._findBorderPositionCircle(this.from,e,{x:v,y:p,low:y,high:x,direction:1});h=T.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,i=T}else{const y=this.options.selfReference.angle/(2*Math.PI);i=this._pointOnCircle(v,p,C,y),h=y*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const m=i.x-I*.9*Math.cos(h),u=i.y-I*.9*Math.sin(h);return{point:i,core:{x:m,y:u},angle:h,length:I,type:A}}drawArrowHead(e,r,n,a,c){e.strokeStyle=this.getColor(e,r),e.fillStyle=e.strokeStyle,e.lineWidth=r.width,YIe.draw(e,c)&&(this.enableShadow(e,r),jM(e).call(e),this.disableShadow(e,r))}enableShadow(e,r){r.shadow===!0&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}disableShadow(e,r){r.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,r){if(r.background!==!1){const n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=r.backgroundColor,e.lineWidth=r.backgroundSize,this.setStrokeDashed(e,r.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,r.dashes)}}setStrokeDashed(e,r){if(r!==!1)if(e.setLineDash!==void 0){const n=$c(r)?r:[5,5];e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function Boe(t,e){var r=Fc(t);if(rI){var n=rI(t);e&&(n=Lv(n).call(n,function(a){return AI(t,a).enumerable})),r.push.apply(r,n)}return r}function $oe(t){for(var e=1;e<arguments.length;e++){var r,n,a=arguments[e]!=null?arguments[e]:{};e%2?Au(r=Boe(Object(a),!0)).call(r,function(c){hk(t,c,a[c])}):nI?dk(t,nI(a)):Au(n=Boe(Object(a))).call(n,function(c){gk(t,c,AI(a,c))})}return t}class LZ extends XIe{constructor(e,r,n){super(e,r,n)}_findBorderPositionBezier(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const a=10,c=.2;let s=!1,h=1,i=0,l=this.to,d,o,f=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,s=!0,f=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(f=0);let A=0;do{o=(i+h)*.5,d=this.getPoint(o,n);const w=Math.atan2(l.y-d.y,l.x-d.x),I=l.distanceToBorder(r,w)+f,m=Math.sqrt(Math.pow(d.x-l.x,2)+Math.pow(d.y-l.y,2)),u=I-m;if(Math.abs(u)<c)break;u<0?s===!1?i=o:h=o:s===!1?h=o:i=o,++A}while(i<=h&&A<a);return $oe($oe({},d),{},{t:o})}_getDistanceToBezierEdge(e,r,n,a,c,s,h){let i=1e9,l,d,o,f,A,w=e,I=r;for(d=1;d<10;d++)o=.1*d,f=Math.pow(1-o,2)*e+2*o*(1-o)*h.x+Math.pow(o,2)*n,A=Math.pow(1-o,2)*r+2*o*(1-o)*h.y+Math.pow(o,2)*a,d>0&&(l=this._getDistanceToLine(w,I,f,A,c,s),i=l<i?l:i),w=f,I=A;return i}_bezierCurve(e,r,n,a){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),n!=null&&n.x!=null?a!=null&&a.x!=null?e.bezierCurveTo(n.x,n.y,a.x,a.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(n.x,n.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,r),this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}getViaNode(){return this._getViaCoordinates()}}class Uoe extends LZ{constructor(e,r,n){super(e,r,n),this.via=this.via,this._boundFunction=()=>{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let r=!1;this.options.physics!==e.physics&&(r=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),r===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,r=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=r,this.via=r,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,r,n){this._bezierCurve(e,r,n)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[n,a,c]=this._getCircleData(),s=2*Math.PI*(1-e);return{x:n+c*Math.sin(s),y:a+c-c*(1-Math.cos(s))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*r.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*r.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,r){return this._findBorderPositionBezier(e,r,this.via)}_getDistanceToEdge(e,r,n,a,c,s){return this._getDistanceToBezierEdge(e,r,n,a,c,s,this.via)}}class Hoe extends LZ{constructor(e,r,n){super(e,r,n)}_line(e,r,n){this._bezierCurve(e,r,n)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,r=this.options.smooth.type;let n=Math.abs(this.from.x-this.to.x),a=Math.abs(this.from.y-this.to.y);if(r==="discrete"||r==="diagonalCross"){let c,s;n<=a?c=s=e*a:c=s=e*n,this.from.x>this.to.x&&(c=-c),this.from.y>=this.to.y&&(s=-s);let h=this.from.x+c,i=this.from.y+s;return r==="discrete"&&(n<=a?h=n<e*a?this.from.x:h:i=a<e*n?this.from.y:i),{x:h,y:i}}else if(r==="straightCross"){let c=(1-e)*n,s=(1-e)*a;return n<=a?(c=0,this.from.y<this.to.y&&(s=-s)):(this.from.x<this.to.x&&(c=-c),s=0),{x:this.to.x+c,y:this.to.y+s}}else if(r==="horizontal"){let c=(1-e)*n;return this.from.x<this.to.x&&(c=-c),{x:this.to.x+c,y:this.from.y}}else if(r==="vertical"){let c=(1-e)*a;return this.from.y<this.to.y&&(c=-c),{x:this.from.x,y:this.to.y+c}}else if(r==="curvedCW"){n=this.to.x-this.from.x,a=this.from.y-this.to.y;const c=Math.sqrt(n*n+a*a),s=Math.PI,i=(Math.atan2(a,n)+(e*.5+.5)*s)%(2*s);return{x:this.from.x+(e*.5+.5)*c*Math.sin(i),y:this.from.y+(e*.5+.5)*c*Math.cos(i)}}else if(r==="curvedCCW"){n=this.to.x-this.from.x,a=this.from.y-this.to.y;const c=Math.sqrt(n*n+a*a),s=Math.PI,i=(Math.atan2(a,n)+(-e*.5+.5)*s)%(2*s);return{x:this.from.x+(e*.5+.5)*c*Math.sin(i),y:this.from.y+(e*.5+.5)*c*Math.cos(i)}}else{let c,s;n<=a?c=s=e*a:c=s=e*n,this.from.x>this.to.x&&(c=-c),this.from.y>=this.to.y&&(s=-s);let h=this.from.x+c,i=this.from.y+s;return n<=a?this.from.x<=this.to.x?h=this.to.x<h?this.to.x:h:h=this.to.x>h?this.to.x:h:this.from.y>=this.to.y?i=this.to.y>i?this.to.y:i:i=this.to.y<i?this.to.y:i,{x:h,y:i}}}_findBorderPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,r,n.via)}_getDistanceToEdge(e,r,n,a,c,s){let h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,r,n,a,c,s,h)}getPoint(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,a=Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*r.x+Math.pow(n,2)*this.toPoint.x,c=Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*r.y+Math.pow(n,2)*this.toPoint.y;return{x:a,y:c}}}class tBt extends LZ{constructor(e,r,n){super(e,r,n)}_getDistanceToBezierEdge2(e,r,n,a,c,s,h,i){let l=1e9,d=e,o=r;const f=[0,0,0,0];for(let A=1;A<10;A++){const w=.1*A;f[0]=Math.pow(1-w,3),f[1]=3*w*Math.pow(1-w,2),f[2]=3*Math.pow(w,2)*(1-w),f[3]=Math.pow(w,3);const I=f[0]*e+f[1]*h.x+f[2]*i.x+f[3]*n,m=f[0]*r+f[1]*h.y+f[2]*i.y+f[3]*a;if(A>0){const u=this._getDistanceToLine(d,o,I,m,c,s);l=u<l?u:l}d=I,o=m}return l}}class joe extends tBt{constructor(e,r,n){super(e,r,n)}_line(e,r,n){const a=n[0],c=n[1];this._bezierCurve(e,r,a,c)}_getViaCoordinates(){const e=this.from.x-this.to.x,r=this.from.y-this.to.y;let n,a,c,s;const h=this.options.smooth.roundness;return(Math.abs(e)>Math.abs(r)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(a=this.from.y,s=this.to.y,n=this.from.x-h*e,c=this.to.x+h*e):(a=this.from.y-h*r,s=this.to.y+h*r,n=this.from.x,c=this.to.x),[{x:n,y:a},{x:c,y:s}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,r){return this._findBorderPositionBezier(e,r)}_getDistanceToEdge(e,r,n,a,c,s){let[h,i]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,r,n,a,c,s,h,i)}getPoint(e){let[r,n]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const a=e,c=[Math.pow(1-a,3),3*a*Math.pow(1-a,2),3*Math.pow(a,2)*(1-a),Math.pow(a,3)],s=c[0]*this.fromPoint.x+c[1]*r.x+c[2]*n.x+c[3]*this.toPoint.x,h=c[0]*this.fromPoint.y+c[1]*r.y+c[2]*n.y+c[3]*this.toPoint.y;return{x:s,y:h}}}class Voe extends XIe{constructor(e,r,n){super(e,r,n)}_line(e,r){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,r){let n=this.to,a=this.from;e.id===this.from.id&&(n=this.from,a=this.to);const c=Math.atan2(n.y-a.y,n.x-a.x),s=n.x-a.x,h=n.y-a.y,i=Math.sqrt(s*s+h*h),l=e.distanceToBorder(r,c),d=(i-l)/i;return{x:(1-d)*a.x+d*n.x,y:(1-d)*a.y+d*n.y,t:0}}_getDistanceToEdge(e,r,n,a,c,s){return this._getDistanceToLine(e,r,n,a,c,s)}}class VC{constructor(e,r,n,a,c){if(r===void 0)throw new Error("No body provided");this.options=jC(a),this.globalOptions=a,this.defaultOptions=c,this.body=r,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Y2(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let r=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;VC.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=BIe(e.value));const n=[e,this.options,this.defaultOptions];return this.chooser=PZ("edge",n),this.updateLabelModule(e),r=this.updateEdgeType()||r,this._setInteractionWidths(),this.connect(),r}static parseOptions(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(D3(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,r,n),r.endPointOffset!==void 0&&r.endPointOffset.from!==void 0&&(Lb(r.endPointOffset.from)?e.endPointOffset.from=r.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),r.endPointOffset!==void 0&&r.endPointOffset.to!==void 0&&(Lb(r.endPointOffset.to)?e.endPointOffset.to=r.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),jO(r.label)?e.label=r.label:jO(e.label)||(e.label=void 0),vm(e,r,"smooth",a),vm(e,r,"shadow",a),vm(e,r,"background",a),r.dashes!==void 0&&r.dashes!==null?e.dashes=r.dashes:n===!0&&r.dashes===null&&(e.dashes=qb(a.dashes)),r.scaling!==void 0&&r.scaling!==null?(r.scaling.min!==void 0&&(e.scaling.min=r.scaling.min),r.scaling.max!==void 0&&(e.scaling.max=r.scaling.max),vm(e.scaling,r.scaling,"label",a.scaling)):n===!0&&r.scaling===null&&(e.scaling=qb(a.scaling)),r.arrows!==void 0&&r.arrows!==null)if(typeof r.arrows=="string"){const h=r.arrows.toLowerCase();e.arrows.to.enabled=Bl(h).call(h,"to")!=-1,e.arrows.middle.enabled=Bl(h).call(h,"middle")!=-1,e.arrows.from.enabled=Bl(h).call(h,"from")!=-1}else if(typeof r.arrows=="object")vm(e.arrows,r.arrows,"to",a.arrows),vm(e.arrows,r.arrows,"middle",a.arrows),vm(e.arrows,r.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+HM(r.arrows));else n===!0&&r.arrows===null&&(e.arrows=qb(a.arrows));if(r.color!==void 0&&r.color!==null){const h=W2(r.color)?{color:r.color,highlight:r.color,hover:r.color,inherit:!1,opacity:1}:r.color,i=e.color;if(c)Ru(i,a.color,!1,n);else for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&delete i[l];if(W2(i))i.color=i,i.highlight=i,i.hover=i,i.inherit=!1,h.opacity===void 0&&(i.opacity=1);else{let l=!1;h.color!==void 0&&(i.color=h.color,l=!0),h.highlight!==void 0&&(i.highlight=h.highlight,l=!0),h.hover!==void 0&&(i.hover=h.hover,l=!0),h.inherit!==void 0&&(i.inherit=h.inherit),h.opacity!==void 0&&(i.opacity=Math.min(1,Math.max(0,h.opacity))),l===!0?i.inherit=!1:i.inherit===void 0&&(i.inherit="from")}}else n===!0&&r.color===null&&(e.color=jC(a.color));n===!0&&r.font===null&&(e.font=jC(a.font)),Object.prototype.hasOwnProperty.call(r,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=r.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,r=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,c={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:r,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:a?void 0:this.options.color.color,inheritsColor:a,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const s=this.options.selectionWidth;typeof s=="function"?c.width=s(c.width):typeof s=="number"&&(c.width+=s),c.width=Math.max(c.width,.3/this.body.view.scale),c.color=this.options.color.highlight,c.shadow=this.options.shadow.enabled}else if(this.hover){const s=this.options.hoverWidth;typeof s=="function"?c.width=s(c.width):typeof s=="number"&&(c.width+=s),c.width=Math.max(c.width,.3/this.body.view.scale),c.color=this.options.color.hover,c.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(c,this.options.id,this.selected,this.hover),c.color!==void 0&&(c.inheritsColor=!1),c.shadow===!1&&(c.shadowColor!==this.options.shadow.color||c.shadowSize!==this.options.shadow.size||c.shadowX!==this.options.shadow.x||c.shadowY!==this.options.shadow.y)&&(c.shadow=!0));else c.shadow=this.options.shadow.enabled,c.width=Math.max(c.width,.3/this.body.view.scale);return c}updateLabelModule(e){const r=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let r=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof Uoe&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof joe&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof Hoe&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof Voe&&e.type.enabled===!1)&&(n=!1),n===!0&&(r=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(r=!0,this.edgeType=new Uoe(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new joe(this.options,this.body,this.labelModule):this.edgeType=new Hoe(this.options,this.body,this.labelModule):this.edgeType=new Voe(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),r}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,r,n){if(this.options.value!==void 0){const a=this.options.scaling.customScalingFunction(e,r,n,this.options.value),c=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*c}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const r=this.getFormattingValues();if(r.hidden)return;const n=this.edgeType.getViaNode();this.edgeType.drawLine(e,r,this.selected,this.hover,n),this.drawLabel(e,n)}drawArrows(e){const r=this.getFormattingValues();if(r.hidden)return;const n=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,r.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),r.fromArrowSrc&&(a.from.image=this.imagelist.load(r.fromArrowSrc)),r.fromArrowImageWidth&&(a.from.imageWidth=r.fromArrowImageWidth),r.fromArrowImageHeight&&(a.from.imageHeight=r.fromArrowImageHeight)),r.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),r.toArrowSrc&&(a.to.image=this.imagelist.load(r.toArrowSrc)),r.toArrowImageWidth&&(a.to.imageWidth=r.toArrowImageWidth),r.toArrowImageHeight&&(a.to.imageHeight=r.toArrowImageHeight)),r.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,r),r.middleArrowSrc&&(a.middle.image=this.imagelist.load(r.middleArrowSrc)),r.middleArrowImageWidth&&(a.middle.imageWidth=r.middleArrowImageWidth),r.middleArrowImageHeight&&(a.middle.imageHeight=r.middleArrowImageHeight)),r.fromArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.from),r.middleArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.middle),r.toArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.to)}drawLabel(e,r){if(this.options.label!==void 0){const n=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let c;if(n.id!=a.id){this.labelModule.pointToSelf=!1,c=this.edgeType.getPoint(.5,r),e.save();const s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,c.x,c.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const s=WIe(e,this.options.selfReference.angle,this.options.selfReference.size,n);c=this._pointOnCircle(s.x,s.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,c.x,c.y,this.selected,this.hover)}}}getItemsOnPoint(e){const r=[];if(this.labelModule.visible()){const a=this._getRotation();OH(this.labelModule.getSize(),e,a)&&r.push({edgeId:this.id,labelId:0})}const n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&r.push({edgeId:this.id}),r}isOverlappingWith(e){if(this.connected){const n=this.from.x,a=this.from.y,c=this.to.x,s=this.to.y,h=e.left,i=e.top;return this.edgeType.getDistanceToEdge(n,a,c,s,h,i)<10}else return!1}_getRotation(e){const r=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,r);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);const a={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return a;const c=this.from.y-this.to.y,s=this.from.x-this.to.x;let h=Math.atan2(c,s);return(h<-1&&s<0||h>0&&s<0)&&(h+=Math.PI),a.angle=h,a}_pointOnCircle(e,r,n,a){return{x:e+n*Math.cos(a),y:r-n*Math.sin(a)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class rBt{constructor(e,r,n){var a;this.body=e,this.images=r,this.groups=n,this.body.functions.createEdge=ka(a=this.create).call(a,this),this.edgesListeners={add:(c,s)=>{this.add(s.items)},update:(c,s)=>{this.update(s.items)},remove:(c,s)=>{this.remove(s.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(c,s,h,i){if(s===c)return .5;{const l=1/(s-c);return Math.max(0,(i-c)*l)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Ru(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,r,n;this.body.emitter.on("_forceDisableDynamicCurves",function(a){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");let s=!1;for(const h in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,h)){const i=e.body.edges[h],l=e.body.data.edges.get(h);if(l!=null){const d=l.smooth;d!==void 0&&d.enabled===!0&&d.type==="dynamic"&&(a===void 0?i.setOptions({smooth:!1}):i.setOptions({smooth:{type:a}}),s=!0)}}c===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",ka(r=this.refresh).call(r,this)),this.body.emitter.on("refresh",ka(n=this.refresh).call(n,this)),this.body.emitter.on("destroy",()=>{tl(this.edgesListeners,(a,c)=>{this.body.data.edges&&this.body.data.edges.off(c,a)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){VC.parseOptions(this.options,e,!0,this.defaultOptions,!0);let r=!1;if(e.smooth!==void 0)for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(r=this.body.edges[n].updateEdgeType()||r);if(e.font!==void 0)for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&this.body.edges[n].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||r===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.data.edges;if(uAe("id",e))this.body.data.edges=e;else if($c(e))this.body.data.edges=new VE,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new VE;else throw new TypeError("Array or DataSet expected");if(n&&tl(this.edgesListeners,(a,c)=>{n.off(c,a)}),this.body.edges={},this.body.data.edges){tl(this.edgesListeners,(c,s)=>{this.body.data.edges.on(s,c)});const a=this.body.data.edges.getIds();this.add(a,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),r===!1&&this.body.emitter.emit("_dataChanged")}add(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.edges,a=this.body.data.edges;for(let c=0;c<e.length;c++){const s=e[c],h=n[s];h&&h.disconnect();const i=a.get(s,{showInternalIds:!0});n[s]=this.create(i)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),r===!1&&this.body.emitter.emit("_dataChanged")}update(e){const r=this.body.edges,n=this.body.data.edges;let a=!1;for(let c=0;c<e.length;c++){const s=e[c],h=n.get(s),i=r[s];i!==void 0?(i.disconnect(),a=i.setOptions(h)||a,i.connect()):(this.body.edges[s]=this.create(h),a=!0)}a===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}remove(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const n=this.body.edges;tl(e,a=>{const c=n[a];c!==void 0&&c.remove()}),r&&this.body.emitter.emit("_dataChanged")}refresh(){tl(this.body.edges,(e,r)=>{const n=this.body.data.edges.get(r);n!==void 0&&e.setOptions(n)})}create(e){return new VC(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const r=this.body.nodes,n=this.body.edges;for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const a=n[e];a.from=null,a.to=null,a.connect()}}getConnectedNodes(e){const r=[];if(this.body.edges[e]!==void 0){const n=this.body.edges[e];n.fromId!==void 0&&r.push(n.fromId),n.toId!==void 0&&r.push(n.toId)}return r}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];tl(this.body.edges,(r,n)=>{const a=this.body.nodes[r.toId],c=this.body.nodes[r.fromId];a!==void 0&&a.isCluster===!0||c!==void 0&&c.isCluster===!0||(a===void 0||c===void 0)&&e.push(n)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const r=this.body.edges,n=[];Au(e).call(e,(a,c)=>{r[c]===void 0&&n.push(c)}),this.add(n,!0)}}class KIe{constructor(e,r,n){this.body=e,this.physicsBody=r,this.barnesHutTree,this.setOptions(n),this._rng=ck("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const r=this.body.nodes,n=this.physicsBody.physicsNodeIndices,a=n.length,c=this._formBarnesHutTree(r,n);this.barnesHutTree=c;for(let s=0;s<a;s++)e=r[n[s]],e.options.mass>0&&this._getForceContributions(c.root,e)}}_getForceContributions(e,r){this._getForceContribution(e.children.NW,r),this._getForceContribution(e.children.NE,r),this._getForceContribution(e.children.SW,r),this._getForceContribution(e.children.SE,r)}_getForceContribution(e,r){if(e.childrenCount>0){const n=e.centerOfMass.x-r.x,a=e.centerOfMass.y-r.y,c=Math.sqrt(n*n+a*a);c*e.calcSize>this.thetaInversed?this._calculateForces(c,n,a,r,e):e.childrenCount===4?this._getForceContributions(e,r):e.children.data.id!=r.id&&this._calculateForces(c,n,a,r,e)}}_calculateForces(e,r,n,a,c){e===0&&(e=.1,r=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));const s=this.options.gravitationalConstant*c.mass*a.options.mass/Math.pow(e,3),h=r*s,i=n*s;this.physicsBody.forces[a.id].x+=h,this.physicsBody.forces[a.id].y+=i}_formBarnesHutTree(e,r){let n;const a=r.length;let c=e[r[0]].x,s=e[r[0]].y,h=e[r[0]].x,i=e[r[0]].y;for(let m=1;m<a;m++){const u=e[r[m]],g=u.x,v=u.y;u.options.mass>0&&(g<c&&(c=g),g>h&&(h=g),v<s&&(s=v),v>i&&(i=v))}const l=Math.abs(h-c)-Math.abs(i-s);l>0?(s-=.5*l,i+=.5*l):(c+=.5*l,h-=.5*l);const o=Math.max(1e-5,Math.abs(h-c)),f=.5*o,A=.5*(c+h),w=.5*(s+i),I={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:A-f,maxX:A+f,minY:w-f,maxY:w+f},size:o,calcSize:1/o,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(I.root);for(let m=0;m<a;m++)n=e[r[m]],n.options.mass>0&&this._placeInTree(I.root,n);return I}_updateBranchMass(e,r){const n=e.centerOfMass,a=e.mass+r.options.mass,c=1/a;n.x=n.x*e.mass+r.x*r.options.mass,n.x*=c,n.y=n.y*e.mass+r.y*r.options.mass,n.y*=c,e.mass=a;const s=Math.max(Math.max(r.height,r.radius),r.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}_placeInTree(e,r,n){(n!=!0||n===void 0)&&this._updateBranchMass(e,r);const a=e.children.NW.range;let c;a.maxX>r.x?a.maxY>r.y?c="NW":c="SW":a.maxY>r.y?c="NE":c="SE",this._placeInRegion(e,r,c)}_placeInRegion(e,r,n){const a=e.children[n];switch(a.childrenCount){case 0:a.children.data=r,a.childrenCount=1,this._updateBranchMass(a,r);break;case 1:a.children.data.x===r.x&&a.children.data.y===r.y?(r.x+=this._rng(),r.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,r));break;case 4:this._placeInTree(a,r);break}}_splitBranch(e){let r=null;e.childrenCount===1&&(r=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),r!=null&&this._placeInTree(e,r)}_insertRegion(e,r){let n,a,c,s;const h=.5*e.size;switch(r){case"NW":n=e.range.minX,a=e.range.minX+h,c=e.range.minY,s=e.range.minY+h;break;case"NE":n=e.range.minX+h,a=e.range.maxX,c=e.range.minY,s=e.range.minY+h;break;case"SW":n=e.range.minX,a=e.range.minX+h,c=e.range.minY+h,s=e.range.maxY;break;case"SE":n=e.range.minX+h,a=e.range.maxX,c=e.range.minY+h,s=e.range.maxY;break}e.children[r]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:a,minY:c,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,r){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,r))}_drawBranch(e,r,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,r),this._drawBranch(e.children.NE,r),this._drawBranch(e.children.SE,r),this._drawBranch(e.children.SW,r)),r.strokeStyle=n,r.beginPath(),r.moveTo(e.range.minX,e.range.minY),r.lineTo(e.range.maxX,e.range.minY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.minY),r.lineTo(e.range.maxX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.maxY),r.lineTo(e.range.minX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.minX,e.range.maxY),r.lineTo(e.range.minX,e.range.minY),r.stroke()}}class nBt{constructor(e,r,n){this._rng=ck("REPULSION SOLVER"),this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r,n,a,c,s,h,i;const l=this.body.nodes,d=this.physicsBody.physicsNodeIndices,o=this.physicsBody.forces,f=this.options.nodeDistance,A=-2/3/f,w=4/3;for(let I=0;I<d.length-1;I++){h=l[d[I]];for(let m=I+1;m<d.length;m++)i=l[d[m]],e=i.x-h.x,r=i.y-h.y,n=Math.sqrt(e*e+r*r),n===0&&(n=.1*this._rng(),e=n),n<2*f&&(n<.5*f?s=1:s=A*n+w,s=s/n,a=e*s,c=r*s,o[h.id].x-=a,o[h.id].y-=c,o[i.id].x+=a,o[i.id].y+=c)}}}class iBt{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){const e=this.body.nodes,r=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,a=this.options.nodeDistance;for(let c=0;c<r.length-1;c++){const s=e[r[c]];for(let h=c+1;h<r.length;h++){const i=e[r[h]];if(s.level===i.level){const l=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(i.shape.radius||0)/2),d=i.x-s.x,o=i.y-s.y,f=Math.sqrt(d*d+o*o),A=.05;let w;f<l?w=-Math.pow(A*f,2)+Math.pow(A*l,2):w=0,f!==0&&(w=w/f);const I=d*w,m=o*w;n[s.id].x-=I,n[s.id].y-=m,n[i.id].x+=I,n[i.id].y+=m}}}}}class eB{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r;const n=this.physicsBody.physicsEdgeIndices,a=this.body.edges;let c,s,h;for(let i=0;i<n.length;i++)r=a[n[i]],r.connected===!0&&r.toId!==r.fromId&&this.body.nodes[r.toId]!==void 0&&this.body.nodes[r.fromId]!==void 0&&(r.edgeType.via!==void 0?(e=r.options.length===void 0?this.options.springLength:r.options.length,c=r.to,s=r.edgeType.via,h=r.from,this._calculateSpringForce(c,s,.5*e),this._calculateSpringForce(s,h,.5*e)):(e=r.options.length===void 0?this.options.springLength*1.5:r.options.length,this._calculateSpringForce(r.from,r.to,e)))}_calculateSpringForce(e,r,n){const a=e.x-r.x,c=e.y-r.y,s=Math.max(Math.sqrt(a*a+c*c),.01),h=this.options.springConstant*(n-s)/s,i=a*h,l=c*h;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=i,this.physicsBody.forces[e.id].y+=l),this.physicsBody.forces[r.id]!==void 0&&(this.physicsBody.forces[r.id].x-=i,this.physicsBody.forces[r.id].y-=l)}}class aBt{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r,n,a,c,s,h,i;const l=this.body.edges,d=.5,o=this.physicsBody.physicsEdgeIndices,f=this.physicsBody.physicsNodeIndices,A=this.physicsBody.forces;for(let p=0;p<f.length;p++){const C=f[p];A[C].springFx=0,A[C].springFy=0}for(let p=0;p<o.length;p++)r=l[o[p]],r.connected===!0&&(e=r.options.length===void 0?this.options.springLength:r.options.length,n=r.from.x-r.to.x,a=r.from.y-r.to.y,i=Math.sqrt(n*n+a*a),i=i===0?.01:i,h=this.options.springConstant*(e-i)/i,c=n*h,s=a*h,r.to.level!=r.from.level?(A[r.toId]!==void 0&&(A[r.toId].springFx-=c,A[r.toId].springFy-=s),A[r.fromId]!==void 0&&(A[r.fromId].springFx+=c,A[r.fromId].springFy+=s)):(A[r.toId]!==void 0&&(A[r.toId].x-=d*c,A[r.toId].y-=d*s),A[r.fromId]!==void 0&&(A[r.fromId].x+=d*c,A[r.fromId].y+=d*s)));h=1;let w,I;for(let p=0;p<f.length;p++){const C=f[p];w=Math.min(h,Math.max(-h,A[C].springFx)),I=Math.min(h,Math.max(-h,A[C].springFy)),A[C].x+=w,A[C].y+=I}let m=0,u=0;for(let p=0;p<f.length;p++){const C=f[p];m+=A[C].x,u+=A[C].y}const g=m/f.length,v=u/f.length;for(let p=0;p<f.length;p++){const C=f[p];A[C].x-=g,A[C].y-=v}}}class j6{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r,n,a;const c=this.body.nodes,s=this.physicsBody.physicsNodeIndices,h=this.physicsBody.forces;for(let i=0;i<s.length;i++){const l=s[i];a=c[l],e=-a.x,r=-a.y,n=Math.sqrt(e*e+r*r),this._calculateForces(n,e,r,h,a)}}_calculateForces(e,r,n,a,c){const s=e===0?0:this.options.centralGravity/e;a[c.id].x=r*s,a[c.id].y=n*s}}class oBt extends KIe{constructor(e,r,n){super(e,r,n),this._rng=ck("FORCE ATLAS 2 BASED REPULSION SOLVER")}_calculateForces(e,r,n,a,c){e===0&&(e=.1*this._rng(),r=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));const s=a.edges.length+1,h=this.options.gravitationalConstant*c.mass*a.options.mass*s/Math.pow(e,2),i=r*h,l=n*h;this.physicsBody.forces[a.id].x+=i,this.physicsBody.forces[a.id].y+=l}}class sBt extends j6{constructor(e,r,n){super(e,r,n)}_calculateForces(e,r,n,a,c){if(e>0){const s=c.edges.length+1,h=this.options.centralGravity*s*c.options.mass;a[c.id].x=r*h,a[c.id].y=n*h}}}class lBt{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},jf(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,BO(["stabilization"],this.options,e),vm(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const r=this.options.wind;r&&((typeof r.x!="number"||LH(r.x))&&(r.x=0),(typeof r.y!="number"||LH(r.y))&&(r.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new oBt(this.body,this.physicsBody,e),this.edgesSolver=new eB(this.body,this.physicsBody,e),this.gravitySolver=new sBt(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new nBt(this.body,this.physicsBody,e),this.edgesSolver=new eB(this.body,this.physicsBody,e),this.gravitySolver=new j6(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new iBt(this.body,this.physicsBody,e),this.edgesSolver=new aBt(this.body,this.physicsBody,e),this.gravitySolver=new j6(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new KIe(this.body,this.physicsBody,e),this.edgesSolver=new eB(this.body,this.physicsBody,e),this.gravitySolver=new j6(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=ka(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=kO();this.physicsTick(),(kO()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&Ny(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}physicsTick(){this._startStabilizing(),this.stabilized!==!0&&(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0?(this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1):(this.timestep=this.options.timestep,this.physicsStep()),this.stabilized===!0&&this.revert(),this.stabilizationIterations++)}updatePhysicsData(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];const e=this.body.nodes,r=this.body.edges;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[n].id);for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&r[n].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(r[n].id);for(let n=0;n<this.physicsBody.physicsNodeIndices.length;n++){const a=this.physicsBody.physicsNodeIndices[n];this.physicsBody.forces[a]={x:0,y:0},this.physicsBody.velocities[a]===void 0&&(this.physicsBody.velocities[a]={x:0,y:0})}for(const n in this.physicsBody.velocities)e[n]===void 0&&delete this.physicsBody.velocities[n]}revert(){const e=Fc(this.previousStates),r=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(let a=0;a<e.length;a++){const c=e[a];r[c]!==void 0?r[c].options.physics===!0&&(this.referenceState[c]={positions:{x:r[c].x,y:r[c].y}},n[c].x=this.previousStates[c].vx,n[c].y=this.previousStates[c].vy,r[c].x=this.previousStates[c].x,r[c].y=this.previousStates[c].y):delete this.previousStates[c]}}_evaluateStepQuality(){let e,r,n;const a=this.body.nodes,c=this.referenceState,s=.3;for(const h in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,h)&&a[h]!==void 0&&(e=a[h].x-c[h].positions.x,r=a[h].y-c[h].positions.y,n=Math.sqrt(Math.pow(e,2)+Math.pow(r,2)),n>s))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let r=0,n=0;const a=5;for(let c=0;c<e.length;c++){const s=e[c],h=this._performStep(s);r=Math.max(r,h),n+=h}this.adaptiveTimestepEnabled=n/e.length<a,this.stabilized=r<this.options.minVelocity}calculateComponentVelocity(e,r,n){const a=this.modelOptions.damping*e,c=(r-a)/n;e+=c*this.timestep;const s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}_performStep(e){const r=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);const a=this.physicsBody.velocities[e];return this.previousStates[e]={x:r.x,y:r.y,vx:a.x,vy:a.y},r.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,n.x,r.options.mass),r.x+=a.x*this.timestep):(n.x=0,a.x=0),r.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,n.y,r.options.mass),r.y+=a.y*this.timestep):(n.y=0,a.y=0),Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2))}_freezeNodes(){const e=this.body.nodes;for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r].x&&e[r].y){const n=e[r].options.fixed;this.freezeCache[r]={x:n.x,y:n.y},n.x=!0,n.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.freezeCache[r]!==void 0&&(e[r].options.fixed.x=this.freezeCache[r].x,e[r].options.fixed.y=this.freezeCache[r].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,Ny(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,r=()=>{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&r();let n=0;for(;e()&&n<this.options.stabilization.updateInterval;)this.physicsTick(),n++;if(r(),e()){var a;Ny(ka(a=this._stabilizationBatch).call(a,this),0)}else this._finalizeStabilization()}_finalizeStabilization(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}_drawForces(e){for(let r=0;r<this.physicsBody.physicsNodeIndices.length;r++){const n=this.physicsBody.physicsNodeIndices[r],a=this.body.nodes[n],c=this.physicsBody.forces[n],s=20,h=.03,i=Math.sqrt(Math.pow(c.x,2)+Math.pow(c.x,2)),l=Math.min(Math.max(5,i),15),d=3*l,o=MH((180-Math.min(1,Math.max(0,h*i))*180)/360,1,1),f={x:a.x+s*c.x,y:a.y+s*c.y};e.lineWidth=l,e.strokeStyle=o,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(f.x,f.y),e.stroke();const A=Math.atan2(c.y,c.x);e.fillStyle=o,YIe.draw(e,{type:"arrow",point:f,angle:A,length:d}),jM(e).call(e)}}}let OR;const uBt=new Uint8Array(16);function cBt(){if(!OR&&(OR=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!OR))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return OR(uBt)}const Ad=[];for(let t=0;t<256;++t)Ad.push((t+256).toString(16).slice(1));function fBt(t,e=0){return Ad[t[e+0]]+Ad[t[e+1]]+Ad[t[e+2]]+Ad[t[e+3]]+"-"+Ad[t[e+4]]+Ad[t[e+5]]+"-"+Ad[t[e+6]]+Ad[t[e+7]]+"-"+Ad[t[e+8]]+Ad[t[e+9]]+"-"+Ad[t[e+10]]+Ad[t[e+11]]+Ad[t[e+12]]+Ad[t[e+13]]+Ad[t[e+14]]+Ad[t[e+15]]}const hBt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Goe={randomUUID:hBt};function VS(t,e,r){if(Goe.randomUUID&&!t)return Goe.randomUUID();t=t||{};const n=t.random||(t.rng||cBt)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,fBt(n)}class Vg{constructor(){}static getRange(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,c=1e9,s=-1e9,h;if(r.length>0)for(let i=0;i<r.length;i++)h=e[r[i]],c>h.shape.boundingBox.left&&(c=h.shape.boundingBox.left),s<h.shape.boundingBox.right&&(s=h.shape.boundingBox.right),n>h.shape.boundingBox.top&&(n=h.shape.boundingBox.top),a<h.shape.boundingBox.bottom&&(a=h.shape.boundingBox.bottom);return c===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,c=0,s=0),{minX:c,maxX:s,minY:n,maxY:a}}static getRangeCore(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,c=1e9,s=-1e9,h;if(r.length>0)for(let i=0;i<r.length;i++)h=e[r[i]],c>h.x&&(c=h.x),s<h.x&&(s=h.x),n>h.y&&(n=h.y),a<h.y&&(a=h.y);return c===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,c=0,s=0),{minX:c,maxX:s,minY:n,maxY:a}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,r){const n={};return r===void 0||r==="node"?(Ru(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):Ru(n,e.options,!0),n}}class dBt extends wp{constructor(e,r,n,a,c,s){super(e,r,n,a,c,s),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){const r=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw new Error("node with id: "+e+" not in current cluster");if(!r.isCluster)throw new Error("node with id: "+e+" is not a cluster");delete this.containedNodes[e],tl(r.edges,n=>{delete this.containedEdges[n.id]}),tl(r.containedNodes,(n,a)=>{this.containedNodes[a]=n}),r.containedNodes={},tl(r.containedEdges,(n,a)=>{this.containedEdges[a]=n}),r.containedEdges={},tl(r.edges,n=>{tl(this.edges,a=>{var c,s;const h=Bl(c=a.clusteringEdgeReplacingIds).call(c,n.id);h!==-1&&(tl(n.clusteringEdgeReplacingIds,i=>{a.clusteringEdgeReplacingIds.push(i),this.body.edges[i].edgeReplacedById=a.id}),j1(s=a.clusteringEdgeReplacingIds).call(s,h,1))})}),r.edges=[]}}class gBt{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},jf(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,r){e===void 0?e=this._getHubSize():typeof e=="object"&&(r=this._checkOptions(e),e=this._getHubSize());const n=[];for(let a=0;a<this.body.nodeIndices.length;a++){const c=this.body.nodes[this.body.nodeIndices[a]];c.edges.length>=e&&n.push(c.id)}for(let a=0;a<n.length;a++)this.clusterByConnection(n[a],r,!0);this.body.emitter.emit("_dataChanged")}cluster(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const n={},a={};tl(this.body.nodes,(c,s)=>{c.options&&e.joinCondition(c.options)===!0&&(n[s]=c,tl(c.edges,h=>{this.clusteredEdges[h.id]===void 0&&(a[h.id]=h)}))}),this._cluster(n,a,e,r)}clusterByEdgeCount(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r=this._checkOptions(r);const a=[],c={};let s,h,i;for(let l=0;l<this.body.nodeIndices.length;l++){const d={},o={},f=this.body.nodeIndices[l],A=this.body.nodes[f];if(c[f]===void 0){i=0,h=[];for(let w=0;w<A.edges.length;w++)s=A.edges[w],this.clusteredEdges[s.id]===void 0&&(s.toId!==s.fromId&&i++,h.push(s));if(i===e){const w=function(m){if(r.joinCondition===void 0||r.joinCondition===null)return!0;const u=Vg.cloneOptions(m);return r.joinCondition(u)};let I=!0;for(let m=0;m<h.length;m++){s=h[m];const u=this._getConnectedId(s,f);if(w(A))o[s.id]=s,d[f]=A,d[u]=this.body.nodes[u],c[f]=!0;else{I=!1;break}}if(Fc(d).length>0&&Fc(o).length>0&&I===!0){const u=function(){for(let g=0;g<a.length;++g)for(const v in d)if(a[g].nodes[v]!==void 0)return a[g]}();if(u!==void 0){for(const g in d)u.nodes[g]===void 0&&(u.nodes[g]=d[g]);for(const g in o)u.edges[g]===void 0&&(u.edges[g]=o[g])}else a.push({nodes:d,edges:o})}}}}for(let l=0;l<a.length;l++)this._cluster(a[l].nodes,a[l].edges,r,!1);n===!0&&this.body.emitter.emit("_dataChanged")}clusterOutliers(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,r)}clusterBridges(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,r)}clusterByConnection(e,r){var n;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const c=this.body.nodes[e];r=this._checkOptions(r,c),r.clusterNodeProperties.x===void 0&&(r.clusterNodeProperties.x=c.x),r.clusterNodeProperties.y===void 0&&(r.clusterNodeProperties.y=c.y),r.clusterNodeProperties.fixed===void 0&&(r.clusterNodeProperties.fixed={},r.clusterNodeProperties.fixed.x=c.options.fixed.x,r.clusterNodeProperties.fixed.y=c.options.fixed.y);const s={},h={},i=c.id,l=Vg.cloneOptions(c);s[i]=c;for(let o=0;o<c.edges.length;o++){const f=c.edges[o];if(this.clusteredEdges[f.id]===void 0){const A=this._getConnectedId(f,i);if(this.clusteredNodes[A]===void 0)if(A!==i)if(r.joinCondition===void 0)h[f.id]=f,s[A]=this.body.nodes[A];else{const w=Vg.cloneOptions(this.body.nodes[A]);r.joinCondition(l,w)===!0&&(h[f.id]=f,s[A]=this.body.nodes[A])}else h[f.id]=f}}const d=FT(n=Fc(s)).call(n,function(o){return s[o].id});for(const o in s){if(!Object.prototype.hasOwnProperty.call(s,o))continue;const f=s[o];for(let A=0;A<f.edges.length;A++){const w=f.edges[A];Bl(d).call(d,this._getConnectedId(w,f.id))>-1&&(h[w.id]=w)}}this._cluster(s,h,r,a)}_createClusterEdges(e,r,n,a){let c,s,h,i,l,d;const o=Fc(e),f=[];for(let I=0;I<o.length;I++){s=o[I],h=e[s];for(let m=0;m<h.edges.length;m++)c=h.edges[m],this.clusteredEdges[c.id]===void 0&&(c.toId==c.fromId?r[c.id]=c:c.toId==s?(i=n.id,l=c.fromId,d=l):(i=c.toId,l=n.id,d=i),e[d]===void 0&&f.push({edge:c,fromId:l,toId:i}))}const A=[],w=function(I){for(let m=0;m<A.length;m++){const u=A[m],g=I.fromId===u.fromId&&I.toId===u.toId,v=I.fromId===u.toId&&I.toId===u.fromId;if(g||v)return u}return null};for(let I=0;I<f.length;I++){const m=f[I],u=m.edge;let g=w(m);g===null?(g=this._createClusteredEdge(m.fromId,m.toId,u,a),A.push(g)):g.clusteringEdgeReplacingIds.push(u.id),this.body.edges[u.id].edgeReplacedById=g.id,this._backupEdgeOptions(u),u.setOptions({physics:!1})}}_checkOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const c=[];for(const d in e)Object.prototype.hasOwnProperty.call(e,d)&&this.clusteredNodes[d]!==void 0&&c.push(d);for(let d=0;d<c.length;++d)delete e[c[d]];if(Fc(e).length==0||Fc(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=!0)return;let s=Ru({},n.clusterNodeProperties);if(n.processProperties!==void 0){const d=[];for(const f in e)if(Object.prototype.hasOwnProperty.call(e,f)){const A=Vg.cloneOptions(e[f]);d.push(A)}const o=[];for(const f in r)if(Object.prototype.hasOwnProperty.call(r,f)&&f.substr(0,12)!=="clusterEdge:"){const A=Vg.cloneOptions(r[f],"edge");o.push(A)}if(s=n.processProperties(s,d,o),!s)throw new Error("The processProperties function does not return properties!")}s.id===void 0&&(s.id="cluster:"+VS());const h=s.id;s.label===void 0&&(s.label="cluster");let i;s.x===void 0&&(i=this._getClusterPosition(e),s.x=i.x),s.y===void 0&&(i===void 0&&(i=this._getClusterPosition(e)),s.y=i.y),s.id=h;const l=this.body.functions.createNode(s,dBt);l.containedNodes=e,l.containedEdges=r,l.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[s.id]=l,this._clusterEdges(e,r,s,n.clusterEdgeProperties),s.id=void 0,a===!0&&this.body.emitter.emit("_dataChanged")}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){const r=this.clusteredEdges[e.id];r!==void 0&&(e.setOptions({physics:r.physics}),delete this.clusteredEdges[e.id])}isCluster(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}_getClusterPosition(e){const r=Fc(e);let n=e[r[0]].x,a=e[r[0]].x,c=e[r[0]].y,s=e[r[0]].y,h;for(let i=1;i<r.length;i++)h=e[r[i]],n=h.x<n?h.x:n,a=h.x>a?h.x:a,c=h.y<c?h.y:c,s=h.y>s?h.y:s;return{x:.5*(n+a),y:.5*(c+s)}}openCluster(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const c=this.findNode(e),s=Bl(c).call(c,e)-1;if(s>=0){const d=c[s];this.body.nodes[d]._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged");return}const h=a.containedNodes,i=a.containedEdges;if(r!==void 0&&r.releaseFunction!==void 0&&typeof r.releaseFunction=="function"){const d={},o={x:a.x,y:a.y};for(const A in h)if(Object.prototype.hasOwnProperty.call(h,A)){const w=this.body.nodes[A];d[A]={x:w.x,y:w.y}}const f=r.releaseFunction(o,d);for(const A in h)if(Object.prototype.hasOwnProperty.call(h,A)){const w=this.body.nodes[A];f[A]!==void 0&&(w.x=f[A].x===void 0?a.x:f[A].x,w.y=f[A].y===void 0?a.y:f[A].y)}}else tl(h,function(d){d.options.fixed.x===!1&&(d.x=a.x),d.options.fixed.y===!1&&(d.y=a.y)});for(const d in h)if(Object.prototype.hasOwnProperty.call(h,d)){const o=this.body.nodes[d];o.vx=a.vx,o.vy=a.vy,o.setOptions({physics:!0}),delete this.clusteredNodes[d]}const l=[];for(let d=0;d<a.edges.length;d++)l.push(a.edges[d]);for(let d=0;d<l.length;d++){const o=l[d],f=this._getConnectedId(o,e),A=this.clusteredNodes[f];for(let w=0;w<o.clusteringEdgeReplacingIds.length;w++){const I=o.clusteringEdgeReplacingIds[w],m=this.body.edges[I];if(m!==void 0)if(A!==void 0){const u=this.body.nodes[A.clusterId];u.containedEdges[m.id]=m,delete i[m.id];let g=m.fromId,v=m.toId;m.toId==f?v=A.clusterId:g=A.clusterId,this._createClusteredEdge(g,v,m,u.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(m)}o.remove()}for(const d in i)Object.prototype.hasOwnProperty.call(i,d)&&this._restoreEdge(i[d]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged")}getNodesInCluster(e){const r=[];if(this.isCluster(e)===!0){const n=this.body.nodes[e].containedNodes;for(const a in n)Object.prototype.hasOwnProperty.call(n,a)&&r.push(this.body.nodes[a].id)}return r}findNode(e){const r=[];let a=0,c;for(;this.clusteredNodes[e]!==void 0&&a<100;){if(c=this.body.nodes[e],c===void 0)return[];r.push(c.id),e=this.clusteredNodes[e].clusterId,a++}return c=this.body.nodes[e],c===void 0?[]:(r.push(c.id),Jb(r).call(r),r)}updateClusteredNode(e,r){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(r===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(r),this.body.emitter.emit("_dataChanged")}updateEdge(e,r){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(r===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");const n=this.getClusteredEdges(e);for(let a=0;a<n.length;a++)this.body.edges[n[a]].setOptions(r);this.body.emitter.emit("_dataChanged")}getClusteredEdges(e){const r=[];let a=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&a<100;)r.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return Jb(r).call(r),r}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){const r=[e],n=[],a=[],c=100;let s=0;for(;r.length>0&&s<c;){const h=r.pop();if(h===void 0)continue;const i=this.body.edges[h];if(i===void 0)continue;s++;const l=i.clusteringEdgeReplacingIds;if(l===void 0)a.push(h);else for(let d=0;d<l.length;++d){const o=l[d];Bl(r).call(r,l)!==-1||Bl(n).call(n,l)!==-1||r.push(o)}n.push(h)}return a}_getConnectedId(e,r){return e.toId!=r?e.toId:(e.fromId!=r,e.fromId)}_getHubSize(){let e=0,r=0,n=0,a=0;for(let i=0;i<this.body.nodeIndices.length;i++){const l=this.body.nodes[this.body.nodeIndices[i]];l.edges.length>a&&(a=l.edges.length),e+=l.edges.length,r+=Math.pow(l.edges.length,2),n+=1}e=e/n,r=r/n;const c=r-Math.pow(e,2),s=Math.sqrt(c);let h=Math.floor(e+2*s);return h>a&&(h=a),h}_createClusteredEdge(e,r,n,a,c){const s=Vg.cloneOptions(n,"edge");Ru(s,a),s.from=e,s.to=r,s.id="clusterEdge:"+VS(),c!==void 0&&Ru(s,c);const h=this.body.functions.createEdge(s);return h.clusteringEdgeReplacingIds=[n.id],h.connect(),this.body.edges[h.id]=h,h}_clusterEdges(e,r,n,a){if(r instanceof VC){const c=r,s={};s[c.id]=c,r=s}if(e instanceof wp){const c=e,s={};s[c.id]=c,e=s}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=n.clusterEdgeProperties),this._createClusterEdges(e,r,n,a);for(const c in r)if(Object.prototype.hasOwnProperty.call(r,c)&&this.body.edges[c]!==void 0){const s=this.body.edges[c];this._backupEdgeOptions(s),s.setOptions({physics:!1})}for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&(this.clusteredNodes[c]={clusterId:n.id,node:this.body.nodes[c]},this.body.nodes[c].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const r=this.clusteredNodes[e];if(r===void 0)return;const n=r.clusterId;if(n!==void 0)return this.body.nodes[n]}_filter(e,r){const n=[];return tl(e,a=>{r(a)&&n.push(a)}),n}_updateState(){let e;const r=[],n={},a=i=>{tl(this.body.nodes,l=>{l.isCluster===!0&&i(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&r.push(e)}a(function(i){for(let l=0;l<r.length;l++)delete i.containedNodes[r[l]]});for(let i=0;i<r.length;i++)delete this.clusteredNodes[r[i]];tl(this.clusteredEdges,i=>{const l=this.body.edges[i];(l===void 0||!l.endPointsValid())&&(n[i]=i)}),a(function(i){tl(i.containedEdges,(l,d)=>{!l.endPointsValid()&&!n[d]&&(n[d]=d)})}),tl(this.body.edges,(i,l)=>{let d=!0;const o=i.clusteringEdgeReplacingIds;if(o!==void 0){let f=0;tl(o,A=>{const w=this.body.edges[A];w!==void 0&&w.endPointsValid()&&(f+=1)}),d=f>0}(!i.endPointsValid()||!d)&&(n[l]=l)}),a(i=>{tl(n,l=>{delete i.containedEdges[l],tl(i.edges,(d,o)=>{if(d.id===l){i.edges[o]=null;return}d.clusteringEdgeReplacingIds=this._filter(d.clusteringEdgeReplacingIds,function(f){return!n[f]})}),i.edges=this._filter(i.edges,function(d){return d!==null})})}),tl(n,i=>{delete this.clusteredEdges[i]}),tl(n,i=>{delete this.body.edges[i]});const c=Fc(this.body.edges);tl(c,i=>{const l=this.body.edges[i],d=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(d!==this._isClusteredEdge(l.id))if(d){const o=this._getClusterNodeForNode(l.fromId);o!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,o);const f=this._getClusterNodeForNode(l.toId);f!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,f)}else delete this._clusterEdges[i],this._restoreEdge(l)});let s=!1,h=!0;for(;h;){const i=[];a(function(l){const d=Fc(l.containedNodes).length,o=l.options.allowSingleNodeCluster===!0;(o&&d<1||!o&&d<2)&&i.push(l.id)});for(let l=0;l<i.length;++l)this.openCluster(i[l],{},!1);h=i.length>0,s=s||h}s&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}function vBt(){let t;window!==void 0&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),t===void 0?window.requestAnimationFrame=function(e){e()}:window.requestAnimationFrame=t}class pBt{constructor(e,r){vBt(),this.body=e,this.canvas=r,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},jf(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=Ny(()=>{var r;this.zooming=!1,ka(r=this._requestRedraw).call(r,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",ka(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.renderTimer=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,this.requiresTimeout===!0?clearTimeout(this.renderTimer):window.cancelAnimationFrame(this.renderTimer),this.body.emitter.off()})}setOptions(e){e!==void 0&&D3(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_requestNextFrame(e,r){if(typeof window>"u")return;let n;const a=window;return this.requiresTimeout===!0?n=Ny(e,r):a.requestAnimationFrame&&(n=a.requestAnimationFrame(e)),n}_startRendering(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(ka(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(()=>{this._redraw(!1)},0))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const r={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const n=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,c=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,a,c),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:s}=this._drawNodes(n,e);r.drawExternalLabels=s}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(n),r.drawExternalLabels!=null&&r.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.clearRect(0,0,a,c)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const r=this.body.nodes;let n;for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n=r[a],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}_drawNodes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.nodes,a=this.body.nodeIndices;let c;const s=[],h=[],i=20,l=this.canvas.DOMtoCanvas({x:-i,y:-i}),d=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+i,y:this.canvas.frame.canvas.clientHeight+i}),o={top:l.y,left:l.x,bottom:d.y,right:d.x},f=[];for(let m=0;m<a.length;m++)if(c=n[a[m]],c.hover)h.push(a[m]);else if(c.isSelected())s.push(a[m]);else if(r===!0){const u=c.draw(e);u.drawExternalLabel!=null&&f.push(u.drawExternalLabel)}else if(c.isBoundingBoxOverlappingWith(o)===!0){const u=c.draw(e);u.drawExternalLabel!=null&&f.push(u.drawExternalLabel)}else c.updateBoundingBox(e,c.selected);let A;const w=s.length,I=h.length;for(A=0;A<w;A++){c=n[s[A]];const m=c.draw(e);m.drawExternalLabel!=null&&f.push(m.drawExternalLabel)}for(A=0;A<I;A++){c=n[h[A]];const m=c.draw(e);m.drawExternalLabel!=null&&f.push(m.drawExternalLabel)}return{drawExternalLabels:()=>{for(const m of f)m()}}}_drawEdges(e){const r=this.body.edges,n=this.body.edgeIndices;for(let a=0;a<n.length;a++){const c=r[n[a]];c.connected===!0&&c.draw(e)}}_drawArrows(e){const r=this.body.edges,n=this.body.edgeIndices;for(let a=0;a<n.length;a++){const c=r[n[a]];c.connected===!0&&c.drawArrows(e)}}_determineBrowserMethod(){if(typeof window<"u"){const e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,Bl(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:Bl(e).call(e,"safari")!=-1&&Bl(e).call(e,"chrome")<=-1&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();const r=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,n=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,r,n),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,r,n),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}var mBt=au,yBt=mBt.setInterval,ABt=yBt,CBt=Is(ABt);function VO(t,e){e.inputHandler=function(r){r.isFirst&&e(r)},t.on("hammer.input",e.inputHandler)}function QIe(t,e){return e.inputHandler=function(r){r.isFinal&&e(r)},t.on("hammer.input",e.inputHandler)}class IBt{constructor(e){this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},jf(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once("resize",r=>{r.width!==0&&(this.body.view.translation.x=r.width*.5),r.height!==0&&(this.body.view.translation.y=r.height*.5)}),this.body.emitter.on("setSize",ka(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&D3(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var r;if(window.ResizeObserver){const a=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:c}=this;a.observe(c),this._cleanupCallbacks.push(()=>{a.unobserve(c)})}else{const a=CBt(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(a)})}const n=ka(r=this._onResize).call(r,this);window.addEventListener("resize",n),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",n)})}}_cleanUp(){var e,r,n;Au(e=Jb(r=j1(n=this._cleanupCallbacks).call(n,0)).call(r)).call(e,a=>{try{a()}catch(c){console.error(c)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,r=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let n=this.cameraState.scale;e!=1&&r!=1?n=this.cameraState.scale*.5*(e+r):e!=1?n=this.cameraState.scale*e:r!=1&&(n=this.cameraState.scale*r),this.body.view.scale=n;const a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),c={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=c.x*this.body.view.scale,this.body.view.translation.y+=c.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Bl(e).call(e,"%")!==-1||Bl(e).call(e,"px")!==-1)return e;if(Bl(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Z2(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Z2.DIRECTION_ALL}),VO(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new Z2(this.frame),QIe(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),r=this._prepareValue(r);let n=!1;const a=this.frame.canvas.width,c=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||r!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=r)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=r,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=r,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{const h=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==h||this.frame.canvas.height!==i)&&this._getCameraState(s),this.frame.canvas.width!==h&&(this.frame.canvas.width=h,n=!0),this.frame.canvas.height!==i&&(this.frame.canvas.height=i,n=!0)}return n===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(c/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let r=1;typeof window<"u"&&(r=window.devicePixelRatio||1);const n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return r/n}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function bBt(t,e){const r=jf({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},t??{});if(!$c(r.nodes))throw new TypeError("Nodes has to be an array of ids.");if(r.nodes.length===0&&(r.nodes=e),!(typeof r.minZoomLevel=="number"&&r.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof r.maxZoomLevel=="number"&&r.minZoomLevel<=r.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return r}class xBt{constructor(e,r){var n,a;this.body=e,this.canvas=r,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",ka(n=this.fit).call(n,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",ka(a=this.releaseNode).call(a,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=bBt(e,this.body.nodeIndices);const n=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight;let c,s;if(n===0||a===0)s=1,c=Vg.getRange(this.body.nodes,e.nodes);else if(r===!0){let l=0;for(const f in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,f)&&this.body.nodes[f].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}c=Vg.getRange(this.body.nodes,e.nodes),s=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const o=Math.min(n/600,a/600);s*=o}else{this.body.emitter.emit("_resizeNodes"),c=Vg.getRange(this.body.nodes,e.nodes);const l=Math.abs(c.maxX-c.minX)*1.1,d=Math.abs(c.maxY-c.minY)*1.1,o=n/l,f=a/d;s=o<=f?o:f}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);const i={position:Vg.findCenter(c),scale:s,animation:e.animation};this.moveTo(i)}focus(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};r.position=n,r.lockedOnNode=e,this.moveTo(r)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!Lb(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!Lb(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!Lb(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!Lb(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:r.x-e.position.x,y:r.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=ka(a=this._lockedRedraw).call(a,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var c;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=ka(c=this._transitionRedraw).call(c,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:r.x-e.x,y:r.y-e.y},a=this.body.view.translation,c={x:a.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+n.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=c}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const r=R8t[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*r,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*r,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*r},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=ka(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function Woe(t){var e=t&&t.preventDefault||!1,r=t&&t.container||window,n={},a={keydown:{},keyup:{}},c={},s;for(s=97;s<=122;s++)c[String.fromCharCode(s)]={code:65+(s-97),shift:!1};for(s=65;s<=90;s++)c[String.fromCharCode(s)]={code:s,shift:!0};for(s=0;s<=9;s++)c[""+s]={code:48+s,shift:!1};for(s=1;s<=12;s++)c["F"+s]={code:111+s,shift:!1};for(s=0;s<=9;s++)c["num"+s]={code:96+s,shift:!1};c["num*"]={code:106,shift:!1},c["num+"]={code:107,shift:!1},c["num-"]={code:109,shift:!1},c["num/"]={code:111,shift:!1},c["num."]={code:110,shift:!1},c.left={code:37,shift:!1},c.up={code:38,shift:!1},c.right={code:39,shift:!1},c.down={code:40,shift:!1},c.space={code:32,shift:!1},c.enter={code:13,shift:!1},c.shift={code:16,shift:void 0},c.esc={code:27,shift:!1},c.backspace={code:8,shift:!1},c.tab={code:9,shift:!1},c.ctrl={code:17,shift:!1},c.alt={code:18,shift:!1},c.delete={code:46,shift:!1},c.pageup={code:33,shift:!1},c.pagedown={code:34,shift:!1},c["="]={code:187,shift:!1},c["-"]={code:189,shift:!1},c["]"]={code:221,shift:!1},c["["]={code:219,shift:!1};var h=function(d){l(d,"keydown")},i=function(d){l(d,"keyup")},l=function(d,o){if(a[o][d.keyCode]!==void 0){for(var f=a[o][d.keyCode],A=0;A<f.length;A++)(f[A].shift===void 0||f[A].shift==!0&&d.shiftKey==!0||f[A].shift==!1&&d.shiftKey==!1)&&f[A].fn(d);e==!0&&d.preventDefault()}};return n.bind=function(d,o,f){if(f===void 0&&(f="keydown"),c[d]===void 0)throw new Error("unsupported key: "+d);a[f][c[d].code]===void 0&&(a[f][c[d].code]=[]),a[f][c[d].code].push({fn:o,shift:c[d].shift})},n.bindAll=function(d,o){o===void 0&&(o="keydown");for(var f in c)c.hasOwnProperty(f)&&n.bind(f,d,o)},n.getKey=function(d){for(var o in c)if(c.hasOwnProperty(o)){if(d.shiftKey==!0&&c[o].shift==!0&&d.keyCode==c[o].code)return o;if(d.shiftKey==!1&&c[o].shift==!1&&d.keyCode==c[o].code)return o;if(d.keyCode==c[o].code&&o=="shift")return o}return"unknown key, currently not supported"},n.unbind=function(d,o,f){if(f===void 0&&(f="keydown"),c[d]===void 0)throw new Error("unsupported key: "+d);if(o!==void 0){var A=[],w=a[f][c[d].code];if(w!==void 0)for(var I=0;I<w.length;I++)w[I].fn==o&&w[I].shift==c[d].shift||A.push(a[f][c[d].code][I]);a[f][c[d].code]=A}else a[f][c[d].code]=[]},n.reset=function(){a={keydown:{},keyup:{}}},n.destroy=function(){a={keydown:{},keyup:{}},r.removeEventListener("keydown",h,!0),r.removeEventListener("keyup",i,!0)},r.addEventListener("keydown",h,!0),r.addEventListener("keyup",i,!0),n}class wBt{constructor(e,r){this.body=e,this.canvas=r,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",()=>{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}loadNavigationElements(){this.cleanNavigation(),this.navigationDOM={};const e=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],r=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(let s=0;s<e.length;s++){this.navigationDOM[e[s]]=document.createElement("div"),this.navigationDOM[e[s]].className="vis-button vis-"+e[s],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[s]]);const h=new Z2(this.navigationDOM[e[s]]);if(r[s]==="_fit"){var n;VO(h,ka(n=this._fit).call(n,this))}else{var a;VO(h,ka(a=this.bindToRedraw).call(a,this,r[s]))}this.navigationHammers.push(h)}const c=new Z2(this.canvas.frame);QIe(c,()=>{this._stopMovement()}),this.navigationHammers.push(c),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var r;this.boundFunctions[e]=ka(r=this[e]).call(r,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,r=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=r/e,c=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=r,this.body.view.translation={x:c,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,r=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=r/e,c=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=r,this.body.view.translation={x:c,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=Woe({container:window,preventDefault:!0}):this.keycharm=Woe({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,r,n,a,c,s,h,i,l,d,o,f,A,w,I,m,u,g,v,p,C,y,x,T;ka(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),ka(r=this.keycharm).call(r,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),ka(n=this.keycharm).call(n,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),ka(a=this.keycharm).call(a,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),ka(c=this.keycharm).call(c,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),ka(s=this.keycharm).call(s,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),ka(h=this.keycharm).call(h,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),ka(i=this.keycharm).call(i,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),ka(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),ka(d=this.keycharm).call(d,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),ka(o=this.keycharm).call(o,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),ka(f=this.keycharm).call(f,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),ka(A=this.keycharm).call(A,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),ka(w=this.keycharm).call(w,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),ka(I=this.keycharm).call(I,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),ka(m=this.keycharm).call(m,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),ka(u=this.keycharm).call(u,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),ka(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),ka(v=this.keycharm).call(v,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),ka(p=this.keycharm).call(p,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),ka(C=this.keycharm).call(C,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),ka(y=this.keycharm).call(y,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),ka(x=this.keycharm).call(x,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),ka(T=this.keycharm).call(T,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class TBt{constructor(e,r,n){var a,c,s,h,i,l,d,o,f,A,w,I,m;this.body=e,this.canvas=r,this.selectionHandler=n,this.navigationHandler=new wBt(e,r),this.body.eventListeners.onTap=ka(a=this.onTap).call(a,this),this.body.eventListeners.onTouch=ka(c=this.onTouch).call(c,this),this.body.eventListeners.onDoubleTap=ka(s=this.onDoubleTap).call(s,this),this.body.eventListeners.onHold=ka(h=this.onHold).call(h,this),this.body.eventListeners.onDragStart=ka(i=this.onDragStart).call(i,this),this.body.eventListeners.onDrag=ka(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=ka(d=this.onDragEnd).call(d,this),this.body.eventListeners.onMouseWheel=ka(o=this.onMouseWheel).call(o,this),this.body.eventListeners.onPinch=ka(f=this.onPinch).call(f,this),this.body.eventListeners.onMouseMove=ka(A=this.onMouseMove).call(A,this),this.body.eventListeners.onRelease=ka(w=this.onRelease).call(w,this),this.body.eventListeners.onContext=ka(I=this.onContext).call(I,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=ka(m=this.getPointer).call(m,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},jf(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(BO(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),vm(this.options,e,"keyboard"),e.tooltip&&(jf(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=EH(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-S8t(this.canvas.frame.canvas),y:e.y-E8t(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const r=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(r,n),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r)}onDoubleTap(e){const r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,r)}onHold(e){const r=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(r,n),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r),this.selectionHandler.generateClickEvent("hold",e,r)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,r),this.touchTime=new Date().valueOf()}}onContext(e){const r=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,r)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,r){const n=function(a,c){const s=[];for(let h=0;h<a.length;h++){const i=a[h];Bl(c).call(c,i)===-1&&s.push(i)}return s};return{nodes:n(e.nodes,r.nodes),edges:n(e.edges,r.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);const r=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=jf({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;const n=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)}}else if(r!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=r.id,r.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[r.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);for(const n of this.selectionHandler.getSelectedNodes()){const a={id:n.id,node:n,x:n.x,y:n.y,xFixed:n.options.fixed.x,yFixed:n.options.fixed.y};n.options.fixed.x=!0,n.options.fixed.y=!0,this.drag.selection.push(a)}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}onDrag(e){if(this.drag.pinched===!0)return;this.body.emitter.emit("unlockNode");const r=this.getPointer(e.center),n=this.drag.selection;if(n&&n.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,r);const a=r.x-this.drag.pointer.x,c=r.y-this.drag.pointer.y;Au(n).call(n,s=>{const h=s.node;s.xFixed===!1&&(h.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(s.x)+a)),s.yFixed===!1&&(h.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(s.y)+c))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,r,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,r,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const a=r.x-this.drag.pointer.x,c=r.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+a,y:this.drag.translation.y+c},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var r;this.body.selectionBox.show=!1;const n=this.body.selectionBox.position,a={minX:Math.min(n.start.x,n.end.x),minY:Math.min(n.start.y,n.end.y),maxX:Math.max(n.start.x,n.end.x),maxY:Math.max(n.start.y,n.end.y)},c=Lv(r=this.body.nodeIndices).call(r,h=>{const i=this.body.nodes[h];return i.x>=a.minX&&i.x<=a.maxX&&i.y>=a.minY&&i.y<=a.maxY});Au(c).call(c,h=>this.selectionHandler.selectObject(this.body.nodes[h]));const s=this.getPointer(e.center);this.selectionHandler.commitAndEmit(s,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const n=this.drag.selection;n&&n.length?(Au(n).call(n,function(a){a.node.options.fixed.x=a.xFixed,a.node.options.fixed.y=a.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const r=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const n=this.pinch.scale*e.scale;this.zoom(n,r)}zoom(e,r){if(this.options.zoomView===!0){const n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let a;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));const c=this.body.view.translation,s=e/n,h=(1-s)*r.x+c.x*s,i=(1-s)*r.y+c.y*s;if(this.body.view.scale=e,this.body.view.translation={x:h,y:i},a!=null){const l=this.canvas.canvasToDOM(a);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),n<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:r}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:r})}}onMouseWheel(e){if(this.options.zoomView===!0){if(e.deltaY!==0){let r=this.body.view.scale;r*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);const n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(r,n)}e.preventDefault()}}onMouseMove(e){const r=this.getPointer({x:e.clientX,y:e.clientY});let n=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(r),this.popup.hidden===!1&&(n=!0,this.popup.setPosition(r.x+3,r.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),n===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=Ny(()=>this._checkShowPopup(r),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,r)}_checkShowPopup(e){const r=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),a={left:r,top:n,right:r,bottom:n},c=this.popupObj===void 0?void 0:this.popupObj.id;let s=!1,h="node";if(this.popupObj===void 0){const i=this.body.nodeIndices,l=this.body.nodes;let d;const o=[];for(let f=0;f<i.length;f++)d=l[i[f]],d.isOverlappingWith(a)===!0&&(s=!0,d.getTitle()!==void 0&&o.push(i[f]));o.length>0&&(this.popupObj=l[o[o.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){const i=this.body.edgeIndices,l=this.body.edges;let d;const o=[];for(let f=0;f<i.length;f++)d=l[i[f]],d.isOverlappingWith(a)===!0&&d.connected===!0&&d.getTitle()!==void 0&&o.push(i[f]);o.length>0&&(this.popupObj=l[o[o.length-1]],h="edge")}this.popupObj!==void 0?this.popupObj.id!==c&&(this.popup===void 0&&(this.popup=new B8t(this.canvas.frame)),this.popup.popupTargetType=h,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const r=this.selectionHandler._pointerToPositionObject(e);let n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(r),n===!0)){const a=this.selectionHandler.getNodeAt(e);n=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(r));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var _Bt=TZ,SBt=EIe;_Bt("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},SBt);var EBt=au,MBt=EBt.Set,PBt=MBt,RBt=PBt,LBt=RBt,dC=Is(LBt),OBt=Wl,Zoe=_Z,DR=fk.getWeakData,DBt=wZ,kBt=bA,NBt=T3,tB=lg,FBt=xZ,JIe=yI,Yoe=Ed,qIe=Xx,zBt=qIe.set,BBt=qIe.getterFor,$Bt=JIe.find,UBt=JIe.findIndex,HBt=OBt([].splice),jBt=0,kR=function(t){return t.frozen||(t.frozen=new ebe)},ebe=function(){this.entries=[]},rB=function(t,e){return $Bt(t.entries,function(r){return r[0]===e})};ebe.prototype={get:function(t){var e=rB(this,t);if(e)return e[1]},has:function(t){return!!rB(this,t)},set:function(t,e){var r=rB(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=UBt(this.entries,function(r){return r[0]===t});return~e&&HBt(this.entries,e,1),!!~e}};var VBt={getConstructor:function(t,e,r,n){var a=t(function(i,l){DBt(i,c),zBt(i,{type:e,id:jBt++,frozen:void 0}),NBt(l)||FBt(l,i[n],{that:i,AS_ENTRIES:r})}),c=a.prototype,s=BBt(e),h=function(i,l,d){var o=s(i),f=DR(kBt(l),!0);return f===!0?kR(o).set(l,d):f[o.id]=d,i};return Zoe(c,{delete:function(i){var l=s(this);if(!tB(i))return!1;var d=DR(i);return d===!0?kR(l).delete(i):d&&Yoe(d,l.id)&&delete d[l.id]},has:function(l){var d=s(this);if(!tB(l))return!1;var o=DR(l);return o===!0?kR(d).has(l):o&&Yoe(o,d.id)}}),Zoe(c,r?{get:function(l){var d=s(this);if(tB(l)){var o=DR(l);return o===!0?kR(d).get(l):o?o[d.id]:void 0}},set:function(l,d){return h(this,l,d)}}:{add:function(l){return h(this,l,!0)}}),a}},GBt=xIe,Xoe=Yc,V6=Wl,Koe=_Z,WBt=fk,ZBt=TZ,tbe=VBt,NR=lg,FR=Xx.enforce,YBt=Gl,XBt=ZAe,XM=Object,KBt=Array.isArray,zR=XM.isExtensible,rbe=XM.isFrozen,QBt=XM.isSealed,nbe=XM.freeze,JBt=XM.seal,Qoe={},Joe={},qBt=!Xoe.ActiveXObject&&"ActiveXObject"in Xoe,j_,ibe=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},abe=ZBt("WeakMap",ibe,tbe),e2=abe.prototype,G6=V6(e2.set),e$t=function(){return GBt&&YBt(function(){var t=nbe([]);return G6(new abe,t,1),!rbe(t)})};if(XBt)if(qBt){j_=tbe.getConstructor(ibe,"WeakMap",!0),WBt.enable();var qoe=V6(e2.delete),BR=V6(e2.has),ese=V6(e2.get);Koe(e2,{delete:function(t){if(NR(t)&&!zR(t)){var e=FR(this);return e.frozen||(e.frozen=new j_),qoe(this,t)||e.frozen.delete(t)}return qoe(this,t)},has:function(e){if(NR(e)&&!zR(e)){var r=FR(this);return r.frozen||(r.frozen=new j_),BR(this,e)||r.frozen.has(e)}return BR(this,e)},get:function(e){if(NR(e)&&!zR(e)){var r=FR(this);return r.frozen||(r.frozen=new j_),BR(this,e)?ese(this,e):r.frozen.get(e)}return ese(this,e)},set:function(e,r){if(NR(e)&&!zR(e)){var n=FR(this);n.frozen||(n.frozen=new j_),BR(this,e)?G6(this,e,r):n.frozen.set(e,r)}else G6(this,e,r);return this}})}else e$t()&&Koe(e2,{set:function(e,r){var n;return KBt(e)&&(rbe(e)?n=Qoe:QBt(e)&&(n=Joe)),G6(this,e,r),n===Qoe&&nbe(e),n===Joe&&JBt(e),this}});var t$t=au,r$t=t$t.WeakMap,n$t=r$t,i$t=n$t,a$t=i$t,GS=Is(a$t);function Mu(t,e,r,n){if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function DH(t,e,r,n,a){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}var gb,fm,JA,qA,W6;function tse(t,e){const r=new dC;for(const n of e)t.has(n)||r.add(n);return r}class rse{constructor(){gb.set(this,new dC),fm.set(this,new dC)}get size(){return Mu(this,fm,"f").size}add(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(const a of r)Mu(this,fm,"f").add(a)}delete(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(const a of r)Mu(this,fm,"f").delete(a)}clear(){Mu(this,fm,"f").clear()}getSelection(){return[...Mu(this,fm,"f")]}getChanges(){return{added:[...tse(Mu(this,gb,"f"),Mu(this,fm,"f"))],deleted:[...tse(Mu(this,fm,"f"),Mu(this,gb,"f"))],previous:[...new dC(Mu(this,gb,"f"))],current:[...new dC(Mu(this,fm,"f"))]}}commit(){const e=this.getChanges();DH(this,gb,Mu(this,fm,"f")),DH(this,fm,new dC(Mu(this,gb,"f")));for(const r of e.added)r.select();for(const r of e.deleted)r.unselect();return e}}gb=new GS,fm=new GS;class o$t{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};JA.set(this,new rse),qA.set(this,new rse),W6.set(this,void 0),DH(this,W6,e)}get sizeNodes(){return Mu(this,JA,"f").size}get sizeEdges(){return Mu(this,qA,"f").size}getNodes(){return Mu(this,JA,"f").getSelection()}getEdges(){return Mu(this,qA,"f").getSelection()}addNodes(){Mu(this,JA,"f").add(...arguments)}addEdges(){Mu(this,qA,"f").add(...arguments)}deleteNodes(e){Mu(this,JA,"f").delete(e)}deleteEdges(e){Mu(this,qA,"f").delete(e)}clear(){Mu(this,JA,"f").clear(),Mu(this,qA,"f").clear()}commit(){const e={nodes:Mu(this,JA,"f").commit(),edges:Mu(this,qA,"f").commit()};for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return Mu(this,W6,"f").call(this,e,...n),e}}JA=new GS,qA=new GS,W6=new GS;class s$t{constructor(e,r){this.body=e,this.canvas=r,this._selectionAccumulator=new o$t,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},jf(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",()=>{this.updateSelection()})}setOptions(e){e!==void 0&&D3(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let r=!1;if(this.options.selectable===!0){const n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(r=this.selectObject(n)),this.body.emitter.emit("_requestRedraw")}return r}selectAdditionalOnPoint(e){let r=!1;if(this.options.selectable===!0){const n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(r=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit("_requestRedraw"))}return r}_initBaseEvent(e,r){const n={};return n.pointer={DOM:{x:r.x,y:r.y},canvas:this.canvas.DOMtoCanvas(r)},n.event=e,n}generateClickEvent(e,r,n,a){let c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const s=this._initBaseEvent(r,n);if(c===!0)s.nodes=[],s.edges=[];else{const h=this.getSelection();s.nodes=h.nodes,s.edges=h.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(n)),r.controlEdge!==void 0&&(s.controlEdge=r.controlEdge),this.body.emitter.emit(e,s)}selectObject(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof wp?(r===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const r=[],n=this.body.nodes;for(let a=0;a<this.body.nodeIndices.length;a++){const c=this.body.nodeIndices[a];n[c].isOverlappingWith(e)&&r.push(c)}return r}_pointerToPositionObject(e){const r=this.canvas.DOMtoCanvas(e);return{left:r.x-1,top:r.y+1,right:r.x+1,bottom:r.y-1}}getNodeAt(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(n);if(a.length>0)return r===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}_getEdgesOverlappingWith(e,r){const n=this.body.edges;for(let a=0;a<this.body.edgeIndices.length;a++){const c=this.body.edgeIndices[a];n[c].isOverlappingWith(e)&&r.push(c)}}_getAllEdgesOverlappingWith(e){const r=[];return this._getEdgesOverlappingWith(e,r),r}getEdgeAt(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=this.canvas.DOMtoCanvas(e);let a=10,c=null;const s=this.body.edges;for(let h=0;h<this.body.edgeIndices.length;h++){const i=this.body.edgeIndices[h],l=s[i];if(l.connected){const d=l.from.x,o=l.from.y,f=l.to.x,A=l.to.y,w=l.edgeType.getDistanceToEdge(d,o,f,A,n.x,n.y);w<a&&(c=i,a=w)}}if(c!==null)return r===!0?this.body.edges[c]:c}_addToHover(e){e instanceof wp?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof wp?(this._selectionAccumulator.deleteNodes(e),this._selectionAccumulator.deleteEdges(...e.edges)):this._selectionAccumulator.deleteEdges(e)}unselectAll(){this._selectionAccumulator.clear()}getSelectedNodeCount(){return this._selectionAccumulator.sizeNodes}getSelectedEdgeCount(){return this._selectionAccumulator.sizeEdges}_hoverConnectedEdges(e){for(let r=0;r<e.edges.length;r++){const n=e.edges[r];n.hover=!0,this._addToHover(n)}}emitBlurEvent(e,r,n){const a=this._initBaseEvent(e,r);n.hover===!0&&(n.hover=!1,n instanceof wp?(a.node=n.id,this.body.emitter.emit("blurNode",a)):(a.edge=n.id,this.body.emitter.emit("blurEdge",a)))}emitHoverEvent(e,r,n){const a=this._initBaseEvent(e,r);let c=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),c=!0,n instanceof wp?(a.node=n.id,this.body.emitter.emit("hoverNode",a)):(a.edge=n.id,this.body.emitter.emit("hoverEdge",a))),c}hoverObject(e,r){let n=this.getNodeAt(r);n===void 0&&(n=this.getEdgeAt(r));let a=!1;for(const c in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,c)&&(n===void 0||n instanceof wp&&n.id!=c||n instanceof VC)&&(this.emitBlurEvent(e,r,this.hoverObj.nodes[c]),delete this.hoverObj.nodes[c],a=!0);for(const c in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,c)&&(a===!0?(this.hoverObj.edges[c].hover=!1,delete this.hoverObj.edges[c]):(n===void 0||n instanceof VC&&n.id!=c||n instanceof wp&&!n.hover)&&(this.emitBlurEvent(e,r,this.hoverObj.edges[c]),delete this.hoverObj.edges[c],a=!0));if(n!==void 0){const c=Fc(this.hoverObj.edges).length,s=Fc(this.hoverObj.nodes).length,h=n instanceof VC&&c===0&&s===0,i=n instanceof wp&&c===0&&s===0;(a||h||i)&&(a=this.emitHoverEvent(e,r,n)),n instanceof wp&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}a===!0&&this.body.emitter.emit("_requestRedraw")}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,r){let n=!1;const a=this._selectionAccumulator.commit(),c={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",r,e,c),n=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",r,e,c),n=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",r,e),n=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",r,e),n=!0),n===!0&&this.generateClickEvent("select",r,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return FT(e=this._selectionAccumulator.getNodes()).call(e,r=>r.id)}getSelectedEdgeIds(){var e;return FT(e=this._selectionAccumulator.getEdges()).call(e,r=>r.id)}setSelection(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((r.unselectAll||r.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const n of e.nodes){const a=this.body.nodes[n];if(!a)throw new RangeError('Node with id "'+n+'" not found');this.selectObject(a,r.highlightEdges)}if(e.edges)for(const n of e.edges){const a=this.body.edges[n];if(!a)throw new RangeError('Edge with id "'+n+'" not found');this.selectObject(a)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:r})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const r=this.canvas.DOMtoCanvas(e),n=[],a=this.body.nodeIndices,c=this.body.nodes;for(let i=a.length-1;i>=0;i--){const d=c[a[i]].getItemsOnPoint(r);n.push.apply(n,d)}const s=this.body.edgeIndices,h=this.body.edges;for(let i=s.length-1;i>=0;i--){const d=h[s[i]].getItemsOnPoint(r);n.push.apply(n,d)}return n}}var nse=jAe,l$t=Math.floor,kH=function(t,e){var r=t.length,n=l$t(r/2);return r<8?u$t(t,e):c$t(t,kH(nse(t,0,n),e),kH(nse(t,n),e),e)},u$t=function(t,e){for(var r=t.length,n=1,a,c;n<r;){for(c=n,a=t[n];c&&e(t[c-1],a)>0;)t[c]=t[--c];c!==n++&&(t[c]=a)}return t},c$t=function(t,e,r,n){for(var a=e.length,c=r.length,s=0,h=0;s<a||h<c;)t[s+h]=s<a&&h<c?n(e[s],r[h])<=0?e[s++]:r[h++]:s<a?e[s++]:r[h++];return t},f$t=kH,h$t=TM,ise=h$t.match(/firefox\/(\d+)/i),d$t=!!ise&&+ise[1],g$t=TM,v$t=/MSIE|Trident/.test(g$t),p$t=TM,ase=p$t.match(/AppleWebKit\/(\d+)\./),m$t=!!ase&&+ase[1],y$t=Cs,obe=Wl,A$t=S3,C$t=$m,ose=Yy,I$t=SCe,sse=Xy,OZ=Gl,b$t=f$t,x$t=L3,lse=d$t,w$t=v$t,use=_M,cse=m$t,xC=[],fse=obe(xC.sort),T$t=obe(xC.push),_$t=OZ(function(){xC.sort(void 0)}),S$t=OZ(function(){xC.sort(null)}),E$t=x$t("sort"),sbe=!OZ(function(){if(use)return use<70;if(!(lse&&lse>3)){if(w$t)return!0;if(cse)return cse<603;var t="",e,r,n,a;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(a=0;a<47;a++)xC.push({k:r+a,v:n})}for(xC.sort(function(c,s){return s.v-c.v}),a=0;a<xC.length;a++)r=xC[a].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),M$t=_$t||!S$t||!E$t||!sbe,P$t=function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:sse(e)>sse(r)?1:-1}};y$t({target:"Array",proto:!0,forced:M$t},{sort:function(e){e!==void 0&&A$t(e);var r=C$t(this);if(sbe)return e===void 0?fse(r):fse(r,e);var n=[],a=ose(r),c,s;for(s=0;s<a;s++)s in r&&T$t(n,r[s]);for(b$t(n,P$t(e)),c=ose(n),s=0;s<c;)r[s]=n[s++];for(;s<a;)I$t(r,s++);return r}});var R$t=Md,L$t=R$t("Array").sort,O$t=Yf,D$t=L$t,nB=Array.prototype,k$t=function(t){var e=t.sort;return t===nB||O$t(nB,t)&&e===nB.sort?D$t:e},N$t=k$t,F$t=N$t,z$t=F$t,X2=Is(z$t),B$t=S3,$$t=$m,U$t=W8,H$t=Yy,j$t=TypeError,V$t=function(t){return function(e,r,n,a){B$t(r);var c=$$t(e),s=U$t(c),h=H$t(c),i=t?h-1:0,l=t?-1:1;if(n<2)for(;;){if(i in s){a=s[i],i+=l;break}if(i+=l,t?i<0:h<=i)throw new j$t("Reduce of empty array with no initial value")}for(;t?i>=0:h>i;i+=l)i in s&&(a=r(a,s[i],i,c));return a}},G$t={left:V$t(!1)},W$t=Yc,Z$t=IA,Y$t=Z$t(W$t.process)==="process",X$t=Cs,K$t=G$t.left,Q$t=L3,hse=_M,J$t=Y$t,q$t=!J$t&&hse>79&&hse<83,eUt=q$t||!Q$t("reduce");X$t({target:"Array",proto:!0,forced:eUt},{reduce:function(e){var r=arguments.length;return K$t(this,e,r,r>1?arguments[1]:void 0)}});var tUt=Md,rUt=tUt("Array").reduce,nUt=Yf,iUt=rUt,iB=Array.prototype,aUt=function(t){var e=t.reduce;return t===iB||nUt(iB,t)&&e===iB.reduce?iUt:e},oUt=aUt,sUt=oUt,lUt=sUt,lbe=Is(lUt);class ube{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,r,n),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,r){this.fake_use(e,r),this.abstract()}shift(e,r){this.fake_use(e,r),this.abstract()}}class uUt extends ube{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.x=r}getTreeSize(e){const r=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:r.min_x,max:r.max_x}}sort(e){X2(e).call(e,function(r,n){return r.x-n.x})}fix(e,r){e.y=this.layout.options.hierarchical.levelSeparation*r,e.options.fixed.y=!0}shift(e,r){this.layout.body.nodes[e].x+=r}}class cUt extends ube{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.y=r}getTreeSize(e){const r=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:r.min_y,max:r.max_y}}sort(e){X2(e).call(e,function(r,n){return r.y-n.y})}fix(e,r){e.x=this.layout.options.hierarchical.levelSeparation*r,e.options.fixed.x=!0}shift(e,r){this.layout.body.nodes[e].y+=r}}var fUt=Cs,hUt=yI.every,dUt=L3,gUt=dUt("every");fUt({target:"Array",proto:!0,forced:!gUt},{every:function(e){return hUt(this,e,arguments.length>1?arguments[1]:void 0)}});var vUt=Md,pUt=vUt("Array").every,mUt=Yf,yUt=pUt,aB=Array.prototype,AUt=function(t){var e=t.every;return t===aB||mUt(aB,t)&&e===aB.every?yUt:e},CUt=AUt,IUt=CUt,bUt=IUt,cbe=Is(bUt);function xUt(t,e){const r=new dC;return Au(t).call(t,n=>{var a;Au(a=n.edges).call(a,c=>{c.connected&&r.add(c)})}),Au(r).call(r,n=>{const a=n.from.id,c=n.to.id;e[a]==null&&(e[a]=0),(e[c]==null||e[a]>=e[c])&&(e[c]=e[a]+1)}),e}function wUt(t){return fbe(e=>{var r,n;return cbe(r=Lv(n=e.edges).call(n,a=>t.has(a.toId))).call(r,a=>a.to===e)},(e,r)=>r>e,"from",t)}function TUt(t){return fbe(e=>{var r,n;return cbe(r=Lv(n=e.edges).call(n,a=>t.has(a.toId))).call(r,a=>a.from===e)},(e,r)=>r<e,"to",t)}function fbe(t,e,r,n){var a;const c=qb(null),s=lbe(a=[...ZIe(n).call(n)]).call(a,(o,f)=>o+1+f.edges.length,0),h=r+"Id",i=r==="to"?1:-1;for(const[o,f]of n){if(!n.has(o)||!t(f))continue;c[o]=0;const A=[f];let w=0,I;for(;I=A.pop();){var l,d;if(!n.has(o))continue;const m=c[I.id]+i;if(Au(l=Lv(d=I.edges).call(d,u=>u.connected&&u.to!==u.from&&u[r]!==I&&n.has(u.toId)&&n.has(u.fromId))).call(l,u=>{const g=u[h],v=c[g];(v==null||e(m,v))&&(c[g]=m,A.push(u[r]))}),w>s)return xUt(n,c);++w}}return c}class _Ut{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,r){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(r),this.parentReference[r]===void 0&&(this.parentReference[r]=[]),this.parentReference[r].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,r){r!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=r,this.treeIndex=Math.max(r,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const r={},n=a=>{if(r[a]!==void 0)return r[a];let c=this.levels[a];if(this.childrenReference[a]){const s=this.childrenReference[a];if(s.length>0)for(let h=0;h<s.length;h++)c=Math.max(c,n(s[h]))}return r[a]=c,c};return n(e)}levelDownstream(e,r){this.levels[r.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[r.id]=this.levels[e.id]+1)}setMinLevelToZero(){var e;const r=new EZ;let n=0;const a=X2(e=[...new dC(sOt(this.levels))]).call(e,(c,s)=>c-s);for(const c of a)r.set(c,n++);for(const c in this.levels)Object.prototype.hasOwnProperty.call(this.levels,c)&&(this.levels[c]=r.get(this.levels[c]))}getTreeSize(e,r){let n=1e9,a=-1e9,c=1e9,s=-1e9;for(const h in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,h)&&this.trees[h]===r){const i=e[h];n=Math.min(i.x,n),a=Math.max(i.x,a),c=Math.min(i.y,c),s=Math.max(i.y,s)}return{min_x:n,max_x:a,min_y:c,max_y:s}}hasSameParent(e,r){const n=this.parentReference[e.id],a=this.parentReference[r.id];if(n===void 0||a===void 0)return!1;for(let c=0;c<n.length;c++)for(let s=0;s<a.length;s++)if(n[c]==a[s])return!0;return!1}inSameSubNetwork(e,r){return this.trees[e.id]===this.trees[r.id]}getLevels(){return Fc(this.distributionOrdering)}addToOrdering(e,r){this.distributionOrdering[r]===void 0&&(this.distributionOrdering[r]=[]);let n=!1;const a=this.distributionOrdering[r];for(const c in a)if(a[c]===e){n=!0;break}n||(this.distributionOrdering[r].push(e),this.distributionIndex[e.id]=this.distributionOrdering[r].length-1)}}class SUt{constructor(e){this.body=e,this._resetRNG(Math.random()+":"+kO()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},jf(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("_dataChanged",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,r){if(e!==void 0){const n=this.options.hierarchical,a=n.enabled;if(D3(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),vm(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),n.direction==="RL"||n.direction==="DU"?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(r);if(a===!0)return this.body.emitter.emit("refresh"),Ru(r,this.optionsBackup)}return r}_resetRNG(e){this.initialRandomSeed=e,this._rng=ck(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const r=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:r.enabled===void 0?!0:r.enabled,solver:"hierarchicalRepulsion"},r.enabled=r.enabled===void 0?!0:r.enabled,r.solver=r.solver||"barnesHut"):typeof e.physics=="object"?(r.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,r.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(r.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let n=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:n};else{const a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(n=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:n,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const r=e.length+50;for(let n=0;n<e.length;n++){const a=e[n],c=2*Math.PI*this._rng();a.x===void 0&&(a.x=r*Math.cos(c)),a.y===void 0&&(a.y=r*Math.sin(c))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){const e=this.body.nodeIndices;let r=0;for(let n=0;n<e.length;n++)this.body.nodes[e[n]].predefinedPosition===!0&&(r+=1);if(r<.5*e.length){let a=0;const c=this.options.clusterThreshold,s={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>c){const i=e.length;for(;e.length>c&&a<=10;){a+=1;const l=e.length;a%3===0?this.body.modules.clustering.clusterBridges(s):this.body.modules.clustering.clusterOutliers(s);const d=e.length;if(l==d&&a%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*i)})}a>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const h=70;for(let i=0;i<e.length;i++){const l=this.body.nodes[e[i]];l.predefinedPosition===!1&&(l.x+=(.5-this._rng())*h,l.y+=(.5-this._rng())*h)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}_shiftToCenter(){const e=Vg.getRangeCore(this.body.nodes,this.body.nodeIndices),r=Vg.findCenter(e);for(let n=0;n<this.body.nodeIndices.length;n++){const a=this.body.nodes[this.body.nodeIndices[n]];a.x-=r.x,a.y-=r.y}}_declusterAll(){let e=!0;for(;e===!0;){e=!1;for(let r=0;r<this.body.nodeIndices.length;r++)this.body.nodes[this.body.nodeIndices[r]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[r],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}getSeed(){return this.initialRandomSeed}setupHierarchicalLayout(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){let e,r,n=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new _Ut;for(r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&(e=this.body.nodes[r],e.options.level!==void 0?(n=!0,this.hierarchical.levels[r]=e.options.level):a=!0);if(a===!0&&n===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(a===!0){const s=this.options.hierarchical.sortMethod;s==="hubsize"?this._determineLevelsByHubsize():s==="directed"?this._determineLevelsDirected():s==="custom"&&this._determineLevelsCustomCallback()}for(const s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);const c=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(c),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let r=!1;const n={},a=()=>{const u=s();let g=0;for(let v=0;v<u.length-1;v++){const p=u[v].max-u[v+1].min;g+=p+this.options.hierarchical.treeSpacing,c(v+1,g)}},c=(u,g)=>{const v=this.hierarchical.trees;for(const p in v)Object.prototype.hasOwnProperty.call(v,p)&&v[p]===u&&this.direction.shift(p,g)},s=()=>{const u=[];for(let g=0;g<this.hierarchical.numTrees();g++)u.push(this.direction.getTreeSize(g));return u},h=(u,g)=>{if(!g[u.id]&&(g[u.id]=!0,this.hierarchical.childrenReference[u.id])){const v=this.hierarchical.childrenReference[u.id];if(v.length>0)for(let p=0;p<v.length;p++)h(this.body.nodes[v[p]],g)}},i=function(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,v=1e9,p=1e9,C=1e9,y=-1e9;for(const x in u)if(Object.prototype.hasOwnProperty.call(u,x)){const T=e.body.nodes[x],P=e.hierarchical.levels[T.id],b=e.direction.getPosition(T),[S,_]=e._getSpaceAroundNode(T,u);v=Math.min(S,v),p=Math.min(_,p),P<=g&&(C=Math.min(b,C),y=Math.max(b,y))}return[C,y,v,p]},l=(u,g)=>{const v=this.hierarchical.getMaxLevel(u.id),p=this.hierarchical.getMaxLevel(g.id);return Math.min(v,p)},d=(u,g,v)=>{const p=this.hierarchical;for(let C=0;C<g.length;C++){const y=g[C],x=p.distributionOrdering[y];if(x.length>1)for(let T=0;T<x.length-1;T++){const P=x[T],b=x[T+1];p.hasSameParent(P,b)&&p.inSameSubNetwork(P,b)&&u(P,b,v)}}},o=function(u,g){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const p=e.direction.getPosition(u),C=e.direction.getPosition(g),y=Math.abs(C-p),x=e.options.hierarchical.nodeSpacing;if(y>x){const T={},P={};h(u,T),h(g,P);const b=l(u,g),S=i(T,b),_=i(P,b),O=S[1],k=_[0],F=_[2];if(Math.abs(O-k)>x){let R=O-k+x;R<-F+x&&(R=-F+x),R<0&&(e._shiftBlock(g.id,R),r=!0,v===!0&&e._centerParent(g))}}},f=(u,g)=>{const v=g.id,p=g.edges,C=this.hierarchical.levels[g.id],y=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,x={},T=[];for(let F=0;F<p.length;F++){const N=p[F];if(N.toId!=N.fromId){const R=N.toId==v?N.from:N.to;x[p[F].id]=R,this.hierarchical.levels[R.id]<C&&T.push(N)}}const P=(F,N)=>{let R=0;for(let z=0;z<N.length;z++)if(x[N[z].id]!==void 0){const E=this.direction.getPosition(x[N[z].id])-F;R+=E/Math.sqrt(E*E+y)}return R},b=(F,N)=>{let R=0;for(let z=0;z<N.length;z++)if(x[N[z].id]!==void 0){const E=this.direction.getPosition(x[N[z].id])-F;R-=y*Math.pow(E*E+y,-1.5)}return R},S=(F,N)=>{let R=this.direction.getPosition(g);const z={};for(let E=0;E<F;E++){const M=P(R,N),D=b(R,N),L=40,j=Math.max(-L,Math.min(L,Math.round(M/D)));if(R=R-j,z[R]!==void 0)break;z[R]=E}return R},_=F=>{const N=this.direction.getPosition(g);if(n[g.id]===void 0){const L={};h(g,L),n[g.id]=L}const R=i(n[g.id]),z=R[2],E=R[3],M=F-N;let D=0;M>0?D=Math.min(M,E-this.options.hierarchical.nodeSpacing):M<0&&(D=-Math.min(-M,z-this.options.hierarchical.nodeSpacing)),D!=0&&(this._shiftBlock(g.id,D),r=!0)},O=F=>{const N=this.direction.getPosition(g),[R,z]=this._getSpaceAroundNode(g),E=F-N;let M=N;E>0?M=Math.min(N+(z-this.options.hierarchical.nodeSpacing),F):E<0&&(M=Math.max(N-(R-this.options.hierarchical.nodeSpacing),F)),M!==N&&(this.direction.setPosition(g,M),r=!0)};let k=S(u,T);_(k),k=S(u,p),O(k)},A=u=>{let g=this.hierarchical.getLevels();g=Jb(g).call(g);for(let v=0;v<u;v++){r=!1;for(let p=0;p<g.length;p++){const C=g[p],y=this.hierarchical.distributionOrdering[C];for(let x=0;x<y.length;x++)f(1e3,y[x])}if(r!==!0)break}},w=u=>{let g=this.hierarchical.getLevels();g=Jb(g).call(g);for(let v=0;v<u&&(r=!1,d(o,g,!0),r===!0);v++);},I=()=>{for(const u in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,u)&&this._centerParent(this.body.nodes[u])},m=()=>{let u=this.hierarchical.getLevels();u=Jb(u).call(u);for(let g=0;g<u.length;g++){const v=u[g],p=this.hierarchical.distributionOrdering[v];for(let C=0;C<p.length;C++)this._centerParent(p[C])}};this.options.hierarchical.blockShifting===!0&&(w(5),I()),this.options.hierarchical.edgeMinimization===!0&&A(20),this.options.hierarchical.parentCentralization===!0&&m(),a()}_getSpaceAroundNode(e,r){let n=!0;r===void 0&&(n=!1);const a=this.hierarchical.levels[e.id];if(a!==void 0){const c=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),h=this.hierarchical.distributionOrdering[a];let i=1e9,l=1e9;if(c!==0){const d=h[c-1];if(n===!0&&r[d.id]===void 0||n===!1){const o=this.direction.getPosition(d);i=s-o}}if(c!=h.length-1){const d=h[c+1];if(n===!0&&r[d.id]===void 0||n===!1){const o=this.direction.getPosition(d);l=Math.min(l,o-s)}}return[i,l]}else return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){const r=this.hierarchical.parentReference[e.id];for(let n=0;n<r.length;n++){const a=r[n],c=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){const h=this._getCenterPosition(s),i=this.direction.getPosition(c),[l,d]=this._getSpaceAroundNode(c),o=i-h;(o<0&&Math.abs(o)<d-this.options.hierarchical.nodeSpacing||o>0&&Math.abs(o)<l-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(c,h)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r;let a=Fc(e[n]);a=this._indexArrayToNodes(a),X2(r=this.direction).call(r,a);let c=0;for(let s=0;s<a.length;s++){const h=a[s];if(this.positionedNodes[h.id]===void 0){const i=this.options.hierarchical.nodeSpacing;let l=i*c;c>0&&(l=this.direction.getPosition(a[s-1])+i),this.direction.setPosition(h,l,n),this._validatePositionAndContinue(h,n,l),c++}}}}_placeBranchNodes(e,r){var n;const a=this.hierarchical.childrenReference[e];if(a===void 0)return;const c=[];for(let h=0;h<a.length;h++)c.push(this.body.nodes[a[h]]);X2(n=this.direction).call(n,c);for(let h=0;h<c.length;h++){const i=c[h],l=this.hierarchical.levels[i.id];if(l>r&&this.positionedNodes[i.id]===void 0){const d=this.options.hierarchical.nodeSpacing;let o;h===0?o=this.direction.getPosition(this.body.nodes[e]):o=this.direction.getPosition(c[h-1])+d,this.direction.setPosition(i,o,l),this._validatePositionAndContinue(i,l,o)}else return}const s=this._getCenterPosition(c);this.direction.setPosition(this.body.nodes[e],s,r)}_validatePositionAndContinue(e,r,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[r]!==void 0){const a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[r]]);if(n-a<this.options.hierarchical.nodeSpacing){const c=a+this.options.hierarchical.nodeSpacing-n,s=this._findCommonParent(this.lastNodeOnLevel[r],e.id);this._shiftBlock(s.withChild,c)}}this.lastNodeOnLevel[r]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,r)}}_indexArrayToNodes(e){const r=[];for(let n=0;n<e.length;n++)r.push(this.body.nodes[e[n]]);return r}_getDistribution(){const e={};let r,n;for(r in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,r)){n=this.body.nodes[r];const a=this.hierarchical.levels[r]===void 0?0:this.hierarchical.levels[r];this.direction.fix(n,a),e[a]===void 0&&(e[a]={}),e[a][r]=n}return e}_getActiveEdges(e){const r=[];return tl(e.edges,n=>{var a;Bl(a=this.body.edgeIndices).call(a,n.id)!==-1&&r.push(n)}),r}_getHubSizes(){const e={},r=this.body.nodeIndices;tl(r,a=>{const c=this.body.nodes[a],s=this._getActiveEdges(c).length;e[s]=!0});const n=[];return tl(e,a=>{n.push(Number(a))}),X2(n).call(n,function(a,c){return c-a}),n}_determineLevelsByHubsize(){const e=(n,a)=>{this.hierarchical.levelDownstream(n,a)},r=this._getHubSizes();for(let n=0;n<r.length;++n){const a=r[n];if(a===0)break;tl(this.body.nodeIndices,c=>{const s=this.body.nodes[c];a===this._getActiveEdges(s).length&&this._crawlNetwork(e,c)})}}_determineLevelsCustomCallback(){const r=function(a,c,s){},n=(a,c,s)=>{let h=this.hierarchical.levels[a.id];h===void 0&&(h=this.hierarchical.levels[a.id]=1e5);const i=r(Vg.cloneOptions(a,"node"),Vg.cloneOptions(c,"node"),Vg.cloneOptions(s,"edge"));this.hierarchical.levels[c.id]=h+i};this._crawlNetwork(n),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const r=lbe(e=this.body.nodeIndices).call(e,(n,a)=>(n.set(a,this.body.nodes[a]),n),new EZ);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=TUt(r):this.hierarchical.levels=wUt(r),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(r,n)=>{this.hierarchical.levels[n.id]>this.hierarchical.levels[r.id]&&this.hierarchical.addRelation(r.id,n.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments.length>1?arguments[1]:void 0;const n={},a=(c,s)=>{if(n[c.id]===void 0){this.hierarchical.setTreeIndex(c,s),n[c.id]=!0;let h;const i=this._getActiveEdges(c);for(let l=0;l<i.length;l++){const d=i[l];d.connected===!0&&(d.toId==c.id?h=d.from:h=d.to,c.id!=h.id&&(e(c,h,d),a(h,s)))}}};if(r===void 0){let c=0;for(let s=0;s<this.body.nodeIndices.length;s++){const h=this.body.nodeIndices[s];if(n[h]===void 0){const i=this.body.nodes[h];a(i,c),c+=1}}}else{const c=this.body.nodes[r];if(c===void 0){console.error("Node not found:",r);return}a(c)}}_shiftBlock(e,r){const n={},a=c=>{if(n[c])return;n[c]=!0,this.direction.shift(c,r);const s=this.hierarchical.childrenReference[c];if(s!==void 0)for(let h=0;h<s.length;h++)a(s[h])};a(e)}_findCommonParent(e,r){const n={},a=(s,h)=>{const i=this.hierarchical.parentReference[h];if(i!==void 0)for(let l=0;l<i.length;l++){const d=i[l];s[d]=!0,a(s,d)}},c=(s,h)=>{const i=this.hierarchical.parentReference[h];if(i!==void 0)for(let l=0;l<i.length;l++){const d=i[l];if(s[d]!==void 0)return{foundParent:d,withChild:h};const o=c(s,d);if(o.foundParent!==null)return o}return{foundParent:null,withChild:h}};return a(n,e),c(n,r)}setDirectionStrategy(){this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU"?this.direction=new uUt(this):this.direction=new cUt(this)}_getCenterPosition(e){let r=1e9,n=-1e9;for(let a=0;a<e.length;a++){let c;if(e[a].id!==void 0)c=e[a];else{const h=e[a];c=this.body.nodes[h]}const s=this.direction.getPosition(c);r=Math.min(r,s),n=Math.max(n,s)}return .5*(r+n)}}class EUt{constructor(e,r,n,a){var c,s;this.body=e,this.canvas=r,this.selectionHandler=n,this.interactionHandler=a,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},jf(this.options,this.defaultOptions),this.body.emitter.on("destroy",()=>{this._clean()}),this.body.emitter.on("_dataChanged",ka(c=this._restore).call(c,this)),this.body.emitter.on("_resetData",ka(s=this._restore).call(s,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,r,n){r!==void 0&&(r.locale!==void 0?this.options.locale=r.locale:this.options.locale=n.locale,r.locales!==void 0?this.options.locales=r.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Ru(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,r;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const n=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),c=n+a,s=this.options.locales[this.options.locale];let h=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),h=!0),this.options.addEdge!==!1&&(h===!0?this._createSeperator(1):h=!0,this._createAddEdgeButton(s)),n===1&&typeof this.options.editNode=="function"?(h===!0?this._createSeperator(2):h=!0,this._createEditNodeButton(s)):a===1&&n===0&&this.options.editEdge!==!1&&(h===!0?this._createSeperator(3):h=!0,this._createEditEdgeButton(s)),c!==0&&(n>0&&this.options.deleteNode!==!1?(h===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(h===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,ka(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",ka(r=this.showManipulatorToolbar).call(r,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var r;const n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,ka(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",ka(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const r=Ru({},e.options,!1);if(r.x=e.x,r.y=e.y,this.options.editNode.length===2)this.options.editNode(r,n=>{n!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(n),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,r,n,a,c;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s;const h=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(h),this._createSeperator(),this._createDescription(h.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,ka(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",ka(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",ka(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",ka(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",ka(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",ka(c=this._dragStartEdge).call(c,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const s=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(s.from.id,s.to.id);return}if(this.guiEnabled===!0){var e;const s=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(s),this._createSeperator(),this._createDescription(s.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,ka(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var r,n,a,c;const s=this.body.edges[this.edgeBeingEditedId],h=this._getNewTargetNode(s.from.x,s.from.y),i=this._getNewTargetNode(s.to.x,s.to.y);this.temporaryIds.nodes.push(h.id),this.temporaryIds.nodes.push(i.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this.body.nodes[i.id]=i,this.body.nodeIndices.push(i.id),this._temporaryBindUI("onTouch",ka(r=this._controlNodeTouch).call(r,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",ka(n=this._controlNodeDragStart).call(n,this)),this._temporaryBindUI("onDrag",ka(a=this._controlNodeDrag).call(a,this)),this._temporaryBindUI("onDragEnd",ka(c=this._controlNodeDragEnd).call(c,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const d=s.edgeType.findBorderPositions(l);h.selected===!1&&(h.x=d.from.x,h.y=d.from.y),i.selected===!1&&(i.x=d.to.x,i.y=d.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),r=this.selectionHandler.getSelectedEdgeIds();let n;if(e.length>0){for(let a=0;a<e.length;a++)if(this.body.nodes[e[a]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(n=this.options.deleteNode)}else r.length>0&&typeof this.options.deleteEdge=="function"&&(n=this.options.deleteEdge);if(typeof n=="function"){const a={nodes:e,edges:r};if(n.length===2)n(a,c=>{c!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(c.edges),this.body.data.nodes.getDataSet().remove(c.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(r),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,r;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(r=this.options.locales[this.options.locale])===null||r===void 0?void 0:r.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,r){const n=Ru({},this.options.controlNodeStyle);n.id="targetNode"+VS(),n.hidden=!1,n.physics=!1,n.x=e,n.y=r;const a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:r,bottom:r},a}_createEditButton(){var e;this._clean(),this.manipulationDOM={},oC(this.editModeDiv);const r=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",r.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,ka(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(oC(this.editModeDiv),oC(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const r of j1(e=this._domEventListenerCleanupQueue).call(e,0)){var e;r()}}_removeManipulationDOM(){this._clean(),oC(this.manipulationDiv),oC(this.editModeDiv),oC(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var r;const n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,ka(r=this.addNodeMode).call(r,this))}_createAddEdgeButton(e){var r;const n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,ka(r=this.addEdgeMode).call(r,this))}_createEditNodeButton(e){var r;const n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,ka(r=this.editNode).call(r,this))}_createEditEdgeButton(e){var r;const n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,ka(r=this.editEdgeMode).call(r,this))}_createDeleteButton(e){var r;let n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";const a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,ka(r=this.deleteSelected).call(r,this))}_createBackButton(e){var r;const n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,ka(r=this.showManipulatorToolbar).call(r,this))}_createButton(e,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+r,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,r){this.temporaryEventFunctions.push({event:e,boundFunction:r}),this.body.emitter.on(e,r)}_temporaryBindUI(e,r){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=r;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+HM(Fc(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e<this.temporaryEventFunctions.length;e++){const r=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(r,n)}this.temporaryEventFunctions=[]}_bindElementEvents(e,r){const n=new Z2(e,{});VO(n,r),this._domEventListenerCleanupQueue.push(()=>{n.destroy()});const a=c=>{let{keyCode:s,key:h}=c;(h==="Enter"||h===" "||s===13||s===32)&&r()};e.addEventListener("keyup",a,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",a,!1)})}_cleanupTemporaryNodesAndEdges(){for(let c=0;c<this.temporaryIds.edges.length;c++){var e;this.body.edges[this.temporaryIds.edges[c]].disconnect(),delete this.body.edges[this.temporaryIds.edges[c]];const s=Bl(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[c]);if(s!==-1){var r;j1(r=this.body.edgeIndices).call(r,s,1)}}for(let c=0;c<this.temporaryIds.nodes.length;c++){var n;delete this.body.nodes[this.temporaryIds.nodes[c]];const s=Bl(n=this.body.nodeIndices).call(n,this.temporaryIds.nodes[c]);if(s!==-1){var a;j1(a=this.body.nodeIndices).call(a,s,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=jf({},this.body.view.translation)}_controlNodeDragStart(){const e=this.lastTouch,r=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],a=this.body.nodes[this.temporaryIds.nodes[1]],c=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;const s=n.isOverlappingWith(r),h=a.isOverlappingWith(r);s===!0?(this.selectedControlNode=n,c.edgeType.from=n):h===!0&&(this.selectedControlNode=a,c.edgeType.to=a),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}_controlNodeDrag(e){this.body.emitter.emit("disablePhysics");const r=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(r);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}_controlNodeDragEnd(e){const r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();const c=this.selectionHandler._getAllNodesOverlappingWith(n);let s;for(let h=c.length-1;h>=0;h--)if(c[h]!==this.selectedControlNode.id){s=this.body.nodes[c[h]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const h=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===h.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=jf({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const r=this.lastTouch,n=this.selectionHandler.getNodeAt(r);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);const c=this.body.functions.createEdge({id:"connectionEdge"+VS(),from:n.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[c.id]=c,this.body.edgeIndices.push(c.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(c.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r);let a;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);const c=this.selectionHandler._getAllNodesOverlappingWith(n);let s;for(let i=c.length-1;i>=0;i--){var h;if(Bl(h=this.temporaryIds.nodes).call(h,c[i])===-1){s=this.body.nodes[c[i]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,r),this.temporaryIds.nodes[0]!==void 0){const i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(r.x),i.y=this.canvas._YconvertDOMtoCanvas(r.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r);let a;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);const c=this.selectionHandler._getAllNodesOverlappingWith(n);let s;for(let i=c.length-1;i>=0;i--){var h;if(Bl(h=this.temporaryIds.nodes).call(h,c[i])===-1){s=this.body.nodes[c[i]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,r),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const r=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,r,void 0,!0)}_performAddNode(e){const r={id:VS(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(r,n=>{n!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(r),this.showManipulatorToolbar()}_performAddEdge(e,r){const n={from:e,to:r};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(n,a=>{a!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,r){const n={id:this.edgeBeingEditedId,from:e,to:r,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let a=this.options.editEdge;if(typeof a=="object"&&(a=a.editWithoutDrag),typeof a=="function")if(a.length===2)a(n,c=>{c==null||this.inMode!=="editEdge"?(this.body.edges[n.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(c),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const Ga="string",La="boolean",Vi="number",hS="array",Oo="object",hbe="dom",MUt="any",oB=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],sB={borderWidth:{number:Vi},borderWidthSelected:{number:Vi,undefined:"undefined"},brokenImage:{string:Ga,undefined:"undefined"},chosen:{label:{boolean:La,function:"function"},node:{boolean:La,function:"function"},__type__:{object:Oo,boolean:La}},color:{border:{string:Ga},background:{string:Ga},highlight:{border:{string:Ga},background:{string:Ga},__type__:{object:Oo,string:Ga}},hover:{border:{string:Ga},background:{string:Ga},__type__:{object:Oo,string:Ga}},__type__:{object:Oo,string:Ga}},opacity:{number:Vi,undefined:"undefined"},fixed:{x:{boolean:La},y:{boolean:La},__type__:{object:Oo,boolean:La}},font:{align:{string:Ga},color:{string:Ga},size:{number:Vi},face:{string:Ga},background:{string:Ga},strokeWidth:{number:Vi},strokeColor:{string:Ga},vadjust:{number:Vi},multi:{boolean:La,string:Ga},bold:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},boldital:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},ital:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},mono:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},__type__:{object:Oo,string:Ga}},group:{string:Ga,number:Vi,undefined:"undefined"},heightConstraint:{minimum:{number:Vi},valign:{string:Ga},__type__:{object:Oo,boolean:La,number:Vi}},hidden:{boolean:La},icon:{face:{string:Ga},code:{string:Ga},size:{number:Vi},color:{string:Ga},weight:{string:Ga,number:Vi},__type__:{object:Oo}},id:{string:Ga,number:Vi},image:{selected:{string:Ga,undefined:"undefined"},unselected:{string:Ga,undefined:"undefined"},__type__:{object:Oo,string:Ga}},imagePadding:{top:{number:Vi},right:{number:Vi},bottom:{number:Vi},left:{number:Vi},__type__:{object:Oo,number:Vi}},label:{string:Ga,undefined:"undefined"},labelHighlightBold:{boolean:La},level:{number:Vi,undefined:"undefined"},margin:{top:{number:Vi},right:{number:Vi},bottom:{number:Vi},left:{number:Vi},__type__:{object:Oo,number:Vi}},mass:{number:Vi},physics:{boolean:La},scaling:{min:{number:Vi},max:{number:Vi},label:{enabled:{boolean:La},min:{number:Vi},max:{number:Vi},maxVisible:{number:Vi},drawThreshold:{number:Vi},__type__:{object:Oo,boolean:La}},customScalingFunction:{function:"function"},__type__:{object:Oo}},shadow:{enabled:{boolean:La},color:{string:Ga},size:{number:Vi},x:{number:Vi},y:{number:Vi},__type__:{object:Oo,boolean:La}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:La,array:hS},borderRadius:{number:Vi},interpolation:{boolean:La},useImageSize:{boolean:La},useBorderWithImage:{boolean:La},coordinateOrigin:{string:["center","top-left"]},__type__:{object:Oo}},size:{number:Vi},title:{string:Ga,dom:hbe,undefined:"undefined"},value:{number:Vi,undefined:"undefined"},widthConstraint:{minimum:{number:Vi},maximum:{number:Vi},__type__:{object:Oo,boolean:La,number:Vi}},x:{number:Vi},y:{number:Vi},__type__:{object:Oo}},PUt={configure:{enabled:{boolean:La},filter:{boolean:La,string:Ga,array:hS,function:"function"},container:{dom:hbe},showButton:{boolean:La},__type__:{object:Oo,boolean:La,string:Ga,array:hS,function:"function"}},edges:{arrows:{to:{enabled:{boolean:La},scaleFactor:{number:Vi},type:{string:oB},imageHeight:{number:Vi},imageWidth:{number:Vi},src:{string:Ga},__type__:{object:Oo,boolean:La}},middle:{enabled:{boolean:La},scaleFactor:{number:Vi},type:{string:oB},imageWidth:{number:Vi},imageHeight:{number:Vi},src:{string:Ga},__type__:{object:Oo,boolean:La}},from:{enabled:{boolean:La},scaleFactor:{number:Vi},type:{string:oB},imageWidth:{number:Vi},imageHeight:{number:Vi},src:{string:Ga},__type__:{object:Oo,boolean:La}},__type__:{string:["from","to","middle"],object:Oo}},endPointOffset:{from:{number:Vi},to:{number:Vi},__type__:{object:Oo,number:Vi}},arrowStrikethrough:{boolean:La},background:{enabled:{boolean:La},color:{string:Ga},size:{number:Vi},dashes:{boolean:La,array:hS},__type__:{object:Oo,boolean:La}},chosen:{label:{boolean:La,function:"function"},edge:{boolean:La,function:"function"},__type__:{object:Oo,boolean:La}},color:{color:{string:Ga},highlight:{string:Ga},hover:{string:Ga},inherit:{string:["from","to","both"],boolean:La},opacity:{number:Vi},__type__:{object:Oo,string:Ga}},dashes:{boolean:La,array:hS},font:{color:{string:Ga},size:{number:Vi},face:{string:Ga},background:{string:Ga},strokeWidth:{number:Vi},strokeColor:{string:Ga},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:Vi},multi:{boolean:La,string:Ga},bold:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},boldital:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},ital:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},mono:{color:{string:Ga},size:{number:Vi},face:{string:Ga},mod:{string:Ga},vadjust:{number:Vi},__type__:{object:Oo,string:Ga}},__type__:{object:Oo,string:Ga}},hidden:{boolean:La},hoverWidth:{function:"function",number:Vi},label:{string:Ga,undefined:"undefined"},labelHighlightBold:{boolean:La},length:{number:Vi,undefined:"undefined"},physics:{boolean:La},scaling:{min:{number:Vi},max:{number:Vi},label:{enabled:{boolean:La},min:{number:Vi},max:{number:Vi},maxVisible:{number:Vi},drawThreshold:{number:Vi},__type__:{object:Oo,boolean:La}},customScalingFunction:{function:"function"},__type__:{object:Oo}},selectionWidth:{function:"function",number:Vi},selfReferenceSize:{number:Vi},selfReference:{size:{number:Vi},angle:{number:Vi},renderBehindTheNode:{boolean:La},__type__:{object:Oo}},shadow:{enabled:{boolean:La},color:{string:Ga},size:{number:Vi},x:{number:Vi},y:{number:Vi},__type__:{object:Oo,boolean:La}},smooth:{enabled:{boolean:La},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:Vi},forceDirection:{string:["horizontal","vertical","none"],boolean:La},__type__:{object:Oo,boolean:La}},title:{string:Ga,undefined:"undefined"},width:{number:Vi},widthConstraint:{maximum:{number:Vi},__type__:{object:Oo,boolean:La,number:Vi}},value:{number:Vi,undefined:"undefined"},__type__:{object:Oo}},groups:{useDefaultGroups:{boolean:La},__any__:sB,__type__:{object:Oo}},interaction:{dragNodes:{boolean:La},dragView:{boolean:La},hideEdgesOnDrag:{boolean:La},hideEdgesOnZoom:{boolean:La},hideNodesOnDrag:{boolean:La},hover:{boolean:La},keyboard:{enabled:{boolean:La},speed:{x:{number:Vi},y:{number:Vi},zoom:{number:Vi},__type__:{object:Oo}},bindToWindow:{boolean:La},autoFocus:{boolean:La},__type__:{object:Oo,boolean:La}},multiselect:{boolean:La},navigationButtons:{boolean:La},selectable:{boolean:La},selectConnectedEdges:{boolean:La},hoverConnectedEdges:{boolean:La},tooltipDelay:{number:Vi},zoomView:{boolean:La},zoomSpeed:{number:Vi},__type__:{object:Oo}},layout:{randomSeed:{undefined:"undefined",number:Vi,string:Ga},improvedLayout:{boolean:La},clusterThreshold:{number:Vi},hierarchical:{enabled:{boolean:La},levelSeparation:{number:Vi},nodeSpacing:{number:Vi},treeSpacing:{number:Vi},blockShifting:{boolean:La},edgeMinimization:{boolean:La},parentCentralization:{boolean:La},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:Oo,boolean:La}},__type__:{object:Oo}},manipulation:{enabled:{boolean:La},initiallyActive:{boolean:La},addNode:{boolean:La,function:"function"},addEdge:{boolean:La,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:Oo,boolean:La,function:"function"}},deleteNode:{boolean:La,function:"function"},deleteEdge:{boolean:La,function:"function"},controlNodeStyle:sB,__type__:{object:Oo,boolean:La}},nodes:sB,physics:{enabled:{boolean:La},barnesHut:{theta:{number:Vi},gravitationalConstant:{number:Vi},centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},damping:{number:Vi},avoidOverlap:{number:Vi},__type__:{object:Oo}},forceAtlas2Based:{theta:{number:Vi},gravitationalConstant:{number:Vi},centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},damping:{number:Vi},avoidOverlap:{number:Vi},__type__:{object:Oo}},repulsion:{centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},nodeDistance:{number:Vi},damping:{number:Vi},__type__:{object:Oo}},hierarchicalRepulsion:{centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},nodeDistance:{number:Vi},damping:{number:Vi},avoidOverlap:{number:Vi},__type__:{object:Oo}},maxVelocity:{number:Vi},minVelocity:{number:Vi},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:La},iterations:{number:Vi},updateInterval:{number:Vi},onlyDynamicEdges:{boolean:La},fit:{boolean:La},__type__:{object:Oo,boolean:La}},timestep:{number:Vi},adaptiveTimestep:{boolean:La},wind:{x:{number:Vi},y:{number:Vi},__type__:{object:Oo}},__type__:{object:Oo,boolean:La}},autoResize:{boolean:La},clickToUse:{boolean:La},locale:{string:Ga},locales:{__any__:{any:MUt},__type__:{object:Oo}},height:{string:Ga},width:{string:Ga},__type__:{object:Oo}},dbe={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},RUt=(t,e,r)=>{var n;return!!(UC(t).call(t,"physics")&&UC(n=dbe.physics.solver).call(n,e)&&r.physics.solver!==e&&e!=="wind")};class LUt{constructor(){}getDistances(e,r,n){const a={},c=e.edges;for(let h=0;h<r.length;h++){const i=r[h],l={};a[i]=l;for(let d=0;d<r.length;d++)l[r[d]]=h==d?0:1e9}for(let h=0;h<n.length;h++){const i=c[n[h]];i.connected===!0&&a[i.fromId]!==void 0&&a[i.toId]!==void 0&&(a[i.fromId][i.toId]=1,a[i.toId][i.fromId]=1)}const s=r.length;for(let h=0;h<s;h++){const i=r[h],l=a[i];for(let d=0;d<s-1;d++){const o=r[d],f=a[o];for(let A=d+1;A<s;A++){const w=r[A],I=a[w],m=Math.min(f[w],f[i]+l[w]);f[w]=m,I[o]=m}}}return a}}class OUt{constructor(e,r,n){this.body=e,this.springLength=r,this.springConstant=n,this.distanceSolver=new LUt}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const a=this.distanceSolver.getDistances(this.body,e,r);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();const c=.01,s=1;let h=0;const i=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let d=1e9,o=0,f=0,A=0,w=0,I=0;for(;d>c&&h<i;)for(h+=1,[o,d,f,A]=this._getHighestEnergyNode(n),w=d,I=0;w>s&&I<l;)I+=1,this._moveNode(o,f,A),[w,f,A]=this._getEnergy(o)}_getHighestEnergyNode(e){const r=this.body.nodeIndices,n=this.body.nodes;let a=0,c=r[0],s=0,h=0;for(let i=0;i<r.length;i++){const l=r[i];if(n[l].predefinedPosition!==!0||n[l].isCluster===!0&&e===!0||n[l].options.fixed.x!==!0||n[l].options.fixed.y!==!0){const[d,o,f]=this._getEnergy(l);a<d&&(a=d,c=l,s=o,h=f)}}return[c,a,s,h]}_getEnergy(e){const[r,n]=this.E_sums[e];return[Math.sqrt(r**2+n**2),r,n]}_moveNode(e,r,n){const a=this.body.nodeIndices,c=this.body.nodes;let s=0,h=0,i=0;const l=c[e].x,d=c[e].y,o=this.K_matrix[e],f=this.L_matrix[e];for(let p=0;p<a.length;p++){const C=a[p];if(C!==e){const y=c[C].x,x=c[C].y,T=o[C],P=f[C],b=1/((l-y)**2+(d-x)**2)**1.5;s+=T*(1-P*(d-x)**2*b),h+=T*(P*(l-y)*(d-x)*b),i+=T*(1-P*(l-y)**2*b)}}const A=s,w=h,I=r,m=i,u=n,g=(I/A+u/w)/(w/A-m/w),v=-(w*g+I)/A;c[e].x+=v,c[e].y+=g,this._updateE_matrix(e)}_createL_matrix(e){const r=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(let a=0;a<r.length;a++){this.L_matrix[r[a]]={};for(let c=0;c<r.length;c++)this.L_matrix[r[a]][r[c]]=n*e[r[a]][r[c]]}}_createK_matrix(e){const r=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(let a=0;a<r.length;a++){this.K_matrix[r[a]]={};for(let c=0;c<r.length;c++)this.K_matrix[r[a]][r[c]]=n*e[r[a]][r[c]]**-2}}_createE_matrix(){const e=this.body.nodeIndices,r=this.body.nodes;this.E_matrix={},this.E_sums={};for(let n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(let n=0;n<e.length;n++){const a=e[n],c=r[a].x,s=r[a].y;let h=0,i=0;for(let l=n;l<e.length;l++){const d=e[l];if(d!==a){const o=r[d].x,f=r[d].y,A=1/Math.sqrt((c-o)**2+(s-f)**2);this.E_matrix[a][l]=[this.K_matrix[a][d]*(c-o-this.L_matrix[a][d]*(c-o)*A),this.K_matrix[a][d]*(s-f-this.L_matrix[a][d]*(s-f)*A)],this.E_matrix[d][n]=this.E_matrix[a][l],h+=this.E_matrix[a][l][0],i+=this.E_matrix[a][l][1]}}this.E_sums[a]=[h,i]}}_updateE_matrix(e){const r=this.body.nodeIndices,n=this.body.nodes,a=this.E_matrix[e],c=this.K_matrix[e],s=this.L_matrix[e],h=n[e].x,i=n[e].y;let l=0,d=0;for(let o=0;o<r.length;o++){const f=r[o];if(f!==e){const A=a[o],w=A[0],I=A[1],m=n[f].x,u=n[f].y,g=1/Math.sqrt((h-m)**2+(i-u)**2),v=c[f]*(h-m-s[f]*(h-m)*g),p=c[f]*(i-u-s[f]*(i-u)*g);a[o]=[v,p],l+=v,d+=p;const C=this.E_sums[f];C[0]+=v-w,C[1]+=p-I}}this.E_sums[e]=[l,d]}}function So(t,e,r){var n,a,c,s;if(!(this instanceof So))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:ukt,clickToUse:!1},jf(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:ka(n=this.on).call(n,this),off:ka(a=this.off).call(a,this),emit:ka(c=this.emit).call(c,this),once:ka(s=this.once).call(s,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new hkt(()=>this.body.emitter.emit("_requestRedraw")),this.groups=new sNt,this.canvas=new IBt(this.body),this.selectionHandler=new s$t(this.body,this.canvas),this.interactionHandler=new TBt(this.body,this.canvas,this.selectionHandler),this.view=new xBt(this.body,this.canvas),this.renderer=new pBt(this.body,this.canvas),this.physics=new lBt(this.body),this.layoutEngine=new SUt(this.body),this.clustering=new gBt(this.body),this.manipulation=new EUt(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Lzt(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new rBt(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new OUt(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(r),this.setData(e)}LAe(So.prototype);So.prototype.setOptions=function(t){if(t===null&&(t=void 0),t!==void 0){if($8t.validate(t,PUt)===!0&&console.error("%cErrors have been found in the supplied options object.",gIe),D3(["locale","locales","clickToUse"],this.options,t),t.locale!==void 0&&(t.locale=ckt(t.locales||this.options.locales,t.locale)),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),t.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new z8t(this,this.body.container,dbe,this.canvas.pixelRatio,RUt)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){const n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ru(n.nodes,this.nodesHandler.options),Ru(n.edges,this.edgesHandler.options),Ru(n.layout,this.layoutEngine.options),Ru(n.interaction,this.selectionHandler.options),Ru(n.interaction,this.renderer.options),Ru(n.interaction,this.interactionHandler.options),Ru(n.manipulation,this.manipulation.options),Ru(n.physics,this.physics.options),Ru(n.global,this.canvas.options),Ru(n.global,this.options),this.configurator.setModuleOptions(n)}t.clickToUse!==void 0?t.clickToUse===!0?this.activator===void 0&&(this.activator=new F8t(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};So.prototype._updateVisibleIndices=function(){const t=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&!this.clustering._isClusteredNode(r)&&t[r].options.hidden===!1&&this.body.nodeIndices.push(t[r].id);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=e[r],a=t[n.fromId],c=t[n.toId],s=a!==void 0&&c!==void 0;!this.clustering._isClusteredEdge(r)&&n.options.hidden===!1&&s&&a.options.hidden===!1&&c.options.hidden===!1&&this.body.edgeIndices.push(n.id)}};So.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};So.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=K8t(t.dot);this.setData(e);return}else if(t&&t.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=Q8t(t.gephi);this.setData(e);return}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};So.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(const t in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,t)&&delete this.body.edges[t];oC(this.body.container)};So.prototype._updateValueRange=function(t){let e,r,n,a=0;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const c=t[e].getValue();c!==void 0&&(r=r===void 0?c:Math.min(c,r),n=n===void 0?c:Math.max(c,n),a+=c)}if(r!==void 0&&n!==void 0)for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&t[e].setValueRange(r,n,a)};So.prototype.isActive=function(){return!this.activator||this.activator.active};So.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};So.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};So.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};So.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};So.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};So.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};So.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};So.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};So.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};So.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};So.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};So.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};So.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};So.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};So.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};So.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};So.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};So.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};So.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};So.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};So.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};So.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};So.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};So.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};So.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};So.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};So.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};So.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};So.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};So.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};So.prototype.getConnectedNodes=function(t){return this.body.nodes[t]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};So.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};So.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};So.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};So.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};So.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};So.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};So.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};So.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};So.prototype.getNodeAt=function(){const t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};So.prototype.getEdgeAt=function(){const t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};So.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};So.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};So.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};So.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};So.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};So.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};So.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};So.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};So.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};So.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};So.prototype.getOptionsFromConfigurator=function(){let t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const DUt=({operationList:t,operationId:e})=>{var N,R,z,E;const r=mt.useRef(null),n=lI(),a=mt.useRef(null),[c,s]=mt.useState(!0),[h,i]=mt.useState(1),l=e!==void 0?e:t[0].id??0,[d,o]=mt.useState(e??0),f=mt.useRef(d),[A,w]=mt.useState(""),[I,m]=mt.useState([]),[u,g]=mt.useState(null),v=mt.useMemo(()=>t.flatMap(M=>M.outputs.flatMap(D=>D.consumers.map(L=>({from:M.id,to:L,arrows:"to",label:`${F0(D.shape)}
5227
5227
  ${JC(D.dtype)}`})))),[t]),p=mt.useMemo(()=>{const M=new Set;return v.forEach(({from:D,to:L})=>{M.add(D),M.add(L)}),M},[v]),C=mt.useMemo(()=>new VE(t.filter(M=>p.has(M.id)).map(M=>({id:M.id,label:`${M.id} ${M.name}
5228
- ${M.operationFileIdentifier}`,shape:"box",filterString:`${M.name}`}))),[t,p]),y=mt.useCallback(M=>{a.current&&M!==null&&(a.current.focus(M,{scale:h,animation:{duration:500,easingFunction:"easeInOutCubic"}}),a.current.selectNodes([M],!0),o(M),f.current=M)},[a,h]),x=mt.useCallback(M=>{var L;const D=Math.min(M,3);i(D),(L=a.current)==null||L.moveTo({scale:D})},[a]),T=mt.useMemo(()=>u===null||I.length===0?0:(u+1)%I.length,[u,I.length]),P=mt.useMemo(()=>u===null||I.length===0?0:(u-1+I.length)%I.length,[u,I.length]),b=mt.useCallback((M,D)=>{a.current&&!c&&(D!=null?y(D):I.length>M&&(y(I[M]),a.current.selectNodes(I,!1))),g(M)},[c,I,y]),S=()=>{m([]),g(null),w(""),a.current&&(a.current.selectNodes([],!0),a.current.focus(l,{scale:h,animation:{duration:500,easingFunction:"easeInOutQuad"}}),o(l))},_=M=>{var j;if(!M)return m([]),null;const L=C.get({filter:G=>{var W;return(W=G.filterString)==null?void 0:W.toLowerCase().includes(M.toLowerCase())}}).map(G=>G.id);return(j=a==null?void 0:a.current)==null||j.selectNodes(L,!1),m(L),L[0]||null};mt.useEffect(()=>(s(!0),setTimeout(()=>{r.current&&requestAnimationFrame(()=>{a.current=new So(r.current,{nodes:C,edges:v},{nodes:{font:{color:"#202020"},color:{background:"#ccd2f9",border:"none",hover:{background:"#9ca8f2",border:"none"},highlight:{background:"#74c5df",border:"#f6bc42"}},size:20,labelHighlightBold:!1,shape:"box"},edges:{font:{color:"#f5e2ba",size:20,strokeColor:"#000"},color:"#f5e2ba",arrows:{to:{enabled:!0,scaleFactor:.5}},smooth:{enabled:!0,type:"cubicBezier",roundness:.5}},autoResize:!0,layout:{hierarchical:{enabled:!0,levelSeparation:200,nodeSpacing:200,treeSpacing:300,blockShifting:!0,edgeMinimization:!0,direction:"UD",sortMethod:"directed",shakeTowards:"leaves"}},interaction:{hover:!0,keyboard:!0,dragView:!0,zoomView:!0,zoomSpeed:.2},physics:{enabled:!1}}),a.current.once("afterDrawing",()=>{var M,D;s(!1),(M=a.current)==null||M.focus(l,{scale:h,animation:{duration:500,easingFunction:"easeInOutQuad"}}),(D=a.current)==null||D.selectNodes([l],!0),o(l),f.current=l}),a.current.on("click",M=>{var D;if(M.edges.length>0){const L=M.edges[0],j=v.find(G=>G.id===L);(j==null?void 0:j.to)===f.current?y((j==null?void 0:j.from)||null):y((j==null?void 0:j.to)||null)}else(D=a.current)==null||D.selectNodes([],!0),o(null),f.current=null}),a.current.on("zoom",M=>{var D;M.scale<=3?i(M.scale):(D=a.current)==null||D.moveTo({scale:3})})})}),()=>{var M,D,L,j,G;(M=a.current)==null||M.off("zoom"),(D=a.current)==null||D.off("click"),(L=a.current)==null||L.off("dragEnd"),(j=a.current)==null||j.off("afterDrawing"),(G=a.current)==null||G.destroy(),a.current=null}),[v]);const O=M=>{if(C===null||M===null)return null;const D=C.getIds(),L=D.indexOf(M);return L!==-1&&L<D.length-1?D[L+1]:null},k=M=>{if(C===null||M===null)return null;const D=C.getIds(),L=D.indexOf(M);return L>0?D[L-1]:null},F=d??t[0].id;return He.jsxs("div",{className:"operation-graph-component",children:[He.jsxs("div",{className:"operation-graph-header",children:[He.jsxs("div",{className:"operation-graph-nav",children:[He.jsx(ps,{placement:Js.TOP,content:`Go to previous operation ${k(d)}`,disabled:c,children:He.jsx(Ma,{icon:Si.ArrowLeft,onClick:()=>y(k(d)||0),disabled:!k(d)||c,variant:"outlined"})}),He.jsx(ps,{disabled:c,placement:Js.TOP,content:`Center on operation ${F}`,children:He.jsx(Ma,{variant:"outlined",onClick:()=>y(F),disabled:c,children:F})}),He.jsx(ps,{placement:Js.TOP,content:`Go to next operation ${O(d)}`,disabled:c,children:He.jsx(Ma,{icon:Si.ArrowRight,onClick:()=>y(O(d)||0),disabled:!O(d)||c,variant:"outlined"})}),He.jsx(A5,{searchQuery:A,onQueryChanged:M=>{if(!M)S();else{w(M);const D=_(M);b(0,D)}},placeholder:"Filter by operation name",disabled:c}),He.jsx(Ma,{icon:Si.ArrowLeft,onClick:()=>{b(P)},disabled:c||I.length===0,variant:"outlined"}),u!==null&&I.length>0?u+1:0,"/",I.length,He.jsx(Ma,{icon:Si.ArrowRight,onClick:()=>{b(T)},disabled:c||I.length===0,variant:"outlined"})]}),He.jsxs("div",{className:"slider-wrapper",children:[He.jsx(_Ee,{disabled:c,children:"Scale"}),He.jsx(w$,{min:.1,max:3,labelRenderer:M=>`${M.toFixed(2)}`,stepSize:.01,labelStepSize:.75,labelPrecision:1,value:h,onChange:x,disabled:c})]})]}),d!==null&&!c&&He.jsxs("div",{className:"operation-graph-props",children:[He.jsxs("h2",{className:"operation-name",children:[d," ",(N=t.find(M=>M.id===d))==null?void 0:N.name," (",(R=t.find(M=>M.id===d))==null?void 0:R.operationFileIdentifier,")"]}),He.jsx(Ma,{className:"navigate-button",endIcon:Si.SEGMENTED_CONTROL,intent:Xa.PRIMARY,onClick:()=>n(`/operations/${d}`),children:"Memory Details"}),He.jsx("h3",{children:"Inputs 123:"}),He.jsx("div",{className:"tensors",children:(z=t.find(M=>M.id===d))==null?void 0:z.inputs.map((M,D)=>He.jsx(dse,{tensor:M},`input-${d} ${M.id} ${D}`))}),He.jsx("h3",{children:"Outputs:"}),He.jsx("div",{className:"tensors",children:(E=t.find(M=>M.id===d))==null?void 0:E.outputs.map((M,D)=>He.jsx(dse,{tensor:M},`output-${d} ${M.id} ${D}`))})]}),c&&He.jsx("div",{className:"graph-tree-loader",children:He.jsx(ag,{})}),He.jsx("div",{className:"operation-graph-container",ref:r}),He.jsx("aside",{className:"aside",children:"Scroll to zoom. Drag to pan. Click a node to see operation details."})]})},dse=({tensor:t})=>He.jsxs("div",{className:"tensor-details",children:[He.jsx("h3",{children:F0(t.shape)}),He.jsx("div",{children:t.dtype}),He.jsx("div",{children:t.layout}),He.jsx("div",{children:t.buffer_type!==null&&gh[t.buffer_type]}),He.jsx("div",{children:t.operationIdentifier&&[t.operationIdentifier]}),t!=null&&t.memory_config?Object.entries(t.memory_config).map(([e,r])=>He.jsx("table",{children:He.jsx("tbody",{children:He.jsx(nG,{header:e,value:r},e)})},e)):null]}),kUt=()=>{const{data:t,isLoading:e}=ev(),{operationId:r}=cce(),n=No(QT);e3();const a=mt.useMemo(()=>n?t==null?void 0:t.filter(c=>n[0]&&c.id<=n[1]):t,[t,n]);return He.jsxs("div",{className:"data-padding",children:[He.jsx(vA,{title:"GraphTree"}),e||a===void 0||a.length===0?He.jsx("div",{className:"graph-tree-loader",children:He.jsx(ag,{})}):He.jsx(DUt,{operationList:a,operationId:r?parseInt(r,10):void 0})]})},NUt=t=>t?Object.values(t).some(e=>e.length>0):!1,FUt=(t,e)=>{var n;return((n=t[e])==null?void 0:n.toString())||""},GO=(t,e,r,n)=>{let a=t||[];return NUt(e)&&r&&(a=a.filter(c=>!(e&&Object.entries(e).filter(([h,i])=>String(i).length).some(([h,i])=>!FUt(c,h).toLowerCase().includes(i.toLowerCase()))))),(n==null?void 0:n.length)>0&&(a=a.filter(c=>(c==null?void 0:c.math_fidelity)!==null&&n.includes(c.math_fidelity))),a},$R=[{label:"ID",key:"id",sortable:!0},{label:"Total %",key:"total_percent",unit:"%",decimals:1,sortable:!0},{label:"Bound",key:"bound",colour:"yellow"},{label:"OP Code",key:"op_code",colour:"blue",sortable:!0,filterable:!0},{label:"Device Time",key:"device_time",unit:"µs",decimals:0,sortable:!0},{label:"Op-to-Op Gap",key:"op_to_op_gap",colour:"red",unit:"µs",decimals:0,sortable:!0},{label:"Cores",key:"cores",colour:"green",sortable:!0},{label:"DRAM",key:"dram",colour:"yellow",unit:"GB/s",sortable:!0},{label:"DRAM %",key:"dram_percent",colour:"yellow",unit:"%",sortable:!0},{label:"FLOPs",key:"flops",unit:"TFLOPs",sortable:!0},{label:"FLOPs %",key:"flops_percent",unit:"%",sortable:!0},{label:"Math Fidelity",key:"math_fidelity",colour:"cyan"}],zUt=["op_code","bound","total_percent","device_time","op_to_op_gap","cores","dram","dram_percent","flops","flops_percent","math_fidelity","high_dispatch"],gse=1,vse=5,pse=({data:t,comparisonData:e,filters:r,provideMatmulAdvice:n,hiliteHighDispatch:a,matches:c,highlightRows:s,normaliseData:h})=>{const{activeFilters:i}=JG("math_fidelity",t||[]),{sortTableFields:l,changeSorting:d,sortingColumn:o,sortDirection:f}=Rme(null),A=JV(),{data:w}=ev(),I=mt.useMemo(()=>$R.filter(v=>v.filterable).map(v=>v.key),[]),m=mt.useMemo(()=>{const v=GO(t,r,I,i);return l(v)},[t,r,I,i,l]),u=mt.useMemo(()=>{const p=GO(e||[],r,I,i);return l(p)},[e,r,I,i,l]),g=[...$R.slice(0,gse),...A.length>0?[{label:"OP",key:"op",sortable:!0}]:[],...$R.slice(gse,vse),...a?[{label:"Slow",key:"high_dispatch"}]:[],...$R.slice(vse)];return He.jsxs("table",{className:"perf-table monospace",children:[He.jsx("thead",{children:He.jsx("tr",{children:g.map(v=>{const p=o===v.key?f===M1.ASC?M1.DESC:M1.ASC:f;return He.jsx("th",{className:"cell-header",children:v.sortable?He.jsxs(Ma,{onClick:()=>d(v.key)(p),variant:LL.MINIMAL,size:tV.SMALL,children:[He.jsx("span",{className:"header-label",children:v.label}),o===v.key?He.jsx(_s,{className:Ti({"is-active":o===v.key},"sort-icon"),icon:f===M1.ASC?Si.CARET_DOWN:Si.CARET_UP}):He.jsx(_s,{className:Ti("sort-icon"),icon:Si.CARET_DOWN})]}):He.jsx("span",{className:"header-label no-button",children:v.label})},v.key)})})}),He.jsx("tbody",{children:m==null?void 0:m.map((v,p)=>He.jsxs(mt.Fragment,{children:[He.jsx("tr",{className:Ti({"missing-data":s&&(v.missing||v.raw_op_code.includes("MISSING")),"added-data":s&&!v.missing&&(c==null?void 0:c.some(C=>C.id===v.id&&C.raw_op_code===v.raw_op_code)),"row-pattern":e&&h}),children:g.map(C=>He.jsx("td",{className:Ti("cell",{"align-right":C.key==="math_fidelity"}),children:gQ(v,C,w,r==null?void 0:r[C.key])},C.key))}),u[p]&&He.jsx("tr",{className:Ti({"missing-data":s&&(v.missing||v.raw_op_code.includes("MISSING")),"added-data":s&&!v.missing&&(c==null?void 0:c.some(C=>C.id===v.id&&C.raw_op_code===v.raw_op_code)),"row-pattern":e&&h},"comparison-row"),children:g.map(C=>He.jsx("td",{className:Ti("cell",{"align-right":C.key==="math_fidelity"}),children:zUt.includes(C.key)&&u[p]&&(C.key!=="op_code"||C.key==="op_code"&&BUt(v.op_code))&&He.jsx(He.Fragment,{children:gQ(u[p],C,w,r==null?void 0:r[C.key])})},C.key))}),n&&v.op_code.includes("Matmul")&&He.jsx("tr",{children:He.jsx("td",{colSpan:g.length,className:"cell advice",children:He.jsx("ul",{children:v==null?void 0:v.advice.map((C,y)=>He.jsx("li",{children:C},`advice-${y}`))})})})]},p))})]})},BUt=t=>t.toLowerCase().includes("matmul")||t.toLowerCase().includes("conv"),V_={id:null,advice:[],total_percent:null,bound:"",op_code:"MISSING",raw_op_code:"MISSING",device_time:null,op_to_op_gap:null,cores:null,dram:null,dram_percent:null,flops:null,flops_percent:null,math_fidelity:"",output_datatype:"",output_0_memory:"",input_0_datatype:"",input_1_datatype:"",dram_sharded:"",input_0_memory:"",input_1_memory:"",inner_dim_block_size:"",output_subblock_h:"",output_subblock_w:"",pm_ideal_ns:""},mb=[],UR="MISSING - ";function $Ut(t,e){mb.length=0;const r=[],n=[];let a=0,c=0;return e.forEach(s=>{const h=[];for(;a<t.length&&c<s.length;){const i=t[a],l=s[c],d=i.raw_op_code,o=l.raw_op_code;if(d===o)r.push(i),h.push(l),a++,c++;else{const f=s.slice(a+1).findIndex(m=>m.raw_op_code===o),A=s.slice(c+1).findIndex(m=>m.raw_op_code===d),w=f>=0?a+1+f:null,I=A>=0?c+1+A:null;if(w!==null&&(I===null||w-a<=I-c))for(;a<w;)t[a]&&(r.push(t[a]),h.push({...V_,op_code:`${UR} ${t[a].raw_op_code}`}),mb.push(t[a])),a++;else if(I!==null)for(;c<I;)h.push(s[c]),r.push({...V_,op_code:`${UR} ${s[c].raw_op_code}`}),mb.push(s[c]),c++;else r.push(i),h.push(l),a++,c++}}for(;a<t.length;)r.push(t[a]),h.push({...V_,op_code:`${UR} ${t[a].raw_op_code}`}),mb.push(t[a]),a++;for(;c<s.length;)r.push(V_),h.push({...V_,op_code:`${UR} ${s[c].raw_op_code}`}),mb.push(s[c]),c++;n.push(h)}),[r,n]}const mse=[{label:"ID",key:"id",sortable:!0},{label:"Total %",key:"total_percent",unit:"%",decimals:1,sortable:!0},{label:"Bound",key:"bound",colour:"yellow"},{label:"OP Code",key:"op_code",colour:"blue",sortable:!0,filterable:!0},{label:"Device Time",key:"device_time",unit:"µs",decimals:0,sortable:!0},{label:"Op-to-Op Gap",key:"op_to_op_gap",colour:"red",unit:"µs",decimals:0,sortable:!0},{label:"Cores",key:"cores",colour:"green",sortable:!0},{label:"DRAM",key:"dram",colour:"yellow",unit:"GB/s",sortable:!0},{label:"DRAM %",key:"dram_percent",colour:"yellow",unit:"%",sortable:!0},{label:"FLOPs",key:"flops",unit:"TFLOPs",sortable:!0},{label:"FLOPs %",key:"flops_percent",unit:"%",sortable:!0},{label:"Math Fidelity",key:"math_fidelity",colour:"cyan"}],Ww="perf-table-0",UUt=({data:t,comparisonData:e})=>{var E,M;const{getFilterOptions:r,updateFilters:n,activeFilters:a,FilterItem:c}=JG("math_fidelity",t||[]),s=JV(),h=No(Hc),i=No(Nm),[l,d]=mt.useState(!0),[o,f]=mt.useState(!1),[A,w]=mt.useState(!1),[I,m]=mt.useState(!1),[u,g]=mt.useState(Ww),[v,p]=mt.useState(!0),[C,y]=mt.useState(!0),x=mt.useMemo(()=>mse.filter(D=>D.filterable).map(D=>D.key),[]),[T,P]=mt.useState(Object.fromEntries(x.map(D=>[D,""]))),b=(i??[]).findIndex(D=>D===u)>-1?(i??[]).findIndex(D=>D===u):0,S=mt.useMemo(()=>t?yse(t,s):[],[t,s]),_=mt.useMemo(()=>e?e.map(D=>yse(D,s)):[],[e,s]),O=mt.useMemo(()=>GO(S,T,x,a),[S,T,x,a]),k=mt.useMemo(()=>GO(_[b],T,x,a),[b,_,T,x,a]),F=(D,L)=>{P({...T,[D]:L??""})},N=mt.useMemo(()=>S&&_[0]?$Ut(S,_):[],[S,_]),R=u===Ww?t==null?void 0:t.length:((E=e==null?void 0:e[b])==null?void 0:E.length)||0,z=u===Ww?O==null?void 0:O.length:(k==null?void 0:k.length)||0;return mt.useEffect(()=>{i||(y(!1),p(!1),g(Ww))},[i]),mt.useEffect(()=>{i&&!i.includes(u)&&g(Ww)},[i,u]),He.jsxs(He.Fragment,{children:[He.jsx(Bc,{label:l?"Merged device data":"Expanded device data",onChange:()=>d(!l),checked:l&&I,disabled:!I}),He.jsx(Bc,{label:"Show Matmul optimization analysis",onChange:()=>f(!o),checked:o}),He.jsx(Bc,{label:"Highlight high dispatch ops",onChange:()=>w(!A),checked:A}),He.jsx(Bc,{labelElement:He.jsx(ps,{content:"Tries to match up operations between the performance reports",children:He.jsxs("span",{className:"switch-label-with-icon",children:[He.jsx("span",{children:"Normalise performance data"}),He.jsx(_s,{icon:Si.SMALL_INFO_SIGN})]})}),onChange:()=>p(!v),checked:v,disabled:!i}),He.jsx(Bc,{labelElement:He.jsx(ps,{content:"Highlights rows where ops have been added or are missing after normalising the data",children:He.jsxs("span",{className:"switch-label-with-icon",children:[He.jsx("span",{children:"Highlight row difference"}),He.jsx(_s,{icon:Si.SMALL_INFO_SIGN})]})}),onChange:()=>y(!C),checked:C,disabled:!i||!v}),He.jsxs("div",{className:"perf-report",children:[He.jsxs("div",{className:"table-header",children:[He.jsx("h3",{className:"title",children:"Performance report"}),He.jsx("div",{className:"header-aside",children:He.jsx("p",{className:"result-count",children:z!==R?`Showing ${z} of ${R} rows`:`Showing ${z} rows`})})]}),He.jsxs("div",{className:"filters",children:[x.map(D=>{var L;return He.jsx(A5,{onQueryChanged:j=>F(D,j),placeholder:`Filter ${(L=mse.find(j=>j.key===D))==null?void 0:L.label}`,searchQuery:(T==null?void 0:T[D])||""},D)}),He.jsx(ode,{items:t?r():[],placeholder:"Math fidelity filter...",onItemSelect:D=>n(D),selectedItems:a,itemRenderer:(D,L)=>c(String(D)),tagRenderer:D=>D,onRemove:D=>n(D),itemPredicate:(D,L)=>!D||String(L).toLowerCase().includes(D.toLowerCase()),noResults:He.jsx(eA,{disabled:!0,text:"No results.",roleStructure:"listoption"}),resetOnSelect:!0})]}),He.jsxs(zV,{selectedTabId:u,onChange:g,renderActiveTabPanelOnly:!0,size:tV.LARGE,children:[He.jsx(QC,{id:Ww,title:h,icon:Si.TH_LIST,panel:He.jsx(pse,{data:v?N[0]:O,comparisonData:v&&((M=N==null?void 0:N[1])!=null&&M[b])?N[1][b]:[],filters:T,provideMatmulAdvice:o,hiliteHighDispatch:A,matches:mb,highlightRows:C&&v,normaliseData:v})}),i==null?void 0:i.filter(D=>D).map((D,L)=>{var j;return He.jsx(QC,{id:D,title:D,icon:Si.TH_LIST,panel:He.jsx(pse,{data:v&&((j=N==null?void 0:N[1])!=null&&j[b])&&b<1?N[1][b]:k,comparisonData:v&&(N!=null&&N[0])&&b<1?N[0]:[],filters:T,provideMatmulAdvice:o,hiliteHighDispatch:A,matches:mb,highlightRows:C&&v,normaliseData:v})},L)})]})]}),He.jsx("hr",{}),A&&MOe(S)]})},HUt=6.5,yse=(t,e)=>t.map(r=>{var s;const n=parseInt(r.op_to_op_gap,10),a=(s=e.find(h=>h.perfId===r.id))==null?void 0:s.opId,c=a!==void 0?Number(a):void 0;return{...r,op:c,high_dispatch:!!n&&n>HUt,id:parseInt(r.id,10),total_percent:parseFloat(r.total_percent),device_time:parseFloat(r.device_time),op_to_op_gap:r.op_to_op_gap?parseFloat(r.op_to_op_gap):null,cores:parseInt(r.cores,10),dram:r.dram?parseFloat(r.dram):null,dram_percent:r.dram_percent?parseFloat(r.dram_percent):null,flops:r.flops?parseFloat(r.flops):null,flops_percent:r.flops_percent?parseFloat(r.flops_percent):null}}),Ase={grayskull:108,wormhole_b0:64};function jUt(t,e){const r=Math.max(...e.filter(n=>n.cores).map(n=>parseInt(n.cores??"0",10)));return r>Ase[t]?r:Ase[t]}const lB="#575757",uB="#575757",Zw="#FFF";function Jx({chartData:t,configuration:e,title:r}){var c,s,h,i,l,d,o,f,A,w,I,m,u,g,v;const n={autosize:!0,paper_bgcolor:"transparent",plot_bgcolor:"transparent",showlegend:e.showLegend||!1,legend:{orientation:"h",font:{family:"sans-serif"},bgcolor:"#dee2e6",bordercolor:"#fff",borderwidth:2,x:.5,y:-.25,xanchor:"center"},margin:{l:50,r:0,b:50,t:0},barmode:e.barMode,xaxis:{gridcolor:lB,linecolor:uB,color:Zw,title:{font:{color:Zw},text:(s=(c=e.xAxis)==null?void 0:c.title)==null?void 0:s.text},fixedrange:!0,zeroline:!1,range:(h=e.xAxis)==null?void 0:h.range,tickformat:(i=e.xAxis)==null?void 0:i.tickformat,hoverformat:(l=e.xAxis)==null?void 0:l.hoverformat},yaxis:{gridcolor:lB,linecolor:uB,color:Zw,title:{standoff:20,font:{color:Zw},text:(o=(d=e.yAxis)==null?void 0:d.title)==null?void 0:o.text},automargin:!0,fixedrange:!0,zeroline:!1,range:(f=e.yAxis)==null?void 0:f.range,tickformat:(A=e.yAxis)==null?void 0:A.tickformat,hoverformat:(w=e.yAxis)==null?void 0:w.hoverformat},yaxis2:{gridcolor:lB,linecolor:uB,color:Zw,title:{standoff:20,font:{color:Zw},text:(m=(I=e.yAxis2)==null?void 0:I.title)==null?void 0:m.text},overlaying:"y",side:"right",automargin:!0,fixedrange:!0,zeroline:!1,range:(u=e.yAxis2)==null?void 0:u.range,tickformat:(g=e.yAxis2)==null?void 0:g.tickformat,hoverformat:(v=e.yAxis2)==null?void 0:v.hoverformat}},a={displayModeBar:!1,displaylogo:!1,responsive:!0};return He.jsxs("div",{className:Ti("chart-container",{"legend-instructions":e.showLegend}),children:[He.jsx("h3",{children:r}),He.jsx(cG,{className:"chart",data:t,layout:n,config:a,useResizeHandler:!0})]})}const Om=(t,e="",r="")=>t!==0?r:e,VUt=["#008BF8","#58B73B"],GUt=["#E27414","#E8C547"],k3=t=>VUt[t],vk=t=>GUt[t];function WUt({datasets:t=[]}){const e=No(Hc),r=No(Nm),n=mt.useMemo(()=>t.map((c,s)=>({x:c==null?void 0:c.map(h=>h.cores),y:c==null?void 0:c.map(h=>h.device_time),mode:"markers",type:"scatter",name:Om(s,e,r),marker:{size:10,color:k3(s)},hovertemplate:"Cores: %{x}<br />Device Kernel Duration: %{y} ns"})),[t,r,e]),a={showLegend:!0,xAxis:{title:{text:"Core Count"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"}};return He.jsx(Jx,{title:"Device Kernel Duration vs Core Count",chartData:n,configuration:a})}function ZUt({maxCores:t,datasets:e=[]}){const r=No(Hc),n=No(Nm),a=e.reduce((i,l)=>Math.max(i,(l==null?void 0:l.length)||0),0),c=mt.useMemo(()=>e.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.cores),type:"bar",hovertemplate:"Operation: %{x}<br />Cores: %{y}",name:Om(l,r,n),showlegend:!0,legendgroup:`group${l}`,marker:{color:k3(l)}})),[e,r,n]),s=mt.useMemo(()=>e.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.device_time),yaxis:"y2",hovertemplate:"Operation: %{x}<br />Device Kernel Duration: %{y} ns",name:Om(l,r,n),showlegend:!0,legendgroup:`group${l}`,marker:{color:vk(l)}})),[e,r,n]),h={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,a]},yAxis:{title:{text:"Core Count"},tickformat:"d",hoverformat:",.2r",range:[0,t]},yAxis2:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"}};return He.jsx(Jx,{title:"Core Count + Device Kernel Runtime",chartData:[...c,...s],configuration:h})}function YUt({selectedOpCodes:t,datasets:e=[]}){const r=No(Hc),n=No(Nm),a=e.flat(),c=mt.useMemo(()=>[...new Set(a==null?void 0:a.filter(l=>l.raw_op_code!==void 0).map(l=>l.raw_op_code))],[a]),s=mt.useMemo(()=>e.map((l,d)=>c.map(o=>{var f;return{x:[`Op Count ${e.length>1?`(${d+1})`:""}`],y:[l.filter(A=>A.raw_op_code===o).length/l.length],type:"bar",name:Om(d,r,n),hovertemplate:`${o}<br />%{y:.1%}`,marker:{color:(f=t.find(A=>A.opCode===o))==null?void 0:f.colour}}})),[e,c,t,r,n]),h=mt.useMemo(()=>e.map((l,d)=>c.map(o=>{var f;return{x:[`Runtime % ${e.length>1?`(${d+1})`:""}`],y:[l.filter(A=>A.raw_op_code===o).reduce(Cse,0)/l.reduce(Cse,0)],type:"bar",name:Om(d,r,n),hovertemplate:`${o}<br />%{y:.1%}`,marker:{color:(f=t.find(A=>A.opCode===o))==null?void 0:f.colour}}})),[e,c,t,r,n]),i={margin:{l:0,r:0,b:0,t:0},barMode:"stack",yAxis:{tickformat:".0%",range:[0,1]}};return He.jsx(Jx,{title:"Operation Count vs Runtime Contribution",chartData:[...s.flat(),...h.flat()],configuration:i})}const Cse=(t,e)=>t+(e.device_time?parseInt(e.device_time,10):0),XUt=({filteredPerfData:t,comparisonData:e,maxCores:r,selectedOpCodes:n})=>{const a=[t,...e||[]].filter(c=>c.length>0);return He.jsxs("div",{className:"charts",children:[He.jsx(YUt,{datasets:a,selectedOpCodes:n}),He.jsx(ZUt,{datasets:a,maxCores:r}),He.jsx(WUt,{datasets:a})]})},KUt=25;function QUt({opCodeOptions:t,selectedOpCodes:e,updateOpCodes:r}){const[n,a]=mt.useState(!0),[c,s]=mt.useState(!1);mt.useEffect(()=>{e.length===0&&(a(!1),s(!1)),e.length>0&&e.length<t.length&&(a(!1),s(!0)),e.length===t.length&&(a(!0),s(!1))},[e,t]);const h=()=>{r(n?[]:t)},i=()=>n?"Deselect all":"Select all",l=d=>He.jsxs(He.Fragment,{children:[He.jsx("span",{className:"label",children:d.opCode.length>KUt?He.jsx("span",{className:"abbreviated-label",title:d.opCode,children:d.opCode}):d.opCode}),He.jsx("div",{className:"memory-color-block",style:{backgroundColor:d.colour}})]});return He.jsx("aside",{className:"op-code-menu-container",children:He.jsxs("div",{className:"op-code-menu",children:[He.jsx("p",{className:"header",children:He.jsx("strong",{children:"Operation codes"})}),He.jsx("div",{className:"option select-all",children:He.jsx(yT,{checked:n,indeterminate:c,id:"select-all",onChange:h,label:i()})}),t.sort((d,o)=>d.opCode.localeCompare(o.opCode)).map(d=>He.jsx("div",{className:"option",children:He.jsx(yT,{className:"label-container",checked:e.map(o=>o.opCode).includes(d.opCode),id:d.opCode,labelElement:l(d),onChange:()=>{const o=e.includes(d)?e.filter(f=>f!==d):[...e,d];r(o)}},d.opCode)},d.opCode))]})})}const JUt=["rgb(31, 119, 180)","rgb(255, 127, 14)","rgb(44, 160, 44)","rgb(214, 39, 40)","rgb(148, 103, 189)","rgb(140, 86, 75)","rgb(227, 119, 194)","rgb(188, 189, 34)","rgb(23, 190, 207)","rgb(255, 187, 120)","rgb(40, 108, 26)","rgb(255, 152, 150)","rgb(197, 176, 213)","rgb(196, 156, 148)","rgb(247, 182, 210)","rgb(199, 199, 199)","rgb(219, 219, 141)","rgb(158, 218, 229)","rgb(57, 59, 121)","rgb(82, 84, 163)","rgb(107, 110, 207)","rgb(156, 158, 222)","rgb(255, 127, 14)"];function DZ(t,e){const r=t.pm_ideal_ns?parseFloat(t.pm_ideal_ns):null,n=t.device_time?parseFloat(t.device_time):null,a=t.cores?parseInt(t.cores,10):null;if(!Wg(r)||!Wg(n)||!Wg(a))return 0;const c=n*1e3,s=r/c*(e/a);return Wg(s)?s:0}function Ise({datasets:t=[],maxCores:e}){const r=No(Hc),n=No(Nm),a=mt.useMemo(()=>t.map((h,i)=>({x:h==null?void 0:h.map((l,d)=>d+1),y:h==null?void 0:h.map(l=>l.cores),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Cores: %{y}<extra></extra>",name:Om(i,r,n),legendgroup:`group${i}`,marker:{color:k3(i)}})),[t,r,n]),c=mt.useMemo(()=>t.map((h,i)=>({x:h==null?void 0:h.map((l,d)=>d+1),y:h==null?void 0:h.map(l=>DZ(l,e)).filter(l=>l!==-1),yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:Om(i,r,n),legendgroup:`group${i}`,marker:{color:vk(i)}})),[t,r,n,e]),s={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,iG(t)]},yAxis:{title:{text:"Core Count"},tickformat:"d",hoverformat:",.2r",range:[0,e]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Jx,{title:"Core Count + Utilization",chartData:[...a,...c],configuration:s})}const qUt={autosize:!0,paper_bgcolor:"transparent",margin:{l:50,r:50,b:50,t:50},showlegend:!1};function bse({reportTitle:t,data:e=[],opCodes:r,className:n=""}){const a=mt.useMemo(()=>[...new Set(e==null?void 0:e.filter(s=>s.raw_op_code!==void 0).map(s=>s.raw_op_code))],[e]),c=mt.useMemo(()=>({values:a.map(s=>e.filter(h=>h.raw_op_code===s).length),labels:[...a],type:"pie",textinfo:"percent",hovertemplate:"%{label}<br />Count: %{value}<extra></extra>",marker:{colors:a.map(s=>{var h;return(h=r.find(i=>i.opCode===s))==null?void 0:h.colour})},outsidetextfont:{color:"white"}}),[e,r,a]);return He.jsxs("div",{className:Ti("operation-types-chart",n),children:[He.jsx("h3",{children:"Operation Types"}),He.jsx("p",{children:t}),He.jsx(cG,{className:"chart",data:[c],layout:qUt,config:zDe,useResizeHandler:!0})]})}const xse=()=>He.jsxs("div",{className:"dummy-chart-container",children:[He.jsx("div",{className:"title"}),He.jsxs("div",{className:"dummy-chart",children:[He.jsx("div",{className:"bar",style:{height:"40%"}}),He.jsx("div",{className:"bar",style:{height:"60%"}}),He.jsx("div",{className:"bar",style:{height:"80%"}}),He.jsx("div",{className:"bar",style:{height:"50%"}}),He.jsx("div",{className:"bar",style:{height:"90%"}}),He.jsx("div",{className:"bar",style:{height:"30%"}}),He.jsx("div",{className:"bar",style:{height:"40%"}}),He.jsx("div",{className:"bar",style:{height:"60%"}}),He.jsx("div",{className:"bar",style:{height:"80%"}}),He.jsx("div",{className:"bar",style:{height:"50%"}}),He.jsx("div",{className:"bar",style:{height:"90%"}}),He.jsx("div",{className:"bar",style:{height:"30%"}})]})]});function wse({datasets:t=[],maxCores:e}){const r=No(Hc),n=No(Nm),a=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.device_time),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Duration: %{y} ns<extra></extra>",name:Om(l,r,n),legendgroup:`group${l}`,marker:{color:k3(l)}})),[t,r,n]),c=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:(i==null?void 0:i.map(d=>DZ(d,e)).filter(d=>d!==-1))??[],yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:Om(l,r,n),legendgroup:`group${l}`,marker:{color:vk(l)}})),[t,e,r,n]),s=Math.max(...a.flatMap(i=>i.y??[])),h={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{range:[0,iG(t)],title:{text:"Operation"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,s]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Jx,{title:"Device Kernel Duration + Utilization",chartData:[...a,...c],configuration:h})}function Tse({datasets:t,maxCores:e}){const r=No(Hc),n=No(Nm),a=mt.useMemo(()=>t.map((s,h)=>({x:s==null?void 0:s.map(i=>i.device_time),y:s==null?void 0:s.map(i=>DZ(i,e)).filter(i=>i!==-1),mode:"markers",type:"scatter",name:Om(h,r,n),marker:{size:10,color:k3(h)},hovertemplate:"Duration: %{x} ns<br />Utilization: %{y}"})),[t,e,r,n]),c={showLegend:!0,xAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"},yAxis:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%"}};return He.jsx(Jx,{title:"Utilization vs Device Kernel Duration",chartData:a,configuration:c})}function _se({datasets:t=[]}){const e=No(Hc),r=No(Nm),n=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>parseFloat(d.device_time)*1e3),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Device time: %{y} ns<extra></extra>",name:Om(l,e,r),legendgroup:`group${l}`,marker:{color:k3(l)}})),[t,e,r]),a=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.pm_ideal_ns),hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Ideal time: %{y} ns<extra></extra>",name:Om(l,e,r),legendgroup:`group${l}`,marker:{color:vk(l)}})),[t,e,r]),c=Math.max(...t.flatMap(i=>i.map(l=>parseFloat(l.device_time)*1e3))),s=Math.max(...t.flatMap(i=>i.map(l=>parseFloat(l.pm_ideal_ns)))),h={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,iG(t)]},yAxis:{title:{text:"Time (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,Math.max(c,s)]}};return He.jsx(Jx,{title:"Device Time + Ideal Time",chartData:[...n,...a],configuration:h})}const eHt=({chartData:t,secondaryData:e=[],maxCores:r,opCodeOptions:n})=>{const a=No(Hc),c=No(Nm),s=[t,...e||[]].filter(l=>l.length>0),h=mt.useMemo(()=>s.map(l=>l.filter(d=>d.raw_op_code.toLowerCase().includes("matmul"))),[s]),i=mt.useMemo(()=>s.map(l=>l.filter(d=>d.raw_op_code.toLowerCase().includes("conv"))),[s]);return He.jsxs("div",{className:"charts",children:[He.jsx("h2",{children:"Matmul operations"}),h.filter(l=>l.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(Ise,{datasets:h,maxCores:r}),He.jsx(_se,{datasets:h}),He.jsx(wse,{datasets:h,maxCores:r}),He.jsx(Tse,{datasets:h,maxCores:r})]}):He.jsx(xse,{}),He.jsx("h2",{children:"Conv operations"}),i.filter(l=>l.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(Ise,{datasets:i,maxCores:r}),He.jsx(_se,{datasets:i}),He.jsx(wse,{datasets:i,maxCores:r}),He.jsx(Tse,{datasets:i,maxCores:r})]}):He.jsx(xse,{}),He.jsx("h2",{children:"All operations"}),He.jsxs("div",{className:"operation-types-charts",children:[a&&He.jsx(bse,{className:"flex-chart",reportTitle:c?a:"",data:t,opCodes:n}),c==null?void 0:c.map((l,d)=>He.jsx(bse,{className:"flex-chart",reportTitle:a?l:"",data:e[d],opCodes:n},`${l}-${d}`))]})]})},tHt=({folderList:t,reportIndex:e,label:r,subLabel:n})=>{const[a,c]=Sl(Nm),s=No(Hc);return He.jsx(yf,{className:"form-group",label:r,subLabel:n,children:He.jsxs("div",{className:"folder-selection",children:[He.jsx(H$,{items:t.filter(h=>{const i=(a||[]).filter((l,d)=>d!==e);return h.reportName!==s&&!i.includes(h.reportName)}),value:(a==null?void 0:a[e])||null,handleSelect:h=>{const i=[...a||[]];i[e]=h.reportName,c(i)}}),He.jsx(Ma,{variant:LL.OUTLINED,icon:Si.CROSS,onClick:()=>{const h=[...a||[]];h.splice(e,1),c((h==null?void 0:h.length)===0?null:h)},disabled:!(a!=null&&a[e])})]})})},Sse="tab-1";function rHt(){var b,S,_;const[t,e]=Sl(Nm),r=No(Hc),[n,a]=Sl(mhe),{data:c,isLoading:s}=lLe(),{data:h,isLoading:i}=UD(r),{data:l}=uLe(t||null),{data:d}=tde(),o=Xhe(),f=(b=FD())==null?void 0:b.SERVER_MODE;e3();const A=mt.useMemo(()=>Array.from(new Set([...(h==null?void 0:h.map(k=>k.raw_op_code).filter(k=>k!==void 0))||[],...l?l.flatMap(k=>k.map(F=>F.raw_op_code).filter(F=>F!==void 0)):[]])).map((k,F)=>({opCode:k,colour:JUt[F]})),[h,l]),[w,I]=mt.useState(Sse),[m,u]=mt.useState([]),[g,v]=mt.useState([]),[p,C]=mt.useState(A);mt.useEffect(()=>{if(r&&(t!=null&&t.includes(r))){const O=t.filter(k=>k!==r);e(O.length===0?null:O)}},[t,r,e]),mt.useEffect(()=>{t&&o&&a([o[0],o[1]])},[t,a,o]),mt.useEffect(()=>{v((l==null?void 0:l.map(O=>O.filter(k=>p.length?p.map(F=>F.opCode).includes(k.raw_op_code??""):!1)))||[])},[p,l]),mt.useEffect(()=>{u((h==null?void 0:h.filter(O=>p.length?p.map(k=>k.opCode).includes(O.raw_op_code??""):!1))||[])},[p,h]),mt.useEffect(()=>{C(A)},[A]);const y=mt.useMemo(()=>!t&&n&&m.length>0?m.filter(O=>{const k=parseInt(O==null?void 0:O.id,10);return k>=n[0]&&k<=n[1]}):m,[n,m,t]);if(i||s)return He.jsx(ag,{});const x=((S=c==null?void 0:c.deviceMeta)==null?void 0:S.architecture)??ZL.WORMHOLE,T=h?jUt(x,h):0,P=t&&(t==null?void 0:t.length)>0?[...t,null]:[null];return He.jsxs("div",{className:"performance data-padding",children:[He.jsx(vA,{title:"Performance"}),He.jsx("h1",{className:"page-title",children:"Performance analysis"}),!f&&(d?He.jsx("div",{className:"comparison-selectors",children:d&&((_=P.slice(0,1))==null?void 0:_.map((O,k)=>He.jsx(tHt,{folderList:d,reportIndex:k,label:k===0?He.jsx("h3",{className:"label",children:"Compare"}):null,subLabel:k===0?"Select from performance reports to compare":""},`${k}-comparison-report-selector`)))}):He.jsx(ag,{})),He.jsxs(zV,{id:"performance-tabs",selectedTabId:w,onChange:I,renderActiveTabPanelOnly:!0,size:tV.LARGE,children:[He.jsx(QC,{id:Sse,title:"Table",icon:Si.TH,panel:He.jsx(UUt,{data:y,comparisonData:g})}),He.jsx(QC,{id:"tab-2",title:"Charts",icon:Si.TIMELINE_AREA_CHART,panel:He.jsxs("div",{className:"chart-tab",children:[He.jsxs("p",{children:[He.jsx("strong",{children:"Arch:"})," ",x]}),He.jsxs("p",{children:[He.jsx("strong",{children:"Cores:"})," ",T]}),h?He.jsxs(He.Fragment,{children:[He.jsxs("div",{className:"charts-container",children:[He.jsx(QUt,{opCodeOptions:A,selectedOpCodes:p,updateOpCodes:C}),He.jsx(XUt,{filteredPerfData:y,comparisonData:g,maxCores:T,selectedOpCodes:p})]}),He.jsxs("div",{className:"charts-container non-filterable-charts",children:[He.jsx("span",{}),He.jsx("div",{children:He.jsx(eHt,{chartData:y,secondaryData:l||[],maxCores:T,opCodeOptions:A})})]})]}):null]})})]})]})}const nHt={[ko.IDLE]:Si.DOT,[ko.PROGRESS]:Si.DOT,[ko.FAILED]:Si.CROSS,[ko.OK]:Si.TICK},iHt={[ko.IDLE]:Xa.NONE,[ko.PROGRESS]:Xa.WARNING,[ko.FAILED]:Xa.DANGER,[ko.OK]:Xa.SUCCESS},aHt=()=>{const[t,e]=mt.useState(null),{uploadNpeFile:r}=rde(),[n,a]=Sl(ED),[c,s]=mt.useState(ko.IDLE),h=async i=>{var o,f,A,w;if(e("Uploading..."),s(ko.PROGRESS),!i.target.files)return;const l=(o=i.target.files)==null?void 0:o[0],d=await r(i.target.files);if(d.status!==200)s(ko.FAILED),e((f=d==null?void 0:d.data)==null?void 0:f.message);else if(((A=d==null?void 0:d.data)==null?void 0:A.status)!==ko.OK)s(ko.FAILED),e((w=d==null?void 0:d.data)==null?void 0:w.message);else{const I=l.name;a(I),A1("Active NPE",I),s(ko.OK),e(`${I} uploaded successfully`)}};return He.jsxs("div",{className:"npe-file-loader",children:[He.jsx(Ffe,{text:n??"Choose file...",onInputChange:h}),He.jsx("div",{className:`verify-connection-item status-${ko[c]}`,children:c?He.jsxs(He.Fragment,{children:[He.jsx(_s,{className:"connection-status-icon",icon:nHt[c],size:20,intent:iHt[c]}),He.jsx("span",{className:"connection-status-text",children:t})]}):null})]})},G_={version:null,arch:{units:"",label:"Architecture",description:"Architecture used (e.g. wormhole_b0, blackhole)"},congestion_model_name:{units:"",label:"Congestion Model",description:"Congestion model used in simulation to infer congestion (default: fast)"},cycles_per_timestep:{units:"cycles",label:"Device Cycles Per Timestep",description:"How many cycles each simulation timestep/frame spans"},device_name:{units:"",label:"Device Name",description:"Device simulated (e.g. wormhole_b0, blackhole)"},dram_bw_util:{units:"%",label:"DRAM Bandwidth Utilization",description:"% of DRAM RW bandwidth used over entire operation runtime (100% is maximum)"},link_demand:{units:"%",label:"NoC Link Demand",description:"Average demand for NoC links over entire runtime. Multiple packets requesting results in demand exceeding 100% for a given link. Demand be compared with link utilization to understand how localized congestion is."},link_util:{units:"%",label:"NoC Link Utilization",description:"Average utilization of NoC links over entire runtime. Link utilization saturates at 100% for every NoC link, no matter how much demand there is. Useful for understanding NoC toggle rate and overall efficiency of communication."},max_link_demand:{units:"%",label:"Max NoC Link Demand",description:"Maximum observed link demand over all timesteps. See link_demand for more details."},num_cols:{decimals:0,units:"",label:"Cols",description:"Number of core columns on the device."},num_rows:{decimals:0,units:"",label:"Rows",description:"Number of core rows on the device."}};var h0=(t=>(t.NOC0="NOC0",t.NOC1="NOC1",t))(h0||{}),g1=(t=>(t.NOC1_NORTH="NOC1_NORTH",t.NOC0_SOUTH="NOC0_SOUTH",t.NOC0_EAST="NOC0_EAST",t.NOC1_WEST="NOC1_WEST",t.NOC0_IN="NOC0_IN",t.NOC0_OUT="NOC0_OUT",t.NOC1_IN="NOC1_IN",t.NOC1_OUT="NOC1_OUT",t))(g1||{}),os=(t=>(t[t.CHIP_ID=0]="CHIP_ID",t[t.Y=1]="Y",t[t.X=2]="X",t[t.NOC_ID=3]="NOC_ID",t[t.DEMAND=4]="DEMAND",t))(os||{});const cB=({width:t,height:e,data:r,isMulticolor:n=!1,style:a})=>{const s=new Map,h=new Map,i=r.filter((d,o,f)=>o===f.findIndex(A=>A.nocId===d.nocId&&A.color===d.color));i.forEach(d=>{if(!s.has(d.nocId))s.set(d.nocId,1);else{const o=s.get(d.nocId);s.set(d.nocId,o+1)}}),s.forEach((d,o)=>{h.set(o,[5,(d-1)*5])});const l=[];return He.jsx("svg",{width:t,height:e,style:a,"aria-description":i.map(d=>d.nocId).join(","),children:He.jsx("g",{children:i.map((d,o)=>{const f=l.find(w=>w.nocId===d.nocId),A=f?f.counter:0;return f?f.counter+=1:l.push({nocId:d.nocId,counter:1}),He.jsxs(mt.Fragment,{children:[He.jsx("line",{x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,stroke:d.color,strokeWidth:1,...n?{strokeDasharray:h.get(d.nocId).join(",")}:{},...n?{strokeDashoffset:A*h.get(d.nocId)[0]}:{}}),d.arrow&&!n&&He.jsx("polygon",{transform:d.transform,points:`${d.arrow.p1} ${d.arrow.p2} ${d.arrow.p3}`,fill:d.color||"white"}),d.arrow&&n&&He.jsx("polygon",{transform:d.transform,points:`${d.arrow.p1} ${d.arrow.p2} ${d.arrow.p3}`,fill:"#999"})]},`${o}-${d.x1}-${d.y1}-${d.x2}-${d.y2}`)})})})},e5=50,Nf={x:25,y:e5-25},pk=5,ib=-pk,ab=-pk,ob=pk,sb=pk,ZA={x:e5-10,y:10},qd=2,Ese=["#FFFFFF","#FF0000","#0000FF","#FFFF00","#FF00FF","#FF4500","rgb(91,131,19)","#9400D3","#FFD700","#1E90FF","#007500","#FF69B4","#BA55D3","#7FFF00","#B22222"];function*oHt(){let t=0;for(;;)yield Ese[t],t=(t+1)%Ese.length}const sHt=oHt(),Z6=new Map,gbe=t=>(Z6.has(t)||Z6.set(t,sHt.next().value),Z6.get(t)||"#ffffff"),lHt=()=>{Z6.clear()},vbe=(t,e)=>{let r=0,n=0,a=0,c=0,s=9,h=9,i="",l=0,d=0,o={p1:"",p2:"",p3:""};switch(t){case g1.NOC1_NORTH:d=0,r=Nf.x+ob,a=Nf.y+sb,n=Nf.x+ob,c=0,o={p1:`${n-h/2},${c+s+d}`,p2:`${n+h/2},${c+s+d}`,p3:`${n},${c+d}`};break;case g1.NOC1_WEST:d=0,r=Nf.x+ob,n=0,a=Nf.y+sb,c=Nf.y+sb,o={p1:`${n+s+d},${c-h/2}`,p2:`${n+s+d},${c+h/2}`,p3:`${n+d},${c}`};break;case g1.NOC0_SOUTH:d=2,r=Nf.x+ib,n=Nf.x+ib,a=Nf.y+ab,c=e5,o={p1:`${n-h/2},${c-s-d}`,p2:`${n+h/2},${c-s-d}`,p3:`${n},${c-d}`};break;case g1.NOC0_EAST:d=2,r=Nf.x+ib,n=e5,a=Nf.y+ab,c=Nf.y+ab,o={p1:`${n-s-d},${c-h/2}`,p2:`${n-s-d},${c+h/2}`,p3:`${n-d},${c}`};break;case g1.NOC0_OUT:h=7,s=7,d=2,r=Nf.x+ib-qd,n=ZA.x+ib-qd,a=Nf.y+ab-qd,c=ZA.y+ab-qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break;case g1.NOC0_IN:h=7,s=7,d=2,r=ZA.x+ib+qd,n=Nf.x+ib+qd,c=Nf.y+ab+qd,a=ZA.y+ab+qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break;case g1.NOC1_OUT:h=7,s=7,d=0,r=Nf.x+ob-qd,n=ZA.x+ob-qd,a=Nf.y+sb-qd,c=ZA.y+sb-qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break;case g1.NOC1_IN:h=7,s=7,d=0,r=ZA.x+ob+qd,n=Nf.x+ob+qd,c=Nf.y+sb+qd,a=ZA.y+sb+qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break}return{x2:n,y2:c,x1:r,y1:a,arrow:o,transform:i,color:e,nocId:t}},lC=(t,e=0,r=!1)=>{if(t===-1)return"rgb(100, 100, 100)";const n=150,c=(Math.min(t,n)-e)/(n-e),s=Math.round(c*255);return r?`rgb(${s},${s},${255-s})`:`rgb(${s}, ${255-s}, 0)`},Mse=t=>t.map(e=>vbe(e.nocId,gbe(e.transfer))),uHt=({timestepList:t,canvasWidth:e,nocType:r=null})=>{const n=mt.useRef(null),a=30,[c,s]=mt.useState(null),h=mt.useMemo(()=>({worst:t.map(d=>{if(r){const A=Math.max(-1,...d.link_demand.filter(I=>I[os.NOC_ID].indexOf(r)===0).map(I=>I[os.DEMAND])),w=lC(A);return{value:A,color:w}}const o=Math.max(-1,...d.link_demand.map(A=>A[os.DEMAND])),f=lC(o);return{value:o,color:f}}),utilization:t.map(d=>{if(r){const o=d.noc[r];if(o)return{value:o.avg_link_util,color:lC(o.avg_link_util)}}return{value:d.avg_link_util,color:lC(d.avg_link_util)}}),demand:t.map(d=>{if(r){const f=d.noc[r];if(f)return{value:f.avg_link_demand,color:lC(f.avg_link_demand)}}const o=lC(d.avg_link_demand);return{value:d.avg_link_demand,color:o}})}),[r,t]);mt.useEffect(()=>{const d=n.current,o=d==null?void 0:d.getContext("2d");if(!d||!o)return;o.clearRect(0,0,d.width,d.height);const f=d.width/h.worst.length;h.worst.forEach(({color:A},w)=>{o.fillStyle=A,o.fillRect(w*f,0,f,d.height/3)}),h.utilization.forEach(({color:A},w)=>{o.fillStyle=A,o.fillRect(w*f,d.height/3,f,d.height/3*2)}),h.demand.forEach(({color:A},w)=>{o.fillStyle=A,o.fillRect(w*f,d.height/3*2,f,d.height)})},[h,e,a]);const i=d=>{const o=n.current;if(o){const f=o.getBoundingClientRect(),A=d.clientX-f.left,w=f.width/h.worst.length,I=Math.floor(A/w);I>-1?s({x:A,y:0,text:He.jsxs("div",{children:[r!==void 0&&He.jsxs("div",{children:["Selected ",r]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:h.worst[I].color}})," ","Max Demand:"," ",h.worst[I].value>-1?`${h.worst[I].value.toFixed(3)} %`:"N/A"]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:h.utilization[I].color}}),` Avg Utilization: ${h.utilization[I].value.toFixed(3)} %`]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:h.demand[I].color}}),` Avg Demand: ${h.demand[I].value.toFixed(3)} %`]})]})}):(n.current&&(n.current.style.cursor="default"),s(null))}},l=()=>{s(null)};return He.jsxs(He.Fragment,{children:[c&&He.jsx(ps,{content:c.text,position:Js.TOP,hoverOpenDelay:0,hoverCloseDelay:0,isOpen:!0,usePortal:!0,minimal:!0,modifiers:{offset:{enabled:!0,options:{offset:[c.x,a*1.5]}}},children:He.jsx("div",{style:{position:"absolute",top:0,left:`${c.x}px`,width:"0",height:"0",backgroundColor:"red",zIndex:100}})}),He.jsx("canvas",{style:{width:"100%",height:`${a}px`},ref:n,width:e,height:a,onMouseMove:i,onMouseLeave:l})]})},cHt=({groupedTransfersByNoCID:t,selectedNode:e,showActiveTransfers:r,highlightedTransfer:n,setHighlightedTransfer:a,congestionData:c,nocType:s})=>He.jsx("div",{className:"side-data",children:Object.keys(t).length!==0&&He.jsxs(He.Fragment,{children:[He.jsxs("h3",{children:["Active transfers through ",e==null?void 0:e.coords.join("-"),He.jsx(Ma,{variant:"minimal",icon:Si.CROSS,onClick:()=>r(null)})]}),Object.entries(t).map(([h,i])=>{const l=c.find(o=>o[os.NOC_ID]===h),d=l?l[os.DEMAND]:0;return He.jsxs("div",{className:"local-transfer-ctn",children:[He.jsxs("h4",{children:["NOC ID: ",h,He.jsx("span",{className:"color-square",style:{backgroundColor:lC(d)}}),d.toFixed(2)]}),i.map(o=>He.jsxs("div",{className:"local-transfer",style:{opacity:n===null||n===o?1:.25},onMouseOver:()=>a(o),onMouseOut:()=>a(null),children:[He.jsx("div",{className:"color-square",style:{backgroundColor:gbe(o.id)}}),o.id,He.jsxs("div",{children:[He.jsx("span",{className:"transfer-src",children:o.src.join("-")})," ",He.jsx(_s,{size:12,icon:Si.ArrowRight})," ",He.jsx("span",{className:"transfer-dst",children:o.dst.length===1?o.dst[0].join("-"):`${o.dst[0].join("-")} - ${o.dst[o.dst.length-1].join("-")}`})]}),He.jsxs("div",{children:[hh(o.total_bytes),"B"]}),He.jsx("div",{children:o.noc_event_type}),He.jsx("div",{children:He.jsxs("div",{className:"route",children:[o.route[0].injection_rate.toFixed(2)," b/cycle"]})})]},o.id))]},h)})]})}),fHt=({info:t,numTransfers:e})=>{const r=c=>G_[c]!==void 0&&G_[c]!==null,n=(c,s)=>{if(!G_[c])return null;const i=G_[c],l=i.units,d=i.decimals!==void 0?i.decimals:2;return`${typeof s=="number"?Number(s).toFixed(d):s} ${l}`},a=c=>{const s=G_[c];if(!s)return null;const{label:h,description:i}=s;return He.jsx(ps,{content:i,children:h?`${h}: `:c})};return He.jsx("div",{className:"metadata",children:He.jsxs(VD,{label:He.jsx("h3",{className:"title",children:"Run summary"}),isOpen:!0,children:[He.jsx("div",{children:t&&Object.keys(t).map(c=>r(c)&&t[c]!==void 0?He.jsxs("div",{children:[He.jsxs("span",{children:[a(c),": "]}),He.jsx("span",{children:n(c,t[c])})]},c):null)}),He.jsx("hr",{}),He.jsxs("div",{children:[He.jsx("span",{children:"Active transfers:"}),He.jsx("span",{children:e})]})]})})},hHt=({id:t,width:e,height:r,cores:n,dram:a,eth:c,pcie:s,showActiveTransfers:h,isAnnotatingCores:i,TENSIX_SIZE:l})=>{const d=o=>{const[f,A]=o;return n!=null&&n.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-c",children:"T"}):a!=null&&a.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-d",children:"d"}):c!=null&&c.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-e",children:"e"}):s!=null&&s.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-p",children:"p"}):He.jsx("div",{className:"node-type-label"})};return He.jsxs("div",{className:"tensix-grid empty",style:{display:"grid",gridTemplateColumns:`repeat(${e||0}, ${l}px)`,gridTemplateRows:`repeat(${r||0}, ${l}px)`},children:[He.jsx("div",{className:"chip-id",children:t}),Array.from({length:e}).map((o,f)=>Array.from({length:r}).map((A,w)=>He.jsx("div",{className:"tensix empty-tensix",onClick:()=>h(null),style:{gridColumn:f+1,gridRow:w+1,width:`${l}px`,height:`${l}px`},children:i?d([w,f]):""},`${f}-${w}`)))]})},dHt=({transfer:t,clusterChip:e,index:r,getOriginOpacity:n})=>He.jsxs(He.Fragment,{children:[t.src&&e.id===t.src[os.CHIP_ID]&&He.jsx("div",{className:"tensix src-dst src",style:{gridColumn:t.src[os.X]+1,gridRow:t.src[os.Y]+1,opacity:n(t)}},`${t.id}-src-${r}`),t.dst.map(a=>{var s;const c=((s=t.src)==null?void 0:s.toString())===a.toString()?"both":"dst";return e.id===a[os.CHIP_ID]?He.jsx("div",{className:Ti("tensix src-dst",c),style:{gridColumn:a[os.X]+1,gridRow:a[os.Y]+1,opacity:n(t)}},`${t.id}-dst-${r}-${a[os.Y]}-${a[os.X]}`):null})]}),gHt=25,Pse=25,v1=e5,Yw=v1,Rse=1,Lse=2,vHt=({npeData:t})=>{var me,pe;const[e,r]=mt.useState(null),[n,a]=mt.useState(0),c=t.timestep_data[n],s=t.noc_transfers.filter(oe=>c==null?void 0:c.active_transfers.includes(oe.id)),[h,i]=mt.useState(null),[l,d]=mt.useState([]),[o,f]=mt.useState(null),[A,w]=mt.useState(0);let I=0;const[m,u]=mt.useState(.75),g=Object.entries(t.chips).map(([oe,ne])=>(I=Math.max(I,ne[Fg.X]),{id:parseInt(oe,10),coords:ne})),[v,p]=mt.useState(!1),[C,y]=mt.useState(!0),[x,T]=mt.useState(null),P=oe=>{T(x===null?oe===h0.NOC0?h0.NOC1:h0.NOC0:x!==oe?null:oe===h0.NOC0?h0.NOC1:h0.NOC0)},[b,S]=mt.useState(window.innerWidth);mt.useEffect(()=>{const oe=()=>S(window.innerWidth);return window.addEventListener("resize",oe),()=>window.removeEventListener("resize",oe)},[]);const{architecture:_,cores:O,dram:k,eth:F,pcie:N}=fLe(t.common_info.arch),R=((me=_.grid)==null?void 0:me.x_size)||10,z=((pe=_.grid)==null?void 0:pe.y_size)||12;mt.useEffect(()=>{lHt(),v&&re()},[n,v]),mt.useEffect(()=>{L(),a(0),f(null),d([]),r(null)},[t]);const E=mt.useMemo(()=>{const oe=new Map;return l.forEach(ne=>{ne.route.forEach(J=>{J.links.forEach(ue=>{const[he,le,ee]=ue,ge=oe.get(he)||[];ge[le]=ge[le]||[],ge[le][ee]=ge[le][ee]||[],ge[le][ee].push({transfer:ne.id,nocId:ue[os.NOC_ID]}),oe.set(he,ge)})})}),oe},[l]),M=mt.useMemo(()=>{if(!(o!=null&&o.coords))return{};const[oe,ne,J]=o.coords,ue={};return l.forEach(he=>{he.route.forEach(le=>{le.links.forEach(ee=>{const[ge,de,Ae]=ee;if(ne===de&&J===Ae&&oe===ge){const be=ee[os.NOC_ID];ue[be]||(ue[be]=[]),ue[be].push(he)}})})}),ue},[l,o]),D=(oe=Rse)=>{w(oe),clearInterval(h);const ne=t.timestep_data.length,J=setInterval(()=>{a(ue=>ue<ne-1?ue+1:0)},100/oe);i(J)},L=()=>(w(0),clearInterval(h)),j=()=>{D()},G=()=>{D(Lse)},W=()=>{L()},X=()=>{L();const oe=t.timestep_data.length;f(null),d([]),a(ne=>ne>0?ne-1:oe-1)},Y=()=>{L(),f(null),d([]);const oe=t.timestep_data.length;a(ne=>ne<oe-1?ne+1:0)},K=oe=>{L(),a(oe),f(null),d([])},V=(oe,ne)=>{if(Q(),oe===null){d([]),f(null);return}if((o==null?void 0:o.index)===ne){f(null),d([]);return}ne!==void 0&&f({index:ne,coords:[oe[os.CHIP_ID],oe[os.Y],oe[os.X]]}),W();const J=t.timestep_data[n].active_transfers.map(ue=>{var ee;const he=t.noc_transfers.find(ge=>ge.id===ue),le=(ee=he==null?void 0:he.route)==null?void 0:ee.map(ge=>ge.links.some(de=>de[os.Y]===oe[os.Y]&&de[os.X]===oe[os.X]&&(x===null||de[os.NOC_ID].indexOf(x)===0))?ge:null).filter(ge=>ge!==null);if(le&&le.length>0)return he}).filter(ue=>ue!==void 0);d(J)},Q=()=>{p(!1),d([])},re=()=>{p(!0),f(null);const oe=t.timestep_data[n].active_transfers.map(ne=>t.noc_transfers.find(J=>J.id===ne)).filter(ne=>ne!==void 0);d(oe)},se=oe=>{if(v)return 0;if(e!==null&&e.id===oe.id)return 1;if(e!==null)return .15;if(l.length===0)return 0;const ne=l.some(J=>J.id===oe.id);return l.length!==0&&!ne?.15:.5},ce=b-b/t.timestep_data.length-Pse;return He.jsxs("div",{className:"npe",children:[He.jsx(fHt,{info:t.common_info,numTransfers:s.length}),He.jsxs("div",{className:"header",children:[He.jsxs(N0,{className:"npe-controls",children:[He.jsx(Ma,{icon:Si.StepBackward,onClick:X}),He.jsx(Ma,{icon:Si.Play,intent:A===Rse?Xa.PRIMARY:Xa.NONE,onClick:j}),He.jsx(Ma,{icon:Si.FastForward,onClick:G,intent:A===Lse?Xa.PRIMARY:Xa.NONE}),He.jsx(Ma,{icon:Si.STOP,onClick:W}),He.jsx(Ma,{icon:Si.StepForward,onClick:Y}),"|",He.jsx(Bc,{label:"Show all active transfers",checked:v,onChange:()=>v?Q():re()}),He.jsx(Bc,{label:"Annotate cores",checked:C,onChange:()=>y(!C)}),He.jsx(Bc,{label:"NOC0",checked:x===h0.NOC0||x===null,onChange:()=>P(h0.NOC0)}),He.jsx(Bc,{label:"NOC1",checked:x===h0.NOC1||x===null,onChange:()=>P(h0.NOC1)}),"|",He.jsxs("label",{children:["Zoom",He.jsx(w$,{"aria-label":"zoom",min:.1,max:2,stepSize:.1,labelStepSize:1,value:m,onChange:oe=>u(oe),labelRenderer:oe=>`${oe.toFixed(1)}`})]})]}),He.jsxs("div",{style:{position:"relative",width:`${ce}px`},children:[He.jsx(w$,{min:0,max:t.timestep_data.length-1,stepSize:1,labelStepSize:t.timestep_data.length>gHt?t.timestep_data.length/20:1,value:n,onChange:oe=>K(oe)}),He.jsx("div",{className:"bp5-slider-progress duplicate",style:{width:`${b-Pse}px`}})]}),He.jsx(uHt,{timestepList:t.timestep_data,canvasWidth:b,nocType:x})]}),He.jsxs("div",{className:"split-grid",children:[He.jsx("div",{className:Ti("chip-cluster-wrap",{"details-open":o!==null}),style:{gridTemplateColumns:`repeat(${I||0}, ${(v1+1)*R}px)`,zoom:m},children:g.map(oe=>{var ne;return He.jsxs("div",{className:"chip",style:{gridColumn:oe.coords[Fg.X]+1,gridRow:oe.coords[Fg.Y]+1},children:[He.jsx(hHt,{id:oe.id,width:R,height:z,cores:O,dram:k,eth:F,pcie:N,showActiveTransfers:V,isAnnotatingCores:C,TENSIX_SIZE:v1}),He.jsxs("div",{className:"tensix-grid congestion",style:{display:"grid",gridTemplateColumns:`repeat(${R}, ${v1}px)`,gridTemplateRows:`repeat(${z}, ${v1}px)`},children:[s.map((J,ue)=>He.jsx(dHt,{transfer:J,clusterChip:oe,index:ue,getOriginOpacity:se},`${J.id}-${ue}`)),c==null?void 0:c.link_demand.map((J,ue)=>J[os.CHIP_ID]===oe.id&&(x===null||J[os.NOC_ID].indexOf(x)===0)?He.jsxs("button",{type:"button",className:`tensix ${J[os.Y]}-${J[os.X]}`,style:{position:"relative",gridColumn:J[os.X]+1,gridRow:J[os.Y]+1},onClick:()=>V(J,ue),children:[He.jsx(cB,{style:{opacity:e!==null||l.length!==0?.15:1},width:Yw,height:Yw,data:[vbe(J[os.NOC_ID],lC(J[os.DEMAND]))],isMulticolor:!1}),He.jsxs("div",{style:{fontSize:"9px",position:"absolute",top:0},children:[J[os.Y],"-",J[os.X]]})]},`${ue}-${J[os.Y]}-${J[os.X]}-${J[os.NOC_ID]}`):null)]}),He.jsx("div",{className:"tensix-grid transfers",style:{gridTemplateColumns:`repeat(${R}, ${v1}px)`,gridTemplateRows:`repeat(${z}, ${v1}px)`},children:(ne=E.get(oe.id))==null?void 0:ne.map((J,ue)=>He.jsx(He.Fragment,{children:J.map((he,le)=>He.jsx("div",{className:(o==null?void 0:o.coords[os.Y])===ue&&(o==null?void 0:o.coords[os.X])===le?"selected tensix no-click":"tensix no-click",style:{gridColumn:le+1,gridRow:ue+1},children:He.jsx("div",{className:"transfer-render-ctn",children:He.jsx(cB,{style:{...e!==null?{opacity:.25}:{opacity:1}},width:Yw,height:Yw,data:Mse(he),isMulticolor:!0})})},`selected-transfer-${ue}-${le}`))},`device-${oe.id}-row-${ue}`))}),e!==null&&He.jsx("div",{className:"tensix-grid transfer-single",style:{gridTemplateColumns:`repeat(${R}, ${v1}px)`,gridTemplateRows:`repeat(${z}, ${v1}px)`},children:e==null?void 0:e.route.map(J=>J.links.map(ue=>ue[os.CHIP_ID]===oe.id?He.jsx("div",{className:"tensix",style:{position:"relative",gridColumn:ue[os.X]+1,gridRow:ue[os.Y]+1},children:He.jsx("div",{className:"transfer-render-ctn",children:He.jsx(cB,{width:Yw,height:Yw,data:Mse([{transfer:e.id,nocId:ue[os.NOC_ID]}]),isMulticolor:!1})})},`${ue[os.Y]}-${ue[os.X]}-${ue[os.NOC_ID]}`):null))})]})})}),He.jsx(cHt,{groupedTransfersByNoCID:M,selectedNode:o,congestionData:c==null?void 0:c.link_demand.filter(oe=>oe[os.Y]===(o==null?void 0:o.coords[os.Y])&&oe[os.X]===(o==null?void 0:o.coords[os.X])),showActiveTransfers:V,highlightedTransfer:e,setHighlightedTransfer:r,nocType:x})]})]})},NH=t=>{if(!t)return null;const e=/^(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?$/,r=t.match(e);if(!r)return null;const[,n,a,c,s]=r;return{major:parseInt(n,10),minor:parseInt(a,10),patch:parseInt(c,10),...s?{prerelease:s}:{}}},pbe="1.0.0",Ose=He.jsx("a",{target:"_blank",href:"https://github.com/tenstorrent/tt-npe",rel:"noreferrer",children:"tt-npe"}),pHt=()=>{const t=No(ED),{data:e,isLoading:r}=eLe(t);return He.jsxs(He.Fragment,{children:[He.jsx(vA,{title:"NPE"}),He.jsx("h1",{className:"page-title",children:"NOC performance estimator"}),He.jsx(aHt,{}),r?He.jsx(ag,{}):e?mHt(e)?He.jsx(vHt,{npeData:e}):He.jsxs(He.Fragment,{children:[He.jsxs("p",{children:["Invalid NPE data or version. Current supported version is ",pbe," got ",e.common_info.version||"null",";"]}),He.jsxs("p",{children:["Use ",Ose," to generate new NPE dataset",Dse(e.common_info.version)?He.jsxs(He.Fragment,{children:[" ","or install an older version of the visualizer"," ",He.jsxs("pre",{children:["pip install ttnn-visualizer==",Dse(e.common_info.version)]})]}):null]})]}):He.jsxs(He.Fragment,{children:[He.jsx("p",{children:"Please upload a NPE file for analysis."}),He.jsxs("p",{children:["See ",Ose," for details on how to generate NPE files."]})]})]})},mHt=t=>{if(!["common_info","noc_transfers","timestep_data"].every(c=>c in t))return!1;const n=NH(t.common_info.version);if(!n)return!1;const a=NH(pbe);return(n==null?void 0:n.major)===(a==null?void 0:a.major)},Dse=t=>{switch(NH(t)){case null:case void 0:return"0.32.3";default:return""}},mbe=[{index:!0,element:He.jsx(lOe,{})},{path:Xo.OPERATIONS,element:He.jsx(kOe,{})},{path:`${Xo.OPERATIONS}/:operationId`,element:He.jsx(Irt,{})},{path:Xo.TENSORS,element:He.jsx(Srt,{})},{path:Xo.BUFFERS,element:He.jsx(fat,{})},{path:Xo.STYLEGUIDE,element:He.jsx(gat,{})},{path:`${Xo.GRAPHTREE}/:operationId?`,element:He.jsx(kUt,{})},{path:Xo.PERFORMANCE,element:He.jsx(rHt,{})},{path:Xo.NPE,element:He.jsx(pHt,{})},{path:Xo.CLUSTER,element:null}],yHt=d5({enter:"Toastify--animate Toastify__bounce-enter",exit:" no-toast-animation Toastify__bounce-exit",appendPosition:!0,collapseDuration:0,collapse:!0});function AHt(){const t="0.38.2",e=Tm(km),r=Tm(Hc),n=Tm(ED),{data:a}=qV(),c=H0(),s=c.state;return mt.useEffect(()=>{var h,i,l;a!=null&&a.active_report&&(e(((h=a.active_report)==null?void 0:h.profiler_name)??null),r(((i=a.active_report)==null?void 0:i.performance_name)??null),n(((l=a.active_report)==null?void 0:l.npe_name)??null))},[a,e,r,n]),He.jsxs("div",{className:oT,children:[He.jsxs(vA,{defaultTitle:"TT-NN Visualizer",titleTemplate:"%s | TT-NN Visualizer",children:[He.jsx("meta",{charSet:"utf-8"}),He.jsx("script",{src:"/api/config.js"})]}),He.jsx("header",{className:"app-header",children:He.jsxs("nav",{className:"nav-container",children:[He.jsxs("a",{href:Xo.HOME,className:"title",children:[He.jsxs("h1",{children:[He.jsx("img",{width:250,alt:"tenstorrent",src:"https://docs.tenstorrent.com/tt-tm-assets/Logo/Standard%20Lockup/svg/tt_logo_color-orange-whitetext.svg"}),He.jsx("span",{className:"visualizer-title",children:"TT-NN Visualizer"})]}),He.jsxs("sup",{className:"version",children:["v",t]})]}),He.jsx(pLe,{})]})}),He.jsxs("main",{children:[He.jsx(PLe,{routes:mbe}),c.pathname===Xo.CLUSTER&&(s==null?void 0:s.background)&&He.jsx(ELe,{}),He.jsx(bPe,{position:"top-right",autoClose:!1,newestOnTop:!1,closeOnClick:!0,closeButton:!1,theme:"light",transition:yHt})]}),He.jsx(bLe,{})]})}const Hy=Object.create(null);Hy.open="0";Hy.close="1";Hy.ping="2";Hy.pong="3";Hy.message="4";Hy.upgrade="5";Hy.noop="6";const Y6=Object.create(null);Object.keys(Hy).forEach(t=>{Y6[Hy[t]]=t});const FH={type:"error",data:"parser error"},ybe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Abe=typeof ArrayBuffer=="function",Cbe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,kZ=({type:t,data:e},r,n)=>ybe&&e instanceof Blob?r?n(e):kse(e,n):Abe&&(e instanceof ArrayBuffer||Cbe(e))?r?n(e):kse(new Blob([e]),n):n(Hy[t]+(e||"")),kse=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Nse(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let fB;function CHt(t,e){if(ybe&&t.data instanceof Blob)return t.data.arrayBuffer().then(Nse).then(e);if(Abe&&(t.data instanceof ArrayBuffer||Cbe(t.data)))return e(Nse(t.data));kZ(t,!1,r=>{fB||(fB=new TextEncoder),e(fB.encode(r))})}const Fse="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dS=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Fse.length;t++)dS[Fse.charCodeAt(t)]=t;const IHt=t=>{let e=t.length*.75,r=t.length,n,a=0,c,s,h,i;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const l=new ArrayBuffer(e),d=new Uint8Array(l);for(n=0;n<r;n+=4)c=dS[t.charCodeAt(n)],s=dS[t.charCodeAt(n+1)],h=dS[t.charCodeAt(n+2)],i=dS[t.charCodeAt(n+3)],d[a++]=c<<2|s>>4,d[a++]=(s&15)<<4|h>>2,d[a++]=(h&3)<<6|i&63;return l},bHt=typeof ArrayBuffer=="function",NZ=(t,e)=>{if(typeof t!="string")return{type:"message",data:Ibe(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:xHt(t.substring(1),e)}:Y6[r]?t.length>1?{type:Y6[r],data:t.substring(1)}:{type:Y6[r]}:FH},xHt=(t,e)=>{if(bHt){const r=IHt(t);return Ibe(r,e)}else return{base64:!0,data:t}},Ibe=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},bbe="",wHt=(t,e)=>{const r=t.length,n=new Array(r);let a=0;t.forEach((c,s)=>{kZ(c,!1,h=>{n[s]=h,++a===r&&e(n.join(bbe))})})},THt=(t,e)=>{const r=t.split(bbe),n=[];for(let a=0;a<r.length;a++){const c=NZ(r[a],e);if(n.push(c),c.type==="error")break}return n};function _Ht(){return new TransformStream({transform(t,e){CHt(t,r=>{const n=r.length;let a;if(n<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,n);else if(n<65536){a=new Uint8Array(3);const c=new DataView(a.buffer);c.setUint8(0,126),c.setUint16(1,n)}else{a=new Uint8Array(9);const c=new DataView(a.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(r)})}})}let hB;function HR(t){return t.reduce((e,r)=>e+r.length,0)}function jR(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let a=0;a<e;a++)r[a]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function SHt(t,e){hB||(hB=new TextDecoder);const r=[];let n=0,a=-1,c=!1;return new TransformStream({transform(s,h){for(r.push(s);;){if(n===0){if(HR(r)<1)break;const i=jR(r,1);c=(i[0]&128)===128,a=i[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(HR(r)<2)break;const i=jR(r,2);a=new DataView(i.buffer,i.byteOffset,i.length).getUint16(0),n=3}else if(n===2){if(HR(r)<8)break;const i=jR(r,8),l=new DataView(i.buffer,i.byteOffset,i.length),d=l.getUint32(0);if(d>Math.pow(2,21)-1){h.enqueue(FH);break}a=d*Math.pow(2,32)+l.getUint32(4),n=3}else{if(HR(r)<a)break;const i=jR(r,a);h.enqueue(NZ(c?i:hB.decode(i),e)),n=0}if(a===0||a>t){h.enqueue(FH);break}}}})}const xbe=4;function $f(t){if(t)return EHt(t)}function EHt(t){for(var e in $f.prototype)t[e]=$f.prototype[e];return t}$f.prototype.on=$f.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};$f.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};$f.prototype.off=$f.prototype.removeListener=$f.prototype.removeAllListeners=$f.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,a=0;a<r.length;a++)if(n=r[a],n===e||n.fn===e){r.splice(a,1);break}return r.length===0&&delete this._callbacks["$"+t],this};$f.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,a=r.length;n<a;++n)r[n].apply(this,e)}return this};$f.prototype.emitReserved=$f.prototype.emit;$f.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};$f.prototype.hasListeners=function(t){return!!this.listeners(t).length};const mk=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),ym=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),MHt="arraybuffer";function wbe(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const PHt=ym.setTimeout,RHt=ym.clearTimeout;function yk(t,e){e.useNativeTimers?(t.setTimeoutFn=PHt.bind(ym),t.clearTimeoutFn=RHt.bind(ym)):(t.setTimeoutFn=ym.setTimeout.bind(ym),t.clearTimeoutFn=ym.clearTimeout.bind(ym))}const LHt=1.33;function OHt(t){return typeof t=="string"?DHt(t):Math.ceil((t.byteLength||t.size)*LHt)}function DHt(t){let e=0,r=0;for(let n=0,a=t.length;n<a;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function Tbe(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kHt(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function NHt(t){let e={},r=t.split("&");for(let n=0,a=r.length;n<a;n++){let c=r[n].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class FHt extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class FZ extends $f{constructor(e){super(),this.writable=!1,yk(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new FHt(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=NZ(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=kHt(e);return r.length?"?"+r:""}}class zHt extends FZ{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};THt(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,wHt(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Tbe()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let _be=!1;try{_be=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const BHt=_be;function $Ht(){}class UHt extends zHt{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(a,c)=>{this.onError("xhr post error",a,c)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}let K2=class X6 extends $f{constructor(e,r,n){super(),this.createRequest=e,yk(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=wbe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var a;n.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=X6.requestsCount++,X6.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$Ht,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete X6.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};K2.requestsCount=0;K2.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zse);else if(typeof addEventListener=="function"){const t="onpagehide"in ym?"pagehide":"unload";addEventListener(t,zse,!1)}}function zse(){for(let t in K2.requests)K2.requests.hasOwnProperty(t)&&K2.requests[t].abort()}const HHt=function(){const t=Sbe({xdomain:!1});return t&&t.responseType!==null}();class jHt extends UHt{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=HHt&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K2(Sbe,this.uri(),e)}}function Sbe(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||BHt))return new XMLHttpRequest}catch{}if(!e)try{return new ym[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ebe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VHt extends FZ{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=Ebe?{}:wbe(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;kZ(n,this.supportsBinary,c=>{try{this.doWrite(n,c)}catch{}a&&mk(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Tbe()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const dB=ym.WebSocket||ym.MozWebSocket;class GHt extends VHt{createSocket(e,r,n){return Ebe?new dB(e,r,n):r?new dB(e,r):new dB(e)}doWrite(e,r){this.ws.send(r)}}class WHt extends FZ{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=SHt(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),a=_Ht();a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();const c=()=>{n.read().then(({done:h,value:i})=>{h||(this.onPacket(i),c())}).catch(h=>{})};c();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;this._writer.write(n).then(()=>{a&&mk(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const ZHt={websocket:GHt,webtransport:WHt,polling:jHt},YHt=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,XHt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zH(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let a=YHt.exec(t||""),c={},s=14;for(;s--;)c[XHt[s]]=a[s]||"";return r!=-1&&n!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=KHt(c,c.path),c.queryKey=QHt(c,c.query),c}function KHt(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function QHt(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,c){a&&(r[a]=c)}),r}const BH=typeof addEventListener=="function"&&typeof removeEventListener=="function",K6=[];BH&&addEventListener("offline",()=>{K6.forEach(t=>t())},!1);class GC extends $f{constructor(e,r){if(super(),this.binaryType=MHt,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=zH(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=zH(r.host).host);yk(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const a=n.prototype.name;this.transports.push(a),this._transportsByName[a]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=NHt(this.opts.query)),BH&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},K6.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=xbe,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&GC.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",GC.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const a=this.writeBuffer[n].data;if(a&&(r+=OHt(a)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,mk(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,a){if(typeof r=="function"&&(a=r,r=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const c={type:e,data:r,options:n};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(GC.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),BH&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=K6.indexOf(this._offlineEventListener);n!==-1&&K6.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}GC.protocol=xbe;class JHt extends GC{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;GC.priorWebsocketSuccess=!1;const a=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",o=>{if(!n)if(o.type==="pong"&&o.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;GC.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=r.name,this.emitReserved("upgradeError",f)}}))};function c(){n||(n=!0,d(),r.close(),r=null)}const s=o=>{const f=new Error("probe error: "+o);f.transport=r.name,c(),this.emitReserved("upgradeError",f)};function h(){s("transport closed")}function i(){s("socket closed")}function l(o){r&&o.name!==r.name&&c()}const d=()=>{r.removeListener("open",a),r.removeListener("error",s),r.removeListener("close",h),this.off("close",i),this.off("upgrading",l)};r.once("open",a),r.once("error",s),r.once("close",h),this.once("close",i),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let qHt=class extends JHt{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>ZHt[a]).filter(a=>!!a)),super(e,n)}};function ejt(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=zH(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const c=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port+e,n.href=n.protocol+"://"+c+(r&&r.port===n.port?"":":"+n.port),n}const tjt=typeof ArrayBuffer=="function",rjt=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Mbe=Object.prototype.toString,njt=typeof Blob=="function"||typeof Blob<"u"&&Mbe.call(Blob)==="[object BlobConstructor]",ijt=typeof File=="function"||typeof File<"u"&&Mbe.call(File)==="[object FileConstructor]";function zZ(t){return tjt&&(t instanceof ArrayBuffer||rjt(t))||njt&&t instanceof Blob||ijt&&t instanceof File}function Q6(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Q6(t[r]))return!0;return!1}if(zZ(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Q6(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Q6(t[r]))return!0;return!1}function ajt(t){const e=[],r=t.data,n=t;return n.data=$H(r,e),n.attachments=e.length,{packet:n,buffers:e}}function $H(t,e){if(!t)return t;if(zZ(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=$H(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=$H(t[n],e));return r}return t}function ojt(t,e){return t.data=UH(t.data,e),delete t.attachments,t}function UH(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=UH(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=UH(t[r],e));return t}const sjt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ljt=5;var cl;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(cl||(cl={}));class ujt{constructor(e){this.replacer=e}encode(e){return(e.type===cl.EVENT||e.type===cl.ACK)&&Q6(e)?this.encodeAsBinary({type:e.type===cl.EVENT?cl.BINARY_EVENT:cl.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===cl.BINARY_EVENT||e.type===cl.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=ajt(e),n=this.encodeAsString(r.packet),a=r.buffers;return a.unshift(n),a}}function Bse(t){return Object.prototype.toString.call(t)==="[object Object]"}class BZ extends $f{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===cl.BINARY_EVENT;n||r.type===cl.BINARY_ACK?(r.type=n?cl.EVENT:cl.ACK,this.reconstructor=new cjt(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(zZ(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(cl[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===cl.BINARY_EVENT||n.type===cl.BINARY_ACK){const c=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const s=e.substring(c,r);if(s!=Number(s)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(e.charAt(r+1)==="/"){const c=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(c,r)}else n.nsp="/";const a=e.charAt(r+1);if(a!==""&&Number(a)==a){const c=r+1;for(;++r;){const s=e.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===e.length)break}n.id=Number(e.substring(c,r+1))}if(e.charAt(++r)){const c=this.tryParse(e.substr(r));if(BZ.isPayloadValid(n.type,c))n.data=c;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case cl.CONNECT:return Bse(r);case cl.DISCONNECT:return r===void 0;case cl.CONNECT_ERROR:return typeof r=="string"||Bse(r);case cl.EVENT:case cl.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&sjt.indexOf(r[0])===-1);case cl.ACK:case cl.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class cjt{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=ojt(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fjt=Object.freeze(Object.defineProperty({__proto__:null,Decoder:BZ,Encoder:ujt,get PacketType(){return cl},protocol:ljt},Symbol.toStringTag,{value:"Module"}));function p0(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const hjt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Pbe extends $f{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[p0(e,"open",this.onopen.bind(this)),p0(e,"packet",this.onpacket.bind(this)),p0(e,"error",this.onerror.bind(this)),p0(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,a,c;if(hjt.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const s={type:cl.EVENT,data:r};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const d=this.ids++,o=r.pop();this._registerAckCallback(d,o),s.id=d}const h=(a=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||a===void 0?void 0:a.writable,i=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(i?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,r){var n;const a=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(a===void 0){this.acks[e]=r;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===e&&this.sendBuffer.splice(h,1);r.call(this,new Error("operation has timed out"))},a),s=(...h)=>{this.io.clearTimeoutFn(c),r.apply(this,h)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...r){return new Promise((n,a)=>{const c=(s,h)=>s?a(s):n(h);c.withError=!0,r.push(c),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...c)=>n!==this._queue[0]?void 0:(a!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...c)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:cl.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case cl.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case cl.EVENT:case cl.BINARY_EVENT:this.onevent(e);break;case cl.ACK:case cl.BINARY_ACK:this.onack(e);break;case cl.DISCONNECT:this.ondisconnect();break;case cl.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...a){n||(n=!0,r.packet({type:cl.ACK,id:e,data:a}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:cl.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function N3(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}N3.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+r:t-r}return Math.min(t,this.max)|0};N3.prototype.reset=function(){this.attempts=0};N3.prototype.setMin=function(t){this.ms=t};N3.prototype.setMax=function(t){this.max=t};N3.prototype.setJitter=function(t){this.jitter=t};class HH extends $f{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,yk(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new N3({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const a=r.parser||fjt;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new qHt(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const a=p0(r,"open",function(){n.onopen(),e&&e()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),e?e(h):this.maybeReconnectOnOpen()},s=p0(r,"error",c);if(this._timeout!==!1){const h=this._timeout,i=this.setTimeoutFn(()=>{a(),c(new Error("timeout")),r.close()},h);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}return this.subs.push(a),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(p0(e,"ping",this.onping.bind(this)),p0(e,"data",this.ondata.bind(this)),p0(e,"error",this.onerror.bind(this)),p0(e,"close",this.onclose.bind(this)),p0(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){mk(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Pbe(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const W_={};function J6(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=ejt(t,e.path||"/socket.io"),n=r.source,a=r.id,c=r.path,s=W_[a]&&c in W_[a].nsps,h=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let i;return h?i=new HH(n,e):(W_[a]||(W_[a]=new HH(n,e)),i=W_[a]),r.query&&!e.query&&(e.query=r.queryKey),i.socket(r.path,e)}Object.assign(J6,{Manager:HH,Socket:Pbe,io:J6,connect:J6});const l0=J6(`http://localhost:8000?instanceId=${XV()}`),djt=mt.createContext(null),gjt=({children:t})=>{const[e,r]=Sl(nC),n=XV();return mt.useEffect(()=>(l0.on("connect",()=>{r(a=>({...a,status:Ep.INACTIVE})),console.log(`Socket connected with ID: ${l0.id}`)}),l0.on("disconnect",a=>{console.log(`Socket disconnected: ${a}`)}),l0.on("connect_error",a=>{console.error(`Socket connection error: ${a.message}`)}),l0.on("reconnect",a=>{console.log(`Socket reconnected after ${a} attempts`)}),l0.on("fileTransferProgress",a=>{a.instanceId===n&&r({currentFileName:a.current_file_name,numberOfFiles:a.number_of_files,percentOfCurrent:a.percent_of_current,finishedFiles:a.finished_files,status:a.status})}),()=>{l0.off("connect"),l0.off("disconnect"),l0.off("connect_error"),l0.off("reconnect")}),[n,r]),He.jsx(djt.Provider,{value:l0,children:t})},vjt=STe([{path:Xo.HOME,element:He.jsx(AHt,{}),errorElement:He.jsx(K4e,{}),children:mbe}]);tSe.onlyShowFocusOnTabs();const pjt=new QTe({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});vB.createRoot(document.getElementById("root")).render(He.jsx(r3e,{client:pjt,children:He.jsx(rhe,{children:He.jsx(no.StrictMode,{children:He.jsx(gjt,{children:He.jsx(KEe,{children:He.jsx(yTe,{router:vjt})})})})})}));export{ga as I,d2 as _,g2 as a,UX as b,oEe as p};
5228
+ ${M.operationFileIdentifier}`,shape:"box",filterString:`${M.name}`}))),[t,p]),y=mt.useCallback(M=>{a.current&&M!==null&&(a.current.focus(M,{scale:h,animation:{duration:500,easingFunction:"easeInOutCubic"}}),a.current.selectNodes([M],!0),o(M),f.current=M)},[a,h]),x=mt.useCallback(M=>{var L;const D=Math.min(M,3);i(D),(L=a.current)==null||L.moveTo({scale:D})},[a]),T=mt.useMemo(()=>u===null||I.length===0?0:(u+1)%I.length,[u,I.length]),P=mt.useMemo(()=>u===null||I.length===0?0:(u-1+I.length)%I.length,[u,I.length]),b=mt.useCallback((M,D)=>{a.current&&!c&&(D!=null?y(D):I.length>M&&(y(I[M]),a.current.selectNodes(I,!1))),g(M)},[c,I,y]),S=()=>{m([]),g(null),w(""),a.current&&(a.current.selectNodes([],!0),a.current.focus(l,{scale:h,animation:{duration:500,easingFunction:"easeInOutQuad"}}),o(l))},_=M=>{var j;if(!M)return m([]),null;const L=C.get({filter:G=>{var W;return(W=G.filterString)==null?void 0:W.toLowerCase().includes(M.toLowerCase())}}).map(G=>G.id);return(j=a==null?void 0:a.current)==null||j.selectNodes(L,!1),m(L),L[0]||null};mt.useEffect(()=>(s(!0),setTimeout(()=>{r.current&&requestAnimationFrame(()=>{a.current=new So(r.current,{nodes:C,edges:v},{nodes:{font:{color:"#202020"},color:{background:"#ccd2f9",border:"none",hover:{background:"#9ca8f2",border:"none"},highlight:{background:"#74c5df",border:"#f6bc42"}},size:20,labelHighlightBold:!1,shape:"box"},edges:{font:{color:"#f5e2ba",size:20,strokeColor:"#000"},color:"#f5e2ba",arrows:{to:{enabled:!0,scaleFactor:.5}},smooth:{enabled:!0,type:"cubicBezier",roundness:.5}},autoResize:!0,layout:{hierarchical:{enabled:!0,levelSeparation:200,nodeSpacing:200,treeSpacing:300,blockShifting:!0,edgeMinimization:!0,direction:"UD",sortMethod:"directed",shakeTowards:"leaves"}},interaction:{hover:!0,keyboard:!0,dragView:!0,zoomView:!0,zoomSpeed:.2},physics:{enabled:!1}}),a.current.once("afterDrawing",()=>{var M,D;s(!1),(M=a.current)==null||M.focus(l,{scale:h,animation:{duration:500,easingFunction:"easeInOutQuad"}}),(D=a.current)==null||D.selectNodes([l],!0),o(l),f.current=l}),a.current.on("click",M=>{var D;if(M.edges.length>0){const L=M.edges[0],j=v.find(G=>G.id===L);(j==null?void 0:j.to)===f.current?y((j==null?void 0:j.from)||null):y((j==null?void 0:j.to)||null)}else(D=a.current)==null||D.selectNodes([],!0),o(null),f.current=null}),a.current.on("zoom",M=>{var D;M.scale<=3?i(M.scale):(D=a.current)==null||D.moveTo({scale:3})})})}),()=>{var M,D,L,j,G;(M=a.current)==null||M.off("zoom"),(D=a.current)==null||D.off("click"),(L=a.current)==null||L.off("dragEnd"),(j=a.current)==null||j.off("afterDrawing"),(G=a.current)==null||G.destroy(),a.current=null}),[v]);const O=M=>{if(C===null||M===null)return null;const D=C.getIds(),L=D.indexOf(M);return L!==-1&&L<D.length-1?D[L+1]:null},k=M=>{if(C===null||M===null)return null;const D=C.getIds(),L=D.indexOf(M);return L>0?D[L-1]:null},F=d??t[0].id;return He.jsxs("div",{className:"operation-graph-component",children:[He.jsxs("div",{className:"operation-graph-header",children:[He.jsxs("div",{className:"operation-graph-nav",children:[He.jsx(ps,{placement:Js.TOP,content:`Go to previous operation ${k(d)}`,disabled:c,children:He.jsx(Ma,{icon:Si.ArrowLeft,onClick:()=>y(k(d)||0),disabled:!k(d)||c,variant:"outlined"})}),He.jsx(ps,{disabled:c,placement:Js.TOP,content:`Center on operation ${F}`,children:He.jsx(Ma,{variant:"outlined",onClick:()=>y(F),disabled:c,children:F})}),He.jsx(ps,{placement:Js.TOP,content:`Go to next operation ${O(d)}`,disabled:c,children:He.jsx(Ma,{icon:Si.ArrowRight,onClick:()=>y(O(d)||0),disabled:!O(d)||c,variant:"outlined"})}),He.jsx(A5,{searchQuery:A,onQueryChanged:M=>{if(!M)S();else{w(M);const D=_(M);b(0,D)}},placeholder:"Filter by operation name",disabled:c}),He.jsx(Ma,{icon:Si.ArrowLeft,onClick:()=>{b(P)},disabled:c||I.length===0,variant:"outlined"}),u!==null&&I.length>0?u+1:0,"/",I.length,He.jsx(Ma,{icon:Si.ArrowRight,onClick:()=>{b(T)},disabled:c||I.length===0,variant:"outlined"})]}),He.jsxs("div",{className:"slider-wrapper",children:[He.jsx(_Ee,{disabled:c,children:"Scale"}),He.jsx(w$,{min:.1,max:3,labelRenderer:M=>`${M.toFixed(2)}`,stepSize:.01,labelStepSize:.75,labelPrecision:1,value:h,onChange:x,disabled:c})]})]}),d!==null&&!c&&He.jsxs("div",{className:"operation-graph-props",children:[He.jsxs("h2",{className:"operation-name",children:[d," ",(N=t.find(M=>M.id===d))==null?void 0:N.name," (",(R=t.find(M=>M.id===d))==null?void 0:R.operationFileIdentifier,")"]}),He.jsx(Ma,{className:"navigate-button",endIcon:Si.SEGMENTED_CONTROL,intent:Xa.PRIMARY,onClick:()=>n(`/operations/${d}`),children:"Memory Details"}),He.jsx("h3",{children:"Inputs 123:"}),He.jsx("div",{className:"tensors",children:(z=t.find(M=>M.id===d))==null?void 0:z.inputs.map((M,D)=>He.jsx(dse,{tensor:M},`input-${d} ${M.id} ${D}`))}),He.jsx("h3",{children:"Outputs:"}),He.jsx("div",{className:"tensors",children:(E=t.find(M=>M.id===d))==null?void 0:E.outputs.map((M,D)=>He.jsx(dse,{tensor:M},`output-${d} ${M.id} ${D}`))})]}),c&&He.jsx("div",{className:"graph-tree-loader",children:He.jsx(ag,{})}),He.jsx("div",{className:"operation-graph-container",ref:r}),He.jsx("aside",{className:"aside",children:"Scroll to zoom. Drag to pan. Click a node to see operation details."})]})},dse=({tensor:t})=>He.jsxs("div",{className:"tensor-details",children:[He.jsx("h3",{children:F0(t.shape)}),He.jsx("div",{children:t.dtype}),He.jsx("div",{children:t.layout}),He.jsx("div",{children:t.buffer_type!==null&&gh[t.buffer_type]}),He.jsx("div",{children:t.operationIdentifier&&[t.operationIdentifier]}),t!=null&&t.memory_config?Object.entries(t.memory_config).map(([e,r])=>He.jsx("table",{children:He.jsx("tbody",{children:He.jsx(nG,{header:e,value:r},e)})},e)):null]}),kUt=()=>{const{data:t,isLoading:e}=ev(),{operationId:r}=cce(),n=No(QT);e3();const a=mt.useMemo(()=>n?t==null?void 0:t.filter(c=>n[0]&&c.id<=n[1]):t,[t,n]);return He.jsxs("div",{className:"data-padding",children:[He.jsx(vA,{title:"GraphTree"}),e||a===void 0||a.length===0?He.jsx("div",{className:"graph-tree-loader",children:He.jsx(ag,{})}):He.jsx(DUt,{operationList:a,operationId:r?parseInt(r,10):void 0})]})},NUt=t=>t?Object.values(t).some(e=>e.length>0):!1,FUt=(t,e)=>{var n;return((n=t[e])==null?void 0:n.toString())||""},GO=(t,e,r,n)=>{let a=t||[];return NUt(e)&&r&&(a=a.filter(c=>!(e&&Object.entries(e).filter(([h,i])=>String(i).length).some(([h,i])=>!FUt(c,h).toLowerCase().includes(i.toLowerCase()))))),(n==null?void 0:n.length)>0&&(a=a.filter(c=>(c==null?void 0:c.math_fidelity)!==null&&n.includes(c.math_fidelity))),a},$R=[{label:"ID",key:"id",sortable:!0},{label:"Total %",key:"total_percent",unit:"%",decimals:1,sortable:!0},{label:"Bound",key:"bound",colour:"yellow"},{label:"OP Code",key:"op_code",colour:"blue",sortable:!0,filterable:!0},{label:"Device Time",key:"device_time",unit:"µs",decimals:0,sortable:!0},{label:"Op-to-Op Gap",key:"op_to_op_gap",colour:"red",unit:"µs",decimals:0,sortable:!0},{label:"Cores",key:"cores",colour:"green",sortable:!0},{label:"DRAM",key:"dram",colour:"yellow",unit:"GB/s",sortable:!0},{label:"DRAM %",key:"dram_percent",colour:"yellow",unit:"%",sortable:!0},{label:"FLOPs",key:"flops",unit:"TFLOPs",sortable:!0},{label:"FLOPs %",key:"flops_percent",unit:"%",sortable:!0},{label:"Math Fidelity",key:"math_fidelity",colour:"cyan"}],zUt=["op_code","bound","total_percent","device_time","op_to_op_gap","cores","dram","dram_percent","flops","flops_percent","math_fidelity","high_dispatch"],gse=1,vse=5,pse=({data:t,comparisonData:e,filters:r,provideMatmulAdvice:n,hiliteHighDispatch:a,matches:c,highlightRows:s,normaliseData:h})=>{const{activeFilters:i}=JG("math_fidelity",t||[]),{sortTableFields:l,changeSorting:d,sortingColumn:o,sortDirection:f}=Rme(null),A=JV(),{data:w}=ev(),I=mt.useMemo(()=>$R.filter(v=>v.filterable).map(v=>v.key),[]),m=mt.useMemo(()=>{const v=GO(t,r,I,i);return l(v)},[t,r,I,i,l]),u=mt.useMemo(()=>{const p=GO(e||[],r,I,i);return l(p)},[e,r,I,i,l]),g=[...$R.slice(0,gse),...A.length>0?[{label:"OP",key:"op",sortable:!0}]:[],...$R.slice(gse,vse),...a?[{label:"Slow",key:"high_dispatch"}]:[],...$R.slice(vse)];return He.jsxs("table",{className:"perf-table monospace",children:[He.jsx("thead",{children:He.jsx("tr",{children:g.map(v=>{const p=o===v.key?f===M1.ASC?M1.DESC:M1.ASC:f;return He.jsx("th",{className:"cell-header",children:v.sortable?He.jsxs(Ma,{onClick:()=>d(v.key)(p),variant:LL.MINIMAL,size:tV.SMALL,children:[He.jsx("span",{className:"header-label",children:v.label}),o===v.key?He.jsx(_s,{className:Ti({"is-active":o===v.key},"sort-icon"),icon:f===M1.ASC?Si.CARET_DOWN:Si.CARET_UP}):He.jsx(_s,{className:Ti("sort-icon"),icon:Si.CARET_DOWN})]}):He.jsx("span",{className:"header-label no-button",children:v.label})},v.key)})})}),He.jsx("tbody",{children:m==null?void 0:m.map((v,p)=>He.jsxs(mt.Fragment,{children:[He.jsx("tr",{className:Ti({"missing-data":s&&(v.missing||v.raw_op_code.includes("MISSING")),"added-data":s&&!v.missing&&(c==null?void 0:c.some(C=>C.id===v.id&&C.raw_op_code===v.raw_op_code)),"row-pattern":e&&h}),children:g.map(C=>He.jsx("td",{className:Ti("cell",{"align-right":C.key==="math_fidelity"}),children:gQ(v,C,w,r==null?void 0:r[C.key])},C.key))}),u[p]&&He.jsx("tr",{className:Ti({"missing-data":s&&(v.missing||v.raw_op_code.includes("MISSING")),"added-data":s&&!v.missing&&(c==null?void 0:c.some(C=>C.id===v.id&&C.raw_op_code===v.raw_op_code)),"row-pattern":e&&h},"comparison-row"),children:g.map(C=>He.jsx("td",{className:Ti("cell",{"align-right":C.key==="math_fidelity"}),children:zUt.includes(C.key)&&u[p]&&(C.key!=="op_code"||C.key==="op_code"&&BUt(v.op_code))&&He.jsx(He.Fragment,{children:gQ(u[p],C,w,r==null?void 0:r[C.key])})},C.key))}),n&&v.op_code.includes("Matmul")&&He.jsx("tr",{children:He.jsx("td",{colSpan:g.length,className:"cell advice",children:He.jsx("ul",{children:v==null?void 0:v.advice.map((C,y)=>He.jsx("li",{children:C},`advice-${y}`))})})})]},p))})]})},BUt=t=>t.toLowerCase().includes("matmul")||t.toLowerCase().includes("conv"),V_={id:null,advice:[],total_percent:null,bound:"",op_code:"MISSING",raw_op_code:"MISSING",device_time:null,op_to_op_gap:null,cores:null,dram:null,dram_percent:null,flops:null,flops_percent:null,math_fidelity:"",output_datatype:"",output_0_memory:"",input_0_datatype:"",input_1_datatype:"",dram_sharded:"",input_0_memory:"",input_1_memory:"",inner_dim_block_size:"",output_subblock_h:"",output_subblock_w:"",pm_ideal_ns:""},mb=[],UR="MISSING - ";function $Ut(t,e){mb.length=0;const r=[],n=[];let a=0,c=0;return e.forEach(s=>{const h=[];for(;a<t.length&&c<s.length;){const i=t[a],l=s[c],d=i.raw_op_code,o=l.raw_op_code;if(d===o)r.push(i),h.push(l),a++,c++;else{const f=s.slice(a+1).findIndex(m=>m.raw_op_code===o),A=s.slice(c+1).findIndex(m=>m.raw_op_code===d),w=f>=0?a+1+f:null,I=A>=0?c+1+A:null;if(w!==null&&(I===null||w-a<=I-c))for(;a<w;)t[a]&&(r.push(t[a]),h.push({...V_,op_code:`${UR} ${t[a].raw_op_code}`}),mb.push(t[a])),a++;else if(I!==null)for(;c<I;)h.push(s[c]),r.push({...V_,op_code:`${UR} ${s[c].raw_op_code}`}),mb.push(s[c]),c++;else r.push(i),h.push(l),a++,c++}}for(;a<t.length;)r.push(t[a]),h.push({...V_,op_code:`${UR} ${t[a].raw_op_code}`}),mb.push(t[a]),a++;for(;c<s.length;)r.push(V_),h.push({...V_,op_code:`${UR} ${s[c].raw_op_code}`}),mb.push(s[c]),c++;n.push(h)}),[r,n]}const mse=[{label:"ID",key:"id",sortable:!0},{label:"Total %",key:"total_percent",unit:"%",decimals:1,sortable:!0},{label:"Bound",key:"bound",colour:"yellow"},{label:"OP Code",key:"op_code",colour:"blue",sortable:!0,filterable:!0},{label:"Device Time",key:"device_time",unit:"µs",decimals:0,sortable:!0},{label:"Op-to-Op Gap",key:"op_to_op_gap",colour:"red",unit:"µs",decimals:0,sortable:!0},{label:"Cores",key:"cores",colour:"green",sortable:!0},{label:"DRAM",key:"dram",colour:"yellow",unit:"GB/s",sortable:!0},{label:"DRAM %",key:"dram_percent",colour:"yellow",unit:"%",sortable:!0},{label:"FLOPs",key:"flops",unit:"TFLOPs",sortable:!0},{label:"FLOPs %",key:"flops_percent",unit:"%",sortable:!0},{label:"Math Fidelity",key:"math_fidelity",colour:"cyan"}],Ww="perf-table-0",UUt=({data:t,comparisonData:e})=>{var E,M;const{getFilterOptions:r,updateFilters:n,activeFilters:a,FilterItem:c}=JG("math_fidelity",t||[]),s=JV(),h=No(Hc),i=No(Nm),[l,d]=mt.useState(!0),[o,f]=mt.useState(!1),[A,w]=mt.useState(!1),[I,m]=mt.useState(!1),[u,g]=mt.useState(Ww),[v,p]=mt.useState(!0),[C,y]=mt.useState(!0),x=mt.useMemo(()=>mse.filter(D=>D.filterable).map(D=>D.key),[]),[T,P]=mt.useState(Object.fromEntries(x.map(D=>[D,""]))),b=(i??[]).findIndex(D=>D===u)>-1?(i??[]).findIndex(D=>D===u):0,S=mt.useMemo(()=>t?yse(t,s):[],[t,s]),_=mt.useMemo(()=>e?e.map(D=>yse(D,s)):[],[e,s]),O=mt.useMemo(()=>GO(S,T,x,a),[S,T,x,a]),k=mt.useMemo(()=>GO(_[b],T,x,a),[b,_,T,x,a]),F=(D,L)=>{P({...T,[D]:L??""})},N=mt.useMemo(()=>S&&_[0]?$Ut(S,_):[],[S,_]),R=u===Ww?t==null?void 0:t.length:((E=e==null?void 0:e[b])==null?void 0:E.length)||0,z=u===Ww?O==null?void 0:O.length:(k==null?void 0:k.length)||0;return mt.useEffect(()=>{i||(y(!1),p(!1),g(Ww))},[i]),mt.useEffect(()=>{i&&!i.includes(u)&&g(Ww)},[i,u]),He.jsxs(He.Fragment,{children:[He.jsx(Bc,{label:l?"Merged device data":"Expanded device data",onChange:()=>d(!l),checked:l&&I,disabled:!I}),He.jsx(Bc,{label:"Show Matmul optimization analysis",onChange:()=>f(!o),checked:o}),He.jsx(Bc,{label:"Highlight high dispatch ops",onChange:()=>w(!A),checked:A}),He.jsx(Bc,{labelElement:He.jsx(ps,{content:"Tries to match up operations between the performance reports",children:He.jsxs("span",{className:"switch-label-with-icon",children:[He.jsx("span",{children:"Normalise performance data"}),He.jsx(_s,{icon:Si.SMALL_INFO_SIGN})]})}),onChange:()=>p(!v),checked:v,disabled:!i}),He.jsx(Bc,{labelElement:He.jsx(ps,{content:"Highlights rows where ops have been added or are missing after normalising the data",children:He.jsxs("span",{className:"switch-label-with-icon",children:[He.jsx("span",{children:"Highlight row difference"}),He.jsx(_s,{icon:Si.SMALL_INFO_SIGN})]})}),onChange:()=>y(!C),checked:C,disabled:!i||!v}),He.jsxs("div",{className:"perf-report",children:[He.jsxs("div",{className:"table-header",children:[He.jsx("h3",{className:"title",children:"Performance report"}),He.jsx("div",{className:"header-aside",children:He.jsx("p",{className:"result-count",children:z!==R?`Showing ${z} of ${R} rows`:`Showing ${z} rows`})})]}),He.jsxs("div",{className:"filters",children:[x.map(D=>{var L;return He.jsx(A5,{onQueryChanged:j=>F(D,j),placeholder:`Filter ${(L=mse.find(j=>j.key===D))==null?void 0:L.label}`,searchQuery:(T==null?void 0:T[D])||""},D)}),He.jsx(ode,{items:t?r():[],placeholder:"Math fidelity filter...",onItemSelect:D=>n(D),selectedItems:a,itemRenderer:(D,L)=>c(String(D)),tagRenderer:D=>D,onRemove:D=>n(D),itemPredicate:(D,L)=>!D||String(L).toLowerCase().includes(D.toLowerCase()),noResults:He.jsx(eA,{disabled:!0,text:"No results.",roleStructure:"listoption"}),resetOnSelect:!0})]}),He.jsxs(zV,{selectedTabId:u,onChange:g,renderActiveTabPanelOnly:!0,size:tV.LARGE,children:[He.jsx(QC,{id:Ww,title:h,icon:Si.TH_LIST,panel:He.jsx(pse,{data:v?N[0]:O,comparisonData:v&&((M=N==null?void 0:N[1])!=null&&M[b])?N[1][b]:[],filters:T,provideMatmulAdvice:o,hiliteHighDispatch:A,matches:mb,highlightRows:C&&v,normaliseData:v})}),i==null?void 0:i.filter(D=>D).map((D,L)=>{var j;return He.jsx(QC,{id:D,title:D,icon:Si.TH_LIST,panel:He.jsx(pse,{data:v&&((j=N==null?void 0:N[1])!=null&&j[b])&&b<1?N[1][b]:k,comparisonData:v&&(N!=null&&N[0])&&b<1?N[0]:[],filters:T,provideMatmulAdvice:o,hiliteHighDispatch:A,matches:mb,highlightRows:C&&v,normaliseData:v})},L)})]})]}),He.jsx("hr",{}),A&&MOe(S)]})},HUt=6.5,yse=(t,e)=>t.map(r=>{var s;const n=parseInt(r.op_to_op_gap,10),a=(s=e.find(h=>h.perfId===r.id))==null?void 0:s.opId,c=a!==void 0?Number(a):void 0;return{...r,op:c,high_dispatch:!!n&&n>HUt,id:parseInt(r.id,10),total_percent:parseFloat(r.total_percent),device_time:parseFloat(r.device_time),op_to_op_gap:r.op_to_op_gap?parseFloat(r.op_to_op_gap):null,cores:parseInt(r.cores,10),dram:r.dram?parseFloat(r.dram):null,dram_percent:r.dram_percent?parseFloat(r.dram_percent):null,flops:r.flops?parseFloat(r.flops):null,flops_percent:r.flops_percent?parseFloat(r.flops_percent):null}}),Ase={grayskull:108,wormhole_b0:64};function jUt(t,e){const r=Math.max(...e.filter(n=>n.cores).map(n=>parseInt(n.cores??"0",10)));return r>Ase[t]?r:Ase[t]}const lB="#575757",uB="#575757",Zw="#FFF";function Jx({chartData:t,configuration:e,title:r}){var c,s,h,i,l,d,o,f,A,w,I,m,u,g,v;const n={autosize:!0,paper_bgcolor:"transparent",plot_bgcolor:"transparent",showlegend:e.showLegend||!1,legend:{orientation:"h",font:{family:"sans-serif"},bgcolor:"#dee2e6",bordercolor:"#fff",borderwidth:2,x:.5,y:-.25,xanchor:"center"},margin:{l:50,r:0,b:50,t:0},barmode:e.barMode,xaxis:{gridcolor:lB,linecolor:uB,color:Zw,title:{font:{color:Zw},text:(s=(c=e.xAxis)==null?void 0:c.title)==null?void 0:s.text},fixedrange:!0,zeroline:!1,range:(h=e.xAxis)==null?void 0:h.range,tickformat:(i=e.xAxis)==null?void 0:i.tickformat,hoverformat:(l=e.xAxis)==null?void 0:l.hoverformat},yaxis:{gridcolor:lB,linecolor:uB,color:Zw,title:{standoff:20,font:{color:Zw},text:(o=(d=e.yAxis)==null?void 0:d.title)==null?void 0:o.text},automargin:!0,fixedrange:!0,zeroline:!1,range:(f=e.yAxis)==null?void 0:f.range,tickformat:(A=e.yAxis)==null?void 0:A.tickformat,hoverformat:(w=e.yAxis)==null?void 0:w.hoverformat},yaxis2:{gridcolor:lB,linecolor:uB,color:Zw,title:{standoff:20,font:{color:Zw},text:(m=(I=e.yAxis2)==null?void 0:I.title)==null?void 0:m.text},overlaying:"y",side:"right",automargin:!0,fixedrange:!0,zeroline:!1,range:(u=e.yAxis2)==null?void 0:u.range,tickformat:(g=e.yAxis2)==null?void 0:g.tickformat,hoverformat:(v=e.yAxis2)==null?void 0:v.hoverformat}},a={displayModeBar:!1,displaylogo:!1,responsive:!0};return He.jsxs("div",{className:Ti("chart-container",{"legend-instructions":e.showLegend}),children:[He.jsx("h3",{children:r}),He.jsx(cG,{className:"chart",data:t,layout:n,config:a,useResizeHandler:!0})]})}const Om=(t,e="",r="")=>t!==0?r:e,VUt=["#008BF8","#58B73B"],GUt=["#E27414","#E8C547"],k3=t=>VUt[t],vk=t=>GUt[t];function WUt({datasets:t=[]}){const e=No(Hc),r=No(Nm),n=mt.useMemo(()=>t.map((c,s)=>({x:c==null?void 0:c.map(h=>h.cores),y:c==null?void 0:c.map(h=>h.device_time),mode:"markers",type:"scatter",name:Om(s,e,r),marker:{size:10,color:k3(s)},hovertemplate:"Cores: %{x}<br />Device Kernel Duration: %{y} ns"})),[t,r,e]),a={showLegend:!0,xAxis:{title:{text:"Core Count"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"}};return He.jsx(Jx,{title:"Device Kernel Duration vs Core Count",chartData:n,configuration:a})}function ZUt({maxCores:t,datasets:e=[]}){const r=No(Hc),n=No(Nm),a=e.reduce((i,l)=>Math.max(i,(l==null?void 0:l.length)||0),0),c=mt.useMemo(()=>e.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.cores),type:"bar",hovertemplate:"Operation: %{x}<br />Cores: %{y}",name:Om(l,r,n),showlegend:!0,legendgroup:`group${l}`,marker:{color:k3(l)}})),[e,r,n]),s=mt.useMemo(()=>e.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.device_time),yaxis:"y2",hovertemplate:"Operation: %{x}<br />Device Kernel Duration: %{y} ns",name:Om(l,r,n),showlegend:!0,legendgroup:`group${l}`,marker:{color:vk(l)}})),[e,r,n]),h={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,a]},yAxis:{title:{text:"Core Count"},tickformat:"d",hoverformat:",.2r",range:[0,t]},yAxis2:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"}};return He.jsx(Jx,{title:"Core Count + Device Kernel Runtime",chartData:[...c,...s],configuration:h})}function YUt({selectedOpCodes:t,datasets:e=[]}){const r=No(Hc),n=No(Nm),a=e.flat(),c=mt.useMemo(()=>[...new Set(a==null?void 0:a.filter(l=>l.raw_op_code!==void 0).map(l=>l.raw_op_code))],[a]),s=mt.useMemo(()=>e.map((l,d)=>c.map(o=>{var f;return{x:[`Op Count ${e.length>1?`(${d+1})`:""}`],y:[l.filter(A=>A.raw_op_code===o).length/l.length],type:"bar",name:Om(d,r,n),hovertemplate:`${o}<br />%{y:.1%}`,marker:{color:(f=t.find(A=>A.opCode===o))==null?void 0:f.colour}}})),[e,c,t,r,n]),h=mt.useMemo(()=>e.map((l,d)=>c.map(o=>{var f;return{x:[`Runtime % ${e.length>1?`(${d+1})`:""}`],y:[l.filter(A=>A.raw_op_code===o).reduce(Cse,0)/l.reduce(Cse,0)],type:"bar",name:Om(d,r,n),hovertemplate:`${o}<br />%{y:.1%}`,marker:{color:(f=t.find(A=>A.opCode===o))==null?void 0:f.colour}}})),[e,c,t,r,n]),i={margin:{l:0,r:0,b:0,t:0},barMode:"stack",yAxis:{tickformat:".0%",range:[0,1]}};return He.jsx(Jx,{title:"Operation Count vs Runtime Contribution",chartData:[...s.flat(),...h.flat()],configuration:i})}const Cse=(t,e)=>t+(e.device_time?parseInt(e.device_time,10):0),XUt=({filteredPerfData:t,comparisonData:e,maxCores:r,selectedOpCodes:n})=>{const a=[t,...e||[]].filter(c=>c.length>0);return He.jsxs("div",{className:"charts",children:[He.jsx(YUt,{datasets:a,selectedOpCodes:n}),He.jsx(ZUt,{datasets:a,maxCores:r}),He.jsx(WUt,{datasets:a})]})},KUt=25;function QUt({opCodeOptions:t,selectedOpCodes:e,updateOpCodes:r}){const[n,a]=mt.useState(!0),[c,s]=mt.useState(!1);mt.useEffect(()=>{e.length===0&&(a(!1),s(!1)),e.length>0&&e.length<t.length&&(a(!1),s(!0)),e.length===t.length&&(a(!0),s(!1))},[e,t]);const h=()=>{r(n?[]:t)},i=()=>n?"Deselect all":"Select all",l=d=>He.jsxs(He.Fragment,{children:[He.jsx("span",{className:"label",children:d.opCode.length>KUt?He.jsx("span",{className:"abbreviated-label",title:d.opCode,children:d.opCode}):d.opCode}),He.jsx("div",{className:"memory-color-block",style:{backgroundColor:d.colour}})]});return He.jsx("aside",{className:"op-code-menu-container",children:He.jsxs("div",{className:"op-code-menu",children:[He.jsx("p",{className:"header",children:He.jsx("strong",{children:"Operation codes"})}),He.jsx("div",{className:"option select-all",children:He.jsx(yT,{checked:n,indeterminate:c,id:"select-all",onChange:h,label:i()})}),t.sort((d,o)=>d.opCode.localeCompare(o.opCode)).map(d=>He.jsx("div",{className:"option",children:He.jsx(yT,{className:"label-container",checked:e.map(o=>o.opCode).includes(d.opCode),id:d.opCode,labelElement:l(d),onChange:()=>{const o=e.includes(d)?e.filter(f=>f!==d):[...e,d];r(o)}},d.opCode)},d.opCode))]})})}const JUt=["rgb(31, 119, 180)","rgb(255, 127, 14)","rgb(44, 160, 44)","rgb(214, 39, 40)","rgb(148, 103, 189)","rgb(140, 86, 75)","rgb(227, 119, 194)","rgb(188, 189, 34)","rgb(23, 190, 207)","rgb(255, 187, 120)","rgb(40, 108, 26)","rgb(255, 152, 150)","rgb(197, 176, 213)","rgb(196, 156, 148)","rgb(247, 182, 210)","rgb(199, 199, 199)","rgb(219, 219, 141)","rgb(158, 218, 229)","rgb(57, 59, 121)","rgb(82, 84, 163)","rgb(107, 110, 207)","rgb(156, 158, 222)","rgb(255, 127, 14)"];function DZ(t,e){const r=t.pm_ideal_ns?parseFloat(t.pm_ideal_ns):null,n=t.device_time?parseFloat(t.device_time):null,a=t.cores?parseInt(t.cores,10):null;if(!Wg(r)||!Wg(n)||!Wg(a))return 0;const c=n*1e3,s=r/c*(e/a);return Wg(s)?s:0}function Ise({datasets:t=[],maxCores:e}){const r=No(Hc),n=No(Nm),a=mt.useMemo(()=>t.map((h,i)=>({x:h==null?void 0:h.map((l,d)=>d+1),y:h==null?void 0:h.map(l=>l.cores),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Cores: %{y}<extra></extra>",name:Om(i,r,n),legendgroup:`group${i}`,marker:{color:k3(i)}})),[t,r,n]),c=mt.useMemo(()=>t.map((h,i)=>({x:h==null?void 0:h.map((l,d)=>d+1),y:h==null?void 0:h.map(l=>DZ(l,e)).filter(l=>l!==-1),yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:Om(i,r,n),legendgroup:`group${i}`,marker:{color:vk(i)}})),[t,r,n,e]),s={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,iG(t)]},yAxis:{title:{text:"Core Count"},tickformat:"d",hoverformat:",.2r",range:[0,e]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Jx,{title:"Core Count + Utilization",chartData:[...a,...c],configuration:s})}const qUt={autosize:!0,paper_bgcolor:"transparent",margin:{l:50,r:50,b:50,t:50},showlegend:!1};function bse({reportTitle:t,data:e=[],opCodes:r,className:n=""}){const a=mt.useMemo(()=>[...new Set(e==null?void 0:e.filter(s=>s.raw_op_code!==void 0).map(s=>s.raw_op_code))],[e]),c=mt.useMemo(()=>({values:a.map(s=>e.filter(h=>h.raw_op_code===s).length),labels:[...a],type:"pie",textinfo:"percent",hovertemplate:"%{label}<br />Count: %{value}<extra></extra>",marker:{colors:a.map(s=>{var h;return(h=r.find(i=>i.opCode===s))==null?void 0:h.colour})},outsidetextfont:{color:"white"}}),[e,r,a]);return He.jsxs("div",{className:Ti("operation-types-chart",n),children:[He.jsx("h3",{children:"Operation Types"}),He.jsx("p",{children:t}),He.jsx(cG,{className:"chart",data:[c],layout:qUt,config:zDe,useResizeHandler:!0})]})}const xse=()=>He.jsxs("div",{className:"dummy-chart-container",children:[He.jsx("div",{className:"title"}),He.jsxs("div",{className:"dummy-chart",children:[He.jsx("div",{className:"bar",style:{height:"40%"}}),He.jsx("div",{className:"bar",style:{height:"60%"}}),He.jsx("div",{className:"bar",style:{height:"80%"}}),He.jsx("div",{className:"bar",style:{height:"50%"}}),He.jsx("div",{className:"bar",style:{height:"90%"}}),He.jsx("div",{className:"bar",style:{height:"30%"}}),He.jsx("div",{className:"bar",style:{height:"40%"}}),He.jsx("div",{className:"bar",style:{height:"60%"}}),He.jsx("div",{className:"bar",style:{height:"80%"}}),He.jsx("div",{className:"bar",style:{height:"50%"}}),He.jsx("div",{className:"bar",style:{height:"90%"}}),He.jsx("div",{className:"bar",style:{height:"30%"}})]})]});function wse({datasets:t=[],maxCores:e}){const r=No(Hc),n=No(Nm),a=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.device_time),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Duration: %{y} ns<extra></extra>",name:Om(l,r,n),legendgroup:`group${l}`,marker:{color:k3(l)}})),[t,r,n]),c=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:(i==null?void 0:i.map(d=>DZ(d,e)).filter(d=>d!==-1))??[],yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:Om(l,r,n),legendgroup:`group${l}`,marker:{color:vk(l)}})),[t,e,r,n]),s=Math.max(...a.flatMap(i=>i.y??[])),h={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{range:[0,iG(t)],title:{text:"Operation"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,s]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Jx,{title:"Device Kernel Duration + Utilization",chartData:[...a,...c],configuration:h})}function Tse({datasets:t,maxCores:e}){const r=No(Hc),n=No(Nm),a=mt.useMemo(()=>t.map((s,h)=>({x:s==null?void 0:s.map(i=>i.device_time),y:s==null?void 0:s.map(i=>DZ(i,e)).filter(i=>i!==-1),mode:"markers",type:"scatter",name:Om(h,r,n),marker:{size:10,color:k3(h)},hovertemplate:"Duration: %{x} ns<br />Utilization: %{y}"})),[t,e,r,n]),c={showLegend:!0,xAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"},yAxis:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%"}};return He.jsx(Jx,{title:"Utilization vs Device Kernel Duration",chartData:a,configuration:c})}function _se({datasets:t=[]}){const e=No(Hc),r=No(Nm),n=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>parseFloat(d.device_time)*1e3),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Device time: %{y} ns<extra></extra>",name:Om(l,e,r),legendgroup:`group${l}`,marker:{color:k3(l)}})),[t,e,r]),a=mt.useMemo(()=>t.map((i,l)=>({x:i==null?void 0:i.map((d,o)=>o+1),y:i==null?void 0:i.map(d=>d.pm_ideal_ns),hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Ideal time: %{y} ns<extra></extra>",name:Om(l,e,r),legendgroup:`group${l}`,marker:{color:vk(l)}})),[t,e,r]),c=Math.max(...t.flatMap(i=>i.map(l=>parseFloat(l.device_time)*1e3))),s=Math.max(...t.flatMap(i=>i.map(l=>parseFloat(l.pm_ideal_ns)))),h={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,iG(t)]},yAxis:{title:{text:"Time (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,Math.max(c,s)]}};return He.jsx(Jx,{title:"Device Time + Ideal Time",chartData:[...n,...a],configuration:h})}const eHt=({chartData:t,secondaryData:e=[],maxCores:r,opCodeOptions:n})=>{const a=No(Hc),c=No(Nm),s=[t,...e||[]].filter(l=>l.length>0),h=mt.useMemo(()=>s.map(l=>l.filter(d=>d.raw_op_code.toLowerCase().includes("matmul"))),[s]),i=mt.useMemo(()=>s.map(l=>l.filter(d=>d.raw_op_code.toLowerCase().includes("conv"))),[s]);return He.jsxs("div",{className:"charts",children:[He.jsx("h2",{children:"Matmul operations"}),h.filter(l=>l.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(Ise,{datasets:h,maxCores:r}),He.jsx(_se,{datasets:h}),He.jsx(wse,{datasets:h,maxCores:r}),He.jsx(Tse,{datasets:h,maxCores:r})]}):He.jsx(xse,{}),He.jsx("h2",{children:"Conv operations"}),i.filter(l=>l.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(Ise,{datasets:i,maxCores:r}),He.jsx(_se,{datasets:i}),He.jsx(wse,{datasets:i,maxCores:r}),He.jsx(Tse,{datasets:i,maxCores:r})]}):He.jsx(xse,{}),He.jsx("h2",{children:"All operations"}),He.jsxs("div",{className:"operation-types-charts",children:[a&&He.jsx(bse,{className:"flex-chart",reportTitle:c?a:"",data:t,opCodes:n}),c==null?void 0:c.map((l,d)=>He.jsx(bse,{className:"flex-chart",reportTitle:a?l:"",data:e[d],opCodes:n},`${l}-${d}`))]})]})},tHt=({folderList:t,reportIndex:e,label:r,subLabel:n})=>{const[a,c]=Sl(Nm),s=No(Hc);return He.jsx(yf,{className:"form-group",label:r,subLabel:n,children:He.jsxs("div",{className:"folder-selection",children:[He.jsx(H$,{items:t.filter(h=>{const i=(a||[]).filter((l,d)=>d!==e);return h.reportName!==s&&!i.includes(h.reportName)}),value:(a==null?void 0:a[e])||null,handleSelect:h=>{const i=[...a||[]];i[e]=h.reportName,c(i)}}),He.jsx(Ma,{variant:LL.OUTLINED,icon:Si.CROSS,onClick:()=>{const h=[...a||[]];h.splice(e,1),c((h==null?void 0:h.length)===0?null:h)},disabled:!(a!=null&&a[e])})]})})},Sse="tab-1";function rHt(){var b,S,_;const[t,e]=Sl(Nm),r=No(Hc),[n,a]=Sl(mhe),{data:c,isLoading:s}=lLe(),{data:h,isLoading:i}=UD(r),{data:l}=uLe(t||null),{data:d}=tde(),o=Xhe(),f=(b=FD())==null?void 0:b.SERVER_MODE;e3();const A=mt.useMemo(()=>Array.from(new Set([...(h==null?void 0:h.map(k=>k.raw_op_code).filter(k=>k!==void 0))||[],...l?l.flatMap(k=>k.map(F=>F.raw_op_code).filter(F=>F!==void 0)):[]])).map((k,F)=>({opCode:k,colour:JUt[F]})),[h,l]),[w,I]=mt.useState(Sse),[m,u]=mt.useState([]),[g,v]=mt.useState([]),[p,C]=mt.useState(A);mt.useEffect(()=>{if(r&&(t!=null&&t.includes(r))){const O=t.filter(k=>k!==r);e(O.length===0?null:O)}},[t,r,e]),mt.useEffect(()=>{t&&o&&a([o[0],o[1]])},[t,a,o]),mt.useEffect(()=>{v((l==null?void 0:l.map(O=>O.filter(k=>p.length?p.map(F=>F.opCode).includes(k.raw_op_code??""):!1)))||[])},[p,l]),mt.useEffect(()=>{u((h==null?void 0:h.filter(O=>p.length?p.map(k=>k.opCode).includes(O.raw_op_code??""):!1))||[])},[p,h]),mt.useEffect(()=>{C(A)},[A]);const y=mt.useMemo(()=>!t&&n&&m.length>0?m.filter(O=>{const k=parseInt(O==null?void 0:O.id,10);return k>=n[0]&&k<=n[1]}):m,[n,m,t]);if(i||s)return He.jsx(ag,{});const x=((S=c==null?void 0:c.deviceMeta)==null?void 0:S.architecture)??ZL.WORMHOLE,T=h?jUt(x,h):0,P=t&&(t==null?void 0:t.length)>0?[...t,null]:[null];return He.jsxs("div",{className:"performance data-padding",children:[He.jsx(vA,{title:"Performance"}),He.jsx("h1",{className:"page-title",children:"Performance analysis"}),!f&&(d?He.jsx("div",{className:"comparison-selectors",children:d&&((_=P.slice(0,1))==null?void 0:_.map((O,k)=>He.jsx(tHt,{folderList:d,reportIndex:k,label:k===0?He.jsx("h3",{className:"label",children:"Compare"}):null,subLabel:k===0?"Select from performance reports to compare":""},`${k}-comparison-report-selector`)))}):He.jsx(ag,{})),He.jsxs(zV,{id:"performance-tabs",selectedTabId:w,onChange:I,renderActiveTabPanelOnly:!0,size:tV.LARGE,children:[He.jsx(QC,{id:Sse,title:"Table",icon:Si.TH,panel:He.jsx(UUt,{data:y,comparisonData:g})}),He.jsx(QC,{id:"tab-2",title:"Charts",icon:Si.TIMELINE_AREA_CHART,panel:He.jsxs("div",{className:"chart-tab",children:[He.jsxs("p",{children:[He.jsx("strong",{children:"Arch:"})," ",x]}),He.jsxs("p",{children:[He.jsx("strong",{children:"Cores:"})," ",T]}),h?He.jsxs(He.Fragment,{children:[He.jsxs("div",{className:"charts-container",children:[He.jsx(QUt,{opCodeOptions:A,selectedOpCodes:p,updateOpCodes:C}),He.jsx(XUt,{filteredPerfData:y,comparisonData:g,maxCores:T,selectedOpCodes:p})]}),He.jsxs("div",{className:"charts-container non-filterable-charts",children:[He.jsx("span",{}),He.jsx("div",{children:He.jsx(eHt,{chartData:y,secondaryData:l||[],maxCores:T,opCodeOptions:A})})]})]}):null]})})]})]})}const nHt={[ko.IDLE]:Si.DOT,[ko.PROGRESS]:Si.DOT,[ko.FAILED]:Si.CROSS,[ko.OK]:Si.TICK},iHt={[ko.IDLE]:Xa.NONE,[ko.PROGRESS]:Xa.WARNING,[ko.FAILED]:Xa.DANGER,[ko.OK]:Xa.SUCCESS},aHt=()=>{const[t,e]=mt.useState(null),{uploadNpeFile:r}=rde(),[n,a]=Sl(ED),[c,s]=mt.useState(ko.IDLE),h=async i=>{var o,f,A,w;if(e("Uploading..."),s(ko.PROGRESS),!i.target.files)return;const l=(o=i.target.files)==null?void 0:o[0],d=await r(i.target.files);if(d.status!==200)s(ko.FAILED),e((f=d==null?void 0:d.data)==null?void 0:f.message);else if(((A=d==null?void 0:d.data)==null?void 0:A.status)!==ko.OK)s(ko.FAILED),e((w=d==null?void 0:d.data)==null?void 0:w.message);else{const I=l.name;a(I),A1("Active NPE",I),s(ko.OK),e(`${I} uploaded successfully`)}};return He.jsxs("div",{className:"npe-file-loader",children:[He.jsx(Ffe,{text:n??"Choose file...",onInputChange:h}),He.jsx("div",{className:`verify-connection-item status-${ko[c]}`,children:c?He.jsxs(He.Fragment,{children:[He.jsx(_s,{className:"connection-status-icon",icon:nHt[c],size:20,intent:iHt[c]}),He.jsx("span",{className:"connection-status-text",children:t})]}):null})]})},G_={version:null,arch:{units:"",label:"Architecture",description:"Architecture used (e.g. wormhole_b0, blackhole)"},congestion_model_name:{units:"",label:"Congestion Model",description:"Congestion model used in simulation to infer congestion (default: fast)"},cycles_per_timestep:{units:"cycles",label:"Device Cycles Per Timestep",description:"How many cycles each simulation timestep/frame spans"},device_name:{units:"",label:"Device Name",description:"Device simulated (e.g. wormhole_b0, blackhole)"},dram_bw_util:{units:"%",label:"DRAM Bandwidth Utilization",description:"% of DRAM RW bandwidth used over entire operation runtime (100% is maximum)"},link_demand:{units:"%",label:"NoC Link Demand",description:"Average demand for NoC links over entire runtime. Multiple packets requesting results in demand exceeding 100% for a given link. Demand be compared with link utilization to understand how localized congestion is."},link_util:{units:"%",label:"NoC Link Utilization",description:"Average utilization of NoC links over entire runtime. Link utilization saturates at 100% for every NoC link, no matter how much demand there is. Useful for understanding NoC toggle rate and overall efficiency of communication."},max_link_demand:{units:"%",label:"Max NoC Link Demand",description:"Maximum observed link demand over all timesteps. See link_demand for more details."},num_cols:{decimals:0,units:"",label:"Cols",description:"Number of core columns on the device."},num_rows:{decimals:0,units:"",label:"Rows",description:"Number of core rows on the device."}};var h0=(t=>(t.NOC0="NOC0",t.NOC1="NOC1",t))(h0||{}),g1=(t=>(t.NOC1_NORTH="NOC1_NORTH",t.NOC0_SOUTH="NOC0_SOUTH",t.NOC0_EAST="NOC0_EAST",t.NOC1_WEST="NOC1_WEST",t.NOC0_IN="NOC0_IN",t.NOC0_OUT="NOC0_OUT",t.NOC1_IN="NOC1_IN",t.NOC1_OUT="NOC1_OUT",t))(g1||{}),os=(t=>(t[t.CHIP_ID=0]="CHIP_ID",t[t.Y=1]="Y",t[t.X=2]="X",t[t.NOC_ID=3]="NOC_ID",t[t.DEMAND=4]="DEMAND",t))(os||{});const cB=({width:t,height:e,data:r,isMulticolor:n=!1,style:a})=>{const s=new Map,h=new Map,i=r.filter((d,o,f)=>o===f.findIndex(A=>A.nocId===d.nocId&&A.color===d.color));i.forEach(d=>{if(!s.has(d.nocId))s.set(d.nocId,1);else{const o=s.get(d.nocId);s.set(d.nocId,o+1)}}),s.forEach((d,o)=>{h.set(o,[5,(d-1)*5])});const l=[];return He.jsx("svg",{width:t,height:e,style:a,"aria-description":i.map(d=>d.nocId).join(","),children:He.jsx("g",{children:i.map((d,o)=>{const f=l.find(w=>w.nocId===d.nocId),A=f?f.counter:0;return f?f.counter+=1:l.push({nocId:d.nocId,counter:1}),He.jsxs(mt.Fragment,{children:[He.jsx("line",{x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,stroke:d.color,strokeWidth:1,...n?{strokeDasharray:h.get(d.nocId).join(",")}:{},...n?{strokeDashoffset:A*h.get(d.nocId)[0]}:{}}),d.arrow&&!n&&He.jsx("polygon",{transform:d.transform,points:`${d.arrow.p1} ${d.arrow.p2} ${d.arrow.p3}`,fill:d.color||"white"}),d.arrow&&n&&He.jsx("polygon",{transform:d.transform,points:`${d.arrow.p1} ${d.arrow.p2} ${d.arrow.p3}`,fill:"#999"})]},`${o}-${d.x1}-${d.y1}-${d.x2}-${d.y2}`)})})})},e5=50,Nf={x:25,y:e5-25},pk=5,ib=-pk,ab=-pk,ob=pk,sb=pk,ZA={x:e5-10,y:10},qd=2,Ese=["#FFFFFF","#FF0000","#0000FF","#FFFF00","#FF00FF","#FF4500","rgb(91,131,19)","#9400D3","#FFD700","#1E90FF","#007500","#FF69B4","#BA55D3","#7FFF00","#B22222"];function*oHt(){let t=0;for(;;)yield Ese[t],t=(t+1)%Ese.length}const sHt=oHt(),Z6=new Map,gbe=t=>(Z6.has(t)||Z6.set(t,sHt.next().value),Z6.get(t)||"#ffffff"),lHt=()=>{Z6.clear()},vbe=(t,e)=>{let r=0,n=0,a=0,c=0,s=9,h=9,i="",l=0,d=0,o={p1:"",p2:"",p3:""};switch(t){case g1.NOC1_NORTH:d=0,r=Nf.x+ob,a=Nf.y+sb,n=Nf.x+ob,c=0,o={p1:`${n-h/2},${c+s+d}`,p2:`${n+h/2},${c+s+d}`,p3:`${n},${c+d}`};break;case g1.NOC1_WEST:d=0,r=Nf.x+ob,n=0,a=Nf.y+sb,c=Nf.y+sb,o={p1:`${n+s+d},${c-h/2}`,p2:`${n+s+d},${c+h/2}`,p3:`${n+d},${c}`};break;case g1.NOC0_SOUTH:d=2,r=Nf.x+ib,n=Nf.x+ib,a=Nf.y+ab,c=e5,o={p1:`${n-h/2},${c-s-d}`,p2:`${n+h/2},${c-s-d}`,p3:`${n},${c-d}`};break;case g1.NOC0_EAST:d=2,r=Nf.x+ib,n=e5,a=Nf.y+ab,c=Nf.y+ab,o={p1:`${n-s-d},${c-h/2}`,p2:`${n-s-d},${c+h/2}`,p3:`${n-d},${c}`};break;case g1.NOC0_OUT:h=7,s=7,d=2,r=Nf.x+ib-qd,n=ZA.x+ib-qd,a=Nf.y+ab-qd,c=ZA.y+ab-qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break;case g1.NOC0_IN:h=7,s=7,d=2,r=ZA.x+ib+qd,n=Nf.x+ib+qd,c=Nf.y+ab+qd,a=ZA.y+ab+qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break;case g1.NOC1_OUT:h=7,s=7,d=0,r=Nf.x+ob-qd,n=ZA.x+ob-qd,a=Nf.y+sb-qd,c=ZA.y+sb-qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break;case g1.NOC1_IN:h=7,s=7,d=0,r=ZA.x+ob+qd,n=Nf.x+ob+qd,c=Nf.y+sb+qd,a=ZA.y+sb+qd,o={p1:`${n-h/2},${c+s-d}`,p2:`${n+h/2},${c+s-d}`,p3:`${n},${c-d}`},l=Math.atan2(c-a,n-r)*180/Math.PI+90,i=`rotate(${l} ${n} ${c})`;break}return{x2:n,y2:c,x1:r,y1:a,arrow:o,transform:i,color:e,nocId:t}},lC=(t,e=0,r=!1)=>{if(t===-1)return"rgb(100, 100, 100)";const n=150,c=(Math.min(t,n)-e)/(n-e),s=Math.round(c*255);return r?`rgb(${s},${s},${255-s})`:`rgb(${s}, ${255-s}, 0)`},Mse=t=>t.map(e=>vbe(e.nocId,gbe(e.transfer))),uHt=({timestepList:t,canvasWidth:e,nocType:r=null})=>{const n=mt.useRef(null),a=30,[c,s]=mt.useState(null),h=mt.useMemo(()=>({worst:t.map(d=>{if(r){const A=Math.max(-1,...d.link_demand.filter(I=>I[os.NOC_ID].indexOf(r)===0).map(I=>I[os.DEMAND])),w=lC(A);return{value:A,color:w}}const o=Math.max(-1,...d.link_demand.map(A=>A[os.DEMAND])),f=lC(o);return{value:o,color:f}}),utilization:t.map(d=>{if(r){const o=d.noc[r];if(o)return{value:o.avg_link_util,color:lC(o.avg_link_util)}}return{value:d.avg_link_util,color:lC(d.avg_link_util)}}),demand:t.map(d=>{if(r){const f=d.noc[r];if(f)return{value:f.avg_link_demand,color:lC(f.avg_link_demand)}}const o=lC(d.avg_link_demand);return{value:d.avg_link_demand,color:o}})}),[r,t]);mt.useEffect(()=>{const d=n.current,o=d==null?void 0:d.getContext("2d");if(!d||!o)return;o.clearRect(0,0,d.width,d.height);const f=d.width/h.worst.length;h.worst.forEach(({color:A},w)=>{o.fillStyle=A,o.fillRect(w*f,0,f,d.height/3)}),h.utilization.forEach(({color:A},w)=>{o.fillStyle=A,o.fillRect(w*f,d.height/3,f,d.height/3*2)}),h.demand.forEach(({color:A},w)=>{o.fillStyle=A,o.fillRect(w*f,d.height/3*2,f,d.height)})},[h,e,a]);const i=d=>{const o=n.current;if(o){const f=o.getBoundingClientRect(),A=d.clientX-f.left,w=f.width/h.worst.length,I=Math.floor(A/w);I>-1?s({x:A,y:0,text:He.jsxs("div",{children:[r!==void 0&&He.jsxs("div",{children:["Selected ",r]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:h.worst[I].color}})," ","Max Demand:"," ",h.worst[I].value>-1?`${h.worst[I].value.toFixed(3)} %`:"N/A"]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:h.utilization[I].color}}),` Avg Utilization: ${h.utilization[I].value.toFixed(3)} %`]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:h.demand[I].color}}),` Avg Demand: ${h.demand[I].value.toFixed(3)} %`]})]})}):(n.current&&(n.current.style.cursor="default"),s(null))}},l=()=>{s(null)};return He.jsxs(He.Fragment,{children:[c&&He.jsx(ps,{content:c.text,position:Js.TOP,hoverOpenDelay:0,hoverCloseDelay:0,isOpen:!0,usePortal:!0,minimal:!0,modifiers:{offset:{enabled:!0,options:{offset:[c.x,a*1.5]}}},children:He.jsx("div",{style:{position:"absolute",top:0,left:`${c.x}px`,width:"0",height:"0",backgroundColor:"red",zIndex:100}})}),He.jsx("canvas",{style:{width:"100%",height:`${a}px`},ref:n,width:e,height:a,onMouseMove:i,onMouseLeave:l})]})},cHt=({groupedTransfersByNoCID:t,selectedNode:e,showActiveTransfers:r,highlightedTransfer:n,setHighlightedTransfer:a,congestionData:c,nocType:s})=>He.jsx("div",{className:"side-data",children:Object.keys(t).length!==0&&He.jsxs(He.Fragment,{children:[He.jsxs("h3",{children:["Active transfers through ",e==null?void 0:e.coords.join("-"),He.jsx(Ma,{variant:"minimal",icon:Si.CROSS,onClick:()=>r(null)})]}),Object.entries(t).map(([h,i])=>{const l=c.find(o=>o[os.NOC_ID]===h),d=l?l[os.DEMAND]:0;return He.jsxs("div",{className:"local-transfer-ctn",children:[He.jsxs("h4",{children:["NOC ID: ",h,He.jsx("span",{className:"color-square",style:{backgroundColor:lC(d)}}),d.toFixed(2)]}),i.map(o=>He.jsxs("div",{className:"local-transfer",style:{opacity:n===null||n===o?1:.25},onMouseOver:()=>a(o),onMouseOut:()=>a(null),children:[He.jsx("div",{className:"color-square",style:{backgroundColor:gbe(o.id)}}),o.id,He.jsxs("div",{children:[He.jsx("span",{className:"transfer-src",children:o.src.join("-")})," ",He.jsx(_s,{size:12,icon:Si.ArrowRight})," ",He.jsx("span",{className:"transfer-dst",children:o.dst.length===1?o.dst[0].join("-"):`${o.dst[0].join("-")} - ${o.dst[o.dst.length-1].join("-")}`})]}),He.jsxs("div",{children:[hh(o.total_bytes),"B"]}),He.jsx("div",{children:o.noc_event_type}),He.jsx("div",{children:He.jsxs("div",{className:"route",children:[o.route[0].injection_rate.toFixed(2)," b/cycle"]})})]},o.id))]},h)})]})}),fHt=({info:t,numTransfers:e})=>{const r=c=>G_[c]!==void 0&&G_[c]!==null,n=(c,s)=>{if(!G_[c])return null;const i=G_[c],l=i.units,d=i.decimals!==void 0?i.decimals:2;return`${typeof s=="number"?Number(s).toFixed(d):s} ${l}`},a=c=>{const s=G_[c];if(!s)return null;const{label:h,description:i}=s;return He.jsx(ps,{content:i,children:h?`${h}: `:c})};return He.jsx("div",{className:"metadata",children:He.jsxs(VD,{label:He.jsx("h3",{className:"title",children:"Run summary"}),isOpen:!0,children:[He.jsx("div",{children:t&&Object.keys(t).map(c=>r(c)&&t[c]!==void 0?He.jsxs("div",{children:[He.jsxs("span",{children:[a(c),": "]}),He.jsx("span",{children:n(c,t[c])})]},c):null)}),He.jsx("hr",{}),He.jsxs("div",{children:[He.jsx("span",{children:"Active transfers:"}),He.jsx("span",{children:e})]})]})})},hHt=({id:t,width:e,height:r,cores:n,dram:a,eth:c,pcie:s,showActiveTransfers:h,isAnnotatingCores:i,TENSIX_SIZE:l})=>{const d=o=>{const[f,A]=o;return n!=null&&n.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-c",children:"T"}):a!=null&&a.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-d",children:"d"}):c!=null&&c.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-e",children:"e"}):s!=null&&s.some(w=>w[0]===f&&w[1]===A)?He.jsx("div",{className:"node-type-label node-type-p",children:"p"}):He.jsx("div",{className:"node-type-label"})};return He.jsxs("div",{className:"tensix-grid empty",style:{display:"grid",gridTemplateColumns:`repeat(${e||0}, ${l}px)`,gridTemplateRows:`repeat(${r||0}, ${l}px)`},children:[He.jsx("div",{className:"chip-id",children:t}),Array.from({length:e}).map((o,f)=>Array.from({length:r}).map((A,w)=>He.jsx("div",{className:"tensix empty-tensix",onClick:()=>h(null),style:{gridColumn:f+1,gridRow:w+1,width:`${l}px`,height:`${l}px`},children:i?d([w,f]):""},`${f}-${w}`)))]})},dHt=({transfer:t,clusterChip:e,index:r,getOriginOpacity:n})=>He.jsxs(He.Fragment,{children:[t.src&&e.id===t.src[os.CHIP_ID]&&He.jsx("div",{className:"tensix src-dst src",style:{gridColumn:t.src[os.X]+1,gridRow:t.src[os.Y]+1,opacity:n(t)}},`${t.id}-src-${r}`),t.dst.map(a=>{var s;const c=((s=t.src)==null?void 0:s.toString())===a.toString()?"both":"dst";return e.id===a[os.CHIP_ID]?He.jsx("div",{className:Ti("tensix src-dst",c),style:{gridColumn:a[os.X]+1,gridRow:a[os.Y]+1,opacity:n(t)}},`${t.id}-dst-${r}-${a[os.Y]}-${a[os.X]}`):null})]}),gHt=25,Pse=25,v1=e5,Yw=v1,Rse=1,Lse=2,vHt=({npeData:t})=>{var me,pe;const[e,r]=mt.useState(null),[n,a]=mt.useState(0),c=t.timestep_data[n],s=t.noc_transfers.filter(oe=>c==null?void 0:c.active_transfers.includes(oe.id)),[h,i]=mt.useState(null),[l,d]=mt.useState([]),[o,f]=mt.useState(null),[A,w]=mt.useState(0);let I=0;const[m,u]=mt.useState(.75),g=Object.entries(t.chips).map(([oe,ne])=>(I=Math.max(I,ne[Fg.X]),{id:parseInt(oe,10),coords:ne})),[v,p]=mt.useState(!1),[C,y]=mt.useState(!0),[x,T]=mt.useState(null),P=oe=>{T(x===null?oe===h0.NOC0?h0.NOC1:h0.NOC0:x!==oe?null:oe===h0.NOC0?h0.NOC1:h0.NOC0)},[b,S]=mt.useState(window.innerWidth);mt.useEffect(()=>{const oe=()=>S(window.innerWidth);return window.addEventListener("resize",oe),()=>window.removeEventListener("resize",oe)},[]);const{architecture:_,cores:O,dram:k,eth:F,pcie:N}=fLe(t.common_info.arch),R=((me=_.grid)==null?void 0:me.x_size)||10,z=((pe=_.grid)==null?void 0:pe.y_size)||12;mt.useEffect(()=>{lHt(),v&&re()},[n,v]),mt.useEffect(()=>{L(),a(0),f(null),d([]),r(null)},[t]);const E=mt.useMemo(()=>{const oe=new Map;return l.forEach(ne=>{ne.route.forEach(J=>{J.links.forEach(ue=>{const[he,le,ee]=ue,ge=oe.get(he)||[];ge[le]=ge[le]||[],ge[le][ee]=ge[le][ee]||[],ge[le][ee].push({transfer:ne.id,nocId:ue[os.NOC_ID]}),oe.set(he,ge)})})}),oe},[l]),M=mt.useMemo(()=>{if(!(o!=null&&o.coords))return{};const[oe,ne,J]=o.coords,ue={};return l.forEach(he=>{he.route.forEach(le=>{le.links.forEach(ee=>{const[ge,de,Ae]=ee;if(ne===de&&J===Ae&&oe===ge){const be=ee[os.NOC_ID];ue[be]||(ue[be]=[]),ue[be].push(he)}})})}),ue},[l,o]),D=(oe=Rse)=>{w(oe),clearInterval(h);const ne=t.timestep_data.length,J=setInterval(()=>{a(ue=>ue<ne-1?ue+1:0)},100/oe);i(J)},L=()=>(w(0),clearInterval(h)),j=()=>{D()},G=()=>{D(Lse)},W=()=>{L()},X=()=>{L();const oe=t.timestep_data.length;f(null),d([]),a(ne=>ne>0?ne-1:oe-1)},Y=()=>{L(),f(null),d([]);const oe=t.timestep_data.length;a(ne=>ne<oe-1?ne+1:0)},K=oe=>{L(),a(oe),f(null),d([])},V=(oe,ne)=>{if(Q(),oe===null){d([]),f(null);return}if((o==null?void 0:o.index)===ne){f(null),d([]);return}ne!==void 0&&f({index:ne,coords:[oe[os.CHIP_ID],oe[os.Y],oe[os.X]]}),W();const J=t.timestep_data[n].active_transfers.map(ue=>{var ee;const he=t.noc_transfers.find(ge=>ge.id===ue),le=(ee=he==null?void 0:he.route)==null?void 0:ee.map(ge=>ge.links.some(de=>de[os.Y]===oe[os.Y]&&de[os.X]===oe[os.X]&&(x===null||de[os.NOC_ID].indexOf(x)===0))?ge:null).filter(ge=>ge!==null);if(le&&le.length>0)return he}).filter(ue=>ue!==void 0);d(J)},Q=()=>{p(!1),d([])},re=()=>{p(!0),f(null);const oe=t.timestep_data[n].active_transfers.map(ne=>t.noc_transfers.find(J=>J.id===ne)).filter(ne=>ne!==void 0);d(oe)},se=oe=>{if(v)return 0;if(e!==null&&e.id===oe.id)return 1;if(e!==null)return .15;if(l.length===0)return 0;const ne=l.some(J=>J.id===oe.id);return l.length!==0&&!ne?.15:.5},ce=b-b/t.timestep_data.length-Pse;return He.jsxs("div",{className:"npe",children:[He.jsx(fHt,{info:t.common_info,numTransfers:s.length}),He.jsxs("div",{className:"header",children:[He.jsxs(N0,{className:"npe-controls",children:[He.jsx(Ma,{icon:Si.StepBackward,onClick:X}),He.jsx(Ma,{icon:Si.Play,intent:A===Rse?Xa.PRIMARY:Xa.NONE,onClick:j}),He.jsx(Ma,{icon:Si.FastForward,onClick:G,intent:A===Lse?Xa.PRIMARY:Xa.NONE}),He.jsx(Ma,{icon:Si.STOP,onClick:W}),He.jsx(Ma,{icon:Si.StepForward,onClick:Y}),"|",He.jsx(Bc,{label:"Show all active transfers",checked:v,onChange:()=>v?Q():re()}),He.jsx(Bc,{label:"Annotate cores",checked:C,onChange:()=>y(!C)}),He.jsx(Bc,{label:"NOC0",checked:x===h0.NOC0||x===null,onChange:()=>P(h0.NOC0)}),He.jsx(Bc,{label:"NOC1",checked:x===h0.NOC1||x===null,onChange:()=>P(h0.NOC1)}),"|",He.jsxs("label",{children:["Zoom",He.jsx(w$,{"aria-label":"zoom",min:.1,max:2,stepSize:.1,labelStepSize:1,value:m,onChange:oe=>u(oe),labelRenderer:oe=>`${oe.toFixed(1)}`})]})]}),He.jsxs("div",{style:{position:"relative",width:`${ce}px`},children:[He.jsx(w$,{min:0,max:t.timestep_data.length-1,stepSize:1,labelStepSize:t.timestep_data.length>gHt?t.timestep_data.length/20:1,value:n,onChange:oe=>K(oe)}),He.jsx("div",{className:"bp5-slider-progress duplicate",style:{width:`${b-Pse}px`}})]}),He.jsx(uHt,{timestepList:t.timestep_data,canvasWidth:b,nocType:x})]}),He.jsxs("div",{className:"split-grid",children:[He.jsx("div",{className:Ti("chip-cluster-wrap",{"details-open":o!==null}),style:{gridTemplateColumns:`repeat(${I||0}, ${(v1+1)*R}px)`,zoom:m},children:g.map(oe=>{var ne;return He.jsxs("div",{className:"chip",style:{gridColumn:oe.coords[Fg.X]+1,gridRow:oe.coords[Fg.Y]+1},children:[He.jsx(hHt,{id:oe.id,width:R,height:z,cores:O,dram:k,eth:F,pcie:N,showActiveTransfers:V,isAnnotatingCores:C,TENSIX_SIZE:v1}),He.jsxs("div",{className:"tensix-grid congestion",style:{display:"grid",gridTemplateColumns:`repeat(${R}, ${v1}px)`,gridTemplateRows:`repeat(${z}, ${v1}px)`},children:[s.map((J,ue)=>He.jsx(dHt,{transfer:J,clusterChip:oe,index:ue,getOriginOpacity:se},`${J.id}-${ue}`)),c==null?void 0:c.link_demand.map((J,ue)=>J[os.CHIP_ID]===oe.id&&(x===null||J[os.NOC_ID].indexOf(x)===0)?He.jsxs("button",{type:"button",className:`tensix ${J[os.Y]}-${J[os.X]}`,style:{position:"relative",gridColumn:J[os.X]+1,gridRow:J[os.Y]+1},onClick:()=>V(J,ue),children:[He.jsx(cB,{style:{opacity:e!==null||l.length!==0?.15:1},width:Yw,height:Yw,data:[vbe(J[os.NOC_ID],lC(J[os.DEMAND]))],isMulticolor:!1}),He.jsxs("div",{style:{fontSize:"9px",position:"absolute",top:0},children:[J[os.Y],"-",J[os.X]]})]},`${ue}-${J[os.Y]}-${J[os.X]}-${J[os.NOC_ID]}`):null)]}),He.jsx("div",{className:"tensix-grid transfers",style:{gridTemplateColumns:`repeat(${R}, ${v1}px)`,gridTemplateRows:`repeat(${z}, ${v1}px)`},children:(ne=E.get(oe.id))==null?void 0:ne.map((J,ue)=>He.jsx(He.Fragment,{children:J.map((he,le)=>He.jsx("div",{className:(o==null?void 0:o.coords[os.Y])===ue&&(o==null?void 0:o.coords[os.X])===le?"selected tensix no-click":"tensix no-click",style:{gridColumn:le+1,gridRow:ue+1},children:He.jsx("div",{className:"transfer-render-ctn",children:He.jsx(cB,{style:{...e!==null?{opacity:.25}:{opacity:1}},width:Yw,height:Yw,data:Mse(he),isMulticolor:!0})})},`selected-transfer-${ue}-${le}`))},`device-${oe.id}-row-${ue}`))}),e!==null&&He.jsx("div",{className:"tensix-grid transfer-single",style:{gridTemplateColumns:`repeat(${R}, ${v1}px)`,gridTemplateRows:`repeat(${z}, ${v1}px)`},children:e==null?void 0:e.route.map(J=>J.links.map(ue=>ue[os.CHIP_ID]===oe.id?He.jsx("div",{className:"tensix",style:{position:"relative",gridColumn:ue[os.X]+1,gridRow:ue[os.Y]+1},children:He.jsx("div",{className:"transfer-render-ctn",children:He.jsx(cB,{width:Yw,height:Yw,data:Mse([{transfer:e.id,nocId:ue[os.NOC_ID]}]),isMulticolor:!1})})},`${ue[os.Y]}-${ue[os.X]}-${ue[os.NOC_ID]}`):null))})]})})}),He.jsx(cHt,{groupedTransfersByNoCID:M,selectedNode:o,congestionData:c==null?void 0:c.link_demand.filter(oe=>oe[os.Y]===(o==null?void 0:o.coords[os.Y])&&oe[os.X]===(o==null?void 0:o.coords[os.X])),showActiveTransfers:V,highlightedTransfer:e,setHighlightedTransfer:r,nocType:x})]})]})},NH=t=>{if(!t)return null;const e=/^(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?$/,r=t.match(e);if(!r)return null;const[,n,a,c,s]=r;return{major:parseInt(n,10),minor:parseInt(a,10),patch:parseInt(c,10),...s?{prerelease:s}:{}}},pbe="1.0.0",Ose=He.jsx("a",{target:"_blank",href:"https://github.com/tenstorrent/tt-npe",rel:"noreferrer",children:"tt-npe"}),pHt=()=>{const t=No(ED),{data:e,isLoading:r}=eLe(t);return He.jsxs(He.Fragment,{children:[He.jsx(vA,{title:"NPE"}),He.jsx("h1",{className:"page-title",children:"NOC performance estimator"}),He.jsx(aHt,{}),r?He.jsx(ag,{}):e?mHt(e)?He.jsx(vHt,{npeData:e}):He.jsxs(He.Fragment,{children:[He.jsxs("p",{children:["Invalid NPE data or version. Current supported version is ",pbe," got ",e.common_info.version||"null",";"]}),He.jsxs("p",{children:["Use ",Ose," to generate new NPE dataset",Dse(e.common_info.version)?He.jsxs(He.Fragment,{children:[" ","or install an older version of the visualizer"," ",He.jsxs("pre",{children:["pip install ttnn-visualizer==",Dse(e.common_info.version)]})]}):null]})]}):He.jsxs(He.Fragment,{children:[He.jsx("p",{children:"Please upload a NPE file for analysis."}),He.jsxs("p",{children:["See ",Ose," for details on how to generate NPE files."]})]})]})},mHt=t=>{if(!["common_info","noc_transfers","timestep_data"].every(c=>c in t))return!1;const n=NH(t.common_info.version);if(!n)return!1;const a=NH(pbe);return(n==null?void 0:n.major)===(a==null?void 0:a.major)},Dse=t=>{switch(NH(t)){case null:case void 0:return"0.32.3";default:return""}},mbe=[{index:!0,element:He.jsx(lOe,{})},{path:Xo.OPERATIONS,element:He.jsx(kOe,{})},{path:`${Xo.OPERATIONS}/:operationId`,element:He.jsx(Irt,{})},{path:Xo.TENSORS,element:He.jsx(Srt,{})},{path:Xo.BUFFERS,element:He.jsx(fat,{})},{path:Xo.STYLEGUIDE,element:He.jsx(gat,{})},{path:`${Xo.GRAPHTREE}/:operationId?`,element:He.jsx(kUt,{})},{path:Xo.PERFORMANCE,element:He.jsx(rHt,{})},{path:Xo.NPE,element:He.jsx(pHt,{})},{path:Xo.CLUSTER,element:null}],yHt=d5({enter:"Toastify--animate Toastify__bounce-enter",exit:" no-toast-animation Toastify__bounce-exit",appendPosition:!0,collapseDuration:0,collapse:!0});function AHt(){const t="0.38.3",e=Tm(km),r=Tm(Hc),n=Tm(ED),{data:a}=qV(),c=H0(),s=c.state;return mt.useEffect(()=>{var h,i,l;a!=null&&a.active_report&&(e(((h=a.active_report)==null?void 0:h.profiler_name)??null),r(((i=a.active_report)==null?void 0:i.performance_name)??null),n(((l=a.active_report)==null?void 0:l.npe_name)??null))},[a,e,r,n]),He.jsxs("div",{className:oT,children:[He.jsxs(vA,{defaultTitle:"TT-NN Visualizer",titleTemplate:"%s | TT-NN Visualizer",children:[He.jsx("meta",{charSet:"utf-8"}),He.jsx("script",{src:"/api/config.js"})]}),He.jsx("header",{className:"app-header",children:He.jsxs("nav",{className:"nav-container",children:[He.jsxs("a",{href:Xo.HOME,className:"title",children:[He.jsxs("h1",{children:[He.jsx("img",{width:250,alt:"tenstorrent",src:"https://docs.tenstorrent.com/tt-tm-assets/Logo/Standard%20Lockup/svg/tt_logo_color-orange-whitetext.svg"}),He.jsx("span",{className:"visualizer-title",children:"TT-NN Visualizer"})]}),He.jsxs("sup",{className:"version",children:["v",t]})]}),He.jsx(pLe,{})]})}),He.jsxs("main",{children:[He.jsx(PLe,{routes:mbe}),c.pathname===Xo.CLUSTER&&(s==null?void 0:s.background)&&He.jsx(ELe,{}),He.jsx(bPe,{position:"top-right",autoClose:!1,newestOnTop:!1,closeOnClick:!0,closeButton:!1,theme:"light",transition:yHt})]}),He.jsx(bLe,{})]})}const Hy=Object.create(null);Hy.open="0";Hy.close="1";Hy.ping="2";Hy.pong="3";Hy.message="4";Hy.upgrade="5";Hy.noop="6";const Y6=Object.create(null);Object.keys(Hy).forEach(t=>{Y6[Hy[t]]=t});const FH={type:"error",data:"parser error"},ybe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Abe=typeof ArrayBuffer=="function",Cbe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,kZ=({type:t,data:e},r,n)=>ybe&&e instanceof Blob?r?n(e):kse(e,n):Abe&&(e instanceof ArrayBuffer||Cbe(e))?r?n(e):kse(new Blob([e]),n):n(Hy[t]+(e||"")),kse=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Nse(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let fB;function CHt(t,e){if(ybe&&t.data instanceof Blob)return t.data.arrayBuffer().then(Nse).then(e);if(Abe&&(t.data instanceof ArrayBuffer||Cbe(t.data)))return e(Nse(t.data));kZ(t,!1,r=>{fB||(fB=new TextEncoder),e(fB.encode(r))})}const Fse="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dS=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Fse.length;t++)dS[Fse.charCodeAt(t)]=t;const IHt=t=>{let e=t.length*.75,r=t.length,n,a=0,c,s,h,i;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const l=new ArrayBuffer(e),d=new Uint8Array(l);for(n=0;n<r;n+=4)c=dS[t.charCodeAt(n)],s=dS[t.charCodeAt(n+1)],h=dS[t.charCodeAt(n+2)],i=dS[t.charCodeAt(n+3)],d[a++]=c<<2|s>>4,d[a++]=(s&15)<<4|h>>2,d[a++]=(h&3)<<6|i&63;return l},bHt=typeof ArrayBuffer=="function",NZ=(t,e)=>{if(typeof t!="string")return{type:"message",data:Ibe(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:xHt(t.substring(1),e)}:Y6[r]?t.length>1?{type:Y6[r],data:t.substring(1)}:{type:Y6[r]}:FH},xHt=(t,e)=>{if(bHt){const r=IHt(t);return Ibe(r,e)}else return{base64:!0,data:t}},Ibe=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},bbe="",wHt=(t,e)=>{const r=t.length,n=new Array(r);let a=0;t.forEach((c,s)=>{kZ(c,!1,h=>{n[s]=h,++a===r&&e(n.join(bbe))})})},THt=(t,e)=>{const r=t.split(bbe),n=[];for(let a=0;a<r.length;a++){const c=NZ(r[a],e);if(n.push(c),c.type==="error")break}return n};function _Ht(){return new TransformStream({transform(t,e){CHt(t,r=>{const n=r.length;let a;if(n<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,n);else if(n<65536){a=new Uint8Array(3);const c=new DataView(a.buffer);c.setUint8(0,126),c.setUint16(1,n)}else{a=new Uint8Array(9);const c=new DataView(a.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(r)})}})}let hB;function HR(t){return t.reduce((e,r)=>e+r.length,0)}function jR(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let a=0;a<e;a++)r[a]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function SHt(t,e){hB||(hB=new TextDecoder);const r=[];let n=0,a=-1,c=!1;return new TransformStream({transform(s,h){for(r.push(s);;){if(n===0){if(HR(r)<1)break;const i=jR(r,1);c=(i[0]&128)===128,a=i[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(HR(r)<2)break;const i=jR(r,2);a=new DataView(i.buffer,i.byteOffset,i.length).getUint16(0),n=3}else if(n===2){if(HR(r)<8)break;const i=jR(r,8),l=new DataView(i.buffer,i.byteOffset,i.length),d=l.getUint32(0);if(d>Math.pow(2,21)-1){h.enqueue(FH);break}a=d*Math.pow(2,32)+l.getUint32(4),n=3}else{if(HR(r)<a)break;const i=jR(r,a);h.enqueue(NZ(c?i:hB.decode(i),e)),n=0}if(a===0||a>t){h.enqueue(FH);break}}}})}const xbe=4;function $f(t){if(t)return EHt(t)}function EHt(t){for(var e in $f.prototype)t[e]=$f.prototype[e];return t}$f.prototype.on=$f.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};$f.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};$f.prototype.off=$f.prototype.removeListener=$f.prototype.removeAllListeners=$f.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,a=0;a<r.length;a++)if(n=r[a],n===e||n.fn===e){r.splice(a,1);break}return r.length===0&&delete this._callbacks["$"+t],this};$f.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,a=r.length;n<a;++n)r[n].apply(this,e)}return this};$f.prototype.emitReserved=$f.prototype.emit;$f.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};$f.prototype.hasListeners=function(t){return!!this.listeners(t).length};const mk=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),ym=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),MHt="arraybuffer";function wbe(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const PHt=ym.setTimeout,RHt=ym.clearTimeout;function yk(t,e){e.useNativeTimers?(t.setTimeoutFn=PHt.bind(ym),t.clearTimeoutFn=RHt.bind(ym)):(t.setTimeoutFn=ym.setTimeout.bind(ym),t.clearTimeoutFn=ym.clearTimeout.bind(ym))}const LHt=1.33;function OHt(t){return typeof t=="string"?DHt(t):Math.ceil((t.byteLength||t.size)*LHt)}function DHt(t){let e=0,r=0;for(let n=0,a=t.length;n<a;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function Tbe(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kHt(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function NHt(t){let e={},r=t.split("&");for(let n=0,a=r.length;n<a;n++){let c=r[n].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class FHt extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class FZ extends $f{constructor(e){super(),this.writable=!1,yk(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new FHt(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=NZ(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=kHt(e);return r.length?"?"+r:""}}class zHt extends FZ{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};THt(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,wHt(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Tbe()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let _be=!1;try{_be=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const BHt=_be;function $Ht(){}class UHt extends zHt{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(a,c)=>{this.onError("xhr post error",a,c)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}let K2=class X6 extends $f{constructor(e,r,n){super(),this.createRequest=e,yk(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=wbe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var a;n.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=X6.requestsCount++,X6.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$Ht,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete X6.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};K2.requestsCount=0;K2.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zse);else if(typeof addEventListener=="function"){const t="onpagehide"in ym?"pagehide":"unload";addEventListener(t,zse,!1)}}function zse(){for(let t in K2.requests)K2.requests.hasOwnProperty(t)&&K2.requests[t].abort()}const HHt=function(){const t=Sbe({xdomain:!1});return t&&t.responseType!==null}();class jHt extends UHt{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=HHt&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K2(Sbe,this.uri(),e)}}function Sbe(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||BHt))return new XMLHttpRequest}catch{}if(!e)try{return new ym[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ebe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VHt extends FZ{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=Ebe?{}:wbe(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;kZ(n,this.supportsBinary,c=>{try{this.doWrite(n,c)}catch{}a&&mk(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Tbe()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const dB=ym.WebSocket||ym.MozWebSocket;class GHt extends VHt{createSocket(e,r,n){return Ebe?new dB(e,r,n):r?new dB(e,r):new dB(e)}doWrite(e,r){this.ws.send(r)}}class WHt extends FZ{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=SHt(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),a=_Ht();a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();const c=()=>{n.read().then(({done:h,value:i})=>{h||(this.onPacket(i),c())}).catch(h=>{})};c();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;this._writer.write(n).then(()=>{a&&mk(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const ZHt={websocket:GHt,webtransport:WHt,polling:jHt},YHt=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,XHt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zH(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let a=YHt.exec(t||""),c={},s=14;for(;s--;)c[XHt[s]]=a[s]||"";return r!=-1&&n!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=KHt(c,c.path),c.queryKey=QHt(c,c.query),c}function KHt(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function QHt(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,c){a&&(r[a]=c)}),r}const BH=typeof addEventListener=="function"&&typeof removeEventListener=="function",K6=[];BH&&addEventListener("offline",()=>{K6.forEach(t=>t())},!1);class GC extends $f{constructor(e,r){if(super(),this.binaryType=MHt,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=zH(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=zH(r.host).host);yk(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const a=n.prototype.name;this.transports.push(a),this._transportsByName[a]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=NHt(this.opts.query)),BH&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},K6.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=xbe,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&GC.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",GC.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const a=this.writeBuffer[n].data;if(a&&(r+=OHt(a)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,mk(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,a){if(typeof r=="function"&&(a=r,r=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const c={type:e,data:r,options:n};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(GC.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),BH&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=K6.indexOf(this._offlineEventListener);n!==-1&&K6.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}GC.protocol=xbe;class JHt extends GC{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;GC.priorWebsocketSuccess=!1;const a=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",o=>{if(!n)if(o.type==="pong"&&o.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;GC.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=r.name,this.emitReserved("upgradeError",f)}}))};function c(){n||(n=!0,d(),r.close(),r=null)}const s=o=>{const f=new Error("probe error: "+o);f.transport=r.name,c(),this.emitReserved("upgradeError",f)};function h(){s("transport closed")}function i(){s("socket closed")}function l(o){r&&o.name!==r.name&&c()}const d=()=>{r.removeListener("open",a),r.removeListener("error",s),r.removeListener("close",h),this.off("close",i),this.off("upgrading",l)};r.once("open",a),r.once("error",s),r.once("close",h),this.once("close",i),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let qHt=class extends JHt{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>ZHt[a]).filter(a=>!!a)),super(e,n)}};function ejt(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=zH(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const c=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port+e,n.href=n.protocol+"://"+c+(r&&r.port===n.port?"":":"+n.port),n}const tjt=typeof ArrayBuffer=="function",rjt=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Mbe=Object.prototype.toString,njt=typeof Blob=="function"||typeof Blob<"u"&&Mbe.call(Blob)==="[object BlobConstructor]",ijt=typeof File=="function"||typeof File<"u"&&Mbe.call(File)==="[object FileConstructor]";function zZ(t){return tjt&&(t instanceof ArrayBuffer||rjt(t))||njt&&t instanceof Blob||ijt&&t instanceof File}function Q6(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Q6(t[r]))return!0;return!1}if(zZ(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Q6(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Q6(t[r]))return!0;return!1}function ajt(t){const e=[],r=t.data,n=t;return n.data=$H(r,e),n.attachments=e.length,{packet:n,buffers:e}}function $H(t,e){if(!t)return t;if(zZ(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=$H(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=$H(t[n],e));return r}return t}function ojt(t,e){return t.data=UH(t.data,e),delete t.attachments,t}function UH(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=UH(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=UH(t[r],e));return t}const sjt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ljt=5;var cl;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(cl||(cl={}));class ujt{constructor(e){this.replacer=e}encode(e){return(e.type===cl.EVENT||e.type===cl.ACK)&&Q6(e)?this.encodeAsBinary({type:e.type===cl.EVENT?cl.BINARY_EVENT:cl.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===cl.BINARY_EVENT||e.type===cl.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=ajt(e),n=this.encodeAsString(r.packet),a=r.buffers;return a.unshift(n),a}}function Bse(t){return Object.prototype.toString.call(t)==="[object Object]"}class BZ extends $f{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===cl.BINARY_EVENT;n||r.type===cl.BINARY_ACK?(r.type=n?cl.EVENT:cl.ACK,this.reconstructor=new cjt(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(zZ(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(cl[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===cl.BINARY_EVENT||n.type===cl.BINARY_ACK){const c=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const s=e.substring(c,r);if(s!=Number(s)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(e.charAt(r+1)==="/"){const c=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(c,r)}else n.nsp="/";const a=e.charAt(r+1);if(a!==""&&Number(a)==a){const c=r+1;for(;++r;){const s=e.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===e.length)break}n.id=Number(e.substring(c,r+1))}if(e.charAt(++r)){const c=this.tryParse(e.substr(r));if(BZ.isPayloadValid(n.type,c))n.data=c;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case cl.CONNECT:return Bse(r);case cl.DISCONNECT:return r===void 0;case cl.CONNECT_ERROR:return typeof r=="string"||Bse(r);case cl.EVENT:case cl.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&sjt.indexOf(r[0])===-1);case cl.ACK:case cl.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class cjt{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=ojt(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fjt=Object.freeze(Object.defineProperty({__proto__:null,Decoder:BZ,Encoder:ujt,get PacketType(){return cl},protocol:ljt},Symbol.toStringTag,{value:"Module"}));function p0(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const hjt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Pbe extends $f{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[p0(e,"open",this.onopen.bind(this)),p0(e,"packet",this.onpacket.bind(this)),p0(e,"error",this.onerror.bind(this)),p0(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,a,c;if(hjt.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const s={type:cl.EVENT,data:r};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const d=this.ids++,o=r.pop();this._registerAckCallback(d,o),s.id=d}const h=(a=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||a===void 0?void 0:a.writable,i=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(i?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,r){var n;const a=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(a===void 0){this.acks[e]=r;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===e&&this.sendBuffer.splice(h,1);r.call(this,new Error("operation has timed out"))},a),s=(...h)=>{this.io.clearTimeoutFn(c),r.apply(this,h)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...r){return new Promise((n,a)=>{const c=(s,h)=>s?a(s):n(h);c.withError=!0,r.push(c),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...c)=>n!==this._queue[0]?void 0:(a!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...c)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:cl.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case cl.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case cl.EVENT:case cl.BINARY_EVENT:this.onevent(e);break;case cl.ACK:case cl.BINARY_ACK:this.onack(e);break;case cl.DISCONNECT:this.ondisconnect();break;case cl.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...a){n||(n=!0,r.packet({type:cl.ACK,id:e,data:a}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:cl.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function N3(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}N3.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+r:t-r}return Math.min(t,this.max)|0};N3.prototype.reset=function(){this.attempts=0};N3.prototype.setMin=function(t){this.ms=t};N3.prototype.setMax=function(t){this.max=t};N3.prototype.setJitter=function(t){this.jitter=t};class HH extends $f{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,yk(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new N3({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const a=r.parser||fjt;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new qHt(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const a=p0(r,"open",function(){n.onopen(),e&&e()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),e?e(h):this.maybeReconnectOnOpen()},s=p0(r,"error",c);if(this._timeout!==!1){const h=this._timeout,i=this.setTimeoutFn(()=>{a(),c(new Error("timeout")),r.close()},h);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}return this.subs.push(a),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(p0(e,"ping",this.onping.bind(this)),p0(e,"data",this.ondata.bind(this)),p0(e,"error",this.onerror.bind(this)),p0(e,"close",this.onclose.bind(this)),p0(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){mk(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Pbe(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const W_={};function J6(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=ejt(t,e.path||"/socket.io"),n=r.source,a=r.id,c=r.path,s=W_[a]&&c in W_[a].nsps,h=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let i;return h?i=new HH(n,e):(W_[a]||(W_[a]=new HH(n,e)),i=W_[a]),r.query&&!e.query&&(e.query=r.queryKey),i.socket(r.path,e)}Object.assign(J6,{Manager:HH,Socket:Pbe,io:J6,connect:J6});const l0=J6(`http://localhost:8000?instanceId=${XV()}`),djt=mt.createContext(null),gjt=({children:t})=>{const[e,r]=Sl(nC),n=XV();return mt.useEffect(()=>(l0.on("connect",()=>{r(a=>({...a,status:Ep.INACTIVE})),console.log(`Socket connected with ID: ${l0.id}`)}),l0.on("disconnect",a=>{console.log(`Socket disconnected: ${a}`)}),l0.on("connect_error",a=>{console.error(`Socket connection error: ${a.message}`)}),l0.on("reconnect",a=>{console.log(`Socket reconnected after ${a} attempts`)}),l0.on("fileTransferProgress",a=>{a.instanceId===n&&r({currentFileName:a.current_file_name,numberOfFiles:a.number_of_files,percentOfCurrent:a.percent_of_current,finishedFiles:a.finished_files,status:a.status})}),()=>{l0.off("connect"),l0.off("disconnect"),l0.off("connect_error"),l0.off("reconnect")}),[n,r]),He.jsx(djt.Provider,{value:l0,children:t})},vjt=STe([{path:Xo.HOME,element:He.jsx(AHt,{}),errorElement:He.jsx(K4e,{}),children:mbe}]);tSe.onlyShowFocusOnTabs();const pjt=new QTe({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});vB.createRoot(document.getElementById("root")).render(He.jsx(r3e,{client:pjt,children:He.jsx(rhe,{children:He.jsx(no.StrictMode,{children:He.jsx(gjt,{children:He.jsx(KEe,{children:He.jsx(yTe,{router:vjt})})})})})}));export{ga as I,d2 as _,g2 as a,UX as b,oEe as p};