ttnn-visualizer 0.37.0__py3-none-any.whl → 0.37.1__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.
- ttnn_visualizer/static/assets/{allPaths-Z03s-OPC.js → allPaths-BaKDx9R3.js} +1 -1
- ttnn_visualizer/static/assets/{allPathsLoader-BnryPsjm.js → allPathsLoader-DVskN3_V.js} +2 -2
- ttnn_visualizer/static/assets/{index-BgzPx-DB.js → index-wX7GhuKE.js} +3 -3
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-Ru7hJnSI.js → splitPathsBySizeLoader-BEIaCBcL.js} +1 -1
- ttnn_visualizer/static/index.html +1 -1
- {ttnn_visualizer-0.37.0.dist-info → ttnn_visualizer-0.37.1.dist-info}/METADATA +1 -1
- {ttnn_visualizer-0.37.0.dist-info → ttnn_visualizer-0.37.1.dist-info}/RECORD +12 -12
- {ttnn_visualizer-0.37.0.dist-info → ttnn_visualizer-0.37.1.dist-info}/LICENSE +0 -0
- {ttnn_visualizer-0.37.0.dist-info → ttnn_visualizer-0.37.1.dist-info}/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.37.0.dist-info → ttnn_visualizer-0.37.1.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.37.0.dist-info → ttnn_visualizer-0.37.1.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.37.0.dist-info → ttnn_visualizer-0.37.1.dist-info}/top_level.txt +0 -0
@@ -69,7 +69,7 @@ Error generating stack: `+u.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 r={}.hasOwnProperty;function e(){for(var u="",o=0;o<arguments.length;o++){var f=arguments[o];f&&(u=a(u,n(f)))}return u}function n(u){if(typeof u=="string"||typeof u=="number")return u;if(typeof u!="object")return"";if(Array.isArray(u))return e.apply(null,u);if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]"))return u.toString();var o="";for(var f in u)r.call(u,f)&&u[f]&&(o=a(o,f));return o}function a(u,o){return o?u?u+" "+o:u+o:u}t.exports?(e.default=e,t.exports=e):window.classNames=e})()})(Kde);var CRe=Kde.exports;const _i=cy(CRe);function DG(t,r){r===void 0&&(r=[]),bt.useEffect(function(){i1("production")||t()},r)}var IRe={defaultTabIndex:void 0,disabledTabIndex:-1};function Qde(t,r,e,n){n===void 0&&(n=IRe);var a=n.defaultTabIndex,u=n.disabledTabIndex,o=r.active,f=r.onClick,i=r.onFocus,s=r.onKeyDown,d=r.onKeyUp,l=r.onBlur,h=r.tabIndex,y=h===void 0?a:h,b=bt.useState(),C=b[0],m=b[1],c=bt.useState(!1),v=c[0],g=c[1],p=bt.useRef(null),I=bt.useCallback(function(E){v&&g(!1),l==null||l(E)},[v,l]),A=bt.useCallback(function(E){JT(E)&&(E.preventDefault(),E.key!==C&&g(!0)),m(E.key),s==null||s(E)},[C,s]),w=bt.useCallback(function(E){var x;JT(E)&&(g(!1),(x=p.current)===null||x===void 0||x.click()),m(void 0),d==null||d(E)},[d,p]),T=t&&(o||v);return[T,{onBlur:I,onClick:t?f:void 0,onFocus:t?i:void 0,onKeyDown:A,onKeyUp:w,ref:pA(p,e),tabIndex:t?y:u}]}function bRe(t){return t.toLowerCase()}var xRe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],wRe=/[^A-Z0-9]+/gi;function Jde(t,r){r===void 0&&(r={});for(var e=r.splitRegexp,n=e===void 0?xRe:e,a=r.stripRegexp,u=a===void 0?wRe:a,o=r.transform,f=o===void 0?bRe:o,i=r.delimiter,s=i===void 0?" ":i,d=_Q(_Q(t,n,"$1\0$2"),u,"\0"),l=0,h=d.length;d.charAt(l)==="\0";)l++;for(;d.charAt(h-1)==="\0";)h--;return d.slice(l,h).split("\0").map(f).join(s)}function _Q(t,r,e){return r instanceof RegExp?t.replace(r,e):r.reduce(function(n,a){return n.replace(a,e)},t)}function TRe(t,r){var e=t.charAt(0),n=t.substr(1).toLowerCase();return r>0&&e>="0"&&e<="9"?"_"+e+n:""+e.toUpperCase()+n}function _Re(t,r){return r===void 0&&(r={}),Jde(t,Kn({delimiter:"",transform:TRe},r))}function SRe(t,r){return r===void 0&&(r={}),Jde(t,Kn({delimiter:"."},r))}function ERe(t,r){return r===void 0&&(r={}),SRe(t,Kn({delimiter:"_"},r))}var Fa;(function(t){t[t.STANDARD=16]="STANDARD",t[t.LARGE=20]="LARGE"})(Fa||(Fa={}));const MRe="modulepreload",RRe=function(t){return"/"+t},SQ={},EQ=function(r,e,n){let a=Promise.resolve();if(e&&e.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),f=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));a=Promise.allSettled(e.map(i=>{if(i=RRe(i),i in SQ)return;SQ[i]=!0;const s=i.endsWith(".css"),d=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${d}`))return;const l=document.createElement("link");if(l.rel=s?"stylesheet":MRe,s||(l.as="script"),l.crossOrigin="",l.href=i,f&&l.setAttribute("nonce",f),document.head.appendChild(l),s)return new Promise((h,y)=>{l.addEventListener("load",h),l.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${i}`)))})}))}function u(o){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=o,window.dispatchEvent(f),!f.defaultPrevented)throw o}return a.then(o=>{for(const f of o||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})};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 qde={},eve={};for(var gF=0,MQ=Object.values(Xt);gF<MQ.length;gF++){var qR=MQ[gF];qde[_Re(qR)]=qR,eve[ERe(qR).toUpperCase()]=qR}var Ti=Kn(Kn({},qde),eve),PRe=new Set(Object.values(Ti));function LRe(t){return typeof NODE_ENV<"u"&&NODE_ENV===t}function ORe(t,r){return Q2(this,void 0,void 0,function(){var e,n,a;return J2(this,function(u){switch(u.label){case 0:return e=LRe("development")&&typeof performance<"u",e&&(n=performance.now(),console.info("Started '".concat(t,"'..."))),[4,r()];case 1:return u.sent(),e&&(a=Math.round(performance.now()-n),console.info("Finished '".concat(t,"' in ").concat(a,"ms"))),[2]}})})}function kRe(t){return Q2(this,void 0,void 0,function(){var r,e;return J2(this,function(n){switch(n.label){case 0:return r=t.loader,e=r===void 0?O2.defaultLoader:r,typeof e!="function"?[3,1]:[2,e];case 1:return e!=="all"?[3,3]:[4,EQ(()=>import("./allPathsLoader-BnryPsjm.js"),[])];case 2:return[2,n.sent().allPathsLoader];case 3:return[4,EQ(()=>import("./splitPathsBySizeLoader-Ru7hJnSI.js"),[])];case 4:return[2,n.sent().splitPathsBySizeLoader]}})})}var WS=function(){function t(){this.defaultLoader="split-by-size",this.loadedIconPaths16=new Map,this.loadedIconPaths20=new Map}return t.setLoaderOptions=function(r){r.loader!==void 0&&(O2.defaultLoader=r.loader)},t.load=function(r,e,n){return Q2(this,void 0,void 0,function(){var a=this;return J2(this,function(u){switch(u.label){case 0:return Array.isArray(r)||(r=[r]),[4,Promise.all(r.map(function(o){return a.loadImpl(o,e,n)}))];case 1:return u.sent(),[2]}})})},t.loadAll=function(r){return Q2(this,void 0,void 0,function(){var e,n=this;return J2(this,function(a){return e=Object.values(Ti),ORe("[Blueprint] loading all icons",function(){return Q2(n,void 0,void 0,function(){return J2(this,function(u){switch(u.label){case 0:return[4,Promise.all([this.load(e,Fa.STANDARD,r),this.load(e,Fa.LARGE,r)])];case 1:return u.sent(),[2]}})})}),[2]})})},t.getPaths=function(r,e){if(this.isValidIconName(r)){var n=e<Fa.LARGE?O2.loadedIconPaths16:O2.loadedIconPaths20;return n.get(r)}},t.loadImpl=function(r,e,n){return n===void 0&&(n={}),Q2(this,void 0,void 0,function(){var a,u,o,f,i;return J2(this,function(s){switch(s.label){case 0:return this.isValidIconName(r)?(a=e<Fa.LARGE?O2.loadedIconPaths16:O2.loadedIconPaths20,a.has(r)?[2]:[4,kRe(n)]):(console.error("[Blueprint] Unknown icon '".concat(r,"'")),[2]);case 1:u=s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),o=e<Fa.LARGE?Fa.STANDARD:Fa.LARGE,[4,u(r,o)];case 3:return f=s.sent(),a.set(r,f),[3,5];case 4:return i=s.sent(),console.error("[Blueprint] Unable to load ".concat(e,"px icon '").concat(r,"'"),i),[3,5];case 5:return[2]}})})},t.isValidIconName=function(r){return PRe.has(r)},t}(),O2=new WS,DRe="bp5",RQ="".concat(DRe,"-icon"),PQ=new Map;function NRe(t){var r,e=(r=PQ.get(t))!==null&&r!==void 0?r:0;return PQ.set(t,e+1),"".concat(t,"-").concat(e)}var Oh=bt.forwardRef(function(t,r){var e=t.children,n=t.className,a=t.color,u=t.htmlTitle,o=t.iconName,f=t.size,i=f===void 0?Fa.STANDARD:f,s=t.svgProps,d=t.tagName,l=d===void 0?"span":d,h=t.title,y=Ms(t,["children","className","color","htmlTitle","iconName","size","svgProps","tagName","title"]),b=i>=Fa.LARGE,C=b?Fa.LARGE:Fa.STANDARD,m="0 0 ".concat(C," ").concat(C),c=NRe("iconTitle"),v=Kn({fill:a,height:i,role:"img",viewBox:m,width:i},s);return l===null?bt.createElement("svg",Kn({"aria-labelledby":h?c:void 0,"data-icon":o,ref:r},v,y,{className:_i(n,s==null?void 0:s.className)}),h&&bt.createElement("title",{id:c},h),e):bt.createElement(l,Kn(Kn({"aria-hidden":h?void 0:!0},y),{className:_i(RQ,"".concat(RQ,"-").concat(o),n),ref:r,title:u}),bt.createElement("svg",Kn({"data-icon":o},v,{className:s==null?void 0:s.className}),h&&bt.createElement("title",null,h),e))});Oh.displayName="Blueprint5.SVGIconContainer";var NG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-down",ref:r},t),bt.createElement("path",{d:e?"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:u}))});NG.defaultProps={size:Fa.STANDARD};NG.displayName="Blueprint5.Icon.ArrowDown";var FG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-left",ref:r},t),bt.createElement("path",{d:e?"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:u}))});FG.defaultProps={size:Fa.STANDARD};FG.displayName="Blueprint5.Icon.ArrowLeft";var zG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-right",ref:r},t),bt.createElement("path",{d:e?"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:u}))});zG.defaultProps={size:Fa.STANDARD};zG.displayName="Blueprint5.Icon.ArrowRight";var BG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-up",ref:r},t),bt.createElement("path",{d:e?"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:u}))});BG.defaultProps={size:Fa.STANDARD};BG.displayName="Blueprint5.Icon.ArrowUp";var $G=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"caret-right",ref:r},t),bt.createElement("path",{d:e?"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:u}))});$G.defaultProps={size:Fa.STANDARD};$G.displayName="Blueprint5.Icon.CaretRight";var cD=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"cross",ref:r},t),bt.createElement("path",{d:e?"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:u}))});cD.defaultProps={size:Fa.STANDARD};cD.displayName="Blueprint5.Icon.Cross";var UG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"drag-handle-vertical",ref:r},t),bt.createElement("path",{d:e?"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:u}))});UG.defaultProps={size:Fa.STANDARD};UG.displayName="Blueprint5.Icon.DragHandleVertical";var xO=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-command",ref:r},t),bt.createElement("path",{d:e?"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:u}))});xO.defaultProps={size:Fa.STANDARD};xO.displayName="Blueprint5.Icon.KeyCommand";var HG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-control",ref:r},t),bt.createElement("path",{d:e?"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:u}))});HG.defaultProps={size:Fa.STANDARD};HG.displayName="Blueprint5.Icon.KeyControl";var jG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-delete",ref:r},t),bt.createElement("path",{d:e?"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:u}))});jG.defaultProps={size:Fa.STANDARD};jG.displayName="Blueprint5.Icon.KeyDelete";var VG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-enter",ref:r},t),bt.createElement("path",{d:e?"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:u}))});VG.defaultProps={size:Fa.STANDARD};VG.displayName="Blueprint5.Icon.KeyEnter";var GG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-option",ref:r},t),bt.createElement("path",{d:e?"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:u}))});GG.defaultProps={size:Fa.STANDARD};GG.displayName="Blueprint5.Icon.KeyOption";var WG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-shift",ref:r},t),bt.createElement("path",{d:e?"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:u}))});WG.defaultProps={size:Fa.STANDARD};WG.displayName="Blueprint5.Icon.KeyShift";var wO=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"more",ref:r},t),bt.createElement("path",{d:e?"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:u}))});wO.defaultProps={size:Fa.STANDARD};wO.displayName="Blueprint5.Icon.More";var ZG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"search",ref:r},t),bt.createElement("path",{d:e?"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:u}))});ZG.defaultProps={size:Fa.STANDARD};ZG.displayName="Blueprint5.Icon.Search";var fD=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"small-cross",ref:r},t),bt.createElement("path",{d:e?"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:u}))});fD.defaultProps={size:Fa.STANDARD};fD.displayName="Blueprint5.Icon.SmallCross";var YG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"small-tick",ref:r},t),bt.createElement("path",{d:e?"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:u}))});YG.defaultProps={size:Fa.STANDARD};YG.displayName="Blueprint5.Icon.SmallTick";var Hs=bt.forwardRef(function(t,r){var e,n,a=t.autoLoad,u=a===void 0?!0:a,o=t.className,f=t.color,i=t.icon,s=t.intent,d=t.tagName,l=d===void 0?"span":d,h=t.svgProps,y=t.title,b=t.htmlTitle,C=Ms(t,["autoLoad","className","color","icon","intent","tagName","svgProps","title","htmlTitle"]),m=(n=(e=t.iconSize)!==null&&e!==void 0?e:t.size)!==null&&n!==void 0?n:Fa.STANDARD,c=bt.useState(function(){return typeof i=="string"?WS.getPaths(i,m):void 0}),v=c[0],g=c[1];if(bt.useEffect(function(){var A=!1;if(typeof i=="string"){var w=WS.getPaths(i,m);w!==void 0?g(w):u?WS.load(i,m).then(function(){A||g(WS.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(){A=!0}},[u,i,m]),i==null||typeof i=="boolean")return null;if(typeof i!="string")return i;if(v==null){var p=m===Fa.STANDARD?p4e:m===Fa.LARGE?m4e:void 0;return bt.createElement(l||"span",Kn(Kn({"aria-hidden":y?void 0:!0},vI(C)),{className:_i(RG,p,y4e(i),Yd(s),o),"data-icon":i,ref:r,title:b}))}else{var I=v.map(function(A,w){return bt.createElement("path",{d:A,key:w,fillRule:"evenodd"})});return bt.createElement(Oh,Kn({children:I,className:_i(Yd(s),o),color:f,htmlTitle:b,iconName:i,ref:r,size:m,svgProps:h,tagName:l,title:y},vI(C)))}});Hs.displayName="".concat(Uo,".Icon");var dx;(function(t){t[t.SMALL=20]="SMALL",t[t.STANDARD=50]="STANDARD",t[t.LARGE=100]="LARGE"})(dx||(dx={}));var vC=45,LQ="M 50,50 m 0,-".concat(vC," a ").concat(vC,",").concat(vC," 0 1 1 0,").concat(vC*2," a ").concat(vC,",").concat(vC," 0 1 1 0,-").concat(vC*2),yS=280,FRe=10,zRe=4,BRe=16,XG=function(t){var r,e=t.className,n=e===void 0?"":e,a=t.intent,u=t.value,o=t.tagName,f=o===void 0?"div":o,i=t.size,s=Ms(t,["className","intent","value","tagName","size"]);DG(function(){var b=i!=null,C=n.indexOf(bO)>=0||n.indexOf(XT)>=0;b&&C&&console.warn(iRe)},[n,i]);var d=$Re(i,n),l=Math.min(BRe,zRe*dx.LARGE/d),h=yS-yS*(u==null?.25:N3(u,0,1)),y=_i(oD,Yd(a),(r={},r[o4e]=u!=null,r),n);return bt.createElement(f,Kn({"aria-label":"loading","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":u===void 0?void 0:u*100,className:y,role:"progressbar"},s),bt.createElement(f,{className:i4e},bt.createElement("svg",{width:d,height:d,strokeWidth:l.toFixed(2),viewBox:URe(l)},bt.createElement("path",{className:s4e,d:LQ}),bt.createElement("path",{className:a4e,d:LQ,pathLength:yS,strokeDasharray:"".concat(yS," ").concat(yS),strokeDashoffset:h}))))};XG.displayName="".concat(Uo,".Spinner");var $Re=function(t,r){return t==null?r.indexOf(bO)>=0?dx.SMALL:r.indexOf(XT)>=0?dx.LARGE:dx.STANDARD:Math.max(FRe,t)},URe=function(t){var r=vC+t/2,e=(50-r).toFixed(2),n=(r*2).toFixed(2);return"".concat(e," ").concat(e," ").concat(n," ").concat(n)},HRe=Wde()?bt.useLayoutEffect:bt.useEffect,hD=bt.forwardRef(function(t,r){var e,n=t.children,a=t.tagName,u=a===void 0?"div":a,o=t.title,f=t.className,i=t.ellipsize,s=i===void 0?!1:i,d=Ms(t,["children","tagName","title","className","ellipsize"]),l=bt.useRef(),h=bt.useMemo(function(){return pA(l,r)},[r]),y=bt.useState(""),b=y[0],C=y[1],m=bt.useState(),c=m[0],v=m[1];return HRe(function(){var g;((g=l.current)===null||g===void 0?void 0:g.textContent)!=null&&(v(s&&l.current.scrollWidth>l.current.clientWidth),C(l.current.textContent))},[l,n,s]),bt.createElement(u,Kn(Kn({},d),{className:_i((e={},e[F5e]=s,e),f),ref:h,title:o??(c?b:void 0)}),n)});hD.displayName="".concat(Uo,".Text");var Ta=bt.forwardRef(function(t,r){var e=tve(t,r);return bt.createElement("button",Kn({type:"button"},vI(t),e),rve(t))});Ta.displayName="".concat(Uo,".Button");var Hx=bt.forwardRef(function(t,r){var e=t.href,n=tve(t,r,{defaultTabIndex:0,disabledTabIndex:-1});return bt.createElement("a",Kn({role:"button"},vI(t),n,{"aria-disabled":n.disabled,href:n.disabled?void 0:e}),rve(t))});Hx.displayName="".concat(Uo,".AnchorButton");function tve(t,r,e){var n,a=t.alignText,u=t.fill,o=t.large,f=t.loading,i=f===void 0?!1:f,s=t.minimal,d=t.outlined,l=t.size,h=l===void 0?"medium":l,y=t.small,b=t.variant,C=b===void 0?"solid":b,m=t.disabled||i,c=Qde(!m,t,r,e),v=c[0],g=c[1],p=_i(sM,(n={},n[Bx]=v,n[MA]=m,n[cp]=u,n[_G]=i,n),sD(a),Yd(t.intent),LA(h,{large:o,small:y}),Gde(C,{minimal:s,outlined:d}),t.className);return Kn(Kn({},g),{className:p,disabled:m})}function rve(t){var r=t.children,e=t.ellipsizeText,n=t.endIcon,a=t.icon,u=t.loading,o=t.rightIcon,f=t.text,i=t.textClassName,s=!f5(f)||!f5(r);return bt.createElement(bt.Fragment,null,u&&bt.createElement(XG,{className:G5e,size:dx.SMALL}),bt.createElement(Hs,{icon:a}),s&&bt.createElement(hD,{className:_i(W5e,i),ellipsize:e,tagName:"span"},f,r),bt.createElement(Hs,{icon:n??o}))}function l0(t,r){return bt.forwardRef(function(e,n){var a=e.className,u=e.children,o=Ms(e,["className","children"]);return bt.createElement(t,Kn(Kn({},o),{className:_i(r,a),ref:n}),u)})}l0("h1",O3);l0("h2",O3);l0("h3",O3);var jRe=l0("h4",O3);l0("h5",O3);var VRe=l0("h6",O3);l0("blockquote",z5e);l0("code",B5e);l0("pre",$5e);var GRe=l0("label",kde);l0("ol",_de);l0("ul",_de);function KG(t,r){if(t==null)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(r.indexOf(n)!==-1)continue;e[n]=t[n]}return e}var nve={exports:{}},WRe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ZRe=WRe,YRe=ZRe;function ive(){}function ave(){}ave.resetWarningCache=ive;var XRe=function(){function t(n,a,u,o,f,i){if(i!==YRe){var s=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 s.name="Invariant Violation",s}}t.isRequired=t;function r(){return t}var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:r,element:t,elementType:t,instanceOf:r,node:t,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:ave,resetWarningCache:ive};return e.PropTypes=e,e};nve.exports=XRe();var KRe=nve.exports;function QRe(t,r){return t.classList?!!r&&t.classList.contains(r):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+r+" ")!==-1}function JRe(t,r){t.classList?t.classList.add(r):QRe(t,r)||(typeof t.className=="string"?t.className=t.className+" "+r:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+r))}function OQ(t,r){return t.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function qRe(t,r){t.classList?t.classList.remove(r):typeof t.className=="string"?t.className=OQ(t.className,r):t.setAttribute("class",OQ(t.className&&t.className.baseVal||"",r))}const kQ={disabled:!1},TO=uo.createContext(null);var ove=function(r){return r.scrollTop},ZS="unmounted",Bb="exited",$b="entering",k2="entered",FU="exiting",OA=function(t){EI(r,t);function r(n,a){var u;u=t.call(this,n,a)||this;var o=a,f=o&&!o.isMounting?n.enter:n.appear,i;return u.appearStatus=null,n.in?f?(i=Bb,u.appearStatus=$b):i=k2:n.unmountOnExit||n.mountOnEnter?i=ZS:i=Bb,u.state={status:i},u.nextCallback=null,u}r.getDerivedStateFromProps=function(a,u){var o=a.in;return o&&u.status===ZS?{status:Bb}:null};var e=r.prototype;return e.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},e.componentDidUpdate=function(a){var u=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==$b&&o!==k2&&(u=$b):(o===$b||o===k2)&&(u=FU)}this.updateStatus(!1,u)},e.componentWillUnmount=function(){this.cancelNextCallback()},e.getTimeouts=function(){var a=this.props.timeout,u,o,f;return u=o=f=a,a!=null&&typeof a!="number"&&(u=a.exit,o=a.enter,f=a.appear!==void 0?a.appear:o),{exit:u,enter:o,appear:f}},e.updateStatus=function(a,u){if(a===void 0&&(a=!1),u!==null)if(this.cancelNextCallback(),u===$b){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:VS.findDOMNode(this);o&&ove(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Bb&&this.setState({status:ZS})},e.performEnter=function(a){var u=this,o=this.props.enter,f=this.context?this.context.isMounting:a,i=this.props.nodeRef?[f]:[VS.findDOMNode(this),f],s=i[0],d=i[1],l=this.getTimeouts(),h=f?l.appear:l.enter;if(!a&&!o||kQ.disabled){this.safeSetState({status:k2},function(){u.props.onEntered(s)});return}this.props.onEnter(s,d),this.safeSetState({status:$b},function(){u.props.onEntering(s,d),u.onTransitionEnd(h,function(){u.safeSetState({status:k2},function(){u.props.onEntered(s,d)})})})},e.performExit=function(){var a=this,u=this.props.exit,o=this.getTimeouts(),f=this.props.nodeRef?void 0:VS.findDOMNode(this);if(!u||kQ.disabled){this.safeSetState({status:Bb},function(){a.props.onExited(f)});return}this.props.onExit(f),this.safeSetState({status:FU},function(){a.props.onExiting(f),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:Bb},function(){a.props.onExited(f)})})})},e.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},e.safeSetState=function(a,u){u=this.setNextCallback(u),this.setState(a,u)},e.setNextCallback=function(a){var u=this,o=!0;return this.nextCallback=function(f){o&&(o=!1,u.nextCallback=null,a(f))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},e.onTransitionEnd=function(a,u){this.setNextCallback(u);var o=this.props.nodeRef?this.props.nodeRef.current:VS.findDOMNode(this),f=a==null&&!this.props.addEndListener;if(!o||f){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],s=i[0],d=i[1];this.props.addEndListener(s,d)}a!=null&&setTimeout(this.nextCallback,a)},e.render=function(){var a=this.state.status;if(a===ZS)return null;var u=this.props,o=u.children;u.in,u.mountOnEnter,u.unmountOnExit,u.appear,u.enter,u.exit,u.timeout,u.addEndListener,u.onEnter,u.onEntering,u.onEntered,u.onExit,u.onExiting,u.onExited,u.nodeRef;var f=KG(u,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return uo.createElement(TO.Provider,{value:null},typeof o=="function"?o(a,f):uo.cloneElement(uo.Children.only(o),f))},r}(uo.Component);OA.contextType=TO;OA.propTypes={};function l2(){}OA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:l2,onEntering:l2,onEntered:l2,onExit:l2,onExiting:l2,onExited:l2};OA.UNMOUNTED=ZS;OA.EXITED=Bb;OA.ENTERING=$b;OA.ENTERED=k2;OA.EXITING=FU;var ePe=function(r,e){return r&&e&&e.split(" ").forEach(function(n){return JRe(r,n)})},pF=function(r,e){return r&&e&&e.split(" ").forEach(function(n){return qRe(r,n)})},pE=function(t){EI(r,t);function r(){for(var n,a=arguments.length,u=new Array(a),o=0;o<a;o++)u[o]=arguments[o];return n=t.call.apply(t,[this].concat(u))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(f,i){var s=n.resolveArguments(f,i),d=s[0],l=s[1];n.removeClasses(d,"exit"),n.addClass(d,l?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(f,i)},n.onEntering=function(f,i){var s=n.resolveArguments(f,i),d=s[0],l=s[1],h=l?"appear":"enter";n.addClass(d,h,"active"),n.props.onEntering&&n.props.onEntering(f,i)},n.onEntered=function(f,i){var s=n.resolveArguments(f,i),d=s[0],l=s[1],h=l?"appear":"enter";n.removeClasses(d,h),n.addClass(d,h,"done"),n.props.onEntered&&n.props.onEntered(f,i)},n.onExit=function(f){var i=n.resolveArguments(f),s=i[0];n.removeClasses(s,"appear"),n.removeClasses(s,"enter"),n.addClass(s,"exit","base"),n.props.onExit&&n.props.onExit(f)},n.onExiting=function(f){var i=n.resolveArguments(f),s=i[0];n.addClass(s,"exit","active"),n.props.onExiting&&n.props.onExiting(f)},n.onExited=function(f){var i=n.resolveArguments(f),s=i[0];n.removeClasses(s,"exit"),n.addClass(s,"exit","done"),n.props.onExited&&n.props.onExited(f)},n.resolveArguments=function(f,i){return n.props.nodeRef?[n.props.nodeRef.current,f]:[f,i]},n.getClassNames=function(f){var i=n.props.classNames,s=typeof i=="string",d=s&&i?i+"-":"",l=s?""+d+f:i[f],h=s?l+"-active":i[f+"Active"],y=s?l+"-done":i[f+"Done"];return{baseClassName:l,activeClassName:h,doneClassName:y}},n}var e=r.prototype;return e.addClass=function(a,u,o){var f=this.getClassNames(u)[o+"ClassName"],i=this.getClassNames("enter"),s=i.doneClassName;u==="appear"&&o==="done"&&s&&(f+=" "+s),o==="active"&&a&&ove(a),f&&(this.appliedClasses[u][o]=f,ePe(a,f))},e.removeClasses=function(a,u){var o=this.appliedClasses[u],f=o.base,i=o.active,s=o.done;this.appliedClasses[u]={},f&&pF(a,f),i&&pF(a,i),s&&pF(a,s)},e.render=function(){var a=this.props;a.classNames;var u=KG(a,["classNames"]);return uo.createElement(OA,zl({},u,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(uo.Component);pE.defaultProps={classNames:""};pE.propTypes={};function tPe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function QG(t,r){var e=function(u){return r&&bt.isValidElement(u)?r(u):u},n=Object.create(null);return t&&bt.Children.map(t,function(a){return a}).forEach(function(a){n[a.key]=e(a)}),n}function rPe(t,r){t=t||{},r=r||{};function e(d){return d in r?r[d]:t[d]}var n=Object.create(null),a=[];for(var u in t)u in r?a.length&&(n[u]=a,a=[]):a.push(u);var o,f={};for(var i in r){if(n[i])for(o=0;o<n[i].length;o++){var s=n[i][o];f[n[i][o]]=e(s)}f[i]=e(i)}for(o=0;o<a.length;o++)f[a[o]]=e(a[o]);return f}function tx(t,r,e){return e[r]!=null?e[r]:t.props[r]}function nPe(t,r){return QG(t.children,function(e){return bt.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:tx(e,"appear",t),enter:tx(e,"enter",t),exit:tx(e,"exit",t)})})}function iPe(t,r,e){var n=QG(t.children),a=rPe(r,n);return Object.keys(a).forEach(function(u){var o=a[u];if(bt.isValidElement(o)){var f=u in r,i=u in n,s=r[u],d=bt.isValidElement(s)&&!s.props.in;i&&(!f||d)?a[u]=bt.cloneElement(o,{onExited:e.bind(null,o),in:!0,exit:tx(o,"exit",t),enter:tx(o,"enter",t)}):!i&&f&&!d?a[u]=bt.cloneElement(o,{in:!1}):i&&f&&bt.isValidElement(s)&&(a[u]=bt.cloneElement(o,{onExited:e.bind(null,o),in:s.props.in,exit:tx(o,"exit",t),enter:tx(o,"enter",t)}))}}),a}var aPe=Object.values||function(t){return Object.keys(t).map(function(r){return t[r]})},oPe={component:"div",childFactory:function(r){return r}},JG=function(t){EI(r,t);function r(n,a){var u;u=t.call(this,n,a)||this;var o=u.handleExited.bind(tPe(u));return u.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},u}var e=r.prototype;return e.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},e.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(a,u){var o=u.children,f=u.handleExited,i=u.firstRender;return{children:i?nPe(a,f):iPe(a,o,f),firstRender:!1}},e.handleExited=function(a,u){var o=QG(this.props.children);a.key in o||(a.props.onExited&&a.props.onExited(u),this.mounted&&this.setState(function(f){var i=zl({},f.children);return delete i[a.key],{children:i}}))},e.render=function(){var a=this.props,u=a.component,o=a.childFactory,f=KG(a,["component","childFactory"]),i=this.state.contextValue,s=aPe(this.state.children).map(o);return delete f.appear,delete f.enter,delete f.exit,u===null?uo.createElement(TO.Provider,{value:i},s):uo.createElement(TO.Provider,{value:i},uo.createElement(u,f,s))},r}(uo.Component);JG.propTypes={};JG.defaultProps=oPe;var sPe=function(){var t=1,r=new WeakMap,e=function(n,a){return typeof n=="number"||typeof n=="string"?a?"idx-".concat(a):"val-".concat(n):r.has(n)?"uid"+r.get(n):(r.set(n,t++),e(n))};return e},sve=function(t){return t===void 0&&(t=""),{value:1,prefix:t,uid:sPe()}},lPe=sve(),uPe=bt.createContext(sve()),cPe=function(t){return t.value++},fPe=function(t){return t?t.prefix:""},hPe=function(t){var r=t||lPe,e=fPe(r),n=cPe(r),a=e+n,u=function(o){return a+r.uid(o)};return{uid:a,gen:u}},dPe=function(){var t=bt.useContext(uPe),r=bt.useState(function(){return hPe(t)})[0];return r},vPe=function(){var t=dPe().uid;return t},lve=bt.createContext({hasProvider:!1,stack:{current:[]}}),gPe=function(t){var r=t.children,e=bt.useRef([]),n=bt.useMemo(function(){return{hasProvider:!0,stack:e}},[e]);return bt.createElement(lve.Provider,{value:n},r)},uve={exports:{}},cve={};/**
|
72
|
+
*/(function(t){(function(){var r={}.hasOwnProperty;function e(){for(var u="",o=0;o<arguments.length;o++){var f=arguments[o];f&&(u=a(u,n(f)))}return u}function n(u){if(typeof u=="string"||typeof u=="number")return u;if(typeof u!="object")return"";if(Array.isArray(u))return e.apply(null,u);if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]"))return u.toString();var o="";for(var f in u)r.call(u,f)&&u[f]&&(o=a(o,f));return o}function a(u,o){return o?u?u+" "+o:u+o:u}t.exports?(e.default=e,t.exports=e):window.classNames=e})()})(Kde);var CRe=Kde.exports;const _i=cy(CRe);function DG(t,r){r===void 0&&(r=[]),bt.useEffect(function(){i1("production")||t()},r)}var IRe={defaultTabIndex:void 0,disabledTabIndex:-1};function Qde(t,r,e,n){n===void 0&&(n=IRe);var a=n.defaultTabIndex,u=n.disabledTabIndex,o=r.active,f=r.onClick,i=r.onFocus,s=r.onKeyDown,d=r.onKeyUp,l=r.onBlur,h=r.tabIndex,y=h===void 0?a:h,b=bt.useState(),C=b[0],m=b[1],c=bt.useState(!1),v=c[0],g=c[1],p=bt.useRef(null),I=bt.useCallback(function(E){v&&g(!1),l==null||l(E)},[v,l]),A=bt.useCallback(function(E){JT(E)&&(E.preventDefault(),E.key!==C&&g(!0)),m(E.key),s==null||s(E)},[C,s]),w=bt.useCallback(function(E){var x;JT(E)&&(g(!1),(x=p.current)===null||x===void 0||x.click()),m(void 0),d==null||d(E)},[d,p]),T=t&&(o||v);return[T,{onBlur:I,onClick:t?f:void 0,onFocus:t?i:void 0,onKeyDown:A,onKeyUp:w,ref:pA(p,e),tabIndex:t?y:u}]}function bRe(t){return t.toLowerCase()}var xRe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],wRe=/[^A-Z0-9]+/gi;function Jde(t,r){r===void 0&&(r={});for(var e=r.splitRegexp,n=e===void 0?xRe:e,a=r.stripRegexp,u=a===void 0?wRe:a,o=r.transform,f=o===void 0?bRe:o,i=r.delimiter,s=i===void 0?" ":i,d=_Q(_Q(t,n,"$1\0$2"),u,"\0"),l=0,h=d.length;d.charAt(l)==="\0";)l++;for(;d.charAt(h-1)==="\0";)h--;return d.slice(l,h).split("\0").map(f).join(s)}function _Q(t,r,e){return r instanceof RegExp?t.replace(r,e):r.reduce(function(n,a){return n.replace(a,e)},t)}function TRe(t,r){var e=t.charAt(0),n=t.substr(1).toLowerCase();return r>0&&e>="0"&&e<="9"?"_"+e+n:""+e.toUpperCase()+n}function _Re(t,r){return r===void 0&&(r={}),Jde(t,Kn({delimiter:"",transform:TRe},r))}function SRe(t,r){return r===void 0&&(r={}),Jde(t,Kn({delimiter:"."},r))}function ERe(t,r){return r===void 0&&(r={}),SRe(t,Kn({delimiter:"_"},r))}var Fa;(function(t){t[t.STANDARD=16]="STANDARD",t[t.LARGE=20]="LARGE"})(Fa||(Fa={}));const MRe="modulepreload",RRe=function(t){return"/"+t},SQ={},EQ=function(r,e,n){let a=Promise.resolve();if(e&&e.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),f=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));a=Promise.allSettled(e.map(i=>{if(i=RRe(i),i in SQ)return;SQ[i]=!0;const s=i.endsWith(".css"),d=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${d}`))return;const l=document.createElement("link");if(l.rel=s?"stylesheet":MRe,s||(l.as="script"),l.crossOrigin="",l.href=i,f&&l.setAttribute("nonce",f),document.head.appendChild(l),s)return new Promise((h,y)=>{l.addEventListener("load",h),l.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${i}`)))})}))}function u(o){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=o,window.dispatchEvent(f),!f.defaultPrevented)throw o}return a.then(o=>{for(const f of o||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})};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 qde={},eve={};for(var gF=0,MQ=Object.values(Xt);gF<MQ.length;gF++){var qR=MQ[gF];qde[_Re(qR)]=qR,eve[ERe(qR).toUpperCase()]=qR}var Ti=Kn(Kn({},qde),eve),PRe=new Set(Object.values(Ti));function LRe(t){return typeof NODE_ENV<"u"&&NODE_ENV===t}function ORe(t,r){return Q2(this,void 0,void 0,function(){var e,n,a;return J2(this,function(u){switch(u.label){case 0:return e=LRe("development")&&typeof performance<"u",e&&(n=performance.now(),console.info("Started '".concat(t,"'..."))),[4,r()];case 1:return u.sent(),e&&(a=Math.round(performance.now()-n),console.info("Finished '".concat(t,"' in ").concat(a,"ms"))),[2]}})})}function kRe(t){return Q2(this,void 0,void 0,function(){var r,e;return J2(this,function(n){switch(n.label){case 0:return r=t.loader,e=r===void 0?O2.defaultLoader:r,typeof e!="function"?[3,1]:[2,e];case 1:return e!=="all"?[3,3]:[4,EQ(()=>import("./allPathsLoader-DVskN3_V.js"),[])];case 2:return[2,n.sent().allPathsLoader];case 3:return[4,EQ(()=>import("./splitPathsBySizeLoader-BEIaCBcL.js"),[])];case 4:return[2,n.sent().splitPathsBySizeLoader]}})})}var WS=function(){function t(){this.defaultLoader="split-by-size",this.loadedIconPaths16=new Map,this.loadedIconPaths20=new Map}return t.setLoaderOptions=function(r){r.loader!==void 0&&(O2.defaultLoader=r.loader)},t.load=function(r,e,n){return Q2(this,void 0,void 0,function(){var a=this;return J2(this,function(u){switch(u.label){case 0:return Array.isArray(r)||(r=[r]),[4,Promise.all(r.map(function(o){return a.loadImpl(o,e,n)}))];case 1:return u.sent(),[2]}})})},t.loadAll=function(r){return Q2(this,void 0,void 0,function(){var e,n=this;return J2(this,function(a){return e=Object.values(Ti),ORe("[Blueprint] loading all icons",function(){return Q2(n,void 0,void 0,function(){return J2(this,function(u){switch(u.label){case 0:return[4,Promise.all([this.load(e,Fa.STANDARD,r),this.load(e,Fa.LARGE,r)])];case 1:return u.sent(),[2]}})})}),[2]})})},t.getPaths=function(r,e){if(this.isValidIconName(r)){var n=e<Fa.LARGE?O2.loadedIconPaths16:O2.loadedIconPaths20;return n.get(r)}},t.loadImpl=function(r,e,n){return n===void 0&&(n={}),Q2(this,void 0,void 0,function(){var a,u,o,f,i;return J2(this,function(s){switch(s.label){case 0:return this.isValidIconName(r)?(a=e<Fa.LARGE?O2.loadedIconPaths16:O2.loadedIconPaths20,a.has(r)?[2]:[4,kRe(n)]):(console.error("[Blueprint] Unknown icon '".concat(r,"'")),[2]);case 1:u=s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),o=e<Fa.LARGE?Fa.STANDARD:Fa.LARGE,[4,u(r,o)];case 3:return f=s.sent(),a.set(r,f),[3,5];case 4:return i=s.sent(),console.error("[Blueprint] Unable to load ".concat(e,"px icon '").concat(r,"'"),i),[3,5];case 5:return[2]}})})},t.isValidIconName=function(r){return PRe.has(r)},t}(),O2=new WS,DRe="bp5",RQ="".concat(DRe,"-icon"),PQ=new Map;function NRe(t){var r,e=(r=PQ.get(t))!==null&&r!==void 0?r:0;return PQ.set(t,e+1),"".concat(t,"-").concat(e)}var Oh=bt.forwardRef(function(t,r){var e=t.children,n=t.className,a=t.color,u=t.htmlTitle,o=t.iconName,f=t.size,i=f===void 0?Fa.STANDARD:f,s=t.svgProps,d=t.tagName,l=d===void 0?"span":d,h=t.title,y=Ms(t,["children","className","color","htmlTitle","iconName","size","svgProps","tagName","title"]),b=i>=Fa.LARGE,C=b?Fa.LARGE:Fa.STANDARD,m="0 0 ".concat(C," ").concat(C),c=NRe("iconTitle"),v=Kn({fill:a,height:i,role:"img",viewBox:m,width:i},s);return l===null?bt.createElement("svg",Kn({"aria-labelledby":h?c:void 0,"data-icon":o,ref:r},v,y,{className:_i(n,s==null?void 0:s.className)}),h&&bt.createElement("title",{id:c},h),e):bt.createElement(l,Kn(Kn({"aria-hidden":h?void 0:!0},y),{className:_i(RQ,"".concat(RQ,"-").concat(o),n),ref:r,title:u}),bt.createElement("svg",Kn({"data-icon":o},v,{className:s==null?void 0:s.className}),h&&bt.createElement("title",null,h),e))});Oh.displayName="Blueprint5.SVGIconContainer";var NG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-down",ref:r},t),bt.createElement("path",{d:e?"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:u}))});NG.defaultProps={size:Fa.STANDARD};NG.displayName="Blueprint5.Icon.ArrowDown";var FG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-left",ref:r},t),bt.createElement("path",{d:e?"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:u}))});FG.defaultProps={size:Fa.STANDARD};FG.displayName="Blueprint5.Icon.ArrowLeft";var zG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-right",ref:r},t),bt.createElement("path",{d:e?"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:u}))});zG.defaultProps={size:Fa.STANDARD};zG.displayName="Blueprint5.Icon.ArrowRight";var BG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"arrow-up",ref:r},t),bt.createElement("path",{d:e?"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:u}))});BG.defaultProps={size:Fa.STANDARD};BG.displayName="Blueprint5.Icon.ArrowUp";var $G=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"caret-right",ref:r},t),bt.createElement("path",{d:e?"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:u}))});$G.defaultProps={size:Fa.STANDARD};$G.displayName="Blueprint5.Icon.CaretRight";var cD=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"cross",ref:r},t),bt.createElement("path",{d:e?"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:u}))});cD.defaultProps={size:Fa.STANDARD};cD.displayName="Blueprint5.Icon.Cross";var UG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"drag-handle-vertical",ref:r},t),bt.createElement("path",{d:e?"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:u}))});UG.defaultProps={size:Fa.STANDARD};UG.displayName="Blueprint5.Icon.DragHandleVertical";var xO=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-command",ref:r},t),bt.createElement("path",{d:e?"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:u}))});xO.defaultProps={size:Fa.STANDARD};xO.displayName="Blueprint5.Icon.KeyCommand";var HG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-control",ref:r},t),bt.createElement("path",{d:e?"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:u}))});HG.defaultProps={size:Fa.STANDARD};HG.displayName="Blueprint5.Icon.KeyControl";var jG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-delete",ref:r},t),bt.createElement("path",{d:e?"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:u}))});jG.defaultProps={size:Fa.STANDARD};jG.displayName="Blueprint5.Icon.KeyDelete";var VG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-enter",ref:r},t),bt.createElement("path",{d:e?"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:u}))});VG.defaultProps={size:Fa.STANDARD};VG.displayName="Blueprint5.Icon.KeyEnter";var GG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-option",ref:r},t),bt.createElement("path",{d:e?"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:u}))});GG.defaultProps={size:Fa.STANDARD};GG.displayName="Blueprint5.Icon.KeyOption";var WG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"key-shift",ref:r},t),bt.createElement("path",{d:e?"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:u}))});WG.defaultProps={size:Fa.STANDARD};WG.displayName="Blueprint5.Icon.KeyShift";var wO=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"more",ref:r},t),bt.createElement("path",{d:e?"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:u}))});wO.defaultProps={size:Fa.STANDARD};wO.displayName="Blueprint5.Icon.More";var ZG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"search",ref:r},t),bt.createElement("path",{d:e?"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:u}))});ZG.defaultProps={size:Fa.STANDARD};ZG.displayName="Blueprint5.Icon.Search";var fD=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"small-cross",ref:r},t),bt.createElement("path",{d:e?"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:u}))});fD.defaultProps={size:Fa.STANDARD};fD.displayName="Blueprint5.Icon.SmallCross";var YG=bt.forwardRef(function(t,r){var e=t.size>=Fa.LARGE,n=e?Fa.LARGE:Fa.STANDARD,a="".concat(-1*n/.05/2),u={transformOrigin:"center"};return bt.createElement(Oh,Kn({iconName:"small-tick",ref:r},t),bt.createElement("path",{d:e?"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:u}))});YG.defaultProps={size:Fa.STANDARD};YG.displayName="Blueprint5.Icon.SmallTick";var Hs=bt.forwardRef(function(t,r){var e,n,a=t.autoLoad,u=a===void 0?!0:a,o=t.className,f=t.color,i=t.icon,s=t.intent,d=t.tagName,l=d===void 0?"span":d,h=t.svgProps,y=t.title,b=t.htmlTitle,C=Ms(t,["autoLoad","className","color","icon","intent","tagName","svgProps","title","htmlTitle"]),m=(n=(e=t.iconSize)!==null&&e!==void 0?e:t.size)!==null&&n!==void 0?n:Fa.STANDARD,c=bt.useState(function(){return typeof i=="string"?WS.getPaths(i,m):void 0}),v=c[0],g=c[1];if(bt.useEffect(function(){var A=!1;if(typeof i=="string"){var w=WS.getPaths(i,m);w!==void 0?g(w):u?WS.load(i,m).then(function(){A||g(WS.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(){A=!0}},[u,i,m]),i==null||typeof i=="boolean")return null;if(typeof i!="string")return i;if(v==null){var p=m===Fa.STANDARD?p4e:m===Fa.LARGE?m4e:void 0;return bt.createElement(l||"span",Kn(Kn({"aria-hidden":y?void 0:!0},vI(C)),{className:_i(RG,p,y4e(i),Yd(s),o),"data-icon":i,ref:r,title:b}))}else{var I=v.map(function(A,w){return bt.createElement("path",{d:A,key:w,fillRule:"evenodd"})});return bt.createElement(Oh,Kn({children:I,className:_i(Yd(s),o),color:f,htmlTitle:b,iconName:i,ref:r,size:m,svgProps:h,tagName:l,title:y},vI(C)))}});Hs.displayName="".concat(Uo,".Icon");var dx;(function(t){t[t.SMALL=20]="SMALL",t[t.STANDARD=50]="STANDARD",t[t.LARGE=100]="LARGE"})(dx||(dx={}));var vC=45,LQ="M 50,50 m 0,-".concat(vC," a ").concat(vC,",").concat(vC," 0 1 1 0,").concat(vC*2," a ").concat(vC,",").concat(vC," 0 1 1 0,-").concat(vC*2),yS=280,FRe=10,zRe=4,BRe=16,XG=function(t){var r,e=t.className,n=e===void 0?"":e,a=t.intent,u=t.value,o=t.tagName,f=o===void 0?"div":o,i=t.size,s=Ms(t,["className","intent","value","tagName","size"]);DG(function(){var b=i!=null,C=n.indexOf(bO)>=0||n.indexOf(XT)>=0;b&&C&&console.warn(iRe)},[n,i]);var d=$Re(i,n),l=Math.min(BRe,zRe*dx.LARGE/d),h=yS-yS*(u==null?.25:N3(u,0,1)),y=_i(oD,Yd(a),(r={},r[o4e]=u!=null,r),n);return bt.createElement(f,Kn({"aria-label":"loading","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":u===void 0?void 0:u*100,className:y,role:"progressbar"},s),bt.createElement(f,{className:i4e},bt.createElement("svg",{width:d,height:d,strokeWidth:l.toFixed(2),viewBox:URe(l)},bt.createElement("path",{className:s4e,d:LQ}),bt.createElement("path",{className:a4e,d:LQ,pathLength:yS,strokeDasharray:"".concat(yS," ").concat(yS),strokeDashoffset:h}))))};XG.displayName="".concat(Uo,".Spinner");var $Re=function(t,r){return t==null?r.indexOf(bO)>=0?dx.SMALL:r.indexOf(XT)>=0?dx.LARGE:dx.STANDARD:Math.max(FRe,t)},URe=function(t){var r=vC+t/2,e=(50-r).toFixed(2),n=(r*2).toFixed(2);return"".concat(e," ").concat(e," ").concat(n," ").concat(n)},HRe=Wde()?bt.useLayoutEffect:bt.useEffect,hD=bt.forwardRef(function(t,r){var e,n=t.children,a=t.tagName,u=a===void 0?"div":a,o=t.title,f=t.className,i=t.ellipsize,s=i===void 0?!1:i,d=Ms(t,["children","tagName","title","className","ellipsize"]),l=bt.useRef(),h=bt.useMemo(function(){return pA(l,r)},[r]),y=bt.useState(""),b=y[0],C=y[1],m=bt.useState(),c=m[0],v=m[1];return HRe(function(){var g;((g=l.current)===null||g===void 0?void 0:g.textContent)!=null&&(v(s&&l.current.scrollWidth>l.current.clientWidth),C(l.current.textContent))},[l,n,s]),bt.createElement(u,Kn(Kn({},d),{className:_i((e={},e[F5e]=s,e),f),ref:h,title:o??(c?b:void 0)}),n)});hD.displayName="".concat(Uo,".Text");var Ta=bt.forwardRef(function(t,r){var e=tve(t,r);return bt.createElement("button",Kn({type:"button"},vI(t),e),rve(t))});Ta.displayName="".concat(Uo,".Button");var Hx=bt.forwardRef(function(t,r){var e=t.href,n=tve(t,r,{defaultTabIndex:0,disabledTabIndex:-1});return bt.createElement("a",Kn({role:"button"},vI(t),n,{"aria-disabled":n.disabled,href:n.disabled?void 0:e}),rve(t))});Hx.displayName="".concat(Uo,".AnchorButton");function tve(t,r,e){var n,a=t.alignText,u=t.fill,o=t.large,f=t.loading,i=f===void 0?!1:f,s=t.minimal,d=t.outlined,l=t.size,h=l===void 0?"medium":l,y=t.small,b=t.variant,C=b===void 0?"solid":b,m=t.disabled||i,c=Qde(!m,t,r,e),v=c[0],g=c[1],p=_i(sM,(n={},n[Bx]=v,n[MA]=m,n[cp]=u,n[_G]=i,n),sD(a),Yd(t.intent),LA(h,{large:o,small:y}),Gde(C,{minimal:s,outlined:d}),t.className);return Kn(Kn({},g),{className:p,disabled:m})}function rve(t){var r=t.children,e=t.ellipsizeText,n=t.endIcon,a=t.icon,u=t.loading,o=t.rightIcon,f=t.text,i=t.textClassName,s=!f5(f)||!f5(r);return bt.createElement(bt.Fragment,null,u&&bt.createElement(XG,{className:G5e,size:dx.SMALL}),bt.createElement(Hs,{icon:a}),s&&bt.createElement(hD,{className:_i(W5e,i),ellipsize:e,tagName:"span"},f,r),bt.createElement(Hs,{icon:n??o}))}function l0(t,r){return bt.forwardRef(function(e,n){var a=e.className,u=e.children,o=Ms(e,["className","children"]);return bt.createElement(t,Kn(Kn({},o),{className:_i(r,a),ref:n}),u)})}l0("h1",O3);l0("h2",O3);l0("h3",O3);var jRe=l0("h4",O3);l0("h5",O3);var VRe=l0("h6",O3);l0("blockquote",z5e);l0("code",B5e);l0("pre",$5e);var GRe=l0("label",kde);l0("ol",_de);l0("ul",_de);function KG(t,r){if(t==null)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(r.indexOf(n)!==-1)continue;e[n]=t[n]}return e}var nve={exports:{}},WRe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ZRe=WRe,YRe=ZRe;function ive(){}function ave(){}ave.resetWarningCache=ive;var XRe=function(){function t(n,a,u,o,f,i){if(i!==YRe){var s=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 s.name="Invariant Violation",s}}t.isRequired=t;function r(){return t}var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:r,element:t,elementType:t,instanceOf:r,node:t,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:ave,resetWarningCache:ive};return e.PropTypes=e,e};nve.exports=XRe();var KRe=nve.exports;function QRe(t,r){return t.classList?!!r&&t.classList.contains(r):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+r+" ")!==-1}function JRe(t,r){t.classList?t.classList.add(r):QRe(t,r)||(typeof t.className=="string"?t.className=t.className+" "+r:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+r))}function OQ(t,r){return t.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function qRe(t,r){t.classList?t.classList.remove(r):typeof t.className=="string"?t.className=OQ(t.className,r):t.setAttribute("class",OQ(t.className&&t.className.baseVal||"",r))}const kQ={disabled:!1},TO=uo.createContext(null);var ove=function(r){return r.scrollTop},ZS="unmounted",Bb="exited",$b="entering",k2="entered",FU="exiting",OA=function(t){EI(r,t);function r(n,a){var u;u=t.call(this,n,a)||this;var o=a,f=o&&!o.isMounting?n.enter:n.appear,i;return u.appearStatus=null,n.in?f?(i=Bb,u.appearStatus=$b):i=k2:n.unmountOnExit||n.mountOnEnter?i=ZS:i=Bb,u.state={status:i},u.nextCallback=null,u}r.getDerivedStateFromProps=function(a,u){var o=a.in;return o&&u.status===ZS?{status:Bb}:null};var e=r.prototype;return e.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},e.componentDidUpdate=function(a){var u=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==$b&&o!==k2&&(u=$b):(o===$b||o===k2)&&(u=FU)}this.updateStatus(!1,u)},e.componentWillUnmount=function(){this.cancelNextCallback()},e.getTimeouts=function(){var a=this.props.timeout,u,o,f;return u=o=f=a,a!=null&&typeof a!="number"&&(u=a.exit,o=a.enter,f=a.appear!==void 0?a.appear:o),{exit:u,enter:o,appear:f}},e.updateStatus=function(a,u){if(a===void 0&&(a=!1),u!==null)if(this.cancelNextCallback(),u===$b){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:VS.findDOMNode(this);o&&ove(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Bb&&this.setState({status:ZS})},e.performEnter=function(a){var u=this,o=this.props.enter,f=this.context?this.context.isMounting:a,i=this.props.nodeRef?[f]:[VS.findDOMNode(this),f],s=i[0],d=i[1],l=this.getTimeouts(),h=f?l.appear:l.enter;if(!a&&!o||kQ.disabled){this.safeSetState({status:k2},function(){u.props.onEntered(s)});return}this.props.onEnter(s,d),this.safeSetState({status:$b},function(){u.props.onEntering(s,d),u.onTransitionEnd(h,function(){u.safeSetState({status:k2},function(){u.props.onEntered(s,d)})})})},e.performExit=function(){var a=this,u=this.props.exit,o=this.getTimeouts(),f=this.props.nodeRef?void 0:VS.findDOMNode(this);if(!u||kQ.disabled){this.safeSetState({status:Bb},function(){a.props.onExited(f)});return}this.props.onExit(f),this.safeSetState({status:FU},function(){a.props.onExiting(f),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:Bb},function(){a.props.onExited(f)})})})},e.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},e.safeSetState=function(a,u){u=this.setNextCallback(u),this.setState(a,u)},e.setNextCallback=function(a){var u=this,o=!0;return this.nextCallback=function(f){o&&(o=!1,u.nextCallback=null,a(f))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},e.onTransitionEnd=function(a,u){this.setNextCallback(u);var o=this.props.nodeRef?this.props.nodeRef.current:VS.findDOMNode(this),f=a==null&&!this.props.addEndListener;if(!o||f){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],s=i[0],d=i[1];this.props.addEndListener(s,d)}a!=null&&setTimeout(this.nextCallback,a)},e.render=function(){var a=this.state.status;if(a===ZS)return null;var u=this.props,o=u.children;u.in,u.mountOnEnter,u.unmountOnExit,u.appear,u.enter,u.exit,u.timeout,u.addEndListener,u.onEnter,u.onEntering,u.onEntered,u.onExit,u.onExiting,u.onExited,u.nodeRef;var f=KG(u,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return uo.createElement(TO.Provider,{value:null},typeof o=="function"?o(a,f):uo.cloneElement(uo.Children.only(o),f))},r}(uo.Component);OA.contextType=TO;OA.propTypes={};function l2(){}OA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:l2,onEntering:l2,onEntered:l2,onExit:l2,onExiting:l2,onExited:l2};OA.UNMOUNTED=ZS;OA.EXITED=Bb;OA.ENTERING=$b;OA.ENTERED=k2;OA.EXITING=FU;var ePe=function(r,e){return r&&e&&e.split(" ").forEach(function(n){return JRe(r,n)})},pF=function(r,e){return r&&e&&e.split(" ").forEach(function(n){return qRe(r,n)})},pE=function(t){EI(r,t);function r(){for(var n,a=arguments.length,u=new Array(a),o=0;o<a;o++)u[o]=arguments[o];return n=t.call.apply(t,[this].concat(u))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(f,i){var s=n.resolveArguments(f,i),d=s[0],l=s[1];n.removeClasses(d,"exit"),n.addClass(d,l?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(f,i)},n.onEntering=function(f,i){var s=n.resolveArguments(f,i),d=s[0],l=s[1],h=l?"appear":"enter";n.addClass(d,h,"active"),n.props.onEntering&&n.props.onEntering(f,i)},n.onEntered=function(f,i){var s=n.resolveArguments(f,i),d=s[0],l=s[1],h=l?"appear":"enter";n.removeClasses(d,h),n.addClass(d,h,"done"),n.props.onEntered&&n.props.onEntered(f,i)},n.onExit=function(f){var i=n.resolveArguments(f),s=i[0];n.removeClasses(s,"appear"),n.removeClasses(s,"enter"),n.addClass(s,"exit","base"),n.props.onExit&&n.props.onExit(f)},n.onExiting=function(f){var i=n.resolveArguments(f),s=i[0];n.addClass(s,"exit","active"),n.props.onExiting&&n.props.onExiting(f)},n.onExited=function(f){var i=n.resolveArguments(f),s=i[0];n.removeClasses(s,"exit"),n.addClass(s,"exit","done"),n.props.onExited&&n.props.onExited(f)},n.resolveArguments=function(f,i){return n.props.nodeRef?[n.props.nodeRef.current,f]:[f,i]},n.getClassNames=function(f){var i=n.props.classNames,s=typeof i=="string",d=s&&i?i+"-":"",l=s?""+d+f:i[f],h=s?l+"-active":i[f+"Active"],y=s?l+"-done":i[f+"Done"];return{baseClassName:l,activeClassName:h,doneClassName:y}},n}var e=r.prototype;return e.addClass=function(a,u,o){var f=this.getClassNames(u)[o+"ClassName"],i=this.getClassNames("enter"),s=i.doneClassName;u==="appear"&&o==="done"&&s&&(f+=" "+s),o==="active"&&a&&ove(a),f&&(this.appliedClasses[u][o]=f,ePe(a,f))},e.removeClasses=function(a,u){var o=this.appliedClasses[u],f=o.base,i=o.active,s=o.done;this.appliedClasses[u]={},f&&pF(a,f),i&&pF(a,i),s&&pF(a,s)},e.render=function(){var a=this.props;a.classNames;var u=KG(a,["classNames"]);return uo.createElement(OA,zl({},u,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(uo.Component);pE.defaultProps={classNames:""};pE.propTypes={};function tPe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function QG(t,r){var e=function(u){return r&&bt.isValidElement(u)?r(u):u},n=Object.create(null);return t&&bt.Children.map(t,function(a){return a}).forEach(function(a){n[a.key]=e(a)}),n}function rPe(t,r){t=t||{},r=r||{};function e(d){return d in r?r[d]:t[d]}var n=Object.create(null),a=[];for(var u in t)u in r?a.length&&(n[u]=a,a=[]):a.push(u);var o,f={};for(var i in r){if(n[i])for(o=0;o<n[i].length;o++){var s=n[i][o];f[n[i][o]]=e(s)}f[i]=e(i)}for(o=0;o<a.length;o++)f[a[o]]=e(a[o]);return f}function tx(t,r,e){return e[r]!=null?e[r]:t.props[r]}function nPe(t,r){return QG(t.children,function(e){return bt.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:tx(e,"appear",t),enter:tx(e,"enter",t),exit:tx(e,"exit",t)})})}function iPe(t,r,e){var n=QG(t.children),a=rPe(r,n);return Object.keys(a).forEach(function(u){var o=a[u];if(bt.isValidElement(o)){var f=u in r,i=u in n,s=r[u],d=bt.isValidElement(s)&&!s.props.in;i&&(!f||d)?a[u]=bt.cloneElement(o,{onExited:e.bind(null,o),in:!0,exit:tx(o,"exit",t),enter:tx(o,"enter",t)}):!i&&f&&!d?a[u]=bt.cloneElement(o,{in:!1}):i&&f&&bt.isValidElement(s)&&(a[u]=bt.cloneElement(o,{onExited:e.bind(null,o),in:s.props.in,exit:tx(o,"exit",t),enter:tx(o,"enter",t)}))}}),a}var aPe=Object.values||function(t){return Object.keys(t).map(function(r){return t[r]})},oPe={component:"div",childFactory:function(r){return r}},JG=function(t){EI(r,t);function r(n,a){var u;u=t.call(this,n,a)||this;var o=u.handleExited.bind(tPe(u));return u.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},u}var e=r.prototype;return e.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},e.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(a,u){var o=u.children,f=u.handleExited,i=u.firstRender;return{children:i?nPe(a,f):iPe(a,o,f),firstRender:!1}},e.handleExited=function(a,u){var o=QG(this.props.children);a.key in o||(a.props.onExited&&a.props.onExited(u),this.mounted&&this.setState(function(f){var i=zl({},f.children);return delete i[a.key],{children:i}}))},e.render=function(){var a=this.props,u=a.component,o=a.childFactory,f=KG(a,["component","childFactory"]),i=this.state.contextValue,s=aPe(this.state.children).map(o);return delete f.appear,delete f.enter,delete f.exit,u===null?uo.createElement(TO.Provider,{value:i},s):uo.createElement(TO.Provider,{value:i},uo.createElement(u,f,s))},r}(uo.Component);JG.propTypes={};JG.defaultProps=oPe;var sPe=function(){var t=1,r=new WeakMap,e=function(n,a){return typeof n=="number"||typeof n=="string"?a?"idx-".concat(a):"val-".concat(n):r.has(n)?"uid"+r.get(n):(r.set(n,t++),e(n))};return e},sve=function(t){return t===void 0&&(t=""),{value:1,prefix:t,uid:sPe()}},lPe=sve(),uPe=bt.createContext(sve()),cPe=function(t){return t.value++},fPe=function(t){return t?t.prefix:""},hPe=function(t){var r=t||lPe,e=fPe(r),n=cPe(r),a=e+n,u=function(o){return a+r.uid(o)};return{uid:a,gen:u}},dPe=function(){var t=bt.useContext(uPe),r=bt.useState(function(){return hPe(t)})[0];return r},vPe=function(){var t=dPe().uid;return t},lve=bt.createContext({hasProvider:!1,stack:{current:[]}}),gPe=function(t){var r=t.children,e=bt.useRef([]),n=bt.useMemo(function(){return{hasProvider:!0,stack:e}},[e]);return bt.createElement(lve.Provider,{value:n},r)},uve={exports:{}},cve={};/**
|
73
73
|
* @license React
|
74
74
|
* use-sync-external-store-shim.production.js
|
75
75
|
*
|
@@ -99,7 +99,7 @@ License: MIT
|
|
99
99
|
`,k='"',F=k+k,N=!1,P=null,z=!1,M=((()=>{if(typeof E=="object"){if(typeof E.delimiter!="string"||s.BAD_DELIMITERS.filter(function(O){return E.delimiter.indexOf(O)!==-1}).length||(_=E.delimiter),typeof E.quotes!="boolean"&&typeof E.quotes!="function"&&!Array.isArray(E.quotes)||(x=E.quotes),typeof E.skipEmptyLines!="boolean"&&typeof E.skipEmptyLines!="string"||(N=E.skipEmptyLines),typeof E.newline=="string"&&(L=E.newline),typeof E.quoteChar=="string"&&(k=E.quoteChar),typeof E.header=="boolean"&&(S=E.header),Array.isArray(E.columns)){if(E.columns.length===0)throw new Error("Option columns is empty");P=E.columns}E.escapeChar!==void 0&&(F=E.escapeChar+k),E.escapeFormulae instanceof RegExp?z=E.escapeFormulae:typeof E.escapeFormulae=="boolean"&&E.escapeFormulae&&(z=/^[=+\-@\t\r].*$/)}})(),new RegExp(m(k),"g"));if(typeof T=="string"&&(T=JSON.parse(T)),Array.isArray(T)){if(!T.length||Array.isArray(T[0]))return R(null,T,N);if(typeof T[0]=="object")return R(P||Object.keys(T[0]),T,N)}else if(typeof T=="object")return typeof T.data=="string"&&(T.data=JSON.parse(T.data)),Array.isArray(T.data)&&(T.fields||(T.fields=T.meta&&T.meta.fields||P),T.fields||(T.fields=Array.isArray(T.data[0])?T.fields:typeof T.data[0]=="object"?Object.keys(T.data[0]):[]),Array.isArray(T.data[0])||typeof T.data[0]=="object"||(T.data=[T.data])),R(T.fields||[],T.data||[],N);throw new Error("Unable to serialize unrecognized input");function R(O,j,G){var W="",X=(typeof O=="string"&&(O=JSON.parse(O)),typeof j=="string"&&(j=JSON.parse(j)),Array.isArray(O)&&0<O.length),Y=!Array.isArray(j[0]);if(X&&S){for(var Q=0;Q<O.length;Q++)0<Q&&(W+=_),W+=D(O[Q],Q);0<j.length&&(W+=L)}for(var H=0;H<j.length;H++){var K=(X?O:j[H]).length,re=!1,oe=X?Object.keys(j[H]).length===0:j[H].length===0;if(G&&!X&&(re=G==="greedy"?j[H].join("").trim()==="":j[H].length===1&&j[H][0].length===0),G==="greedy"&&X){for(var ce=[],me=0;me<K;me++){var pe=Y?O[me]:me;ce.push(j[H][pe])}re=ce.join("").trim()===""}if(!re){for(var se=0;se<K;se++){0<se&&!oe&&(W+=_);var ne=X&&Y?O[se]:se;W+=D(j[H][ne],se)}H<j.length-1&&(!G||0<K&&!oe)&&(W+=L)}}return W}function D(O,j){var G,W;return O==null?"":O.constructor===Date?JSON.stringify(O).slice(1,25):(W=!1,z&&typeof O=="string"&&z.test(O)&&(O="'"+O,W=!0),G=O.toString().replace(M,F),(W=W||x===!0||typeof x=="function"&&x(O,j)||Array.isArray(x)&&x[j]||((X,Y)=>{for(var Q=0;Q<Y.length;Q++)if(-1<X.indexOf(Y[Q]))return!0;return!1})(G,s.BAD_DELIMITERS)||-1<G.indexOf(_)||G.charAt(0)===" "||G.charAt(G.length-1)===" ")?k+G+k:G)}},s.RECORD_SEP="",s.UNIT_SEP="",s.BYTE_ORDER_MARK="\uFEFF",s.BAD_DELIMITERS=["\r",`
|
100
100
|
`,'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!u&&!!n.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=c,s.ParserHandle=C,s.NetworkStreamer=l,s.FileStreamer=h,s.StringStreamer=y,s.ReadableStreamStreamer=b,n.jQuery&&((a=n.jQuery).fn.parse=function(T){var E=T.config||{},x=[];return this.each(function(L){if(!(a(this).prop("tagName").toUpperCase()==="INPUT"&&a(this).attr("type").toLowerCase()==="file"&&n.FileReader)||!this.files||this.files.length===0)return!0;for(var k=0;k<this.files.length;k++)x.push({file:this.files[k],inputElem:this,instanceConfig:a.extend({},E)})}),S(),this;function S(){if(x.length===0)w(T.complete)&&T.complete();else{var L,k,F,N,P=x[0];if(w(T.before)){var z=T.before(P.file,P.inputElem);if(typeof z=="object"){if(z.action==="abort")return L="AbortError",k=P.file,F=P.inputElem,N=z.reason,void(w(T.error)&&T.error({name:L},k,F,N));if(z.action==="skip")return void _();typeof z.config=="object"&&(P.instanceConfig=a.extend(P.instanceConfig,z.config))}else if(z==="skip")return void _()}var M=P.instanceConfig.complete;P.instanceConfig.complete=function(R){w(M)&&M(R,P.file,P.inputElem),_()},s.parse(P.file,P.instanceConfig)}}function _(){x.splice(0,1),S()}}),o&&(n.onmessage=function(T){T=T.data,s.WORKER_ID===void 0&&T&&(s.WORKER_ID=T.workerId),typeof T.input=="string"?n.postMessage({workerId:s.WORKER_ID,results:s.parse(T.input,T.config),finished:!0}):(n.File&&T.input instanceof File||T.input instanceof Object)&&(T=s.parse(T.input,T.config))&&n.postMessage({workerId:s.WORKER_ID,results:T,finished:!0})}),(l.prototype=Object.create(d.prototype)).constructor=l,(h.prototype=Object.create(d.prototype)).constructor=h,(y.prototype=Object.create(y.prototype)).constructor=y,(b.prototype=Object.create(d.prototype)).constructor=b,s})})(Fge);var MDe=Fge.exports;const RDe=cy(MDe),Tu=_c.create({baseURL:"/"}),wW=()=>{let t=sessionStorage.getItem("instanceId");const r=new URLSearchParams(window.location.search).get("instanceId");return r&&(t=r,sessionStorage.setItem("instanceId",t)),t||(t=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),sessionStorage.setItem("instanceId",t)),t};Tu.interceptors.request.use(t=>{const r=wW();return r&&(t.params={...t.params,instanceId:r}),t},t=>Promise.reject(t));var Lh=(t=>(t[t.DRAM=0]="DRAM",t[t.L1=1]="L1",t[t.SYSTEM_MEMORY=2]="SYSTEM_MEMORY",t[t.L1_SMALL=3]="L1_SMALL",t[t.TRACE=4]="TRACE",t))(Lh||{});const PC={0:"DRAM",1:"L1",2:"System Memory",3:"L1 Small",4:"Trace"};var W1=(t=>(t.INTERLEAVED="TensorMemoryLayout::INTERLEAVED",t.HEIGHT_SHARDED="TensorMemoryLayout::HEIGHT_SHARDED",t.BLOCK_SHARDED="TensorMemoryLayout::BLOCK_SHARDED",t.WIDTH_SHARDED="TensorMemoryLayout::WIDTH_SHARDED",t))(W1||{});const zge=/MemoryConfig\((.*)\)$/,PDe=/memory_layout=([A-Za-z_:]+)/,LDe=/shard_spec=ShardSpec\((?:grid=\{(\[.*?\])\},?)?(?:shape=\{(\d+), (\d+)\},?)?(?:orientation=ShardOrientation::([A-Za-z_]+),?)?(?:halo=(\d+),?)?(?:mode=ShardMode::([A-Z_]+),?)?(?:physical_shard_shape=std::([A-Za-z_]+),?)?/,ODe=t=>{const r=t.match(zge);if(r){const e=r[1],n=e.match(PDe),a=e.match(LDe),u=n?n[1]:"",o=a?{grid:a[1],shape:[parseInt(a[2],10),parseInt(a[3],10)],orientation:a[4],halo:parseInt(a[5],10),mode:a[6],physical_shard_shape:a[7]}:"std::nullopt";return{memory_layout:u,shard_spec:o}}return null},Bge={shard_spec:"ShardSpec",memory_layout:"MemoryLayout",grid:"CoreRangeSet",shape:"Shape",orientation:"ShardOrientation",halo:"Halo",mode:"Mode",physical_shard_shape:"PhysicalShardShape"};function LJ(t){return Bge[t]}const kDe=t=>!t.includes("(torch)")&&!t.includes("::")&&!t.includes("ttnn.")&&t!=="",DDe={"SPDX-FileCopyrightText":"© 2025 Tenstorrent AI ULC","SPDX-License-Identifier":"Apache-2.0"},NDe={x_size:10,y_size:12},FDe=["0-10"],zDe=["0-3"],BDe=[["0-0","0-1","0-11"],["0-5","0-6","0-7"],["5-0","5-1","5-11"],["5-2","5-9","5-10"],["5-3","5-4","5-8"],["5-5","5-6","5-7"]],$De=["9-0","1-0","8-0","2-0","7-0","3-0","6-0","4-0","9-6","1-6","8-6","2-6","7-6","3-6","6-6","4-6"],UDe=["1-1","2-1","3-1","4-1","6-1","7-1","8-1","9-1","1-2","2-2","3-2","4-2","6-2","7-2","8-2","9-2","1-3","2-3","3-3","4-3","6-3","7-3","8-3","9-3","1-4","2-4","3-4","4-4","6-4","7-4","8-4","9-4","1-5","2-5","3-5","4-5","6-5","7-5","8-5","9-5","1-7","2-7","3-7","4-7","6-7","7-7","8-7","9-7","1-8","2-8","3-8","4-8","6-8","7-8","8-8","9-8","1-9","2-9","3-9","4-9","6-9","7-9","8-9","9-9","1-10","2-10","3-10","4-10","6-10","7-10","8-10","9-10","1-11","2-11","3-11","4-11","6-11","7-11","8-11","9-11"],HDe=[],jDe=["0-2","0-4","0-8","0-9"],VDe=1499136,GDe=2147483648,WDe=262144,ZDe="WORMHOLE",YDe={unpacker:{version:2,inline_srca_trans_without_srca_trans_instr:!0},math:{dst_size_alignment:131072},packer:{version:2},overlay:{version:2}},XDe={license:DDe,grid:NDe,arc:FDe,pcie:zDe,dram:BDe,eth:$De,functional_workers:UDe,harvested_workers:HDe,router_only:jDe,worker_l1_size:VDe,dram_bank_size:GDe,eth_l1_size:WDe,arch_name:ZDe,features:YDe},KDe={"SPDX-FileCopyrightText":"© 2025 Tenstorrent AI ULC","SPDX-License-Identifier":"Apache-2.0"},QDe={x_size:16,y_size:12},JDe="DRAM banks are NOT grouped by modules",qDe=[["0-0","0-1","0-2","0-3","0-4","0-5","0-6","0-7","0-8","0-9","0-10","0-11","9-0","9-1","9-2","9-3","9-4","9-5","9-6","9-7","9-8","9-9","9-10","9-11"]],e8e=["1-1","2-1","3-1","4-1","5-1","6-1","7-1","9-1","10-1","11-1","12-1","13-1","14-1","15-1"],t8e=["1-2","2-2","3-2","4-2","5-2","6-2","7-2","10-2","11-2","12-2","13-2","14-2","15-2","16-2","1-3","2-3","3-3","4-3","5-3","6-3","7-3","10-3","11-3","12-3","13-3","14-3","15-3","16-3","1-4","2-4","3-4","4-4","5-4","6-4","7-4","10-4","11-4","12-4","13-4","14-4","15-4","16-4","1-5","2-5","3-5","4-5","5-5","6-5","7-5","10-5","11-5","12-5","13-5","14-5","15-5","16-5","1-6","2-6","3-6","4-6","5-6","6-6","7-6","10-6","11-6","12-6","13-6","14-6","15-6","16-6","1-7","2-7","3-7","4-7","5-7","6-7","7-7","10-7","11-7","12-7","13-7","14-7","15-7","16-7","1-8","2-8","3-8","4-8","5-8","6-8","7-8","10-8","11-8","12-8","13-8","14-8","15-8","16-8","1-9","2-9","3-9","4-9","5-9","6-9","7-9","10-9","11-9","12-9","13-9","14-9","15-9","16-9","1-10","2-10","3-10","4-10","5-10","6-10","7-10","10-10","11-10","12-10","13-10","14-10","15-10","16-10","1-11","2-11","3-11","4-11","5-11","6-11","7-11","10-11","11-11","12-11","13-11","14-11","15-11","16-11"],r8e=["8-0"],n8e=["2-0","11-0"],i8e=[],a8e=["1-0","2-0","3-0","4-0","5-0","6-0","7-0","10-0","11-0","12-0","13-0","14-0","15-0","16-0"],o8e=1499136,s8e=2147483648,l8e=262144,u8e="BLACKHOLE",c8e={unpacker:{version:2,inline_srca_trans_without_srca_trans_instr:!0},math:{dst_size_alignment:131072},packer:{version:2},overlay:{version:2}},f8e={license:KDe,grid:QDe,_dram_comment:JDe,dram:qDe,eth:e8e,functional_workers:t8e,arc:r8e,pcie:n8e,harvested_workers:i8e,router_only:a8e,worker_l1_size:o8e,dram_bank_size:s8e,eth_l1_size:l8e,arch_name:u8e,features:c8e};var FO=(t=>(t.UNKNOWN="",t.GRAYSKULL="grayskull",t.WORMHOLE="wormhole_b0",t.BLACKHOLE="blackhole",t))(FO||{});const h8e=t=>t.toLowerCase().includes("wormhole")?"wormhole_b0":t.toLowerCase().includes("blackhole")?"blackhole":"",iH=t=>{const r=/File\s+"(?:.+\/)?([^/]+)",\s+line\s+(\d+)/,e=t.match(r);return e?`${e[1]}:${e[2]}`:""},d8e=async()=>{const t=await Tu.get("/api/instance").catch();return t==null?void 0:t.data},OJ=async t=>{const r=await Tu.put("/api/instance",t).catch();return r==null?void 0:r.data},v8e=async(t,r,e)=>(await Tu.get("/api/buffer-pages",{params:{operation_id:t,address:r,buffer_type:e}})).data,g8e=async t=>{if(t===null)return yJ;try{const{data:r}=await Tu.get(`/api/operations/${t}`,{maxRedirects:1});return{...r,operationFileIdentifier:iH(r.stack_trace)}}catch(r){if(_c.isAxiosError(r)&&(r.response&&r.response.status>=400&&r.response.status<500||r.response&&r.response.status>=500))throw r}return yJ},$ge=async()=>{const t=new Map,{data:r}=await Tu.get("/api/operations");return r.map(e=>{e.operationFileIdentifier=iH(e.stack_trace);const n=e.outputs.map(o=>{const f={...o,producerOperation:e,operationIdentifier:`${e.id} ${e.name} ${e.operationFileIdentifier}`};return t.set(o.id,f),{...f,io:"output"}}),a=e.inputs.map(o=>{const f=t.get(o.id);return f?{...f,io:"input"}:{...o,io:"input"}}),u=e.arguments.map(o=>o.name==="memory_config"||zge.test(o.value)?{...o,parsedValue:o.value?ODe(o.value):null}:o);return{...e,operationFileIdentifier:iH(e.stack_trace),outputs:n,inputs:a,arguments:u}})},p8e=async t=>{const r={buffer_type:t},{data:e}=await Tu.get("/api/operation-buffers",{params:r});return e},m8e=async t=>{const r={buffer_type:t},{data:e}=await Tu.get("/api/buffers",{params:r});return e},y8e=t=>{const r=Ko(u0);return mg({queryFn:()=>m8e(t),queryKey:["fetch-all-buffers",t,r],staleTime:1/0})},TW=()=>{const{data:t}=y8e(Lh.L1_SMALL);return bt.useMemo(()=>{const r=(t==null?void 0:t.map(e=>e.address))||[0];return Math.min(...r)},[t])},_W=()=>{const{data:t}=RD();return bt.useMemo(()=>t&&t.length>0?t[0].address_at_first_l1_cb_buffer:0,[t])},A8e=async()=>{const{data:t}=await Tu.get("/api/devices");return t.length===0&&console.error(" Data integrity warning: No device information provided."),[...new Map(t.map(r=>[r.device_id,r])).values()]},Uge=async t=>{const{data:r}=await Tu.get("/api/performance/perf-results/report",{params:{name:t}});return r},C8e=async()=>{const{data:t}=await Tu.get("/api/performance/device-log/raw");function r(e){const n=e.match(/ARCH:\s*([\w\d_]+)/),a=e.match(/CHIP_FREQ\[MHz\]:\s*(\d+)/),u=n?n[1]:null,o=a?parseInt(a[1],10):null;return{architecture:u,frequency:o}}return new Promise((e,n)=>{const a=t.split(`
|
101
101
|
`),u=a.slice(1),o=r(a[0]),i=[u.shift().split(/,\s{1,2}/).join(","),...u].join(`
|
102
|
-
`);RDe.parse(i,{header:!0,complete:s=>e({deviceMeta:o,deviceLog:s}),error:s=>n(s)})})},I8e=async()=>{const{data:t}=await Tu.get("/api/cluster-descriptor");return t},Hge=()=>{const t=Ko(u0);return mg({queryFn:()=>I8e(),queryKey:["get-cluster-description",t],initialData:null})},yg=()=>{const t=Ko(u0);return mg({queryFn:()=>t!==null?$ge():Promise.resolve([]),queryKey:["get-operations",t],retry:!1,staleTime:1/0})},b8e=()=>{const t=yg();return bt.useMemo(()=>{var r,e,n;return(r=t==null?void 0:t.data)!=null&&r.length?[(e=t.data)==null?void 0:e[0].id,(n=t.data)==null?void 0:n[t.data.length-1].id]:null},[t.isLoading])},x8e=async()=>{const t=await Tu.get("/api/npe");return t==null?void 0:t.data},w8e=t=>mg({queryFn:()=>x8e(),queryKey:["fetch-npe",t],retry:!1,staleTime:1/0}),ED=t=>{const{data:r}=yg(),e=bt.useMemo(()=>(r==null?void 0:r.find(o=>o.id===t))||null,[r,t]),n=bt.useCallback(()=>g8e(t),[t]),a=mg(["get-operation-detail",t],n,{retry:2,retryDelay:o=>Math.min(o*100,500),staleTime:1/0}),u=bt.useMemo(()=>{if(!a.data)return[];const o=new Map;return a.data.buffers.forEach(f=>{const{address:i,max_size_per_bank:s}=f;if(i){const d=o.get(i);(!d||s>d.max_size_per_bank)&&o.set(i,f)}}),Array.from(o.values())},[a.data]);return a.data&&(a.data.buffersSummary=u),{operation:e,operationDetails:a}},T8e=t=>{const{data:r}=yg(),e=r==null?void 0:r.find((n,a,u)=>{var o;return((o=u[a+1])==null?void 0:o.id)===t});return ED(e?e.id:null)},_8e=t=>{const{data:r}=yg(),e=r==null?void 0:r.find((n,a,u)=>{var o;return((o=u[a+1])==null?void 0:o.id)===t});return e?{id:e.id,name:e.name}:void 0},S8e=t=>{const{data:r}=yg(),e=r==null?void 0:r.find((n,a,u)=>{var o;return((o=u[a-1])==null?void 0:o.id)===t});return e?{id:e.id,name:e.name}:void 0},E8e=()=>{const{data:t}=yg(),{data:r}=RD(),e=(n,a)=>{if(a===1)return n;const u=[],o=new Map;for(const{name:i,id:s}of n){const d=`${i}-${s}`;o.set(d,(o.get(d)||0)+1)}const f=new Set;for(const i of n){const s=`${i.name}-${i.id}`;!f.has(s)&&o.get(s)===a&&(u.push(i),f.add(s))}return u};return bt.useMemo(()=>{if(!t||!r)return[];const n=t.flatMap(a=>a.device_operations.filter(u=>u.node_type===ys.function_start&&u.params.name&&kDe(u.params.name)).map(u=>({name:u.params.name,id:a.id,operationName:a.name})));return e(n,r.length)},[t,r])},M8e=()=>{const t=Ko(Uf),r=PD(t);return bt.useMemo(()=>r.data?r.data:[],[r.isLoading])},MD=()=>{const t=E8e(),r=M8e();return bt.useMemo(()=>t.every((n,a)=>{const u=r[a];return u&&u.raw_op_code===n.name?(n.perfData=u,!0):!1})?t:[],[r,t])},SW=()=>{const t=MD();return bt.useMemo(()=>t.map(({id:r,perfData:e})=>({opId:r,perfId:e==null?void 0:e.id})),[t])},jge=()=>{const t=Ko(Uf),{data:r}=PD(t);return bt.useMemo(()=>r!=null&&r.length?[Math.min(...r.map(e=>parseInt(e.id,10))),Math.max(...r.map(e=>parseInt(e.id,10)))]:null,[r])},R8e=(t,r,e)=>mg(["get-buffer-pages",t,r,e],()=>v8e(t,r,e),{staleTime:1/0}),P8e=async()=>{try{const{data:t}=await Tu.get("/api/tensors",{maxRedirects:1}),r=await $ge();for(const e of t)if(e.producers.length>0){const n=e.producers[0],a=r.find(o=>o.id===n),u=a==null?void 0:a.outputs.find(o=>o.id===e.id);u&&(e.operationIdentifier=u.operationIdentifier)}return t}catch(t){if(_c.isAxiosError(t)&&(t.response&&t.response.status>=400&&t.response.status<500||t.response&&t.response.status>=500))throw t}return[GOe]},Vge=()=>{const t=Ko(u0);return mg({queryFn:()=>P8e(),queryKey:["get-tensors",t],retry:!1,staleTime:1/0})},RD=()=>{const t=Ko(u0);return mg({queryFn:()=>t!==null?A8e():Promise.resolve([]),queryKey:["get-devices",t],retry:!1,staleTime:1/0})},aH=(t,r)=>{const e=Ko(z3),n=Ko(u0),a=mg({queryFn:()=>p8e(t),queryKey:["fetch-all-buffers",t,n],staleTime:1/0});return bt.useMemo(()=>(a.data&&e&&r&&(a.data=a.data.filter(u=>u.id>=e[0]&&u.id<=e[1])),a),[e,a.isLoading,r])},L8e=()=>{const t=Ko(Uf);return mg({queryFn:()=>C8e(),queryKey:["get-device-log-raw",t],staleTime:1/0})},PD=t=>{const r=mg({queryFn:()=>t!==null?Uge(t):Promise.resolve([]),queryKey:["get-performance-report",t],enabled:t!==null});return bt.useMemo(()=>{if(r.data){const e=r.data.slice().filter(n=>{var a;return!((a=n.op_code)!=null&&a.includes("(torch)"))&&n.op_code!==""});r.data=e}return r},[r.isLoading])},O8e=t=>{const r=mg({queryFn:()=>t!==null?Uge(t):Promise.resolve([]),queryKey:["get-performance-comparison-report",t],staleTime:1/0,enabled:t!==null});return bt.useMemo(()=>{if(r.data){const e=r.data.slice().filter(n=>{var a;return!((a=n.op_code)!=null&&a.includes("(torch)"))&&n.op_code!==""});r.data=e}return r},[r.isLoading,t])},EW=()=>{const t=Ko(u0),r=Ko(Uf),e=Ko(AD);return mg({queryFn:()=>d8e(),queryKey:["get-session",t,r,e],initialData:null})},Gge=t=>{switch(t){case FO.WORMHOLE:return XDe;case FO.BLACKHOLE:return f8e;default:return console.error(`Unsupported arch: ${t}`),{}}},k8e=t=>{const{data:r}=Vge(),e=aH(Lh.L1,!1);return t.map(n=>{var u;const a=r==null?void 0:r.find(o=>o.id===n);if(a){const o=a==null?void 0:a.producers[0],f=(u=e.data)==null?void 0:u.find(s=>s.id===o),i=f==null?void 0:f.buffers.find(s=>s.address===a.address);return{id:a.id,size:(i==null?void 0:i.size)||null}}return null}).filter(n=>n!==null)},D8e=t=>{const r=Gge(t),e=bt.useMemo(()=>{var o;return(o=r.functional_workers)==null?void 0:o.map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]),n=bt.useMemo(()=>{var o;return(o=r.dram)==null?void 0:o.flat().map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]),a=bt.useMemo(()=>{var o;return(o=r.eth)==null?void 0:o.flat().map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]),u=bt.useMemo(()=>{var o;return(o=r.pcie)==null?void 0:o.map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]);return{architecture:r,cores:e,dram:n,eth:a,pcie:u}},Wge="fetch-profiler-folder-list",N8e=async()=>{const{data:t}=await Tu.get("/api/profiler");return t},F8e=async t=>{const{data:r}=await Tu.delete(`/api/profiler/${t}`);return r},Zge=()=>mg({queryFn:()=>N8e(),queryKey:[Wge],initialData:null}),Yge="fetch-performance-folder-list",z8e=async()=>{const{data:t}=await Tu.get("/api/performance");return t},B8e=async t=>{const{data:r}=await Tu.delete(`/api/performance/${t}`);return r},Xge=()=>mg({queryFn:()=>z8e(),queryKey:[Yge],initialData:null});function $8e(){const t=SI(),r=fy(),e=Ko(u0),n=Ko(Uf),a=d=>{t(d)},u=d=>{t(d,{state:{background:r}})},o=Hge(),f=!!e,i=!!n;return He.jsx(a3,{className:"navbar",children:He.jsxs(a3.Group,{align:ex.END,children:[He.jsx(Ta,{text:"Reports",onClick:()=>a(os.HOME),active:s(os.HOME),icon:Ti.DOCUMENT_OPEN,variant:"minimal",size:"large",className:"reports-button"}),He.jsx(Ta,{text:"Operations",onClick:()=>a(os.OPERATIONS),active:s(os.OPERATIONS),icon:Ti.CUBE,disabled:!f,variant:"minimal",size:"large",className:"operations-button"}),He.jsx(Ta,{text:"Tensors",onClick:()=>a(os.TENSORS),active:s(os.TENSORS),icon:Ti.FLOW_LINEAR,disabled:!f,variant:"minimal",size:"large",className:"tensors-button"}),He.jsx(Ta,{text:"Buffers",onClick:()=>a(os.BUFFERS),active:s(os.BUFFERS),icon:Ti.SMALL_SQUARE,disabled:!f,variant:"minimal",size:"large",className:"buffers-button"}),He.jsx(Ta,{text:"Graph",onClick:()=>a(os.GRAPHTREE),active:s(os.GRAPHTREE),icon:Ti.GRAPH,disabled:!f,variant:"minimal",size:"large",className:"graph-button"}),He.jsx(Ta,{text:"Performance",onClick:()=>a(os.PERFORMANCE),active:s(os.PERFORMANCE),icon:Ti.LIGHTNING,disabled:!i,variant:"minimal",size:"large",className:"performance-button"}),He.jsx(Ta,{text:"NPE",onClick:()=>a(os.NPE),active:s(os.NPE),icon:Ti.Random,variant:"minimal",size:"large",className:"npe-button",children:He.jsx("small",{children:"beta"})}),He.jsx(Ta,{text:"Topology",onClick:()=>u(os.CLUSTER),active:s(os.CLUSTER),disabled:o.data===null,icon:Ti.LayoutGrid,variant:"minimal",size:"large",className:"cluster-button modal"})]})});function s(d){var l,h,y,b;return!!(r.pathname===d||r.pathname.includes(d)&&d!==os.HOME||((h=(l=r.state)==null?void 0:l.background)==null?void 0:h.pathname)===d||(b=(y=r.state)==null?void 0:y.background)!=null&&b.pathname.includes(d)&&d!==os.HOME)}}const U8e=()=>{const r=MD().length>0;return He.jsx("span",{children:r?He.jsxs("strong",{children:[He.jsx(Hs,{icon:Ti.TickCircle,intent:lo.SUCCESS})," ","Profiler and perf reports synchronised"]}):He.jsxs("strong",{children:[He.jsx(Hs,{icon:Ti.ISSUE,intent:lo.DANGER})," ","Profiler and perf reports can't be synchronized"]})})};var MW=(t=>(t.SMALL="small",t))(MW||{});function Tv({size:t}){return He.jsxs("div",{className:_i("loading-spinner",{small:t===MW.SMALL}),children:[He.jsx("div",{}),He.jsx("div",{}),He.jsx("div",{}),He.jsx("div",{})]})}const kJ=25;function H8e(){const t=Ko(Uf),r=qm(uge),[e,n]=Xl(z3),a=qm(cge),[u,o]=Xl(fge),f=Ko(hy),[i,s]=bt.useState(!1),[d,l]=bt.useState(!1),{data:h}=yg(),{data:y}=PD(t),b=fy(),C=MD(),m=(C==null?void 0:C.length)>0,c=SW(),v=b8e(),g=jge(),p=v==null?void 0:v[0],I=v==null?void 0:v[1],A=g==null?void 0:g[0],w=g==null?void 0:g[1],T=b.pathname.includes(`${os.OPERATIONS}/`),E=b.pathname===os.PERFORMANCE,x=T||E,S=()=>{n(v),o(g)};return bt.useEffect(()=>{v&&(r(v),n(v))},[v,r,n]),bt.useEffect(()=>{g&&(a(g),o(g))},[g,a,o]),bt.useEffect(()=>{var _,L;if(m&&e&&g&&u&&i){const k=((_=c.find(z=>e[0]===z.opId))==null?void 0:_.perfId)??c.reduce((z,M)=>Math.abs((M.opId??0)-e[0])<Math.abs((z.opId??0)-e[0])?M:z).perfId,F=((L=c.find(z=>e[1]===z.opId))==null?void 0:L.perfId)??c.reduce((z,M)=>Math.abs((M.opId??0)-e[1])<Math.abs((z.opId??0)-e[1])?M:z).perfId,N=Number(k)||(e[0]<c[0].opId?A:u[0]),P=Number(F)||(e[1]>c[c.length-1].opId?w:u[1]);o([N,P]),s(!1)}},[m,e]),bt.useEffect(()=>{var _,L,k,F;if(m&&e&&g&&u&&d){const N=((_=c.find(R=>u[0]===Number(R.perfId)))==null?void 0:_.opId)??c.reduce((R,D)=>Math.abs((Number(D.perfId)??0)-u[0])<Math.abs((Number(R.perfId)??0)-u[0])?D:R).opId,P=((L=c.find(R=>u[1]===Number(R.perfId)))==null?void 0:L.opId)??c.reduce((R,D)=>Math.abs((Number(D.perfId)??0)-u[1])<Math.abs((Number(R.perfId)??0)-u[1])?D:R).opId,z=N||(u[0]<Number(((k=c==null?void 0:c[0])==null?void 0:k.perfId)??0)?p:e[0]),M=P||(u[1]>Number(((F=c==null?void 0:c[c.length-1])==null?void 0:F.perfId)??0)?I:e[1]);n([z,M]),l(!1)}},[m,u]),e||u?He.jsxs("div",{className:"range-slider",children:[u&&He.jsxs("div",{className:"slider",children:[He.jsx("div",{className:"inputs",children:He.jsxs("div",{className:"group",children:[He.jsx(nh,{value:u[0].toString(),onValueChange:_=>{o([parseInt(_,10)||A,u[1]]),l(!0)},fill:!1,disabled:!E,size:"small"}),He.jsx(nh,{value:u[1].toString(),onValueChange:_=>{o([u[0],parseInt(_,10)||w]),l(!0)},fill:!1,disabled:!E,size:"small"})]})}),A&&w&&u&&He.jsxs("div",{className:"slider-container",children:[He.jsx(rJ,{value:u,onChange:_=>{o(_),l(!0)},min:A,max:w,labelStepSize:DJ(w),disabled:!E||!!f,labelRenderer:(_,L)=>V8e(_,y,L==null?void 0:L.isHandleTooltip)}),He.jsx("p",{children:"Performance"})]}),He.jsx("div",{className:"inputs",children:g&&He.jsx(_s,{content:"Reset range",children:He.jsx(Ta,{icon:Ti.RESET,onClick:()=>m?S():o(g),disabled:!E,size:"small"})})})]}),He.jsxs("div",{className:"slider",children:[e&&He.jsx("div",{className:"inputs",children:He.jsxs("div",{className:"group",children:[He.jsx(nh,{value:e[0].toString(),onValueChange:_=>{n([parseInt(_,10)||p,e[1]]),s(!0)},fill:!1,disabled:x,size:"small"}),He.jsx(nh,{value:e[1].toString(),onValueChange:_=>{n([e[0],parseInt(_,10)||I]),s(!0)},fill:!1,disabled:x,size:"small"})]})}),p&&I&&e&&He.jsxs("div",{className:"slider-container",children:[He.jsx(rJ,{value:e,onChange:_=>{n(_),s(!0)},min:p,max:I,labelStepSize:DJ(I),disabled:x,labelRenderer:(_,L)=>j8e(_,h,L==null?void 0:L.isHandleTooltip)}),He.jsx("p",{children:"Operations"})]}),v&&He.jsx(_s,{content:"Reset range",children:He.jsx(Ta,{icon:Ti.RESET,onClick:()=>m?S():n(v),disabled:x,size:"small"})})]})]}):He.jsx(Tv,{})}const DJ=t=>kJ>t?1:Math.ceil(t/kJ),j8e=(t,r,e)=>{const n=r==null?void 0:r.find(a=>a.id===t);return n&&e?`${n.id} ${n.name}`:t.toString()},V8e=(t,r,e)=>{const n=r==null?void 0:r.find(a=>parseInt(a.id,10)===t);return n&&e?`${n.id} ${n.raw_op_code}`:t.toString()},G8e=20;function W8e(){const[t,r]=bt.useState(!1),e=Ko(z3),n=Ko(uge),a=Ko(cge),u=Ko(u0),o=Ko(Uf),{data:f}=Zge(),i=fy(),s=i.pathname.includes(`${os.OPERATIONS}/`),d=i.pathname===os.PERFORMANCE,l=i.pathname.includes(`${os.NPE}`);bt.useEffect(()=>{(s||l)&&r(!1)},[l,s]);const h=()=>d?a&&`Selected Performance: ${a[0]} - ${a[1]}`:e&&`Selected: ${e[0]} - ${e[1]}`,y=Y8e(f,u);return He.jsxs("footer",{className:_i("app-footer",{"is-open":t}),children:[He.jsxs("div",{className:"current-data",children:[He.jsxs("div",{className:"active-reports",children:[y&&He.jsx(_s,{content:`/${u}`,position:sl.TOP,children:He.jsxs("div",{className:"title",children:[He.jsx("strong",{children:"Report:"}),He.jsx("span",{className:"report-name",children:y})]})}),o&&(o.length>G8e?He.jsx(_s,{content:o,className:"title",children:He.jsxs("div",{className:"title",children:[He.jsx("strong",{children:"Performance:"}),He.jsx("span",{className:"report-name",children:o})]})}):He.jsxs("div",{className:"title",children:[He.jsx("strong",{children:"Performance:"}),He.jsx("span",{className:"report-name",children:o})]})),u&&o&&He.jsx(U8e,{})]}),(n||a)&&He.jsxs("div",{className:"slider-controls",children:[!t&&!Z8e(e,n)&&He.jsx("span",{className:"current-range",children:h()}),He.jsx(Ta,{icon:t?Ti.CARET_DOWN:Ti.CARET_UP,onClick:()=>r(!t),disabled:s,size:"small",children:"Range"})]})]}),(u||o)&&He.jsx(uW,{className:"slider-container",isOpen:t,keepChildrenMounted:!0,children:He.jsx(H8e,{})})]})}const Z8e=(t,r)=>!!(t&&r&&t[0]===r[0]&&t[1]===r[1]),Y8e=(t,r)=>{var e;return(e=t==null?void 0:t.find(n=>n.path===r))==null?void 0:e.reportName};var Z1=(t=>(t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t))(Z1||{}),tg=(t=>(t[t.X=0]="X",t[t.Y=1]="Y",t[t.R=2]="R",t[t.S=3]="S",t))(tg||{});const X8e="Wormhole",bE=6,K8e=350,NJ=250,Q8e=150;function J8e(){const t=SI(),r=Hge(),e=r==null?void 0:r.data,n=h8e((e==null?void 0:e.arch.length)&&(e==null?void 0:e.arch[0])||X8e),a=Gge(n);let u=K8e;const o=He.jsx("h1",{className:"cluster-view-header",children:He.jsx(Ta,{icon:Ti.CROSS,onClick:()=>{t(-1)}})});if(!e)return He.jsxs("div",{className:"cluster-view-wrap",children:[o,He.jsx("p",{children:"Loading..."})]});let f=0;const i=e.chips_with_mmio.map(l=>Object.values(l)[0]),s=e.ethernet_connections,d=Object.entries(e.chips).map(([l,h])=>{const y=parseInt(l,10);f=Math.max(f,h[tg.X]);const b={id:y,coords:h,mmio:i.includes(y),connectedChipsByEthId:new Map,eth:a.eth.map(C=>`${l}-${C}`)};return b.design=a,b});return d.length>=8&&(u=NJ),d.length>=32&&(u=Q8e),s.forEach(l=>{const h=d[l[0].chip],y=d[l[1].chip];h&&y&&(h.connectedChipsByEthId.set(h.eth[l[0].chan]??"",y),y.connectedChipsByEthId.set(y.eth[l[1].chan]??"",h))}),He.jsxs("div",{className:"cluster-view-renderer",children:[o,He.jsx("div",{className:"cluster-view-wrap",children:He.jsx("div",{className:"cluster",style:{gridTemplateColumns:`repeat(${f||0}, ${u}px)`},children:d.map(l=>{var y;const h=new Map;return(y=l.design)==null||y.eth.forEach(b=>{var v;const C=`${l.id}-${b}`,m=l.connectedChipsByEthId.get(C);let c=null;m&&((m==null?void 0:m.coords[tg.X])<l.coords[tg.X]&&(c=Z1.LEFT),(m==null?void 0:m.coords[tg.X])>l.coords[tg.X]&&(c=Z1.RIGHT),(m==null?void 0:m.coords[tg.Y])<l.coords[tg.Y]&&(c=Z1.TOP),(m==null?void 0:m.coords[tg.Y])>l.coords[tg.Y]&&(c=Z1.BOTTOM)),c&&(h.has(c)?(v=h.get(c))==null||v.push(C):h.set(c,[C]))}),He.jsxs("div",{className:"chip",style:{display:"grid",width:`${u}px`,height:`${u}px`,gridColumn:l.coords[tg.X]+1,gridRow:l.coords[tg.Y]+1,gridTemplateColumns:`repeat(${bE}, 1fr)`,gridTemplateRows:`repeat(${bE}, 1fr)`},children:[He.jsxs("span",{className:"chip-id",style:{lineHeight:`${u}px`,paddingRight:`${u/4}px`,paddingTop:`${u/5}px`},children:[u>=NJ&&"Device"," ",l.id]}),[...h.entries()].map(([b,C])=>C.map((m,c)=>{const{x:v,y:g}=q8e(b,c),p=u/bE-5;return He.jsx("div",{title:`${m}`,className:`eth eth-position-${b}`,style:{gridColumn:v,gridRow:g,width:`${p}px`,height:`${p}px`},children:He.jsx("span",{children:m})},m)})),l.mmio&&He.jsx("div",{className:"mmio",children:"PCIe"})]},l.id)})})})]})}const q8e=(t,r)=>{let e=0,n=0;switch(t){case Z1.TOP:e=r+2,n=1;break;case Z1.BOTTOM:e=r+2,n=bE;break;case Z1.LEFT:e=1,n=r+2;break;case Z1.RIGHT:e=bE,n=r+2;break;default:return{x:e,y:n}}return{x:e,y:n}};function e9e({routes:t}){const r=fy(),e=r.state,n=e==null?void 0:e.background;return SEe(t,n||r)}const LF=navigator.userAgent.toLowerCase(),FJ=LF.includes("safari")&&!LF.includes("chrome")&&!LF.includes("android"),Kge=()=>{function t(f){const s=Array.from(f).map(h=>h.webkitRelativePath);if(s.length===0)return null;const l=s.reduce((h,y)=>h.split("/").filter((C,m)=>C===y.split("/")[m]).join("/")).split("/");return l.length>=1?l[l.length-1]:null}function r(f,i=["tensors"]){const d=Array.from(f).filter(h=>!i.some(y=>{var b;return(b=h.webkitRelativePath)==null?void 0:b.includes(`/${y}/`)})),l=new DataTransfer;return d.forEach(h=>l.items.add(h)),l.files}return{getUploadedFolderName:t,checkRequiredReportFiles:f=>{const i=["db.sqlite","config.json"],s=new Set;return Array.from(f).forEach(d=>{const l=d.webkitRelativePath.split("/");l.length===2&&s.add(l[1])}),i.every(d=>s.has(d))},checkRequiredProfilerFiles:f=>{const i=["profile_log_device.csv","tracy_profile_log_host.tracy"],s="ops_perf_results",d=new Set;Array.from(f).forEach(y=>{const b=y.webkitRelativePath.split("/");b.length===2&&d.add(b[1])});const l=i.every(y=>d.has(y)),h=Array.from(d).some(y=>y.startsWith(s));return l&&h},uploadLocalFolder:async f=>{const i=eL(),s=new FormData;return Array.from(f).forEach(d=>{s.append("files",d)}),FJ&&s.append("folderName",f[0].webkitRelativePath.split("/")[0]),Tu.post("api/local/upload/profiler",s,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:d=>{if(d&&d.total!==null&&d.total!==void 0){const l=Math.round(d.loaded*100/d.total);i.set(bC,{percentOfCurrent:l,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.UPLOADING})}}}).catch(d=>d).finally(()=>{i.set(bC,{percentOfCurrent:0,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.INACTIVE})})},uploadLocalPerformanceFolder:async f=>{const i=new FormData,s=eL();return Array.from(f).forEach(d=>{i.append("files",d)}),FJ&&i.append("folderName",f[0].webkitRelativePath.split("/")[0]),Tu.post("api/local/upload/performance",i,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:d=>{if(d&&d.total!==null&&d.total!==void 0){const l=Math.round(d.loaded*100/d.total);s.set(bC,{percentOfCurrent:l,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.UPLOADING})}}}).catch(d=>d).finally(()=>{s.set(bC,{percentOfCurrent:0,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.INACTIVE})})},uploadNpeFile:async f=>{const i=eL(),s=new FormData;return Array.from(f).forEach(d=>{s.append("files",d)}),Tu.post("api/local/upload/npe",s,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:d=>{if(d&&d.total!==null&&d.total!==void 0){const l=Math.round(d.loaded*100/d.total);i.set(bC,{percentOfCurrent:l,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.UPLOADING})}}}).catch(d=>d).finally(()=>{i.set(bC,{percentOfCurrent:0,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.INACTIVE})})},filterReportFiles:r}};var Wo=(t=>(t[t.IDLE=0]="IDLE",t[t.PROGRESS=1]="PROGRESS",t[t.FAILED=2]="FAILED",t[t.OK=3]="OK",t))(Wo||{});function Qge({isOpen:t,onClose:r,children:e,hideCloseButton:n=!1,canEscapeKeyClose:a=!0,canOutsideClickClose:u=!0}){return He.jsx(mA,{isOpen:t,onClose:r,className:Nde,canEscapeKeyClose:a,canOutsideClickClose:u,children:He.jsxs("div",{className:_i("overlay-contents",YT,Sde,k5e),children:[e,!n&&He.jsx("div",{className:Mde,children:He.jsx(Ta,{intent:lo.DANGER,onClick:r,children:"Close"})})]})})}function aL({progress:t,estimated:r}){return He.jsxs("div",{className:"progress-bar",children:[He.jsx(zve,{value:t}),t&&r?He.jsxs("span",{className:"status",children:[t>0?`${Math.round(t*100)}%`:"100%"," - ",r>0?`${Math.round(r)}s left`:"0s left"]}):null]})}const t9e=()=>{const t=f=>f.toFixed(2).padStart(5,"0"),[r]=Xl(bC),{currentFileName:e,finishedFiles:n,numberOfFiles:a,percentOfCurrent:u,status:o}=r;return He.jsxs(Qge,{isOpen:[tm.STARTED,tm.COMPRESSING,tm.DOWNLOADING,tm.UPLOADING].includes(o),hideCloseButton:!0,canEscapeKeyClose:!1,canOutsideClickClose:!1,children:[He.jsxs("div",{className:"overlay",children:[He.jsx("h2",{children:"File Transfer Progress"}),e&&He.jsxs("p",{children:["Current File: ",e]}),a&&He.jsxs("p",{children:["Files Transferred: ",n,"/",a]}),He.jsxs("p",{children:["Current File Progress: ",t(u),"%"]}),o&&He.jsxs("p",{children:["Status: ",o.valueOf()]})]}),He.jsx(aL,{progress:u/100})]})},r9e=({message:t,fileName:r})=>He.jsxs("div",{children:[t,He.jsx("br",{}),He.jsx("strong",{children:r})]});function B1(t,r){pu(He.jsx(r9e,{message:t,fileName:r}),{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!1,draggable:!0,progress:void 0,theme:"light"})}var Jge=PG(),vM="".concat(Jge,"-multi-select"),n9e="".concat(vM,"-popover"),i9e="".concat(vM,"-popover-default-width"),a9e="".concat(vM,"-popover-tag-input-margin"),zJ="".concat(vM,"-tag-input-input"),o9e="".concat(Jge,"-select-popover");function s9e(t,r,e){if(t.query.length===0&&e!==void 0)return e;var n=t.filteredItems.map(t.renderItem).filter(function(a){return a!=null});return n.length>0?n:r}function uP(t,r,e){return t===void 0||r==null||e==null?r===e:ud(t)?t(r,e):r[t]===e[t]}function BJ(){return{__blueprintCreateNewItemBrand:"blueprint-create-new-item"}}function D2(t){if(t==null)return!1;var r=Object.keys(t);return r.length!==1||r[0]!=="__blueprintCreateNewItemBrand"?!1:t.__blueprintCreateNewItemBrand==="blueprint-create-new-item"}function cP(t){return t==null||D2(t)?null:t}var qge=function(t){Es(r,t);function r(e){var n,a,u=t.call(this,e)||this;u.itemRefs=new Map,u.refHandlers={itemsParent:function(d){return u.itemsParentRef=d}},u.shouldCheckActiveItemInViewport=!1,u.expectedNextActiveItem=null,u.isEnterKeyPressed=!1,u.renderItemList=function(d){var l=u.props,h=l.initialContent,y=l.noResults,b=d.renderCreateItem(),C=b!=null?null:y,m=s9e(d,C,h);if(m==null&&b==null)return null;var c=u.isCreateItemFirst();return bt.createElement(eW,Kn({role:"listbox"},d.menuProps,{ulRef:d.itemsParentRef}),c&&b,m,!c&&b)},u.renderItem=function(d,l){if(u.props.disabled!==!0){var h=u.state,y=h.activeItem,b=h.query,C=h.filteredItems,m={active:uP(u.props.itemsEqual,cP(y),d),disabled:oH(d,l,u.props.itemDisabled),matchesPredicate:C.indexOf(d)>=0};return u.props.itemRenderer(d,{handleClick:function(c){return u.handleItemSelect(d,c)},handleFocus:function(){return u.setActiveItem(d)},index:l,modifiers:m,query:b,ref:function(c){c?u.itemRefs.set(l,c):u.itemRefs.delete(l)}})}return null},u.renderCreateItemMenuItem=function(){if(u.isCreateItemRendered(u.state.createNewItem)){var d=u.state,l=d.activeItem,h=d.query,y=h.trim(),b=function(m){u.handleItemCreate(y,m)},C=D2(l);return u.props.createNewItemRenderer(y,C,b)}return null},u.handleItemCreate=function(d,l){var h,y,b,C,m=(y=(h=u.props).createNewItemFromQuery)===null||y===void 0?void 0:y.call(h,d);if(m!=null){for(var c=Array.isArray(m)?m:[m],v=0,g=c;v<g.length;v++){var p=g[v];(C=(b=u.props).onItemSelect)===null||C===void 0||C.call(b,p,l)}u.maybeResetQuery()}},u.handleItemSelect=function(d,l){var h,y;u.setActiveItem(d),(y=(h=u.props).onItemSelect)===null||y===void 0||y.call(h,d,l),u.maybeResetQuery()},u.handlePaste=function(d){for(var l=u.props,h=l.createNewItemFromQuery,y=l.onItemsPaste,b,C=[],m=[],c=0,v=d;c<v.length;c++){var g=v[c],p=l9e(g,u.props);if(p!==void 0)b=p,m.push(p);else if(u.canCreateItems()){var I=h==null?void 0:h(g);if(I!==void 0){var A=Array.isArray(I)?I:[I];m.push.apply(m,A)}}else C.push(g)}u.setQuery(C.join(", "),!1),b!==void 0&&u.setActiveItem(b),y==null||y(m)},u.handleKeyDown=function(d){var l,h;if(!d.nativeEvent.isComposing){var y=d.key,b=uD(d,["ArrowUp"],["ArrowDown"]);if(b!==void 0){d.preventDefault();var C=u.getNextActiveItem(b);C!=null&&u.setActiveItem(C)}else y==="Enter"&&(u.isEnterKeyPressed=!0)}(h=(l=u.props).onKeyDown)===null||h===void 0||h.call(l,d)},u.handleKeyUp=function(d){var l=u.props.onKeyUp,h=u.state.activeItem;d.key==="Enter"&&u.isEnterKeyPressed&&(d.preventDefault(),h==null||D2(h)?u.handleItemCreate(u.state.query,d):u.handleItemSelect(h,d),u.isEnterKeyPressed=!1),l==null||l(d)},u.handleInputQueryChange=function(d){var l,h,y=d==null?"":d.target.value;u.setQuery(y),(h=(l=u.props).onQueryChange)===null||h===void 0||h.call(l,y,d)};var o=e.query,f=o===void 0?"":o,i=(n=e.createNewItemFromQuery)===null||n===void 0?void 0:n.call(e,f),s=UJ(f,e);return u.state={activeItem:e.activeItem!==void 0?e.activeItem:(a=e.initialActiveItem)!==null&&a!==void 0?a:OF(s,e.itemDisabled),createNewItem:i,filteredItems:s,query:f},u}return r.ofType=function(){return r},r.prototype.render=function(){var e=this.props,n=e.className,a=e.items,u=e.renderer,o=e.itemListRenderer,f=o===void 0?this.renderItemList:o,i=e.menuProps,s=this.state;s.createNewItem;var d=Ms(s,["createNewItem"]);return u(Kn(Kn({},d),{className:n,handleItemSelect:this.handleItemSelect,handleKeyDown:this.handleKeyDown,handleKeyUp:this.handleKeyUp,handlePaste:this.handlePaste,handleQueryChange:this.handleInputQueryChange,itemList:f(Kn(Kn({},d),{items:a,itemsParentRef:this.refHandlers.itemsParent,menuProps:i,renderCreateItem:this.renderCreateItemMenuItem,renderItem:this.renderItem}))}))},r.prototype.componentDidUpdate=function(e){var n=this;this.props.activeItem!==void 0&&this.props.activeItem!==this.state.activeItem&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:this.props.activeItem})),this.props.query!=null&&this.props.query!==e.query?this.setQuery(this.props.query,this.props.resetOnQuery,this.props):wv(this.props,e,{include:["items","itemListPredicate","itemPredicate"]})||this.setQuery(this.state.query),this.shouldCheckActiveItemInViewport&&(this.requestAnimationFrame(function(){return n.scrollActiveItemIntoView()}),this.shouldCheckActiveItemInViewport=!1)},r.prototype.scrollActiveItemIntoView=function(){var e=this.props.scrollToActiveItem!==!1,n=!uP(this.props.itemsEqual,cP(this.expectedNextActiveItem),cP(this.props.activeItem));if(this.expectedNextActiveItem=null,!(!e&&n)){var a=this.getActiveElement();if(this.itemsParentRef!=null&&a!=null){var u=a.offsetTop,o=a.offsetHeight,f=this.itemsParentRef,i=f.offsetTop,s=f.scrollTop,d=f.clientHeight,l=this.getItemsParentPadding(),h=l.paddingTop,y=l.paddingBottom,b=u+o+y-i,C=u-h-i;b>=s+d?this.itemsParentRef.scrollTop=b+o-d:C<=s&&(this.itemsParentRef.scrollTop=C-o)}}},r.prototype.setQuery=function(e,n,a){var u;n===void 0&&(n=this.props.resetOnQuery),a===void 0&&(a=this.props);var o=a.createNewItemFromQuery;this.shouldCheckActiveItemInViewport=!0;var f=e!==this.state.query;f&&((u=a.onQueryChange)===null||u===void 0||u.call(a,e));var i=e.trim(),s=UJ(i,a),d=o!=null&&i!==""?o(i):void 0;this.setState({createNewItem:d,filteredItems:s,query:e});var l=this.getActiveIndex(s),h=n||l<0||oH(cP(this.state.activeItem),l,a.itemDisabled);h&&(this.isCreateItemRendered(d)&&this.isCreateItemFirst()?this.setActiveItem(BJ()):this.setActiveItem(OF(s,a.itemDisabled)))},r.prototype.setActiveItem=function(e){var n,a,u,o;this.expectedNextActiveItem=e,this.props.activeItem===void 0&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:e})),D2(e)?(a=(n=this.props).onActiveItemChange)===null||a===void 0||a.call(n,null,!0):(o=(u=this.props).onActiveItemChange)===null||o===void 0||o.call(u,e,!1)},r.prototype.getActiveElement=function(){var e,n=this.state.activeItem;if(this.itemsParentRef!=null)if(D2(n)){var a=this.isCreateItemFirst()?0:this.state.filteredItems.length;return this.itemsParentRef.children.item(a)}else{var u=this.getActiveIndex();return(e=this.itemRefs.get(u))!==null&&e!==void 0?e:this.itemsParentRef.children.item(u)}},r.prototype.getActiveIndex=function(e){e===void 0&&(e=this.state.filteredItems);var n=this.state.activeItem;if(n==null||D2(n))return-1;for(var a=0;a<e.length;++a)if(uP(this.props.itemsEqual,e[a],n))return a;return-1},r.prototype.getItemsParentPadding=function(){var e=getComputedStyle(this.itemsParentRef),n=e.paddingTop,a=e.paddingBottom;return{paddingBottom:$J(a),paddingTop:$J(n)}},r.prototype.getNextActiveItem=function(e,n){if(n===void 0&&(n=this.getActiveIndex()),this.isCreateItemRendered(this.state.createNewItem)){var a=n===0&&e===-1||n===this.state.filteredItems.length-1&&e===1;if(a)return BJ()}return OF(this.state.filteredItems,this.props.itemDisabled,e,n)},r.prototype.isCreateItemRendered=function(e){return this.canCreateItems()&&this.state.query!==""&&!this.wouldCreatedItemMatchSomeExistingItem(e)},r.prototype.isCreateItemFirst=function(){return this.props.createNewItemPosition==="first"},r.prototype.canCreateItems=function(){return this.props.createNewItemFromQuery!=null&&this.props.createNewItemRenderer!=null},r.prototype.wouldCreatedItemMatchSomeExistingItem=function(e){var n=this;return this.state.filteredItems.some(function(a){var u=Array.isArray(e)?e:[e];return u.some(function(o){return uP(n.props.itemsEqual,a,o)})})},r.prototype.maybeResetQuery=function(){this.props.resetOnSelect&&this.setQuery("",!0)},r.displayName="".concat(Uo,".QueryList"),r.defaultProps={disabled:!1,resetOnQuery:!0},r}(F3);function $J(t){return t==null?0:parseInt(t.slice(0,-2),10)}function l9e(t,r){var e=r.items,n=r.itemPredicate;if(ud(n))for(var a=0;a<e.length;a++){var u=e[a];if(n(t,u,a,!0))return u}}function UJ(t,r){var e=r.items,n=r.itemPredicate,a=r.itemListPredicate;return ud(a)?a(t,e):ud(n)?e.filter(function(u,o){return n(t,u,o)}):e}function u9e(t,r,e){return t<r?e:t>e?r:t}function oH(t,r,e){return e==null||t==null?!1:ud(e)?e(t,r):!!t[e]}function OF(t,r,e,n){if(e===void 0&&(e=1),n===void 0&&(n=t.length-1),t.length===0)return null;var a=n,u=t.length-1;do if(a=u9e(a+e,0,u),!oH(t[a],a,r))return t[a];while(a!==n&&n!==-1);return null}var epe=function(t){Es(r,t);function r(){var e,n=t.apply(this,arguments)||this;return n.listboxId=LG("listbox"),n.state={isOpen:n.props.popoverProps&&n.props.popoverProps.isOpen||!1},n.input=null,n.queryList=null,n.refHandlers={input:Ux(n,"input",(e=n.props.tagInputProps)===null||e===void 0?void 0:e.inputRef),popover:bt.createRef(),queryList:function(a){return n.queryList=a}},n.renderQueryList=function(a){var u,o=n.props,f=o.disabled,i=o.popoverContentProps,s=i===void 0?{}:i,d=o.popoverProps,l=d===void 0?{}:d,h=a.handleKeyDown,y=a.handleKeyUp;return bt.createElement(uw,Kn({autoFocus:!1,canEscapeKeyClose:!0,disabled:f,enforceFocus:!1,isOpen:n.state.isOpen,placement:l.position||l.placement?void 0:"bottom-start"},l,{className:_i(a.className,l.className),content:bt.createElement("div",Kn({className:n.props.customTarget!=null&&!(!((u=n.props.popoverProps)===null||u===void 0)&&u.matchTargetWidth)?i9e:void 0},s,{onKeyDown:h,onKeyUp:y}),n.props.customTarget!=null&&n.getTagInput(a,_i(cp,a9e)),a.itemList),interactionKind:"click",onInteraction:n.handlePopoverInteraction,onOpened:n.handlePopoverOpened,popoverClassName:_i(n9e,l.popoverClassName),popupKind:RO.LISTBOX,ref:pA(n.refHandlers.popover,n.props.popoverRef),renderTarget:n.getPopoverTargetRenderer(a,n.state.isOpen)}))},n.getPopoverTargetRenderer=function(a,u){return function(o){var f;o.isOpen;var i=o.ref,s=Ms(o,["isOpen","ref"]),d=n.props,l=d.disabled,h=d.fill,y=d.selectedItems,b=d.popoverProps,C=b===void 0?{}:b,m=d.popoverTargetProps,c=m===void 0?{}:m,v=a.handleKeyDown,g=a.handleKeyUp,p=C.targetTagName,I=p===void 0?"div":p;return bt.createElement(I,Kn(Kn(Kn({"aria-autocomplete":"list","aria-controls":n.listboxId},c),s),{"aria-disabled":l,"aria-expanded":u,className:_i(s.className,c.className,(f={},f[cp]=h,f)),onKeyDown:n.getTagInputKeyDownHandler(v),onKeyUp:n.getTagInputKeyUpHandler(g),ref:i,role:"combobox"}),n.props.customTarget!=null?n.props.customTarget(y,u):n.getTagInput(a))}},n.getTagInput=function(a,u){var o,f=n.props,i=f.disabled,s=f.fill,d=f.onClear,l=f.placeholder,h=f.selectedItems,y=f.tagInputProps,b=y===void 0?{}:y,C=d!==void 0&&h.length>0?bt.createElement(Ta,{"aria-label":"Clear selected items",disabled:i,icon:bt.createElement(cD,null),onClick:n.handleClearButtonClick,title:"Clear selected items",variant:"minimal"}):void 0,m=Kn(Kn({},b.inputProps),{className:_i((o=b.inputProps)===null||o===void 0?void 0:o.className,zJ)});return bt.createElement(GLe,Kn({placeholder:l,rightElement:C},b,{className:_i(u,vM,b.className),disabled:i,fill:s,inputRef:n.refHandlers.input,inputProps:m,inputValue:a.query,onAdd:n.getTagInputAddHandler(a),onInputChange:a.handleQueryChange,onRemove:n.handleTagRemove,values:h.map(n.props.tagRenderer)}))},n.handleItemSelect=function(a,u){var o,f,i;n.input!=null&&n.input.focus(),(f=(o=n.props).onItemSelect)===null||f===void 0||f.call(o,a,u),(i=n.refHandlers.popover.current)===null||i===void 0||i.reposition()},n.handleQueryChange=function(a,u){var o,f;n.setState({isOpen:a.length>0||n.props.customTarget==null&&!n.props.openOnKeyDown}),(f=(o=n.props).onQueryChange)===null||f===void 0||f.call(o,a,u)},n.handlePopoverInteraction=function(a,u){var o,f;if(n.props.customTarget!=null){n.setState({isOpen:a}),(f=(o=n.props.popoverProps)===null||o===void 0?void 0:o.onInteraction)===null||f===void 0||f.call(o,a,u);return}n.requestAnimationFrame(function(){var i,s,d=n.input===QT(n.input);n.input!=null&&!d?n.setState({isOpen:!1}):n.props.openOnKeyDown||n.setState({isOpen:!0}),(s=(i=n.props.popoverProps)===null||i===void 0?void 0:i.onInteraction)===null||s===void 0||s.call(i,a,u)})},n.handlePopoverOpened=function(a){var u,o,f,i;n.queryList!=null&&n.queryList.scrollActiveItemIntoView();var s=n.props.customTarget!=null;if(s&&n.input!=null){var d=((o=(u=n.props.tagInputProps)===null||u===void 0?void 0:u.inputProps)===null||o===void 0?void 0:o.autoFocus)!==!1;d&&n.input.focus()}(i=(f=n.props.popoverProps)===null||f===void 0?void 0:f.onOpened)===null||i===void 0||i.call(f,a)},n.handleTagRemove=function(a,u){var o,f,i=n.props,s=i.selectedItems,d=i.onRemove,l=i.tagInputProps;d==null||d(s[u],u),(o=l==null?void 0:l.onRemove)===null||o===void 0||o.call(l,a,u),(f=n.refHandlers.popover.current)===null||f===void 0||f.reposition()},n.getTagInputAddHandler=function(a){return function(u,o){o==="paste"&&a.handlePaste(u)}},n.getTagInputKeyDownHandler=function(a){return function(u){var o,f,i;u.key==="Escape"||u.key==="Tab"?(u.key==="Escape"&&((o=n.input)===null||o===void 0||o.blur()),n.setState({isOpen:!1})):u.key==="Backspace"||u.key==="ArrowLeft"||u.key==="ArrowRight"||(n.props.customTarget!=null?u.key===" "?(u.preventDefault(),n.setState({isOpen:!0})):u.key==="Enter"&&n.setState({isOpen:!0}):n.setState({isOpen:!0}));var s=u.target.closest(".".concat(jde))!=null;n.state.isOpen&&!s&&(a==null||a(u)),(i=(f=n.props.popoverTargetProps)===null||f===void 0?void 0:f.onKeyDown)===null||i===void 0||i.call(f,u)}},n.getTagInputKeyUpHandler=function(a){return function(u){var o,f,i=u.target.classList.contains(zJ);n.state.isOpen&&i&&(a==null||a(u)),(f=(o=n.props.popoverTargetProps)===null||o===void 0?void 0:o.onKeyDown)===null||f===void 0||f.call(o,u)}},n.handleClearButtonClick=function(){var a,u,o;(u=(a=n.props).onClear)===null||u===void 0||u.call(a),(o=n.refHandlers.popover.current)===null||o===void 0||o.reposition()},n}return r.ofType=function(){return r},r.prototype.componentDidUpdate=function(e){var n,a,u,o,f;((n=e.tagInputProps)===null||n===void 0?void 0:n.inputRef)!==((a=this.props.tagInputProps)===null||a===void 0?void 0:a.inputRef)&&(nm((u=e.tagInputProps)===null||u===void 0?void 0:u.inputRef,null),this.refHandlers.input=Ux(this,"input",(o=this.props.tagInputProps)===null||o===void 0?void 0:o.inputRef),nm((f=this.props.tagInputProps)===null||f===void 0?void 0:f.inputRef,this.input)),(e.onClear===void 0&&this.props.onClear!==void 0||e.onClear!==void 0&&this.props.onClear===void 0)&&this.forceUpdate()},r.prototype.render=function(){var e=this.props,n=e.menuProps;e.openOnKeyDown,e.popoverProps,e.tagInputProps,e.customTarget;var a=Ms(e,["menuProps","openOnKeyDown","popoverProps","tagInputProps","customTarget"]);return bt.createElement(qge,Kn({},a,{menuProps:Kn(Kn({"aria-label":"selectable options"},n),{"aria-multiselectable":!0,id:this.listboxId}),onItemSelect:this.handleItemSelect,onQueryChange:this.handleQueryChange,ref:this.refHandlers.queryList,renderer:this.renderQueryList}))},r.displayName="".concat(Uo,".MultiSelect"),r.defaultProps={disabled:!1,fill:!1,placeholder:"Search..."},r}(Sc),RW=function(t){Es(r,t);function r(){var e,n=t.apply(this,arguments)||this;return n.state={isOpen:!1},n.inputElement=null,n.queryList=null,n.handleInputRef=Ux(n,"inputElement",(e=n.props.inputProps)===null||e===void 0?void 0:e.inputRef),n.handleQueryListRef=function(a){return n.queryList=a},n.listboxId=LG("listbox"),n.renderQueryList=function(a){var u=n.props,o=u.filterable,f=o===void 0?!0:o,i=u.disabled,s=i===void 0?!1:i,d=u.inputProps,l=d===void 0?{}:d,h=u.placeholder,y=h===void 0?"Filter...":h,b=u.popoverContentProps,C=b===void 0?{}:b,m=u.popoverProps,c=m===void 0?{}:m,v=u.popoverRef,g=bt.createElement(nh,Kn({"aria-autocomplete":"list",leftIcon:bt.createElement(ZG,null),placeholder:y,rightElement:n.maybeRenderClearButton(a.query)},l,{inputRef:n.handleInputRef,onChange:a.handleQueryChange,value:a.query})),p=a.handleKeyDown,I=a.handleKeyUp;return bt.createElement(uw,Kn({autoFocus:!1,enforceFocus:!1,isOpen:n.state.isOpen,disabled:s,placement:c.position||c.placement?void 0:"bottom-start"},c,{className:_i(a.className,c.className),content:bt.createElement("div",Kn({},C,{onKeyDown:p,onKeyUp:I}),f?g:void 0,a.itemList),onClosing:n.handlePopoverClosing,onInteraction:n.handlePopoverInteraction,onOpened:n.handlePopoverOpened,onOpening:n.handlePopoverOpening,popoverClassName:_i(o9e,c.popoverClassName),popupKind:RO.LISTBOX,ref:v,renderTarget:n.getPopoverTargetRenderer(a,n.state.isOpen)}))},n.getPopoverTargetRenderer=function(a,u){return function(o){var f;o.isOpen;var i=o.ref,s=Ms(o,["isOpen","ref"]),d=n.props,l=d.disabled,h=d.popoverProps,y=h===void 0?{}:h,b=d.popoverTargetProps,C=a.handleKeyDown,m=a.handleKeyUp,c=y.targetTagName,v=c===void 0?"div":c;return bt.createElement(v,Kn(Kn(Kn({"aria-controls":n.listboxId},b),s),{"aria-disabled":l,"aria-expanded":u,className:_i(s.className,b==null?void 0:b.className,(f={},f[cp]=n.props.fill,f)),onKeyDown:n.withPopoverTargetPropsHandler("keydown",u?C:n.handleTargetKeyDown),onKeyUp:n.withPopoverTargetPropsHandler("keyup",u?m:void 0),ref:i,role:"combobox"}),n.props.children)}},n.withPopoverTargetPropsHandler=function(a,u){switch(a){case"keydown":return function(o){var f,i;u==null||u(o),(i=(f=n.props.popoverTargetProps)===null||f===void 0?void 0:f.onKeyDown)===null||i===void 0||i.call(f,o)};case"keyup":return function(o){var f,i;u==null||u(o),(i=(f=n.props.popoverTargetProps)===null||f===void 0?void 0:f.onKeyUp)===null||i===void 0||i.call(f,o)}}},n.handleTargetKeyDown=function(a){a.key==="ArrowUp"||a.key==="ArrowDown"?(a.preventDefault(),n.setState({isOpen:!0})):JT(a)&&n.setState({isOpen:!0})},n.handleItemSelect=function(a,u){var o,f,i=u==null?void 0:u.target,s=i==null?void 0:i.closest(".".concat(D3)),d=s==null?void 0:s.matches(".".concat(c5)),l=d??!0;n.setState({isOpen:!l}),(f=(o=n.props).onItemSelect)===null||f===void 0||f.call(o,a,u)},n.handlePopoverInteraction=function(a,u){var o,f;n.setState({isOpen:a}),(f=(o=n.props.popoverProps)===null||o===void 0?void 0:o.onInteraction)===null||f===void 0||f.call(o,a,u)},n.handlePopoverOpening=function(a){var u,o,f;n.previousFocusedElement=(u=QT(n.inputElement))!==null&&u!==void 0?u:void 0,n.props.resetOnClose&&n.resetQuery(),(f=(o=n.props.popoverProps)===null||o===void 0?void 0:o.onOpening)===null||f===void 0||f.call(o,a)},n.handlePopoverOpened=function(a){var u,o;n.queryList!=null&&n.queryList.scrollActiveItemIntoView(),n.requestAnimationFrame(function(){var f,i=n.props.inputProps,s=i===void 0?{}:i;s.autoFocus!==!1&&((f=n.inputElement)===null||f===void 0||f.focus())}),(o=(u=n.props.popoverProps)===null||u===void 0?void 0:u.onOpened)===null||o===void 0||o.call(u,a)},n.handlePopoverClosing=function(a){var u,o;n.requestAnimationFrame(function(){n.previousFocusedElement!==void 0&&(n.previousFocusedElement.focus(),n.previousFocusedElement=void 0)}),(o=(u=n.props.popoverProps)===null||u===void 0?void 0:u.onClosing)===null||o===void 0||o.call(u,a)},n.resetQuery=function(){return n.queryList&&n.queryList.setQuery("",!0)},n}return r.ofType=function(){return r},r.prototype.render=function(){var e=this.props;e.filterable,e.inputProps;var n=e.menuProps;e.popoverProps;var a=Ms(e,["filterable","inputProps","menuProps","popoverProps"]);return bt.createElement(qge,Kn({},a,{menuProps:Kn(Kn({"aria-label":"selectable options"},n),{id:this.listboxId}),onItemSelect:this.handleItemSelect,ref:this.handleQueryListRef,renderer:this.renderQueryList}))},r.prototype.componentDidUpdate=function(e,n){var a,u,o,f,i;((a=e.inputProps)===null||a===void 0?void 0:a.inputRef)!==((u=this.props.inputProps)===null||u===void 0?void 0:u.inputRef)&&(nm((o=e.inputProps)===null||o===void 0?void 0:o.inputRef,null),this.handleInputRef=Ux(this,"inputElement",(f=this.props.inputProps)===null||f===void 0?void 0:f.inputRef),nm((i=this.props.inputProps)===null||i===void 0?void 0:i.inputRef,this.inputElement)),this.state.isOpen&&!n.isOpen&&this.queryList!=null&&this.queryList.scrollActiveItemIntoView()},r.prototype.maybeRenderClearButton=function(e){return e.length>0?bt.createElement(Ta,{"aria-label":"Clear filter query",icon:bt.createElement(cD,null),onClick:this.resetQuery,title:"Clear filter query",variant:"minimal"}):void 0},r.displayName="".concat(Uo,".Select"),r}(Sc);const sH=({items:t,value:r,handleSelect:e,handleDelete:n,defaultLabel:a="Select a report..."})=>{const{data:u}=EW(),o=!t||t.length===0,f=r||"",[i,s]=bt.useState(!1),d=(l,{handleClick:h,handleFocus:y,modifiers:b})=>b.matchesPredicate?He.jsxs("div",{className:"folder-picker-menu-item",children:[He.jsx(AA,{textClassName:"folder-picker-label",text:`/${l.path}`,labelElement:l.reportName,labelClassName:"folder-picker-name-label",roleStructure:"listoption",active:l.path===f,disabled:b.disabled,onClick:h,onFocus:y,icon:l.path===f?Ti.SAVED:Ti.DOCUMENT}),n&&He.jsxs(He.Fragment,{children:[He.jsx(Ta,{icon:Ti.TRASH,onClick:()=>s(!0),variant:h5.MINIMAL,intent:lo.DANGER}),He.jsx(dve,{canEscapeKeyCancel:!0,canOutsideClickCancel:!0,isOpen:i,intent:lo.DANGER,onCancel:()=>s(!1),onClose:()=>s(!1),onConfirm:()=>{n(l),s(!1)},cancelButtonText:"Cancel",confirmButtonText:"Delete",className:"bp5-dark",children:He.jsxs("p",{children:["Are you sure you want to delete ",He.jsx("strong",{children:l.reportName}),"? This action cannot be undone."]})})]})]},l.reportName):null;return He.jsx(RW,{className:"folder-picker",items:t??[],itemPredicate:(l,h)=>!l||h.reportName.toLowerCase().includes(l.toLowerCase()),itemRenderer:d,noResults:He.jsx(AA,{disabled:!0,text:"No results.",roleStructure:"listoption"}),onItemSelect:e,disabled:!t||!u,fill:!0,children:He.jsx(_s,{content:f?`/${f}`:"",children:He.jsx(Ta,{className:"folder-picker-button",text:t&&f?c9e(t,f):a,disabled:o||!u,alignText:"start",icon:Ti.DOCUMENT_OPEN,endIcon:Ti.CARET_DOWN,variant:h5.OUTLINED,fill:!0})})})},c9e=(t,r)=>{var e;return(e=t==null?void 0:t.find(n=>n.path===r))==null?void 0:e.reportName},HJ={[Wo.IDLE]:Ti.DOT,[Wo.PROGRESS]:Ti.DOT,[Wo.FAILED]:Ti.CROSS,[Wo.OK]:Ti.TICK},jJ={[Wo.IDLE]:lo.NONE,[Wo.PROGRESS]:lo.WARNING,[Wo.FAILED]:lo.DANGER,[Wo.OK]:lo.SUCCESS},VJ={status:Wo.OK,message:"Files uploaded successfully"},f9e={status:Wo.FAILED,message:"Selected directory does not contain a valid report"},h9e={status:Wo.FAILED,message:"Selected directory is not a valid profiler run"},d9e={status:Wo.FAILED,message:"Selected directory does not contain a valid report."},GJ={status:Wo.FAILED,message:"Unable to upload selected directory."},v9e=()=>{const t=TG(),r=qm(mW),e=qm(AW),[n,a]=Xl(u0),[u,o]=Xl(Uf),{uploadLocalFolder:f,uploadLocalPerformanceFolder:i,checkRequiredReportFiles:s,checkRequiredProfilerFiles:d,filterReportFiles:l}=Kge(),{data:h}=Xge(),{data:y}=Zge(),{data:b}=EW(),[C,m]=bt.useState(),[c,v]=bt.useState(!1),[g,p]=bt.useState(!1),[I,A]=bt.useState("Choose directory..."),[w,T]=bt.useState(),[E,x]=bt.useState("Choose directory..."),S=async P=>{if(!P.target.files)return;const{files:z}=P.target,M=l(z);if(!s(M)){m(f9e);return}let R=VJ;v(!0),A(`${M.length} files selected.`);const D=await f(M);D.status!==200?R=GJ:(A(`${M.length} files uploaded`),r("local"),e(kO),D.data&&(a(D.data.path),B1("Active memory report",D.data.reportName))),t.clear(),v(!1),m(R)},_=async P=>{var O;if(!P.target.files)return;const{files:z}=P.target,M=l(z);if(!d(M)){T(h9e);return}let R=VJ;p(!0),x(`${M.length} files selected`);const D=await i(M);if(D.status!==200)R=GJ;else if(((O=D==null?void 0:D.data)==null?void 0:O.status)!==Wo.OK)R=d9e;else{const j=g9e(M);x(`${M.length} files uploaded`),r("local"),o(j),B1("Active performance report",j)}t.clear(),p(!1),T(R)};bt.useEffect(()=>{c&&m({status:Wo.PROGRESS,message:"Files uploading..."}),g&&T({status:Wo.PROGRESS,message:"Files uploading..."})},[c,g]);const L=async P=>{await OJ({...b,active_report:{profiler_name:P.path}}),B1("Active memory report",p9e(y,P.path)??""),a(P.path)},k=async P=>{await F8e(P.path),await t.invalidateQueries([Wge]),B1("Memory report deleted",P.reportName),n===P.path&&(a(null),A("Choose directory..."),m(void 0))},F=async P=>{await OJ({...b,active_report:{performance_name:P.path}}),B1("Active performance report",P.reportName),o(P.path)},N=async P=>{await B8e(P.path),await t.invalidateQueries([Yge]),B1("Performance report deleted",P.reportName),u===P.reportName&&(o(null),x("Choose directory..."),T(void 0))};return He.jsxs(He.Fragment,{children:[He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Memory report"}),subLabel:"Select a memory report",children:He.jsx(sH,{items:y,value:y!=null&&y.map(P=>P.path).includes(n)?n:null,handleSelect:L,handleDelete:k})}),He.jsx(Nf,{subLabel:"Upload a local memory report",children:He.jsxs("div",{className:"buttons-container",children:[He.jsxs("label",{className:"bp5-file-input",htmlFor:"local-upload",children:[He.jsx("input",{id:"local-upload",type:"file",multiple:!0,directory:"",webkitdirectory:"",onChange:S}),He.jsx("span",{className:"bp5-file-upload-input",children:I})]}),He.jsx(t9e,{}),C&&!c&&He.jsxs("div",{className:`verify-connection-item status-${Wo[C.status]}`,children:[He.jsx(Hs,{className:"connection-status-icon",icon:HJ[C.status],size:20,intent:jJ[C.status]}),He.jsx("span",{className:"connection-status-text",children:C.message})]})]})}),He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Performance report"}),subLabel:"Select a performance report",children:He.jsx(sH,{items:h,value:h!=null&&h.map(P=>P.reportName).includes(u)?u:null,handleSelect:F,handleDelete:N})}),He.jsx(Nf,{subLabel:"Upload a local performance report",children:He.jsxs("div",{className:"buttons-container",children:[He.jsxs("label",{className:"bp5-file-input",htmlFor:"local-performance-upload",children:[He.jsx("input",{id:"local-performance-upload",type:"file",multiple:!0,directory:"",webkitdirectory:"",onChange:_}),He.jsx("span",{className:"bp5-file-upload-input",children:E})]}),w&&!g&&He.jsxs("div",{className:`verify-connection-item status-${Wo[w.status]}`,children:[He.jsx(Hs,{className:"connection-status-icon",icon:HJ[w.status],size:20,intent:jJ[w.status]}),He.jsx("span",{className:"connection-status-text",children:w.message})]})]})})]})},g9e=t=>t[0].webkitRelativePath.split("/")[0],p9e=(t,r)=>{var e;return(e=t==null?void 0:t.find(n=>n.path===r))==null?void 0:e.reportName},XS=t=>{const{lastSynced:r,lastModified:e}=t;return r?e>r:!0},m9e=()=>({getAppConfig:t=>localStorage.getItem(t),setAppConfig:(t,r)=>{localStorage.setItem(t,r)},deleteAppConfig:t=>{localStorage.removeItem(t)}}),gM=()=>{const{getAppConfig:t,setAppConfig:r,deleteAppConfig:e}=m9e();return{testConnection:async l=>{if(!l.host||!l.port)return[{status:Wo.FAILED,message:"No connection provided"}];const{data:h}=await Tu.post("api/remote/test",l);return h},syncRemoteFolder:async(l,h,y)=>{if(!l||!l.host||!l.port||!l.profilerPath)throw new Error("No connection provided");if(!h&&!y)throw new Error("No remote folder provided");return Tu.post("api/remote/sync",{connection:l,folder:h,profile:y})},listReportFolders:async l=>{if(!l||!l.host||!l.port)throw new Error("No connection provided");return(await Tu.post("api/remote/profiler",l)).data},listPerformanceFolders:async l=>{if(!l||!l.host||!l.port)throw new Error("No connection provided");return(await Tu.post("api/remote/performance",{connection:l})).data},mountRemoteFolder:async(l,h,y)=>Tu.post("api/remote/use",{connection:l,folder:h,profile:y}),fetchSqlitePath:async l=>{const{data:h}=await Tu.post("api/remote/sqlite/detect-path",l);return h},persistentState:{get savedConnectionList(){return JSON.parse(t("remoteConnections")??"[]")},set savedConnectionList(l){r("remoteConnections",JSON.stringify(l))},get selectedConnection(){return JSON.parse(t("selectedConnection")??"null")??this.savedConnectionList[0]},set selectedConnection(l){r("selectedConnection",JSON.stringify(l??null))},getSavedReportFolders:l=>JSON.parse(t(`${l==null?void 0:l.name} - reportFolders`)??"[]").map(h=>{const{reportPath:y,...b}=h;return h.profilerPath?{...b,profilerPath:y||b.profilerPath}:b}),setSavedReportFolders:(l,h)=>{r(`${l==null?void 0:l.name} - reportFolders`,JSON.stringify(h))},deleteSavedReportFolders:l=>{e(`${l==null?void 0:l.name} - reportFolders`)},getSavedPerformanceFolders:l=>JSON.parse(t(`${l==null?void 0:l.name} - performanceFolders`)??"[]"),setSavedPerformanceFolders:(l,h)=>{r(`${l==null?void 0:l.name} - performanceFolders`,JSON.stringify(h))},deleteSavedPerformanceFolders:l=>{e(`${l==null?void 0:l.name} - performanceFolders`)},updateSavedRemoteFoldersConnection(l,h){const y=this.getSavedReportFolders(l),b=this.getSavedPerformanceFolders(l);this.deleteSavedReportFolders(l),this.deleteSavedPerformanceFolders(l),this.setSavedReportFolders(h,y),this.setSavedPerformanceFolders(h,b)}},readRemoteFile:async l=>{try{return(await Tu.post("api/remote/read",l)).data}catch(h){return _c.isAxiosError(h)?h.message:h}}}},y9e={[Wo.IDLE]:Ti.DOT,[Wo.PROGRESS]:Ti.DOT,[Wo.FAILED]:Ti.CROSS,[Wo.OK]:Ti.TICK},A9e={[Wo.IDLE]:lo.NONE,[Wo.PROGRESS]:lo.WARNING,[Wo.FAILED]:lo.DANGER,[Wo.OK]:lo.SUCCESS};function KS({status:t,message:r}){return He.jsxs("div",{className:`verify-connection-item status-${Wo[t].toLowerCase()}`,children:[He.jsx(Hs,{className:"connection-status-icon",icon:y9e[t],size:20,intent:A9e[t]}),He.jsx("span",{className:"connection-status-text",children:r})]})}const tpe=({open:t,onClose:r,onAddConnection:e,title:n="Add new remote connection",buttonLabel:a="Add connection",remoteConnection:u})=>{var A;const o=u??{name:"",host:"",port:22,profilerPath:"",username:""},f=[{status:Wo.IDLE,message:"Test connection"},{status:Wo.IDLE,message:"Test memory report folder path"}],[i,s]=bt.useState(o),[d,l]=bt.useState(f),{testConnection:h,fetchSqlitePath:y}=gM(),[b,C]=bt.useState(!1),[m,c]=bt.useState(!1),v=d.every(w=>w.status===Wo.OK),g=async()=>{c(!0);const w=await y(i);w.status===Wo.OK&&s({...i,sqliteBinaryPath:w.message}),w.status===Wo.FAILED&&s({...i,sqliteBinaryPath:"Path Not Found"}),c(!1)},p=async()=>{C(!0);const w={status:Wo.PROGRESS,message:"Testing connection"},T={status:Wo.PROGRESS,message:"Testing memory report folder path"},E={status:Wo.PROGRESS,message:"Testing performance report folder path"};l([w,T,E]);try{const x=await h(i);l(x)}catch{l([{status:Wo.FAILED,message:"Connection failed"},{status:Wo.FAILED,message:"Memory report folder path failed"}])}finally{C(!1)}},I=()=>{s(o),l(f),r()};return He.jsxs(qG,{className:"remote-connection-dialog",title:n,icon:"info-sign",canOutsideClickClose:!1,isOpen:t,onClose:I,children:[He.jsxs(fW,{children:[He.jsx(Nf,{label:"Name",subLabel:"Connection name",children:He.jsx(nh,{className:"bp5-light",value:i.name,onChange:w=>s({...i,name:w.target.value})},"name")}),He.jsx(Nf,{label:"SSH Host",subLabel:"SSH host name. E.g.: localhost",children:He.jsx(nh,{value:i.host,onChange:w=>s({...i,host:w.target.value})},"host")}),He.jsx(Nf,{label:"Username",subLabel:"Username to connect with",children:He.jsx(nh,{value:i.username??"",onChange:w=>{s({...i,username:w.target.value})}},"username")}),He.jsx(Nf,{label:"SSH Port",subLabel:"Port to use for the SSH connection. E.g.: port 22",children:He.jsx(nh,{value:((A=i.port)==null?void 0:A.toString())??"",onChange:w=>{const T=Number.parseInt(w.target.value,10);w.target.value===""?s({...i,port:void 0}):T>0&&T<99999&&s({...i,port:T})}},"port")}),He.jsx(Nf,{label:"Memory report folder path",subLabel:'Path to a remote folder containing memory reports e.g. "$HOME/work/profiler-reports/"',children:He.jsx(nh,{value:i.profilerPath,onChange:w=>s({...i,profilerPath:w.target.value})},"path")}),He.jsx(Nf,{label:"Performance report folder path (optional)",subLabel:'Path to a remote folder containing performance reports e.g. "$HOME/perf/perf-reports/"',children:He.jsx(nh,{value:i.performancePath,onChange:w=>s({...i,performancePath:w.target.value})},"path")}),i.useRemoteQuerying&&He.jsxs("fieldset",{className:"remote-querying-fieldset",children:[He.jsx("legend",{children:"Remote Querying Configuration"}),He.jsx(Nf,{label:"Remote SQLite Binary Location",subLabel:"SQLite Binary Location",children:He.jsx(nh,{value:i.sqliteBinaryPath,onChange:w=>s({...i,sqliteBinaryPath:w.target.value})},"sqliteBinaryPath")}),He.jsx(ay,{className:"remote-sql-test-buttons",children:He.jsx(Ta,{text:"Detect Path",disabled:m,loading:m,onClick:g})})]}),He.jsxs("fieldset",{children:[He.jsx("legend",{children:"Test Connection"}),d.map((w,T)=>He.jsx(KS,{status:w.status,message:w.message},`${w.message}-${T}`)),He.jsx("br",{}),He.jsx(Ta,{text:"Test Connection",disabled:b||m,loading:b,onClick:p})]})]}),He.jsx(Pve,{minimal:!0,actions:He.jsx(Ta,{text:a,disabled:!v,onClick:()=>{v&&(e(i),I())}})})]})},C9e=({disabled:t,onAddConnection:r})=>{const[e,n]=bt.useState(!1);return He.jsxs("div",{className:"buttons-container",children:[He.jsx(Ta,{icon:Ti.PLUS,text:"Add new connection",disabled:t,onClick:()=>n(!0)}),He.jsx(tpe,{open:e,onAddConnection:a=>{r(a),n(!1)},onClose:()=>n(!1)})]})},CA=t=>`0x${(t>>>0).toString(16).toUpperCase()}`,Mh=(t,r)=>new Intl.NumberFormat("en-US",{maximumFractionDigits:r}).format(t),I9e=(t,r=1e3)=>t<r?"":`( ${(t/1e6).toFixed(3)}s )`,PW=(t,r)=>t===null?"NULL":t.toString().padStart(r==null?void 0:r.toString().length,"0"),zO=(t,r)=>{if(t===r)return!0;if(typeof t!=typeof r||t===null||r===null)return!1;if(typeof t!="object")return Object.is(t,r);if(Array.isArray(t)&&Array.isArray(r))return t.length!==r.length?!1:t.every((o,f)=>zO(o,r[f]));if(Array.isArray(t)||Array.isArray(r))return!1;const e=t,n=r,a=Object.keys(e),u=Object.keys(n);return a.length!==u.length?!1:a.every(o=>o in n?zO(e[o],n[o]):!1)},oy=t=>{const r=t.match(/Shape\((\[.*\])\)/);return r?r[1]:t},pI=t=>t.replace(/^DataType\./,""),WJ=t=>{const r=/\(x=(\d+),y=(\d+)\)/g,e=[...t.matchAll(r)];if(e.length!==2)return 0;const[n,a]=e[0].slice(1).map(Number),[u,o]=e[1].slice(1).map(Number);return(u-n+1)*(o-a+1)},b9e=({connectionList:t,connection:r,disabled:e,loading:n,offline:a,onSelectConnection:u,onEditConnection:o,onRemoveConnection:f,onSyncRemoteFolderList:i})=>{const[s,d]=bt.useState(!1),l=r??t[0];return He.jsxs("div",{className:"buttons-container",children:[He.jsx(RW,{className:"remote-connection-select",items:t,itemRenderer:(h,y)=>w9e(h,y,l),disabled:e,filterable:!0,itemPredicate:x9e,noResults:He.jsx(AA,{disabled:!0,text:"No results",roleStructure:"listoption"}),onItemSelect:u,children:He.jsx(Ta,{icon:a?Ti.BAN_CIRCLE:Ti.CLOUD,endIcon:Ti.CARET_DOWN,disabled:e,text:BO(l)})}),He.jsx(_s,{content:"Edit selected connection",children:He.jsx(Hx,{icon:Ti.EDIT,disabled:e||!l,onClick:()=>d(!0)})}),He.jsx(_s,{content:"Remove selected connection",children:He.jsx(Hx,{icon:Ti.TRASH,disabled:e||!l,onClick:()=>f(l)})}),He.jsx(tpe,{open:s,onAddConnection:h=>{d(!1),o(h,r)},onClose:()=>{d(!1)},title:"Edit remote connection",buttonLabel:"Save connection",remoteConnection:l},`${l==null?void 0:l.name}${l==null?void 0:l.host}${l==null?void 0:l.port}${l==null?void 0:l.profilerPath}`),He.jsx(Ta,{icon:Ti.LOCATE,disabled:e||!l,loading:n,text:"Fetch remote folders list",onClick:()=>i(l)})]})},BO=t=>{var r;return t?`${t.name} - ssh://${t.host}:${t.port}/${(r=t==null?void 0:t.profilerPath)==null?void 0:r.replace(/^\//gi,"")}`:"(No connection)"},x9e=(t,r)=>BO(r).toLowerCase().includes(t.toLowerCase()),w9e=(t,{handleClick:r,modifiers:e},n)=>e.matchesPredicate?He.jsx(AA,{active:zO(t,n),disabled:e.disabled,onClick:r,text:BO(t)},BO(t)):null,T9e=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),lH=(t,r,e)=>{if(!t||!e)return"n/a";const a={profiler:e.profilerPath||e.reportPath,performance:e.performancePath}[r];return t.remotePath.toLowerCase().replace(a.toLowerCase(),"")},_9e=(t,r)=>(e,n)=>lH(n,t,r).toLowerCase().includes(e.toLowerCase()),S9e=(t,r,e,n)=>(a,{handleClick:u,modifiers:o})=>{var C;const{persistentState:f}=gM(),i=(C=f.selectedConnection)==null?void 0:C.useRemoteQuerying;if(!o.matchesPredicate)return null;const{lastSynced:s,lastModified:d,reportName:l}=a,h=s?T9e.format(new Date(s)):"Never";let y=He.jsx(_s,{content:`Fetching folder status, last sync: ${h}`,children:He.jsx(XG,{size:16})});t||(XS(a)?y=He.jsx(_s,{content:`Folder is stale, last sync: ${h}`,children:He.jsx(Hs,{icon:Ti.HISTORY,color:"goldenrod"})}):y=He.jsx(_s,{content:`Folder is up to date, last sync: ${h}`,children:He.jsx(Hs,{icon:Ti.UPDATED,color:"green"})}));const b=()=>He.jsxs(He.Fragment,{children:[He.jsx("span",{children:l}),He.jsx("span",{children:!i&&y})]});return He.jsx(AA,{className:"remote-folder-item",active:(e==null?void 0:e.reportName)===l,disabled:o.disabled,onClick:u,text:lH(a,r,n),icon:(e==null?void 0:e.reportName)===l?Ti.SAVED:Ti.DOCUMENT,labelElement:b(),labelClassName:"remote-folder-status-icon"},`${lH(a,r,n)}${s??d}`)},ZJ=({remoteFolder:t,remoteFolderList:r=[],loading:e=!1,updatingFolderList:n=!1,onSelectFolder:a,children:u,fallbackLabel:o="(No selection)",icon:f=Ti.DOCUMENT_OPEN,type:i})=>{const{persistentState:s}=gM(),d=s.selectedConnection;return He.jsxs("div",{className:"buttons-container",children:[He.jsx(RW,{className:"remote-folder-select",items:r??[],itemRenderer:S9e(n,i,t,d),filterable:!0,itemPredicate:_9e(i,d),noResults:He.jsx(AA,{disabled:!0,text:"No results",roleStructure:"listoption"}),disabled:e||(r==null?void 0:r.length)===0,onItemSelect:a,children:He.jsx(Ta,{icon:f,endIcon:(r==null?void 0:r.length)>0?Ti.CARET_DOWN:void 0,disabled:e||(r==null?void 0:r.length)===0,text:t?t.reportName:o})}),u]})},E9e=()=>{var P,z;const t=gM(),r=TG(),e=qm(mW),n=qm(AW),[a,u]=Xl(u0),[o,f]=Xl(Uf),[i,s]=bt.useState(!1),[d,l]=bt.useState(!1),[h,y]=bt.useState(t.persistentState.getSavedReportFolders(t.persistentState.selectedConnection)),[b,C]=bt.useState(!1),[m,c]=bt.useState(a?h.find(M=>M.reportName.includes(a)):h[0]),[v,g]=bt.useState(t.persistentState.getSavedPerformanceFolders(t.persistentState.selectedConnection)),[p,I]=bt.useState(!1),[A,w]=bt.useState(o?v.find(M=>M.reportName.includes(o)):v[0]),T=M=>{t.persistentState.selectedConnection=M,y(t.persistentState.getSavedReportFolders(M)),g(t.persistentState.getSavedPerformanceFolders(M)),c(t.persistentState.getSavedReportFolders(M)[0]),w(t.persistentState.getSavedPerformanceFolders(M)[0])},E=(M,R)=>{if(!M)return[];const D=t.persistentState.getSavedReportFolders(M),O=(R??[]).map(j=>({...D==null?void 0:D.find(W=>W.reportName===j.reportName),...j}));return t.persistentState.setSavedReportFolders(M,O),y(O),O},x=(M,R)=>{if(!M)return[];const D=t.persistentState.getSavedPerformanceFolders(M),O=(R??[]).map(j=>({...D==null?void 0:D.find(W=>W.reportName===j.reportName),...j}));return t.persistentState.setSavedPerformanceFolders(M,O),g(O),O},S=M=>t.persistentState.savedConnectionList.findIndex(R=>{const D=R.name===(M==null?void 0:M.name),O=R.host===(M==null?void 0:M.host),j=R.port===(M==null?void 0:M.port);return D&&O&&j}),_=(P=t.persistentState.selectedConnection)==null?void 0:P.useRemoteQuerying,L=b||p,k=d||L,F=M=>{r.clear(),e("remote"),n(kO),u(M),B1("Active memory report",M)},N=M=>{r.clear(),e("remote"),n(kO),f(M),B1("Active performance report",M)};return He.jsxs(He.Fragment,{children:[He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Add remote sync server"}),subLabel:"Add new server connection details",children:He.jsx(C9e,{disabled:k,onAddConnection:M=>{t.persistentState.savedConnectionList=[...t.persistentState.savedConnectionList,M],T(M)}})}),He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Use remote sync server"}),subLabel:"Select remote server that will be used for syncing folders",children:He.jsx(b9e,{connection:t.persistentState.selectedConnection,connectionList:t.persistentState.savedConnectionList,disabled:k,loading:d,offline:i,onEditConnection:(M,R)=>{const D=[...t.persistentState.savedConnectionList];D[S(R)]=M,t.persistentState.savedConnectionList=D,t.persistentState.updateSavedRemoteFoldersConnection(R,M),T(M)},onRemoveConnection:M=>{const R=[...t.persistentState.savedConnectionList];R.splice(S(M),1),t.persistentState.savedConnectionList=R,t.persistentState.deleteSavedReportFolders(M),t.persistentState.deleteSavedPerformanceFolders(M),T(R[0]),c(void 0),w(void 0)},onSelectConnection:async M=>{try{l(!0),T(M);const R=await t.listReportFolders(M),D=M.performancePath?await t.listPerformanceFolders(M):[],O=E(M,R),j=x(M,D);s(!1),c(O[0]),w(j[0])}catch{s(!0)}finally{l(!1)}},onSyncRemoteFolderList:async()=>{try{if(l(!0),t.persistentState.selectedConnection){const M=await t.listReportFolders(t.persistentState.selectedConnection),R=t.persistentState.selectedConnection.performancePath?await t.listPerformanceFolders(t.persistentState.selectedConnection):[],D=E(t.persistentState.selectedConnection,M),O=x(t.persistentState.selectedConnection,R);c(D[0]),w(O[0])}}catch{alert("Unable to connect to remote server.")}finally{l(!1)}}})}),He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Memory report"}),subLabel:"Select a memory report",children:He.jsx(ZJ,{remoteFolder:m,remoteFolderList:h,loading:L||d,updatingFolderList:d,onSelectFolder:async M=>{c(M),t.persistentState.selectedConnection&&(_||!_&&!XS(M))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,M,A)).status===200&&F(M.reportName)},type:"profiler",children:!_&&He.jsx(_s,{content:"Sync remote folder",children:He.jsx(Hx,{icon:Ti.REFRESH,loading:b,disabled:k||!m||(h==null?void 0:h.length)===0,onClick:async()=>{try{if(C(!0),t.persistentState.selectedConnection){const{data:M}=await t.syncRemoteFolder(t.persistentState.selectedConnection,m),R=t.persistentState.getSavedReportFolders(t.persistentState.selectedConnection),D=R.findIndex(O=>O.reportName===(m==null?void 0:m.reportName));R[D]=M,E(t.persistentState.selectedConnection,R),c(R[D])}}catch{alert("Unable to sync remote folder")}finally{if(C(!1),e("remote"),t.persistentState.selectedConnection&&m&&(!_||_&&XS(m))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,m,A)).status===200){const R=m.reportName,D=A==null?void 0:A.reportName;F(R),D&&N(D)}}}})})})}),((z=t.persistentState.selectedConnection)==null?void 0:z.performancePath)&&He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Performance report"}),subLabel:"Select a performance report",children:He.jsx(ZJ,{remoteFolder:A,remoteFolderList:v,loading:L||d,updatingFolderList:d,onSelectFolder:async M=>{if(w(M),t.persistentState.selectedConnection&&(_||!_&&!XS(M))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,m,M)).status===200){const D=M.reportName;N(D)}},type:"performance",children:!_&&He.jsx(_s,{content:"Sync remote folder",children:He.jsx(Hx,{icon:Ti.REFRESH,loading:p,disabled:k||!A||(v==null?void 0:v.length)===0,onClick:async()=>{try{if(I(!0),t.persistentState.selectedConnection){const{data:M}=await t.syncRemoteFolder(t.persistentState.selectedConnection,void 0,A),R=t.persistentState.getSavedPerformanceFolders(t.persistentState.selectedConnection),D=R.findIndex(O=>O.reportName===(A==null?void 0:A.reportName));if(R[D]=M,x(t.persistentState.selectedConnection,R),w(R[D]),t.persistentState.selectedConnection&&A&&(_||!_&&XS(A))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,m,A)).status===200){const j=A.reportName;N(j)}}}catch{alert("Unable to sync remote folder")}finally{I(!1)}}})})})})]})},YJ=["rgb(63,181,143)","rgb(74,217,225)","rgb(247,66,78)","rgb(52,163,188)","rgb(113,168,31)","rgb(95,188,255)","rgb(96,157,255)","rgb(152,218,29)","rgb(187,141,255)","rgb(136,217,141)","rgb(226,177,30)","rgb(255,137,229)","rgb(190,39,130)","rgb(252,194,251)","rgb(209,109,255)","rgb(158,183,229)","rgb(201,151,13)","rgb(250,163,140)","rgb(255,92,111)","rgb(247,147,30)","rgb(227,215,105)","rgb(90,51,137)","rgb(23,244,111)"];function*rpe(){let t=0;for(;;)yield YJ[t],t=(t+1)%YJ.length}const M9e=rpe(),kF=new Map,fw=t=>t===null?"rgb(255,255,255)":(kF.has(t)||kF.set(t,M9e.next().value),kF.get(t)),R9e=rpe(),DF=new Map,up=t=>{if(t!==void 0)return DF.has(t)||DF.set(t,R9e.next().value),DF.get(t)},P9e=({tensorId:t,address:r,colour:e})=>He.jsxs("div",{className:"toast-tensor-message",children:[He.jsx("div",{className:"memory-color-block",style:e?{backgroundColor:e}:{}}),He.jsxs("strong",{children:[t?`Tensor ${t}`:"Buffer",He.jsx("span",{className:"light",children:" at "}),r?CA(r):"NULL",He.jsx("span",{className:"light",children:" selected"})]})]}),LD=()=>{const[t,r]=Xl(QOe),e=qm(fM),n=qm(cw),a=()=>{e(null),n(null),r(null),pu.dismiss()};return{activeToast:t,resetToasts:a,setActiveToast:r,createToast:(o,f)=>{t&&pu.dismiss(t);let i=up(f);o&&!i&&(i=fw(o));const s=pu(He.jsx(P9e,{tensorId:f,address:o,colour:i}),{position:"bottom-right",hideProgressBar:!0,closeOnClick:!0,onClick:a,theme:"light"});r(s)}}};function U3(){const{resetToasts:t}=LD();bt.useEffect(()=>{t()},[])}function L9e(){return U3(),He.jsx("div",{className:"splash-screen home",children:He.jsxs("div",{className:"folder-picker-options",children:[He.jsxs("fieldset",{children:[He.jsx("legend",{children:"Local folder"}),He.jsx(Hs,{icon:Ti.FOLDER_OPEN,size:150}),He.jsx("div",{className:"folder-picker-wrapper",children:He.jsx(v9e,{})})]}),He.jsxs("fieldset",{children:[He.jsx("legend",{children:"Remote Sync"}),He.jsx(Hs,{icon:Ti.CLOUD,size:150}),He.jsx("div",{className:"folder-picker-wrapper",children:He.jsx(E9e,{})})]})]})})}function c2(t,r,e){let n=e.initialDeps??[],a;function u(){var o,f,i,s;let d;e.key&&((o=e.debug)!=null&&o.call(e))&&(d=Date.now());const l=t();if(!(l.length!==n.length||l.some((b,C)=>n[C]!==b)))return a;n=l;let y;if(e.key&&((f=e.debug)!=null&&f.call(e))&&(y=Date.now()),a=r(...l),e.key&&((i=e.debug)!=null&&i.call(e))){const b=Math.round((Date.now()-d)*100)/100,C=Math.round((Date.now()-y)*100)/100,m=C/16,c=(v,g)=>{for(v=String(v);v.length<g;)v=" "+v;return v};console.info(`%c⏱ ${c(C,5)} /${c(b,5)} ms`,`
|
102
|
+
`);RDe.parse(i,{header:!0,complete:s=>e({deviceMeta:o,deviceLog:s}),error:s=>n(s)})})},I8e=async()=>{const{data:t}=await Tu.get("/api/cluster-descriptor");return t},Hge=()=>{const t=Ko(u0);return mg({queryFn:()=>I8e(),queryKey:["get-cluster-description",t],initialData:null})},yg=()=>{const t=Ko(u0);return mg({queryFn:()=>t!==null?$ge():Promise.resolve([]),queryKey:["get-operations",t],retry:!1,staleTime:1/0})},b8e=()=>{const t=yg();return bt.useMemo(()=>{var r,e,n;return(r=t==null?void 0:t.data)!=null&&r.length?[(e=t.data)==null?void 0:e[0].id,(n=t.data)==null?void 0:n[t.data.length-1].id]:null},[t.isLoading])},x8e=async()=>{const t=await Tu.get("/api/npe");return t==null?void 0:t.data},w8e=t=>mg({queryFn:()=>x8e(),queryKey:["fetch-npe",t],retry:!1,staleTime:1/0}),ED=t=>{const{data:r}=yg(),e=bt.useMemo(()=>(r==null?void 0:r.find(o=>o.id===t))||null,[r,t]),n=bt.useCallback(()=>g8e(t),[t]),a=mg(["get-operation-detail",t],n,{retry:2,retryDelay:o=>Math.min(o*100,500),staleTime:1/0}),u=bt.useMemo(()=>{if(!a.data)return[];const o=new Map;return a.data.buffers.forEach(f=>{const{address:i,max_size_per_bank:s}=f;if(i){const d=o.get(i);(!d||s>d.max_size_per_bank)&&o.set(i,f)}}),Array.from(o.values())},[a.data]);return a.data&&(a.data.buffersSummary=u),{operation:e,operationDetails:a}},T8e=t=>{const{data:r}=yg(),e=r==null?void 0:r.find((n,a,u)=>{var o;return((o=u[a+1])==null?void 0:o.id)===t});return ED(e?e.id:null)},_8e=t=>{const{data:r}=yg(),e=r==null?void 0:r.find((n,a,u)=>{var o;return((o=u[a+1])==null?void 0:o.id)===t});return e?{id:e.id,name:e.name}:void 0},S8e=t=>{const{data:r}=yg(),e=r==null?void 0:r.find((n,a,u)=>{var o;return((o=u[a-1])==null?void 0:o.id)===t});return e?{id:e.id,name:e.name}:void 0},E8e=()=>{const{data:t}=yg(),{data:r}=RD(),e=(n,a)=>{if(a===1)return n;const u=[],o=new Map;for(const{name:i,id:s}of n){const d=`${i}-${s}`;o.set(d,(o.get(d)||0)+1)}const f=new Set;for(const i of n){const s=`${i.name}-${i.id}`;!f.has(s)&&o.get(s)===a&&(u.push(i),f.add(s))}return u};return bt.useMemo(()=>{if(!t||!r)return[];const n=t.flatMap(a=>a.device_operations.filter(u=>u.node_type===ys.function_start&&u.params.name&&kDe(u.params.name)).map(u=>({name:u.params.name,id:a.id,operationName:a.name})));return e(n,r.length)},[t,r])},M8e=()=>{const t=Ko(Uf),r=PD(t);return bt.useMemo(()=>r.data?r.data:[],[r.isLoading])},MD=()=>{const t=E8e(),r=M8e();return bt.useMemo(()=>t.every((n,a)=>{const u=r[a];return u&&u.raw_op_code===n.name?(n.perfData=u,!0):!1})?t:[],[r,t])},SW=()=>{const t=MD();return bt.useMemo(()=>t.map(({id:r,perfData:e})=>({opId:r,perfId:e==null?void 0:e.id})),[t])},jge=()=>{const t=Ko(Uf),{data:r}=PD(t);return bt.useMemo(()=>r!=null&&r.length?[Math.min(...r.map(e=>parseInt(e.id,10))),Math.max(...r.map(e=>parseInt(e.id,10)))]:null,[r])},R8e=(t,r,e)=>mg(["get-buffer-pages",t,r,e],()=>v8e(t,r,e),{staleTime:1/0}),P8e=async()=>{try{const{data:t}=await Tu.get("/api/tensors",{maxRedirects:1}),r=await $ge();for(const e of t)if(e.producers.length>0){const n=e.producers[0],a=r.find(o=>o.id===n),u=a==null?void 0:a.outputs.find(o=>o.id===e.id);u&&(e.operationIdentifier=u.operationIdentifier)}return t}catch(t){if(_c.isAxiosError(t)&&(t.response&&t.response.status>=400&&t.response.status<500||t.response&&t.response.status>=500))throw t}return[GOe]},Vge=()=>{const t=Ko(u0);return mg({queryFn:()=>P8e(),queryKey:["get-tensors",t],retry:!1,staleTime:1/0})},RD=()=>{const t=Ko(u0);return mg({queryFn:()=>t!==null?A8e():Promise.resolve([]),queryKey:["get-devices",t],retry:!1,staleTime:1/0})},aH=(t,r)=>{const e=Ko(z3),n=Ko(u0),a=mg({queryFn:()=>p8e(t),queryKey:["fetch-all-buffers",t,n],staleTime:1/0});return bt.useMemo(()=>(a.data&&e&&r&&(a.data=a.data.filter(u=>u.id>=e[0]&&u.id<=e[1])),a),[e,a.isLoading,r])},L8e=()=>{const t=Ko(Uf);return mg({queryFn:()=>C8e(),queryKey:["get-device-log-raw",t],staleTime:1/0})},PD=t=>{const r=mg({queryFn:()=>t!==null?Uge(t):Promise.resolve([]),queryKey:["get-performance-report",t],enabled:t!==null});return bt.useMemo(()=>{if(r.data){const e=r.data.slice().filter(n=>{var a;return!((a=n.op_code)!=null&&a.includes("(torch)"))&&n.op_code!==""});r.data=e}return r},[r.isLoading])},O8e=t=>{const r=mg({queryFn:()=>t!==null?Uge(t):Promise.resolve([]),queryKey:["get-performance-comparison-report",t],staleTime:1/0,enabled:t!==null});return bt.useMemo(()=>{if(r.data){const e=r.data.slice().filter(n=>{var a;return!((a=n.op_code)!=null&&a.includes("(torch)"))&&n.op_code!==""});r.data=e}return r},[r.isLoading,t])},EW=()=>{const t=Ko(u0),r=Ko(Uf),e=Ko(AD);return mg({queryFn:()=>d8e(),queryKey:["get-session",t,r,e],initialData:null})},Gge=t=>{switch(t){case FO.WORMHOLE:return XDe;case FO.BLACKHOLE:return f8e;default:return console.error(`Unsupported arch: ${t}`),{}}},k8e=t=>{const{data:r}=Vge(),e=aH(Lh.L1,!1);return t.map(n=>{var u;const a=r==null?void 0:r.find(o=>o.id===n);if(a){const o=a==null?void 0:a.producers[0],f=(u=e.data)==null?void 0:u.find(s=>s.id===o),i=f==null?void 0:f.buffers.find(s=>s.address===a.address);return{id:a.id,size:(i==null?void 0:i.size)||null}}return null}).filter(n=>n!==null)},D8e=t=>{const r=Gge(t),e=bt.useMemo(()=>{var o;return(o=r.functional_workers)==null?void 0:o.map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]),n=bt.useMemo(()=>{var o;return(o=r.dram)==null?void 0:o.flat().map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]),a=bt.useMemo(()=>{var o;return(o=r.eth)==null?void 0:o.flat().map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]),u=bt.useMemo(()=>{var o;return(o=r.pcie)==null?void 0:o.map(f=>f.split("-").reverse().map(i=>parseInt(i,10)))},[r]);return{architecture:r,cores:e,dram:n,eth:a,pcie:u}},Wge="fetch-profiler-folder-list",N8e=async()=>{const{data:t}=await Tu.get("/api/profiler");return t},F8e=async t=>{const{data:r}=await Tu.delete(`/api/profiler/${t}`);return r},Zge=()=>mg({queryFn:()=>N8e(),queryKey:[Wge],initialData:null}),Yge="fetch-performance-folder-list",z8e=async()=>{const{data:t}=await Tu.get("/api/performance");return t},B8e=async t=>{const{data:r}=await Tu.delete(`/api/performance/${t}`);return r},Xge=()=>mg({queryFn:()=>z8e(),queryKey:[Yge],initialData:null});function $8e(){const t=SI(),r=fy(),e=Ko(u0),n=Ko(Uf),a=d=>{t(d)},u=d=>{t(d,{state:{background:r}})},o=Hge(),f=!!e,i=!!n;return He.jsx(a3,{className:"navbar",children:He.jsxs(a3.Group,{align:ex.END,children:[He.jsx(Ta,{text:"Reports",onClick:()=>a(os.HOME),active:s(os.HOME),icon:Ti.DOCUMENT_OPEN,variant:"minimal",size:"large",className:"reports-button"}),He.jsx(Ta,{text:"Operations",onClick:()=>a(os.OPERATIONS),active:s(os.OPERATIONS),icon:Ti.CUBE,disabled:!f,variant:"minimal",size:"large",className:"operations-button"}),He.jsx(Ta,{text:"Tensors",onClick:()=>a(os.TENSORS),active:s(os.TENSORS),icon:Ti.FLOW_LINEAR,disabled:!f,variant:"minimal",size:"large",className:"tensors-button"}),He.jsx(Ta,{text:"Buffers",onClick:()=>a(os.BUFFERS),active:s(os.BUFFERS),icon:Ti.SMALL_SQUARE,disabled:!f,variant:"minimal",size:"large",className:"buffers-button"}),He.jsx(Ta,{text:"Graph",onClick:()=>a(os.GRAPHTREE),active:s(os.GRAPHTREE),icon:Ti.GRAPH,disabled:!f,variant:"minimal",size:"large",className:"graph-button"}),He.jsx(Ta,{text:"Performance",onClick:()=>a(os.PERFORMANCE),active:s(os.PERFORMANCE),icon:Ti.LIGHTNING,disabled:!i,variant:"minimal",size:"large",className:"performance-button"}),He.jsx(Ta,{text:"NPE",onClick:()=>a(os.NPE),active:s(os.NPE),icon:Ti.Random,variant:"minimal",size:"large",className:"npe-button",children:He.jsx("small",{children:"beta"})}),He.jsx(Ta,{text:"Topology",onClick:()=>u(os.CLUSTER),active:s(os.CLUSTER),disabled:o.data===null,icon:Ti.LayoutGrid,variant:"minimal",size:"large",className:"cluster-button modal"})]})});function s(d){var l,h,y,b;return!!(r.pathname===d||r.pathname.includes(d)&&d!==os.HOME||((h=(l=r.state)==null?void 0:l.background)==null?void 0:h.pathname)===d||(b=(y=r.state)==null?void 0:y.background)!=null&&b.pathname.includes(d)&&d!==os.HOME)}}const U8e=()=>{const r=MD().length>0;return He.jsx("span",{children:r?He.jsxs("strong",{children:[He.jsx(Hs,{icon:Ti.TickCircle,intent:lo.SUCCESS})," ","Profiler and perf reports synchronised"]}):He.jsxs("strong",{children:[He.jsx(Hs,{icon:Ti.ISSUE,intent:lo.DANGER})," ","Profiler and perf reports can't be synchronized"]})})};var MW=(t=>(t.SMALL="small",t))(MW||{});function Tv({size:t}){return He.jsxs("div",{className:_i("loading-spinner",{small:t===MW.SMALL}),children:[He.jsx("div",{}),He.jsx("div",{}),He.jsx("div",{}),He.jsx("div",{})]})}const kJ=25;function H8e(){const t=Ko(Uf),r=qm(uge),[e,n]=Xl(z3),a=qm(cge),[u,o]=Xl(fge),f=Ko(hy),[i,s]=bt.useState(!1),[d,l]=bt.useState(!1),{data:h}=yg(),{data:y}=PD(t),b=fy(),C=MD(),m=(C==null?void 0:C.length)>0,c=SW(),v=b8e(),g=jge(),p=v==null?void 0:v[0],I=v==null?void 0:v[1],A=g==null?void 0:g[0],w=g==null?void 0:g[1],T=b.pathname.includes(`${os.OPERATIONS}/`),E=b.pathname===os.PERFORMANCE,x=T||E,S=()=>{n(v),o(g)};return bt.useEffect(()=>{v&&(r(v),n(v))},[v,r,n]),bt.useEffect(()=>{g&&(a(g),o(g))},[g,a,o]),bt.useEffect(()=>{var _,L;if(m&&e&&g&&u&&i){const k=((_=c.find(z=>e[0]===z.opId))==null?void 0:_.perfId)??c.reduce((z,M)=>Math.abs((M.opId??0)-e[0])<Math.abs((z.opId??0)-e[0])?M:z).perfId,F=((L=c.find(z=>e[1]===z.opId))==null?void 0:L.perfId)??c.reduce((z,M)=>Math.abs((M.opId??0)-e[1])<Math.abs((z.opId??0)-e[1])?M:z).perfId,N=Number(k)||(e[0]<c[0].opId?A:u[0]),P=Number(F)||(e[1]>c[c.length-1].opId?w:u[1]);o([N,P]),s(!1)}},[m,e]),bt.useEffect(()=>{var _,L,k,F;if(m&&e&&g&&u&&d){const N=((_=c.find(R=>u[0]===Number(R.perfId)))==null?void 0:_.opId)??c.reduce((R,D)=>Math.abs((Number(D.perfId)??0)-u[0])<Math.abs((Number(R.perfId)??0)-u[0])?D:R).opId,P=((L=c.find(R=>u[1]===Number(R.perfId)))==null?void 0:L.opId)??c.reduce((R,D)=>Math.abs((Number(D.perfId)??0)-u[1])<Math.abs((Number(R.perfId)??0)-u[1])?D:R).opId,z=N||(u[0]<Number(((k=c==null?void 0:c[0])==null?void 0:k.perfId)??0)?p:e[0]),M=P||(u[1]>Number(((F=c==null?void 0:c[c.length-1])==null?void 0:F.perfId)??0)?I:e[1]);n([z,M]),l(!1)}},[m,u]),e||u?He.jsxs("div",{className:"range-slider",children:[u&&He.jsxs("div",{className:"slider",children:[He.jsx("div",{className:"inputs",children:He.jsxs("div",{className:"group",children:[He.jsx(nh,{value:u[0].toString(),onValueChange:_=>{o([parseInt(_,10)||A,u[1]]),l(!0)},fill:!1,disabled:!E,size:"small"}),He.jsx(nh,{value:u[1].toString(),onValueChange:_=>{o([u[0],parseInt(_,10)||w]),l(!0)},fill:!1,disabled:!E,size:"small"})]})}),A&&w&&u&&He.jsxs("div",{className:"slider-container",children:[He.jsx(rJ,{value:u,onChange:_=>{o(_),l(!0)},min:A,max:w,labelStepSize:DJ(w),disabled:!E||!!f,labelRenderer:(_,L)=>V8e(_,y,L==null?void 0:L.isHandleTooltip)}),He.jsx("p",{children:"Performance"})]}),He.jsx("div",{className:"inputs",children:g&&He.jsx(_s,{content:"Reset range",children:He.jsx(Ta,{icon:Ti.RESET,onClick:()=>m?S():o(g),disabled:!E,size:"small"})})})]}),He.jsxs("div",{className:"slider",children:[e&&He.jsx("div",{className:"inputs",children:He.jsxs("div",{className:"group",children:[He.jsx(nh,{value:e[0].toString(),onValueChange:_=>{n([parseInt(_,10)||p,e[1]]),s(!0)},fill:!1,disabled:x,size:"small"}),He.jsx(nh,{value:e[1].toString(),onValueChange:_=>{n([e[0],parseInt(_,10)||I]),s(!0)},fill:!1,disabled:x,size:"small"})]})}),p&&I&&e&&He.jsxs("div",{className:"slider-container",children:[He.jsx(rJ,{value:e,onChange:_=>{n(_),s(!0)},min:p,max:I,labelStepSize:DJ(I),disabled:x,labelRenderer:(_,L)=>j8e(_,h,L==null?void 0:L.isHandleTooltip)}),He.jsx("p",{children:"Operations"})]}),v&&He.jsx(_s,{content:"Reset range",children:He.jsx(Ta,{icon:Ti.RESET,onClick:()=>m?S():n(v),disabled:x,size:"small"})})]})]}):He.jsx(Tv,{})}const DJ=t=>kJ>t?1:Math.ceil(t/kJ),j8e=(t,r,e)=>{const n=r==null?void 0:r.find(a=>a.id===t);return n&&e?`${n.id} ${n.name}`:t.toString()},V8e=(t,r,e)=>{const n=r==null?void 0:r.find(a=>parseInt(a.id,10)===t);return n&&e?`${n.id} ${n.raw_op_code}`:t.toString()},G8e=20;function W8e(){const[t,r]=bt.useState(!1),e=Ko(z3),n=Ko(uge),a=Ko(cge),u=Ko(u0),o=Ko(Uf),{data:f}=Zge(),i=fy(),s=i.pathname.includes(`${os.OPERATIONS}/`),d=i.pathname===os.PERFORMANCE,l=i.pathname.includes(`${os.NPE}`);bt.useEffect(()=>{(s||l)&&r(!1)},[l,s]);const h=()=>d?a&&`Selected Performance: ${a[0]} - ${a[1]}`:e&&`Selected: ${e[0]} - ${e[1]}`,y=Y8e(f,u);return He.jsxs("footer",{className:_i("app-footer",{"is-open":t}),children:[He.jsxs("div",{className:"current-data",children:[He.jsxs("div",{className:"active-reports",children:[y&&He.jsx(_s,{content:`/${u}`,position:sl.TOP,children:He.jsxs("div",{className:"title",children:[He.jsx("strong",{children:"Report:"}),He.jsx("span",{className:"report-name",children:y})]})}),o&&(o.length>G8e?He.jsx(_s,{content:o,className:"title",children:He.jsxs("div",{className:"title",children:[He.jsx("strong",{children:"Performance:"}),He.jsx("span",{className:"report-name",children:o})]})}):He.jsxs("div",{className:"title",children:[He.jsx("strong",{children:"Performance:"}),He.jsx("span",{className:"report-name",children:o})]})),u&&o&&He.jsx(U8e,{})]}),(n||a)&&He.jsxs("div",{className:"slider-controls",children:[!t&&!Z8e(e,n)&&He.jsx("span",{className:"current-range",children:h()}),He.jsx(Ta,{icon:t?Ti.CARET_DOWN:Ti.CARET_UP,onClick:()=>r(!t),disabled:s,size:"small",children:"Range"})]})]}),(u||o)&&He.jsx(uW,{className:"slider-container",isOpen:t,keepChildrenMounted:!0,children:He.jsx(H8e,{})})]})}const Z8e=(t,r)=>!!(t&&r&&t[0]===r[0]&&t[1]===r[1]),Y8e=(t,r)=>{var e;return(e=t==null?void 0:t.find(n=>n.path===r))==null?void 0:e.reportName};var Z1=(t=>(t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t))(Z1||{}),tg=(t=>(t[t.X=0]="X",t[t.Y=1]="Y",t[t.R=2]="R",t[t.S=3]="S",t))(tg||{});const X8e="Wormhole",bE=6,K8e=350,NJ=250,Q8e=150;function J8e(){const t=SI(),r=Hge(),e=r==null?void 0:r.data,n=h8e((e==null?void 0:e.arch.length)&&(e==null?void 0:e.arch[0])||X8e),a=Gge(n);let u=K8e;const o=He.jsx("h1",{className:"cluster-view-header",children:He.jsx(Ta,{icon:Ti.CROSS,onClick:()=>{t(-1)}})});if(!e)return He.jsxs("div",{className:"cluster-view-wrap",children:[o,He.jsx("p",{children:"Loading..."})]});let f=0;const i=e.chips_with_mmio.map(l=>Object.values(l)[0]),s=e.ethernet_connections,d=Object.entries(e.chips).map(([l,h])=>{const y=parseInt(l,10);f=Math.max(f,h[tg.X]);const b={id:y,coords:h,mmio:i.includes(y),connectedChipsByEthId:new Map,eth:a.eth.map(C=>`${l}-${C}`)};return b.design=a,b});return d.length>=8&&(u=NJ),d.length>=32&&(u=Q8e),s.forEach(l=>{const h=d[l[0].chip],y=d[l[1].chip];h&&y&&(h.connectedChipsByEthId.set(h.eth[l[0].chan]??"",y),y.connectedChipsByEthId.set(y.eth[l[1].chan]??"",h))}),He.jsxs("div",{className:"cluster-view-renderer",children:[o,He.jsx("div",{className:"cluster-view-wrap",children:He.jsx("div",{className:"cluster",style:{gridTemplateColumns:`repeat(${f||0}, ${u}px)`},children:d.map(l=>{var y;const h=new Map;return(y=l.design)==null||y.eth.forEach(b=>{var v;const C=`${l.id}-${b}`,m=l.connectedChipsByEthId.get(C);let c=null;m&&((m==null?void 0:m.coords[tg.X])<l.coords[tg.X]&&(c=Z1.LEFT),(m==null?void 0:m.coords[tg.X])>l.coords[tg.X]&&(c=Z1.RIGHT),(m==null?void 0:m.coords[tg.Y])<l.coords[tg.Y]&&(c=Z1.TOP),(m==null?void 0:m.coords[tg.Y])>l.coords[tg.Y]&&(c=Z1.BOTTOM)),c&&(h.has(c)?(v=h.get(c))==null||v.push(C):h.set(c,[C]))}),He.jsxs("div",{className:"chip",style:{display:"grid",width:`${u}px`,height:`${u}px`,gridColumn:l.coords[tg.X]+1,gridRow:l.coords[tg.Y]+1,gridTemplateColumns:`repeat(${bE}, 1fr)`,gridTemplateRows:`repeat(${bE}, 1fr)`},children:[He.jsxs("span",{className:"chip-id",style:{lineHeight:`${u}px`,paddingRight:`${u/4}px`,paddingTop:`${u/5}px`},children:[u>=NJ&&"Device"," ",l.id]}),[...h.entries()].map(([b,C])=>C.map((m,c)=>{const{x:v,y:g}=q8e(b,c),p=u/bE-5;return He.jsx("div",{title:`${m}`,className:`eth eth-position-${b}`,style:{gridColumn:v,gridRow:g,width:`${p}px`,height:`${p}px`},children:He.jsx("span",{children:m})},m)})),l.mmio&&He.jsx("div",{className:"mmio",children:"PCIe"})]},l.id)})})})]})}const q8e=(t,r)=>{let e=0,n=0;switch(t){case Z1.TOP:e=r+2,n=1;break;case Z1.BOTTOM:e=r+2,n=bE;break;case Z1.LEFT:e=1,n=r+2;break;case Z1.RIGHT:e=bE,n=r+2;break;default:return{x:e,y:n}}return{x:e,y:n}};function e9e({routes:t}){const r=fy(),e=r.state,n=e==null?void 0:e.background;return SEe(t,n||r)}const LF=navigator.userAgent.toLowerCase(),FJ=LF.includes("safari")&&!LF.includes("chrome")&&!LF.includes("android"),Kge=()=>{function t(f){const s=Array.from(f).map(h=>h.webkitRelativePath);if(s.length===0)return null;const l=s.reduce((h,y)=>h.split("/").filter((C,m)=>C===y.split("/")[m]).join("/")).split("/");return l.length>=1?l[l.length-1]:null}function r(f,i=["tensors"]){const d=Array.from(f).filter(h=>!i.some(y=>{var b;return(b=h.webkitRelativePath)==null?void 0:b.includes(`/${y}/`)})),l=new DataTransfer;return d.forEach(h=>l.items.add(h)),l.files}return{getUploadedFolderName:t,checkRequiredReportFiles:f=>{const i=["db.sqlite","config.json"],s=new Set;return Array.from(f).forEach(d=>{const l=d.webkitRelativePath.split("/");l.length===2&&s.add(l[1])}),i.every(d=>s.has(d))},checkRequiredProfilerFiles:f=>{const i=["profile_log_device.csv","tracy_profile_log_host.tracy"],s="ops_perf_results",d=new Set;Array.from(f).forEach(y=>{const b=y.webkitRelativePath.split("/");b.length===2&&d.add(b[1])});const l=i.every(y=>d.has(y)),h=Array.from(d).some(y=>y.startsWith(s));return l&&h},uploadLocalFolder:async f=>{const i=eL(),s=new FormData;return Array.from(f).forEach(d=>{s.append("files",d)}),FJ&&s.append("folderName",f[0].webkitRelativePath.split("/")[0]),Tu.post("api/local/upload/profiler",s,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:d=>{if(d&&d.total!==null&&d.total!==void 0){const l=Math.round(d.loaded*100/d.total);i.set(bC,{percentOfCurrent:l,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.UPLOADING})}}}).catch(d=>d).finally(()=>{i.set(bC,{percentOfCurrent:0,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.INACTIVE})})},uploadLocalPerformanceFolder:async f=>{const i=new FormData,s=eL();return Array.from(f).forEach(d=>{i.append("files",d)}),FJ&&i.append("folderName",f[0].webkitRelativePath.split("/")[0]),Tu.post("api/local/upload/performance",i,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:d=>{if(d&&d.total!==null&&d.total!==void 0){const l=Math.round(d.loaded*100/d.total);s.set(bC,{percentOfCurrent:l,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.UPLOADING})}}}).catch(d=>d).finally(()=>{s.set(bC,{percentOfCurrent:0,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.INACTIVE})})},uploadNpeFile:async f=>{const i=eL(),s=new FormData;return Array.from(f).forEach(d=>{s.append("files",d)}),Tu.post("api/local/upload/npe",s,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:d=>{if(d&&d.total!==null&&d.total!==void 0){const l=Math.round(d.loaded*100/d.total);i.set(bC,{percentOfCurrent:l,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.UPLOADING})}}}).catch(d=>d).finally(()=>{i.set(bC,{percentOfCurrent:0,currentFileName:"",finishedFiles:0,numberOfFiles:f.length,status:tm.INACTIVE})})},filterReportFiles:r}};var Wo=(t=>(t[t.IDLE=0]="IDLE",t[t.PROGRESS=1]="PROGRESS",t[t.FAILED=2]="FAILED",t[t.OK=3]="OK",t))(Wo||{});function Qge({isOpen:t,onClose:r,children:e,hideCloseButton:n=!1,canEscapeKeyClose:a=!0,canOutsideClickClose:u=!0}){return He.jsx(mA,{isOpen:t,onClose:r,className:Nde,canEscapeKeyClose:a,canOutsideClickClose:u,children:He.jsxs("div",{className:_i("overlay-contents",YT,Sde,k5e),children:[e,!n&&He.jsx("div",{className:Mde,children:He.jsx(Ta,{intent:lo.DANGER,onClick:r,children:"Close"})})]})})}function aL({progress:t,estimated:r}){return He.jsxs("div",{className:"progress-bar",children:[He.jsx(zve,{value:t}),t&&r?He.jsxs("span",{className:"status",children:[t>0?`${Math.round(t*100)}%`:"100%"," - ",r>0?`${Math.round(r)}s left`:"0s left"]}):null]})}const t9e=()=>{const t=f=>f.toFixed(2).padStart(5,"0"),[r]=Xl(bC),{currentFileName:e,finishedFiles:n,numberOfFiles:a,percentOfCurrent:u,status:o}=r;return He.jsxs(Qge,{isOpen:[tm.STARTED,tm.COMPRESSING,tm.DOWNLOADING,tm.UPLOADING].includes(o),hideCloseButton:!0,canEscapeKeyClose:!1,canOutsideClickClose:!1,children:[He.jsxs("div",{className:"overlay",children:[He.jsx("h2",{children:"File Transfer Progress"}),e&&He.jsxs("p",{children:["Current File: ",e]}),a&&He.jsxs("p",{children:["Files Transferred: ",n,"/",a]}),He.jsxs("p",{children:["Current File Progress: ",t(u),"%"]}),o&&He.jsxs("p",{children:["Status: ",o.valueOf()]})]}),He.jsx(aL,{progress:u/100})]})},r9e=({message:t,fileName:r})=>He.jsxs("div",{children:[t,He.jsx("br",{}),He.jsx("strong",{children:r})]});function B1(t,r){pu(He.jsx(r9e,{message:t,fileName:r}),{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!1,draggable:!0,progress:void 0,theme:"light"})}var Jge=PG(),vM="".concat(Jge,"-multi-select"),n9e="".concat(vM,"-popover"),i9e="".concat(vM,"-popover-default-width"),a9e="".concat(vM,"-popover-tag-input-margin"),zJ="".concat(vM,"-tag-input-input"),o9e="".concat(Jge,"-select-popover");function s9e(t,r,e){if(t.query.length===0&&e!==void 0)return e;var n=t.filteredItems.map(t.renderItem).filter(function(a){return a!=null});return n.length>0?n:r}function uP(t,r,e){return t===void 0||r==null||e==null?r===e:ud(t)?t(r,e):r[t]===e[t]}function BJ(){return{__blueprintCreateNewItemBrand:"blueprint-create-new-item"}}function D2(t){if(t==null)return!1;var r=Object.keys(t);return r.length!==1||r[0]!=="__blueprintCreateNewItemBrand"?!1:t.__blueprintCreateNewItemBrand==="blueprint-create-new-item"}function cP(t){return t==null||D2(t)?null:t}var qge=function(t){Es(r,t);function r(e){var n,a,u=t.call(this,e)||this;u.itemRefs=new Map,u.refHandlers={itemsParent:function(d){return u.itemsParentRef=d}},u.shouldCheckActiveItemInViewport=!1,u.expectedNextActiveItem=null,u.isEnterKeyPressed=!1,u.renderItemList=function(d){var l=u.props,h=l.initialContent,y=l.noResults,b=d.renderCreateItem(),C=b!=null?null:y,m=s9e(d,C,h);if(m==null&&b==null)return null;var c=u.isCreateItemFirst();return bt.createElement(eW,Kn({role:"listbox"},d.menuProps,{ulRef:d.itemsParentRef}),c&&b,m,!c&&b)},u.renderItem=function(d,l){if(u.props.disabled!==!0){var h=u.state,y=h.activeItem,b=h.query,C=h.filteredItems,m={active:uP(u.props.itemsEqual,cP(y),d),disabled:oH(d,l,u.props.itemDisabled),matchesPredicate:C.indexOf(d)>=0};return u.props.itemRenderer(d,{handleClick:function(c){return u.handleItemSelect(d,c)},handleFocus:function(){return u.setActiveItem(d)},index:l,modifiers:m,query:b,ref:function(c){c?u.itemRefs.set(l,c):u.itemRefs.delete(l)}})}return null},u.renderCreateItemMenuItem=function(){if(u.isCreateItemRendered(u.state.createNewItem)){var d=u.state,l=d.activeItem,h=d.query,y=h.trim(),b=function(m){u.handleItemCreate(y,m)},C=D2(l);return u.props.createNewItemRenderer(y,C,b)}return null},u.handleItemCreate=function(d,l){var h,y,b,C,m=(y=(h=u.props).createNewItemFromQuery)===null||y===void 0?void 0:y.call(h,d);if(m!=null){for(var c=Array.isArray(m)?m:[m],v=0,g=c;v<g.length;v++){var p=g[v];(C=(b=u.props).onItemSelect)===null||C===void 0||C.call(b,p,l)}u.maybeResetQuery()}},u.handleItemSelect=function(d,l){var h,y;u.setActiveItem(d),(y=(h=u.props).onItemSelect)===null||y===void 0||y.call(h,d,l),u.maybeResetQuery()},u.handlePaste=function(d){for(var l=u.props,h=l.createNewItemFromQuery,y=l.onItemsPaste,b,C=[],m=[],c=0,v=d;c<v.length;c++){var g=v[c],p=l9e(g,u.props);if(p!==void 0)b=p,m.push(p);else if(u.canCreateItems()){var I=h==null?void 0:h(g);if(I!==void 0){var A=Array.isArray(I)?I:[I];m.push.apply(m,A)}}else C.push(g)}u.setQuery(C.join(", "),!1),b!==void 0&&u.setActiveItem(b),y==null||y(m)},u.handleKeyDown=function(d){var l,h;if(!d.nativeEvent.isComposing){var y=d.key,b=uD(d,["ArrowUp"],["ArrowDown"]);if(b!==void 0){d.preventDefault();var C=u.getNextActiveItem(b);C!=null&&u.setActiveItem(C)}else y==="Enter"&&(u.isEnterKeyPressed=!0)}(h=(l=u.props).onKeyDown)===null||h===void 0||h.call(l,d)},u.handleKeyUp=function(d){var l=u.props.onKeyUp,h=u.state.activeItem;d.key==="Enter"&&u.isEnterKeyPressed&&(d.preventDefault(),h==null||D2(h)?u.handleItemCreate(u.state.query,d):u.handleItemSelect(h,d),u.isEnterKeyPressed=!1),l==null||l(d)},u.handleInputQueryChange=function(d){var l,h,y=d==null?"":d.target.value;u.setQuery(y),(h=(l=u.props).onQueryChange)===null||h===void 0||h.call(l,y,d)};var o=e.query,f=o===void 0?"":o,i=(n=e.createNewItemFromQuery)===null||n===void 0?void 0:n.call(e,f),s=UJ(f,e);return u.state={activeItem:e.activeItem!==void 0?e.activeItem:(a=e.initialActiveItem)!==null&&a!==void 0?a:OF(s,e.itemDisabled),createNewItem:i,filteredItems:s,query:f},u}return r.ofType=function(){return r},r.prototype.render=function(){var e=this.props,n=e.className,a=e.items,u=e.renderer,o=e.itemListRenderer,f=o===void 0?this.renderItemList:o,i=e.menuProps,s=this.state;s.createNewItem;var d=Ms(s,["createNewItem"]);return u(Kn(Kn({},d),{className:n,handleItemSelect:this.handleItemSelect,handleKeyDown:this.handleKeyDown,handleKeyUp:this.handleKeyUp,handlePaste:this.handlePaste,handleQueryChange:this.handleInputQueryChange,itemList:f(Kn(Kn({},d),{items:a,itemsParentRef:this.refHandlers.itemsParent,menuProps:i,renderCreateItem:this.renderCreateItemMenuItem,renderItem:this.renderItem}))}))},r.prototype.componentDidUpdate=function(e){var n=this;this.props.activeItem!==void 0&&this.props.activeItem!==this.state.activeItem&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:this.props.activeItem})),this.props.query!=null&&this.props.query!==e.query?this.setQuery(this.props.query,this.props.resetOnQuery,this.props):wv(this.props,e,{include:["items","itemListPredicate","itemPredicate"]})||this.setQuery(this.state.query),this.shouldCheckActiveItemInViewport&&(this.requestAnimationFrame(function(){return n.scrollActiveItemIntoView()}),this.shouldCheckActiveItemInViewport=!1)},r.prototype.scrollActiveItemIntoView=function(){var e=this.props.scrollToActiveItem!==!1,n=!uP(this.props.itemsEqual,cP(this.expectedNextActiveItem),cP(this.props.activeItem));if(this.expectedNextActiveItem=null,!(!e&&n)){var a=this.getActiveElement();if(this.itemsParentRef!=null&&a!=null){var u=a.offsetTop,o=a.offsetHeight,f=this.itemsParentRef,i=f.offsetTop,s=f.scrollTop,d=f.clientHeight,l=this.getItemsParentPadding(),h=l.paddingTop,y=l.paddingBottom,b=u+o+y-i,C=u-h-i;b>=s+d?this.itemsParentRef.scrollTop=b+o-d:C<=s&&(this.itemsParentRef.scrollTop=C-o)}}},r.prototype.setQuery=function(e,n,a){var u;n===void 0&&(n=this.props.resetOnQuery),a===void 0&&(a=this.props);var o=a.createNewItemFromQuery;this.shouldCheckActiveItemInViewport=!0;var f=e!==this.state.query;f&&((u=a.onQueryChange)===null||u===void 0||u.call(a,e));var i=e.trim(),s=UJ(i,a),d=o!=null&&i!==""?o(i):void 0;this.setState({createNewItem:d,filteredItems:s,query:e});var l=this.getActiveIndex(s),h=n||l<0||oH(cP(this.state.activeItem),l,a.itemDisabled);h&&(this.isCreateItemRendered(d)&&this.isCreateItemFirst()?this.setActiveItem(BJ()):this.setActiveItem(OF(s,a.itemDisabled)))},r.prototype.setActiveItem=function(e){var n,a,u,o;this.expectedNextActiveItem=e,this.props.activeItem===void 0&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:e})),D2(e)?(a=(n=this.props).onActiveItemChange)===null||a===void 0||a.call(n,null,!0):(o=(u=this.props).onActiveItemChange)===null||o===void 0||o.call(u,e,!1)},r.prototype.getActiveElement=function(){var e,n=this.state.activeItem;if(this.itemsParentRef!=null)if(D2(n)){var a=this.isCreateItemFirst()?0:this.state.filteredItems.length;return this.itemsParentRef.children.item(a)}else{var u=this.getActiveIndex();return(e=this.itemRefs.get(u))!==null&&e!==void 0?e:this.itemsParentRef.children.item(u)}},r.prototype.getActiveIndex=function(e){e===void 0&&(e=this.state.filteredItems);var n=this.state.activeItem;if(n==null||D2(n))return-1;for(var a=0;a<e.length;++a)if(uP(this.props.itemsEqual,e[a],n))return a;return-1},r.prototype.getItemsParentPadding=function(){var e=getComputedStyle(this.itemsParentRef),n=e.paddingTop,a=e.paddingBottom;return{paddingBottom:$J(a),paddingTop:$J(n)}},r.prototype.getNextActiveItem=function(e,n){if(n===void 0&&(n=this.getActiveIndex()),this.isCreateItemRendered(this.state.createNewItem)){var a=n===0&&e===-1||n===this.state.filteredItems.length-1&&e===1;if(a)return BJ()}return OF(this.state.filteredItems,this.props.itemDisabled,e,n)},r.prototype.isCreateItemRendered=function(e){return this.canCreateItems()&&this.state.query!==""&&!this.wouldCreatedItemMatchSomeExistingItem(e)},r.prototype.isCreateItemFirst=function(){return this.props.createNewItemPosition==="first"},r.prototype.canCreateItems=function(){return this.props.createNewItemFromQuery!=null&&this.props.createNewItemRenderer!=null},r.prototype.wouldCreatedItemMatchSomeExistingItem=function(e){var n=this;return this.state.filteredItems.some(function(a){var u=Array.isArray(e)?e:[e];return u.some(function(o){return uP(n.props.itemsEqual,a,o)})})},r.prototype.maybeResetQuery=function(){this.props.resetOnSelect&&this.setQuery("",!0)},r.displayName="".concat(Uo,".QueryList"),r.defaultProps={disabled:!1,resetOnQuery:!0},r}(F3);function $J(t){return t==null?0:parseInt(t.slice(0,-2),10)}function l9e(t,r){var e=r.items,n=r.itemPredicate;if(ud(n))for(var a=0;a<e.length;a++){var u=e[a];if(n(t,u,a,!0))return u}}function UJ(t,r){var e=r.items,n=r.itemPredicate,a=r.itemListPredicate;return ud(a)?a(t,e):ud(n)?e.filter(function(u,o){return n(t,u,o)}):e}function u9e(t,r,e){return t<r?e:t>e?r:t}function oH(t,r,e){return e==null||t==null?!1:ud(e)?e(t,r):!!t[e]}function OF(t,r,e,n){if(e===void 0&&(e=1),n===void 0&&(n=t.length-1),t.length===0)return null;var a=n,u=t.length-1;do if(a=u9e(a+e,0,u),!oH(t[a],a,r))return t[a];while(a!==n&&n!==-1);return null}var epe=function(t){Es(r,t);function r(){var e,n=t.apply(this,arguments)||this;return n.listboxId=LG("listbox"),n.state={isOpen:n.props.popoverProps&&n.props.popoverProps.isOpen||!1},n.input=null,n.queryList=null,n.refHandlers={input:Ux(n,"input",(e=n.props.tagInputProps)===null||e===void 0?void 0:e.inputRef),popover:bt.createRef(),queryList:function(a){return n.queryList=a}},n.renderQueryList=function(a){var u,o=n.props,f=o.disabled,i=o.popoverContentProps,s=i===void 0?{}:i,d=o.popoverProps,l=d===void 0?{}:d,h=a.handleKeyDown,y=a.handleKeyUp;return bt.createElement(uw,Kn({autoFocus:!1,canEscapeKeyClose:!0,disabled:f,enforceFocus:!1,isOpen:n.state.isOpen,placement:l.position||l.placement?void 0:"bottom-start"},l,{className:_i(a.className,l.className),content:bt.createElement("div",Kn({className:n.props.customTarget!=null&&!(!((u=n.props.popoverProps)===null||u===void 0)&&u.matchTargetWidth)?i9e:void 0},s,{onKeyDown:h,onKeyUp:y}),n.props.customTarget!=null&&n.getTagInput(a,_i(cp,a9e)),a.itemList),interactionKind:"click",onInteraction:n.handlePopoverInteraction,onOpened:n.handlePopoverOpened,popoverClassName:_i(n9e,l.popoverClassName),popupKind:RO.LISTBOX,ref:pA(n.refHandlers.popover,n.props.popoverRef),renderTarget:n.getPopoverTargetRenderer(a,n.state.isOpen)}))},n.getPopoverTargetRenderer=function(a,u){return function(o){var f;o.isOpen;var i=o.ref,s=Ms(o,["isOpen","ref"]),d=n.props,l=d.disabled,h=d.fill,y=d.selectedItems,b=d.popoverProps,C=b===void 0?{}:b,m=d.popoverTargetProps,c=m===void 0?{}:m,v=a.handleKeyDown,g=a.handleKeyUp,p=C.targetTagName,I=p===void 0?"div":p;return bt.createElement(I,Kn(Kn(Kn({"aria-autocomplete":"list","aria-controls":n.listboxId},c),s),{"aria-disabled":l,"aria-expanded":u,className:_i(s.className,c.className,(f={},f[cp]=h,f)),onKeyDown:n.getTagInputKeyDownHandler(v),onKeyUp:n.getTagInputKeyUpHandler(g),ref:i,role:"combobox"}),n.props.customTarget!=null?n.props.customTarget(y,u):n.getTagInput(a))}},n.getTagInput=function(a,u){var o,f=n.props,i=f.disabled,s=f.fill,d=f.onClear,l=f.placeholder,h=f.selectedItems,y=f.tagInputProps,b=y===void 0?{}:y,C=d!==void 0&&h.length>0?bt.createElement(Ta,{"aria-label":"Clear selected items",disabled:i,icon:bt.createElement(cD,null),onClick:n.handleClearButtonClick,title:"Clear selected items",variant:"minimal"}):void 0,m=Kn(Kn({},b.inputProps),{className:_i((o=b.inputProps)===null||o===void 0?void 0:o.className,zJ)});return bt.createElement(GLe,Kn({placeholder:l,rightElement:C},b,{className:_i(u,vM,b.className),disabled:i,fill:s,inputRef:n.refHandlers.input,inputProps:m,inputValue:a.query,onAdd:n.getTagInputAddHandler(a),onInputChange:a.handleQueryChange,onRemove:n.handleTagRemove,values:h.map(n.props.tagRenderer)}))},n.handleItemSelect=function(a,u){var o,f,i;n.input!=null&&n.input.focus(),(f=(o=n.props).onItemSelect)===null||f===void 0||f.call(o,a,u),(i=n.refHandlers.popover.current)===null||i===void 0||i.reposition()},n.handleQueryChange=function(a,u){var o,f;n.setState({isOpen:a.length>0||n.props.customTarget==null&&!n.props.openOnKeyDown}),(f=(o=n.props).onQueryChange)===null||f===void 0||f.call(o,a,u)},n.handlePopoverInteraction=function(a,u){var o,f;if(n.props.customTarget!=null){n.setState({isOpen:a}),(f=(o=n.props.popoverProps)===null||o===void 0?void 0:o.onInteraction)===null||f===void 0||f.call(o,a,u);return}n.requestAnimationFrame(function(){var i,s,d=n.input===QT(n.input);n.input!=null&&!d?n.setState({isOpen:!1}):n.props.openOnKeyDown||n.setState({isOpen:!0}),(s=(i=n.props.popoverProps)===null||i===void 0?void 0:i.onInteraction)===null||s===void 0||s.call(i,a,u)})},n.handlePopoverOpened=function(a){var u,o,f,i;n.queryList!=null&&n.queryList.scrollActiveItemIntoView();var s=n.props.customTarget!=null;if(s&&n.input!=null){var d=((o=(u=n.props.tagInputProps)===null||u===void 0?void 0:u.inputProps)===null||o===void 0?void 0:o.autoFocus)!==!1;d&&n.input.focus()}(i=(f=n.props.popoverProps)===null||f===void 0?void 0:f.onOpened)===null||i===void 0||i.call(f,a)},n.handleTagRemove=function(a,u){var o,f,i=n.props,s=i.selectedItems,d=i.onRemove,l=i.tagInputProps;d==null||d(s[u],u),(o=l==null?void 0:l.onRemove)===null||o===void 0||o.call(l,a,u),(f=n.refHandlers.popover.current)===null||f===void 0||f.reposition()},n.getTagInputAddHandler=function(a){return function(u,o){o==="paste"&&a.handlePaste(u)}},n.getTagInputKeyDownHandler=function(a){return function(u){var o,f,i;u.key==="Escape"||u.key==="Tab"?(u.key==="Escape"&&((o=n.input)===null||o===void 0||o.blur()),n.setState({isOpen:!1})):u.key==="Backspace"||u.key==="ArrowLeft"||u.key==="ArrowRight"||(n.props.customTarget!=null?u.key===" "?(u.preventDefault(),n.setState({isOpen:!0})):u.key==="Enter"&&n.setState({isOpen:!0}):n.setState({isOpen:!0}));var s=u.target.closest(".".concat(jde))!=null;n.state.isOpen&&!s&&(a==null||a(u)),(i=(f=n.props.popoverTargetProps)===null||f===void 0?void 0:f.onKeyDown)===null||i===void 0||i.call(f,u)}},n.getTagInputKeyUpHandler=function(a){return function(u){var o,f,i=u.target.classList.contains(zJ);n.state.isOpen&&i&&(a==null||a(u)),(f=(o=n.props.popoverTargetProps)===null||o===void 0?void 0:o.onKeyDown)===null||f===void 0||f.call(o,u)}},n.handleClearButtonClick=function(){var a,u,o;(u=(a=n.props).onClear)===null||u===void 0||u.call(a),(o=n.refHandlers.popover.current)===null||o===void 0||o.reposition()},n}return r.ofType=function(){return r},r.prototype.componentDidUpdate=function(e){var n,a,u,o,f;((n=e.tagInputProps)===null||n===void 0?void 0:n.inputRef)!==((a=this.props.tagInputProps)===null||a===void 0?void 0:a.inputRef)&&(nm((u=e.tagInputProps)===null||u===void 0?void 0:u.inputRef,null),this.refHandlers.input=Ux(this,"input",(o=this.props.tagInputProps)===null||o===void 0?void 0:o.inputRef),nm((f=this.props.tagInputProps)===null||f===void 0?void 0:f.inputRef,this.input)),(e.onClear===void 0&&this.props.onClear!==void 0||e.onClear!==void 0&&this.props.onClear===void 0)&&this.forceUpdate()},r.prototype.render=function(){var e=this.props,n=e.menuProps;e.openOnKeyDown,e.popoverProps,e.tagInputProps,e.customTarget;var a=Ms(e,["menuProps","openOnKeyDown","popoverProps","tagInputProps","customTarget"]);return bt.createElement(qge,Kn({},a,{menuProps:Kn(Kn({"aria-label":"selectable options"},n),{"aria-multiselectable":!0,id:this.listboxId}),onItemSelect:this.handleItemSelect,onQueryChange:this.handleQueryChange,ref:this.refHandlers.queryList,renderer:this.renderQueryList}))},r.displayName="".concat(Uo,".MultiSelect"),r.defaultProps={disabled:!1,fill:!1,placeholder:"Search..."},r}(Sc),RW=function(t){Es(r,t);function r(){var e,n=t.apply(this,arguments)||this;return n.state={isOpen:!1},n.inputElement=null,n.queryList=null,n.handleInputRef=Ux(n,"inputElement",(e=n.props.inputProps)===null||e===void 0?void 0:e.inputRef),n.handleQueryListRef=function(a){return n.queryList=a},n.listboxId=LG("listbox"),n.renderQueryList=function(a){var u=n.props,o=u.filterable,f=o===void 0?!0:o,i=u.disabled,s=i===void 0?!1:i,d=u.inputProps,l=d===void 0?{}:d,h=u.placeholder,y=h===void 0?"Filter...":h,b=u.popoverContentProps,C=b===void 0?{}:b,m=u.popoverProps,c=m===void 0?{}:m,v=u.popoverRef,g=bt.createElement(nh,Kn({"aria-autocomplete":"list",leftIcon:bt.createElement(ZG,null),placeholder:y,rightElement:n.maybeRenderClearButton(a.query)},l,{inputRef:n.handleInputRef,onChange:a.handleQueryChange,value:a.query})),p=a.handleKeyDown,I=a.handleKeyUp;return bt.createElement(uw,Kn({autoFocus:!1,enforceFocus:!1,isOpen:n.state.isOpen,disabled:s,placement:c.position||c.placement?void 0:"bottom-start"},c,{className:_i(a.className,c.className),content:bt.createElement("div",Kn({},C,{onKeyDown:p,onKeyUp:I}),f?g:void 0,a.itemList),onClosing:n.handlePopoverClosing,onInteraction:n.handlePopoverInteraction,onOpened:n.handlePopoverOpened,onOpening:n.handlePopoverOpening,popoverClassName:_i(o9e,c.popoverClassName),popupKind:RO.LISTBOX,ref:v,renderTarget:n.getPopoverTargetRenderer(a,n.state.isOpen)}))},n.getPopoverTargetRenderer=function(a,u){return function(o){var f;o.isOpen;var i=o.ref,s=Ms(o,["isOpen","ref"]),d=n.props,l=d.disabled,h=d.popoverProps,y=h===void 0?{}:h,b=d.popoverTargetProps,C=a.handleKeyDown,m=a.handleKeyUp,c=y.targetTagName,v=c===void 0?"div":c;return bt.createElement(v,Kn(Kn(Kn({"aria-controls":n.listboxId},b),s),{"aria-disabled":l,"aria-expanded":u,className:_i(s.className,b==null?void 0:b.className,(f={},f[cp]=n.props.fill,f)),onKeyDown:n.withPopoverTargetPropsHandler("keydown",u?C:n.handleTargetKeyDown),onKeyUp:n.withPopoverTargetPropsHandler("keyup",u?m:void 0),ref:i,role:"combobox"}),n.props.children)}},n.withPopoverTargetPropsHandler=function(a,u){switch(a){case"keydown":return function(o){var f,i;u==null||u(o),(i=(f=n.props.popoverTargetProps)===null||f===void 0?void 0:f.onKeyDown)===null||i===void 0||i.call(f,o)};case"keyup":return function(o){var f,i;u==null||u(o),(i=(f=n.props.popoverTargetProps)===null||f===void 0?void 0:f.onKeyUp)===null||i===void 0||i.call(f,o)}}},n.handleTargetKeyDown=function(a){a.key==="ArrowUp"||a.key==="ArrowDown"?(a.preventDefault(),n.setState({isOpen:!0})):JT(a)&&n.setState({isOpen:!0})},n.handleItemSelect=function(a,u){var o,f,i=u==null?void 0:u.target,s=i==null?void 0:i.closest(".".concat(D3)),d=s==null?void 0:s.matches(".".concat(c5)),l=d??!0;n.setState({isOpen:!l}),(f=(o=n.props).onItemSelect)===null||f===void 0||f.call(o,a,u)},n.handlePopoverInteraction=function(a,u){var o,f;n.setState({isOpen:a}),(f=(o=n.props.popoverProps)===null||o===void 0?void 0:o.onInteraction)===null||f===void 0||f.call(o,a,u)},n.handlePopoverOpening=function(a){var u,o,f;n.previousFocusedElement=(u=QT(n.inputElement))!==null&&u!==void 0?u:void 0,n.props.resetOnClose&&n.resetQuery(),(f=(o=n.props.popoverProps)===null||o===void 0?void 0:o.onOpening)===null||f===void 0||f.call(o,a)},n.handlePopoverOpened=function(a){var u,o;n.queryList!=null&&n.queryList.scrollActiveItemIntoView(),n.requestAnimationFrame(function(){var f,i=n.props.inputProps,s=i===void 0?{}:i;s.autoFocus!==!1&&((f=n.inputElement)===null||f===void 0||f.focus())}),(o=(u=n.props.popoverProps)===null||u===void 0?void 0:u.onOpened)===null||o===void 0||o.call(u,a)},n.handlePopoverClosing=function(a){var u,o;n.requestAnimationFrame(function(){n.previousFocusedElement!==void 0&&(n.previousFocusedElement.focus(),n.previousFocusedElement=void 0)}),(o=(u=n.props.popoverProps)===null||u===void 0?void 0:u.onClosing)===null||o===void 0||o.call(u,a)},n.resetQuery=function(){return n.queryList&&n.queryList.setQuery("",!0)},n}return r.ofType=function(){return r},r.prototype.render=function(){var e=this.props;e.filterable,e.inputProps;var n=e.menuProps;e.popoverProps;var a=Ms(e,["filterable","inputProps","menuProps","popoverProps"]);return bt.createElement(qge,Kn({},a,{menuProps:Kn(Kn({"aria-label":"selectable options"},n),{id:this.listboxId}),onItemSelect:this.handleItemSelect,ref:this.handleQueryListRef,renderer:this.renderQueryList}))},r.prototype.componentDidUpdate=function(e,n){var a,u,o,f,i;((a=e.inputProps)===null||a===void 0?void 0:a.inputRef)!==((u=this.props.inputProps)===null||u===void 0?void 0:u.inputRef)&&(nm((o=e.inputProps)===null||o===void 0?void 0:o.inputRef,null),this.handleInputRef=Ux(this,"inputElement",(f=this.props.inputProps)===null||f===void 0?void 0:f.inputRef),nm((i=this.props.inputProps)===null||i===void 0?void 0:i.inputRef,this.inputElement)),this.state.isOpen&&!n.isOpen&&this.queryList!=null&&this.queryList.scrollActiveItemIntoView()},r.prototype.maybeRenderClearButton=function(e){return e.length>0?bt.createElement(Ta,{"aria-label":"Clear filter query",icon:bt.createElement(cD,null),onClick:this.resetQuery,title:"Clear filter query",variant:"minimal"}):void 0},r.displayName="".concat(Uo,".Select"),r}(Sc);const sH=({items:t,value:r,handleSelect:e,handleDelete:n,defaultLabel:a="Select a report..."})=>{const{data:u}=EW(),o=!t||t.length===0,f=r||"",[i,s]=bt.useState(!1),d=(l,{handleClick:h,handleFocus:y,modifiers:b})=>b.matchesPredicate?He.jsxs("div",{className:"folder-picker-menu-item",children:[He.jsx(AA,{textClassName:"folder-picker-label",text:`/${l.path}`,labelElement:l.reportName,labelClassName:"folder-picker-name-label",roleStructure:"listoption",active:l.path===f,disabled:b.disabled,onClick:h,onFocus:y,icon:l.path===f?Ti.SAVED:Ti.DOCUMENT}),n&&He.jsxs(He.Fragment,{children:[He.jsx(Ta,{icon:Ti.TRASH,onClick:()=>s(!0),variant:h5.MINIMAL,intent:lo.DANGER}),He.jsx(dve,{canEscapeKeyCancel:!0,canOutsideClickCancel:!0,isOpen:i,intent:lo.DANGER,onCancel:()=>s(!1),onClose:()=>s(!1),onConfirm:()=>{n(l),s(!1)},cancelButtonText:"Cancel",confirmButtonText:"Delete",className:"bp5-dark",children:He.jsxs("p",{children:["Are you sure you want to delete ",He.jsx("strong",{children:l.reportName}),"? This action cannot be undone."]})})]})]},l.reportName):null;return He.jsx(RW,{className:"folder-picker",items:t??[],itemPredicate:(l,h)=>!l||h.reportName.toLowerCase().includes(l.toLowerCase()),itemRenderer:d,noResults:He.jsx(AA,{disabled:!0,text:"No results.",roleStructure:"listoption"}),onItemSelect:e,disabled:!t||!u,fill:!0,children:He.jsx(_s,{content:f?`/${f}`:"",children:He.jsx(Ta,{className:"folder-picker-button",text:t&&f?c9e(t,f):a,disabled:o||!u,alignText:"start",icon:Ti.DOCUMENT_OPEN,endIcon:Ti.CARET_DOWN,variant:h5.OUTLINED,fill:!0})})})},c9e=(t,r)=>{var e;return(e=t==null?void 0:t.find(n=>n.path===r))==null?void 0:e.reportName},HJ={[Wo.IDLE]:Ti.DOT,[Wo.PROGRESS]:Ti.DOT,[Wo.FAILED]:Ti.CROSS,[Wo.OK]:Ti.TICK},jJ={[Wo.IDLE]:lo.NONE,[Wo.PROGRESS]:lo.WARNING,[Wo.FAILED]:lo.DANGER,[Wo.OK]:lo.SUCCESS},VJ={status:Wo.OK,message:"Files uploaded successfully"},f9e={status:Wo.FAILED,message:"Selected directory does not contain a valid report"},h9e={status:Wo.FAILED,message:"Selected directory is not a valid profiler run"},d9e={status:Wo.FAILED,message:"Selected directory does not contain a valid report."},GJ={status:Wo.FAILED,message:"Unable to upload selected directory."},v9e=()=>{const t=TG(),r=qm(mW),e=qm(AW),[n,a]=Xl(u0),[u,o]=Xl(Uf),{uploadLocalFolder:f,uploadLocalPerformanceFolder:i,checkRequiredReportFiles:s,checkRequiredProfilerFiles:d,filterReportFiles:l}=Kge(),{data:h}=Xge(),{data:y}=Zge(),{data:b}=EW(),[C,m]=bt.useState(),[c,v]=bt.useState(!1),[g,p]=bt.useState(!1),[I,A]=bt.useState("Choose directory..."),[w,T]=bt.useState(),[E,x]=bt.useState("Choose directory..."),S=async P=>{if(!P.target.files)return;const{files:z}=P.target,M=l(z);if(!s(M)){m(f9e);return}let R=VJ;v(!0),A(`${M.length} files selected.`);const D=await f(M);D.status!==200?R=GJ:(A(`${M.length} files uploaded`),r("local"),e(kO),D.data&&(a(D.data.path),B1("Active memory report",D.data.reportName))),t.clear(),v(!1),m(R)},_=async P=>{var O;if(!P.target.files)return;const{files:z}=P.target,M=l(z);if(!d(M)){T(h9e);return}let R=VJ;p(!0),x(`${M.length} files selected`);const D=await i(M);if(D.status!==200)R=GJ;else if(((O=D==null?void 0:D.data)==null?void 0:O.status)!==Wo.OK)R=d9e;else{const j=g9e(M);x(`${M.length} files uploaded`),r("local"),o(j),B1("Active performance report",j)}t.clear(),p(!1),T(R)};bt.useEffect(()=>{c&&m({status:Wo.PROGRESS,message:"Files uploading..."}),g&&T({status:Wo.PROGRESS,message:"Files uploading..."})},[c,g]);const L=async P=>{await OJ({...b,active_report:{profiler_name:P.path}}),B1("Active memory report",p9e(y,P.path)??""),a(P.path)},k=async P=>{await F8e(P.path),await t.invalidateQueries([Wge]),B1("Memory report deleted",P.reportName),n===P.path&&(a(null),A("Choose directory..."),m(void 0))},F=async P=>{await OJ({...b,active_report:{performance_name:P.path}}),B1("Active performance report",P.reportName),o(P.path)},N=async P=>{await B8e(P.path),await t.invalidateQueries([Yge]),B1("Performance report deleted",P.reportName),u===P.reportName&&(o(null),x("Choose directory..."),T(void 0))};return He.jsxs(He.Fragment,{children:[He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Memory report"}),subLabel:"Select a memory report",children:He.jsx(sH,{items:y,value:y!=null&&y.map(P=>P.path).includes(n)?n:null,handleSelect:L,handleDelete:k})}),He.jsx(Nf,{subLabel:"Upload a local memory report",children:He.jsxs("div",{className:"buttons-container",children:[He.jsxs("label",{className:"bp5-file-input",htmlFor:"local-upload",children:[He.jsx("input",{id:"local-upload",type:"file",multiple:!0,directory:"",webkitdirectory:"",onChange:S}),He.jsx("span",{className:"bp5-file-upload-input",children:I})]}),He.jsx(t9e,{}),C&&!c&&He.jsxs("div",{className:`verify-connection-item status-${Wo[C.status]}`,children:[He.jsx(Hs,{className:"connection-status-icon",icon:HJ[C.status],size:20,intent:jJ[C.status]}),He.jsx("span",{className:"connection-status-text",children:C.message})]})]})}),He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Performance report"}),subLabel:"Select a performance report",children:He.jsx(sH,{items:h,value:h!=null&&h.map(P=>P.reportName).includes(u)?u:null,handleSelect:F,handleDelete:N})}),He.jsx(Nf,{subLabel:"Upload a local performance report",children:He.jsxs("div",{className:"buttons-container",children:[He.jsxs("label",{className:"bp5-file-input",htmlFor:"local-performance-upload",children:[He.jsx("input",{id:"local-performance-upload",type:"file",multiple:!0,directory:"",webkitdirectory:"",onChange:_}),He.jsx("span",{className:"bp5-file-upload-input",children:E})]}),w&&!g&&He.jsxs("div",{className:`verify-connection-item status-${Wo[w.status]}`,children:[He.jsx(Hs,{className:"connection-status-icon",icon:HJ[w.status],size:20,intent:jJ[w.status]}),He.jsx("span",{className:"connection-status-text",children:w.message})]})]})})]})},g9e=t=>t[0].webkitRelativePath.split("/")[0],p9e=(t,r)=>{var e;return(e=t==null?void 0:t.find(n=>n.path===r))==null?void 0:e.reportName},XS=t=>{const{lastSynced:r,lastModified:e}=t;return r?e>r:!0},m9e=()=>({getAppConfig:t=>localStorage.getItem(t),setAppConfig:(t,r)=>{localStorage.setItem(t,r)},deleteAppConfig:t=>{localStorage.removeItem(t)}}),gM=()=>{const{getAppConfig:t,setAppConfig:r,deleteAppConfig:e}=m9e();return{testConnection:async l=>{if(!l.host||!l.port)return[{status:Wo.FAILED,message:"No connection provided"}];const{data:h}=await Tu.post("api/remote/test",l);return h},syncRemoteFolder:async(l,h,y)=>{if(!l||!l.host||!l.port||!l.profilerPath)throw new Error("No connection provided");if(!h&&!y)throw new Error("No remote folder provided");return Tu.post("api/remote/sync",{connection:l,folder:h,profile:y})},listReportFolders:async l=>{if(!l||!l.host||!l.port)throw new Error("No connection provided");return(await Tu.post("api/remote/profiler",l)).data},listPerformanceFolders:async l=>{if(!l||!l.host||!l.port)throw new Error("No connection provided");return(await Tu.post("api/remote/performance",{connection:l})).data},mountRemoteFolder:async(l,h,y)=>Tu.post("api/remote/use",{connection:l,folder:h,profile:y}),fetchSqlitePath:async l=>{const{data:h}=await Tu.post("api/remote/sqlite/detect-path",l);return h},persistentState:{get savedConnectionList(){return JSON.parse(t("remoteConnections")??"[]")},set savedConnectionList(l){r("remoteConnections",JSON.stringify(l))},get selectedConnection(){return JSON.parse(t("selectedConnection")??"null")??this.savedConnectionList[0]},set selectedConnection(l){r("selectedConnection",JSON.stringify(l??null))},getSavedReportFolders:l=>JSON.parse(t(`${l==null?void 0:l.name} - reportFolders`)??"[]").map(h=>{const{reportPath:y,...b}=h;return h.profilerPath?{...b,profilerPath:y||b.profilerPath}:b}),setSavedReportFolders:(l,h)=>{r(`${l==null?void 0:l.name} - reportFolders`,JSON.stringify(h))},deleteSavedReportFolders:l=>{e(`${l==null?void 0:l.name} - reportFolders`)},getSavedPerformanceFolders:l=>JSON.parse(t(`${l==null?void 0:l.name} - performanceFolders`)??"[]"),setSavedPerformanceFolders:(l,h)=>{r(`${l==null?void 0:l.name} - performanceFolders`,JSON.stringify(h))},deleteSavedPerformanceFolders:l=>{e(`${l==null?void 0:l.name} - performanceFolders`)},updateSavedRemoteFoldersConnection(l,h){const y=this.getSavedReportFolders(l),b=this.getSavedPerformanceFolders(l);this.deleteSavedReportFolders(l),this.deleteSavedPerformanceFolders(l),this.setSavedReportFolders(h,y),this.setSavedPerformanceFolders(h,b)}},readRemoteFile:async l=>{try{return(await Tu.post("api/remote/read",l)).data}catch(h){return _c.isAxiosError(h)?h.message:h}}}},y9e={[Wo.IDLE]:Ti.DOT,[Wo.PROGRESS]:Ti.DOT,[Wo.FAILED]:Ti.CROSS,[Wo.OK]:Ti.TICK},A9e={[Wo.IDLE]:lo.NONE,[Wo.PROGRESS]:lo.WARNING,[Wo.FAILED]:lo.DANGER,[Wo.OK]:lo.SUCCESS};function KS({status:t,message:r}){return He.jsxs("div",{className:`verify-connection-item status-${Wo[t].toLowerCase()}`,children:[He.jsx(Hs,{className:"connection-status-icon",icon:y9e[t],size:20,intent:A9e[t]}),He.jsx("span",{className:"connection-status-text",children:r})]})}const tpe=({open:t,onClose:r,onAddConnection:e,title:n="Add new remote connection",buttonLabel:a="Add connection",remoteConnection:u})=>{var A;const o=u??{name:"",host:"",port:22,profilerPath:"",username:""},f=[{status:Wo.IDLE,message:"Test connection"},{status:Wo.IDLE,message:"Test memory report folder path"}],[i,s]=bt.useState(o),[d,l]=bt.useState(f),{testConnection:h,fetchSqlitePath:y}=gM(),[b,C]=bt.useState(!1),[m,c]=bt.useState(!1),v=d.every(w=>w.status===Wo.OK),g=async()=>{c(!0);const w=await y(i);w.status===Wo.OK&&s({...i,sqliteBinaryPath:w.message}),w.status===Wo.FAILED&&s({...i,sqliteBinaryPath:"Path Not Found"}),c(!1)},p=async()=>{C(!0);const w={status:Wo.PROGRESS,message:"Testing connection"},T={status:Wo.PROGRESS,message:"Testing memory report folder path"},E={status:Wo.PROGRESS,message:"Testing performance report folder path"};l([w,T,E]);try{const x=await h(i);l(x)}catch{l([{status:Wo.FAILED,message:"Connection failed"},{status:Wo.FAILED,message:"Memory report folder path failed"}])}finally{C(!1)}},I=()=>{s(o),l(f),r()};return He.jsxs(qG,{className:"remote-connection-dialog",title:n,icon:"info-sign",canOutsideClickClose:!1,isOpen:t,onClose:I,children:[He.jsxs(fW,{children:[He.jsx(Nf,{label:"Name",subLabel:"Connection name",children:He.jsx(nh,{className:"bp5-light",value:i.name,onChange:w=>s({...i,name:w.target.value})},"name")}),He.jsx(Nf,{label:"SSH Host",subLabel:"SSH host name. E.g.: localhost",children:He.jsx(nh,{value:i.host,onChange:w=>s({...i,host:w.target.value})},"host")}),He.jsx(Nf,{label:"Username",subLabel:"Username to connect with",children:He.jsx(nh,{value:i.username??"",onChange:w=>{s({...i,username:w.target.value})}},"username")}),He.jsx(Nf,{label:"SSH Port",subLabel:"Port to use for the SSH connection. E.g.: port 22",children:He.jsx(nh,{value:((A=i.port)==null?void 0:A.toString())??"",onChange:w=>{const T=Number.parseInt(w.target.value,10);w.target.value===""?s({...i,port:void 0}):T>0&&T<99999&&s({...i,port:T})}},"port")}),He.jsx(Nf,{label:"Memory report folder path",subLabel:'Path to a remote folder containing memory reports e.g. "$HOME/work/profiler-reports/"',children:He.jsx(nh,{value:i.profilerPath,onChange:w=>s({...i,profilerPath:w.target.value})},"path")}),He.jsx(Nf,{label:"Performance report folder path (optional)",subLabel:'Path to a remote folder containing performance reports e.g. "$HOME/perf/perf-reports/"',children:He.jsx(nh,{value:i.performancePath,onChange:w=>s({...i,performancePath:w.target.value})},"path")}),i.useRemoteQuerying&&He.jsxs("fieldset",{className:"remote-querying-fieldset",children:[He.jsx("legend",{children:"Remote Querying Configuration"}),He.jsx(Nf,{label:"Remote SQLite Binary Location",subLabel:"SQLite Binary Location",children:He.jsx(nh,{value:i.sqliteBinaryPath,onChange:w=>s({...i,sqliteBinaryPath:w.target.value})},"sqliteBinaryPath")}),He.jsx(ay,{className:"remote-sql-test-buttons",children:He.jsx(Ta,{text:"Detect Path",disabled:m,loading:m,onClick:g})})]}),He.jsxs("fieldset",{children:[He.jsx("legend",{children:"Test Connection"}),d.map((w,T)=>He.jsx(KS,{status:w.status,message:w.message},`${w.message}-${T}`)),He.jsx("br",{}),He.jsx(Ta,{text:"Test Connection",disabled:b||m,loading:b,onClick:p})]})]}),He.jsx(Pve,{minimal:!0,actions:He.jsx(Ta,{text:a,disabled:!v,onClick:()=>{v&&(e(i),I())}})})]})},C9e=({disabled:t,onAddConnection:r})=>{const[e,n]=bt.useState(!1);return He.jsxs("div",{className:"buttons-container",children:[He.jsx(Ta,{icon:Ti.PLUS,text:"Add new connection",disabled:t,onClick:()=>n(!0)}),He.jsx(tpe,{open:e,onAddConnection:a=>{r(a),n(!1)},onClose:()=>n(!1)})]})},CA=t=>`0x${(t>>>0).toString(16).toUpperCase()}`,Mh=(t,r)=>new Intl.NumberFormat("en-US",{maximumFractionDigits:r}).format(t),I9e=(t,r=1e3)=>t<r?"":`( ${(t/1e6).toFixed(3)}s )`,PW=(t,r)=>t===null?"NULL":t.toString().padStart(r==null?void 0:r.toString().length,"0"),zO=(t,r)=>{if(t===r)return!0;if(typeof t!=typeof r||t===null||r===null)return!1;if(typeof t!="object")return Object.is(t,r);if(Array.isArray(t)&&Array.isArray(r))return t.length!==r.length?!1:t.every((o,f)=>zO(o,r[f]));if(Array.isArray(t)||Array.isArray(r))return!1;const e=t,n=r,a=Object.keys(e),u=Object.keys(n);return a.length!==u.length?!1:a.every(o=>o in n?zO(e[o],n[o]):!1)},oy=t=>{const r=t.match(/Shape\((\[.*\])\)/);return r?r[1]:t},pI=t=>t.replace(/^DataType\./,""),WJ=t=>{const r=/\(x=(\d+),y=(\d+)\)/g,e=[...t.matchAll(r)];if(e.length!==2)return 0;const[n,a]=e[0].slice(1).map(Number),[u,o]=e[1].slice(1).map(Number);return(u-n+1)*(o-a+1)},b9e=({connectionList:t,connection:r,disabled:e,loading:n,offline:a,onSelectConnection:u,onEditConnection:o,onRemoveConnection:f,onSyncRemoteFolderList:i})=>{const[s,d]=bt.useState(!1),l=r??t[0];return He.jsxs("div",{className:"buttons-container",children:[He.jsx(RW,{className:"remote-connection-select",items:t,itemRenderer:(h,y)=>w9e(h,y,l),disabled:e,filterable:!0,itemPredicate:x9e,noResults:He.jsx(AA,{disabled:!0,text:"No results",roleStructure:"listoption"}),onItemSelect:u,children:He.jsx(Ta,{icon:a?Ti.BAN_CIRCLE:Ti.CLOUD,endIcon:Ti.CARET_DOWN,disabled:e,text:BO(l)})}),He.jsx(_s,{content:"Edit selected connection",children:He.jsx(Hx,{icon:Ti.EDIT,disabled:e||!l,onClick:()=>d(!0)})}),He.jsx(_s,{content:"Remove selected connection",children:He.jsx(Hx,{icon:Ti.TRASH,disabled:e||!l,onClick:()=>f(l)})}),He.jsx(tpe,{open:s,onAddConnection:h=>{d(!1),o(h,r)},onClose:()=>{d(!1)},title:"Edit remote connection",buttonLabel:"Save connection",remoteConnection:l},`${l==null?void 0:l.name}${l==null?void 0:l.host}${l==null?void 0:l.port}${l==null?void 0:l.profilerPath}`),He.jsx(Ta,{icon:Ti.LOCATE,disabled:e||!l,loading:n,text:"Fetch remote folders list",onClick:()=>i(l)})]})},BO=t=>{var r;return t?`${t.name} - ssh://${t.host}:${t.port}/${(r=t==null?void 0:t.profilerPath)==null?void 0:r.replace(/^\//gi,"")}`:"(No connection)"},x9e=(t,r)=>BO(r).toLowerCase().includes(t.toLowerCase()),w9e=(t,{handleClick:r,modifiers:e},n)=>e.matchesPredicate?He.jsx(AA,{active:zO(t,n),disabled:e.disabled,onClick:r,text:BO(t)},BO(t)):null,T9e=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),lH=(t,r,e)=>{if(!t||!e)return"n/a";const a={profiler:e.profilerPath||e.reportPath,performance:e.performancePath}[r];return t.remotePath.toLowerCase().replace(a.toLowerCase(),"")},_9e=(t,r)=>(e,n)=>lH(n,t,r).toLowerCase().includes(e.toLowerCase()),S9e=(t,r,e,n)=>(a,{handleClick:u,modifiers:o})=>{var C;const{persistentState:f}=gM(),i=(C=f.selectedConnection)==null?void 0:C.useRemoteQuerying;if(!o.matchesPredicate)return null;const{lastSynced:s,lastModified:d,reportName:l}=a,h=s?T9e.format(new Date(s)):"Never";let y=He.jsx(_s,{content:`Fetching folder status, last sync: ${h}`,children:He.jsx(XG,{size:16})});t||(XS(a)?y=He.jsx(_s,{content:`Folder is stale, last sync: ${h}`,children:He.jsx(Hs,{icon:Ti.HISTORY,color:"goldenrod"})}):y=He.jsx(_s,{content:`Folder is up to date, last sync: ${h}`,children:He.jsx(Hs,{icon:Ti.UPDATED,color:"green"})}));const b=()=>He.jsxs(He.Fragment,{children:[He.jsx("span",{children:l}),He.jsx("span",{children:!i&&y})]});return He.jsx(AA,{className:"remote-folder-item",active:(e==null?void 0:e.reportName)===l,disabled:o.disabled,onClick:u,text:lH(a,r,n),icon:(e==null?void 0:e.reportName)===l?Ti.SAVED:Ti.DOCUMENT,labelElement:b(),labelClassName:"remote-folder-status-icon"},`${lH(a,r,n)}${s??d}`)},ZJ=({remoteFolder:t,remoteFolderList:r=[],loading:e=!1,updatingFolderList:n=!1,onSelectFolder:a,children:u,fallbackLabel:o="(No selection)",icon:f=Ti.DOCUMENT_OPEN,type:i})=>{const{persistentState:s}=gM(),d=s.selectedConnection;return He.jsxs("div",{className:"buttons-container",children:[He.jsx(RW,{className:"remote-folder-select",items:r??[],itemRenderer:S9e(n,i,t,d),filterable:!0,itemPredicate:_9e(i,d),noResults:He.jsx(AA,{disabled:!0,text:"No results",roleStructure:"listoption"}),disabled:e||(r==null?void 0:r.length)===0,onItemSelect:a,children:He.jsx(Ta,{icon:f,endIcon:(r==null?void 0:r.length)>0?Ti.CARET_DOWN:void 0,disabled:e||(r==null?void 0:r.length)===0,text:t?t.reportName:o})}),u]})},E9e=()=>{var P,z;const t=gM(),r=TG(),e=qm(mW),n=qm(AW),[a,u]=Xl(u0),[o,f]=Xl(Uf),[i,s]=bt.useState(!1),[d,l]=bt.useState(!1),[h,y]=bt.useState(t.persistentState.getSavedReportFolders(t.persistentState.selectedConnection)),[b,C]=bt.useState(!1),[m,c]=bt.useState(a?h.find(M=>{var R;return(R=M.reportName)==null?void 0:R.includes(a)}):h[0]),[v,g]=bt.useState(t.persistentState.getSavedPerformanceFolders(t.persistentState.selectedConnection)),[p,I]=bt.useState(!1),[A,w]=bt.useState(o?v.find(M=>{var R;return(R=M.reportName)==null?void 0:R.includes(o)}):v[0]),T=M=>{t.persistentState.selectedConnection=M,y(t.persistentState.getSavedReportFolders(M)),g(t.persistentState.getSavedPerformanceFolders(M)),c(t.persistentState.getSavedReportFolders(M)[0]),w(t.persistentState.getSavedPerformanceFolders(M)[0])},E=(M,R)=>{if(!M)return[];const D=t.persistentState.getSavedReportFolders(M),O=(R??[]).map(j=>({...D==null?void 0:D.find(W=>W.reportName===j.reportName),...j}));return t.persistentState.setSavedReportFolders(M,O),y(O),O},x=(M,R)=>{if(!M)return[];const D=t.persistentState.getSavedPerformanceFolders(M),O=(R??[]).map(j=>({...D==null?void 0:D.find(W=>W.reportName===j.reportName),...j}));return t.persistentState.setSavedPerformanceFolders(M,O),g(O),O},S=M=>t.persistentState.savedConnectionList.findIndex(R=>{const D=R.name===(M==null?void 0:M.name),O=R.host===(M==null?void 0:M.host),j=R.port===(M==null?void 0:M.port);return D&&O&&j}),_=(P=t.persistentState.selectedConnection)==null?void 0:P.useRemoteQuerying,L=b||p,k=d||L,F=M=>{r.clear(),e("remote"),n(kO),u(M),B1("Active memory report",M)},N=M=>{r.clear(),e("remote"),n(kO),f(M),B1("Active performance report",M)};return He.jsxs(He.Fragment,{children:[He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Add remote sync server"}),subLabel:"Add new server connection details",children:He.jsx(C9e,{disabled:k,onAddConnection:M=>{t.persistentState.savedConnectionList=[...t.persistentState.savedConnectionList,M],T(M)}})}),He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Use remote sync server"}),subLabel:"Select remote server that will be used for syncing folders",children:He.jsx(b9e,{connection:t.persistentState.selectedConnection,connectionList:t.persistentState.savedConnectionList,disabled:k,loading:d,offline:i,onEditConnection:(M,R)=>{const D=[...t.persistentState.savedConnectionList];D[S(R)]=M,t.persistentState.savedConnectionList=D,t.persistentState.updateSavedRemoteFoldersConnection(R,M),T(M)},onRemoveConnection:M=>{const R=[...t.persistentState.savedConnectionList];R.splice(S(M),1),t.persistentState.savedConnectionList=R,t.persistentState.deleteSavedReportFolders(M),t.persistentState.deleteSavedPerformanceFolders(M),T(R[0]),c(void 0),w(void 0)},onSelectConnection:async M=>{try{l(!0),T(M);const R=await t.listReportFolders(M),D=M.performancePath?await t.listPerformanceFolders(M):[],O=E(M,R),j=x(M,D);s(!1),c(O[0]),w(j[0])}catch{s(!0)}finally{l(!1)}},onSyncRemoteFolderList:async()=>{try{if(l(!0),t.persistentState.selectedConnection){const M=await t.listReportFolders(t.persistentState.selectedConnection),R=t.persistentState.selectedConnection.performancePath?await t.listPerformanceFolders(t.persistentState.selectedConnection):[],D=E(t.persistentState.selectedConnection,M),O=x(t.persistentState.selectedConnection,R);c(D[0]),w(O[0])}}catch{alert("Unable to connect to remote server.")}finally{l(!1)}}})}),He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Memory report"}),subLabel:"Select a memory report",children:He.jsx(ZJ,{remoteFolder:m,remoteFolderList:h,loading:L||d,updatingFolderList:d,onSelectFolder:async M=>{c(M),t.persistentState.selectedConnection&&(_||!_&&!XS(M))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,M,A)).status===200&&F(M.reportName)},type:"profiler",children:!_&&He.jsx(_s,{content:"Sync remote folder",children:He.jsx(Hx,{icon:Ti.REFRESH,loading:b,disabled:k||!m||(h==null?void 0:h.length)===0,onClick:async()=>{try{if(C(!0),t.persistentState.selectedConnection){const{data:M}=await t.syncRemoteFolder(t.persistentState.selectedConnection,m),R=t.persistentState.getSavedReportFolders(t.persistentState.selectedConnection),D=R.findIndex(O=>O.reportName===(m==null?void 0:m.reportName));R[D]=M,E(t.persistentState.selectedConnection,R),c(R[D])}}catch{alert("Unable to sync remote folder")}finally{if(C(!1),e("remote"),t.persistentState.selectedConnection&&m&&(!_||_&&XS(m))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,m,A)).status===200){const R=m.reportName,D=A==null?void 0:A.reportName;F(R),D&&N(D)}}}})})})}),((z=t.persistentState.selectedConnection)==null?void 0:z.performancePath)&&He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Performance report"}),subLabel:"Select a performance report",children:He.jsx(ZJ,{remoteFolder:A,remoteFolderList:v,loading:L||d,updatingFolderList:d,onSelectFolder:async M=>{if(w(M),t.persistentState.selectedConnection&&(_||!_&&!XS(M))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,m,M)).status===200){const D=M.reportName;N(D)}},type:"performance",children:!_&&He.jsx(_s,{content:"Sync remote folder",children:He.jsx(Hx,{icon:Ti.REFRESH,loading:p,disabled:k||!A||(v==null?void 0:v.length)===0,onClick:async()=>{try{if(I(!0),t.persistentState.selectedConnection){const{data:M}=await t.syncRemoteFolder(t.persistentState.selectedConnection,void 0,A),R=t.persistentState.getSavedPerformanceFolders(t.persistentState.selectedConnection),D=R.findIndex(O=>O.reportName===(A==null?void 0:A.reportName));if(R[D]=M,x(t.persistentState.selectedConnection,R),w(R[D]),t.persistentState.selectedConnection&&A&&(_||!_&&XS(A))&&(await t.mountRemoteFolder(t.persistentState.selectedConnection,m,A)).status===200){const j=A.reportName;N(j)}}}catch{alert("Unable to sync remote folder")}finally{I(!1)}}})})})})]})},YJ=["rgb(63,181,143)","rgb(74,217,225)","rgb(247,66,78)","rgb(52,163,188)","rgb(113,168,31)","rgb(95,188,255)","rgb(96,157,255)","rgb(152,218,29)","rgb(187,141,255)","rgb(136,217,141)","rgb(226,177,30)","rgb(255,137,229)","rgb(190,39,130)","rgb(252,194,251)","rgb(209,109,255)","rgb(158,183,229)","rgb(201,151,13)","rgb(250,163,140)","rgb(255,92,111)","rgb(247,147,30)","rgb(227,215,105)","rgb(90,51,137)","rgb(23,244,111)"];function*rpe(){let t=0;for(;;)yield YJ[t],t=(t+1)%YJ.length}const M9e=rpe(),kF=new Map,fw=t=>t===null?"rgb(255,255,255)":(kF.has(t)||kF.set(t,M9e.next().value),kF.get(t)),R9e=rpe(),DF=new Map,up=t=>{if(t!==void 0)return DF.has(t)||DF.set(t,R9e.next().value),DF.get(t)},P9e=({tensorId:t,address:r,colour:e})=>He.jsxs("div",{className:"toast-tensor-message",children:[He.jsx("div",{className:"memory-color-block",style:e?{backgroundColor:e}:{}}),He.jsxs("strong",{children:[t?`Tensor ${t}`:"Buffer",He.jsx("span",{className:"light",children:" at "}),r?CA(r):"NULL",He.jsx("span",{className:"light",children:" selected"})]})]}),LD=()=>{const[t,r]=Xl(QOe),e=qm(fM),n=qm(cw),a=()=>{e(null),n(null),r(null),pu.dismiss()};return{activeToast:t,resetToasts:a,setActiveToast:r,createToast:(o,f)=>{t&&pu.dismiss(t);let i=up(f);o&&!i&&(i=fw(o));const s=pu(He.jsx(P9e,{tensorId:f,address:o,colour:i}),{position:"bottom-right",hideProgressBar:!0,closeOnClick:!0,onClick:a,theme:"light"});r(s)}}};function U3(){const{resetToasts:t}=LD();bt.useEffect(()=>{t()},[])}function L9e(){return U3(),He.jsx("div",{className:"splash-screen home",children:He.jsxs("div",{className:"folder-picker-options",children:[He.jsxs("fieldset",{children:[He.jsx("legend",{children:"Local folder"}),He.jsx(Hs,{icon:Ti.FOLDER_OPEN,size:150}),He.jsx("div",{className:"folder-picker-wrapper",children:He.jsx(v9e,{})})]}),He.jsxs("fieldset",{children:[He.jsx("legend",{children:"Remote Sync"}),He.jsx(Hs,{icon:Ti.CLOUD,size:150}),He.jsx("div",{className:"folder-picker-wrapper",children:He.jsx(E9e,{})})]})]})})}function c2(t,r,e){let n=e.initialDeps??[],a;function u(){var o,f,i,s;let d;e.key&&((o=e.debug)!=null&&o.call(e))&&(d=Date.now());const l=t();if(!(l.length!==n.length||l.some((b,C)=>n[C]!==b)))return a;n=l;let y;if(e.key&&((f=e.debug)!=null&&f.call(e))&&(y=Date.now()),a=r(...l),e.key&&((i=e.debug)!=null&&i.call(e))){const b=Math.round((Date.now()-d)*100)/100,C=Math.round((Date.now()-y)*100)/100,m=C/16,c=(v,g)=>{for(v=String(v);v.length<g;)v=" "+v;return v};console.info(`%c⏱ ${c(C,5)} /${c(b,5)} ms`,`
|
103
103
|
font-size: .6rem;
|
104
104
|
font-weight: bold;
|
105
105
|
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(s=e==null?void 0:e.onChange)==null||s.call(e,a),a}return u.updateDeps=o=>{n=o},u}function NF(t,r){if(t===void 0)throw new Error("Unexpected undefined");return t}const O9e=(t,r)=>Math.abs(t-r)<=1,k9e=(t,r,e)=>{let n;return function(...a){t.clearTimeout(n),n=t.setTimeout(()=>r.apply(this,a),e)}},XJ=t=>{const{offsetWidth:r,offsetHeight:e}=t;return{width:r,height:e}},D9e=t=>t,N9e=t=>{const r=Math.max(t.startIndex-t.overscan,0),e=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let a=r;a<=e;a++)n.push(a);return n},F9e=(t,r)=>{const e=t.scrollElement;if(!e)return;const n=t.targetWindow;if(!n)return;const a=o=>{const{width:f,height:i}=o;r({width:Math.round(f),height:Math.round(i)})};if(a(XJ(e)),!n.ResizeObserver)return()=>{};const u=new n.ResizeObserver(o=>{const f=()=>{const i=o[0];if(i!=null&&i.borderBoxSize){const s=i.borderBoxSize[0];if(s){a({width:s.inlineSize,height:s.blockSize});return}}a(XJ(e))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(f):f()});return u.observe(e,{box:"border-box"}),()=>{u.unobserve(e)}},KJ={passive:!0},QJ=typeof window>"u"?!0:"onscrollend"in window,z9e=(t,r)=>{const e=t.scrollElement;if(!e)return;const n=t.targetWindow;if(!n)return;let a=0;const u=t.options.useScrollendEvent&&QJ?()=>{}:k9e(n,()=>{r(a,!1)},t.options.isScrollingResetDelay),o=d=>()=>{const{horizontal:l,isRtl:h}=t.options;a=l?e.scrollLeft*(h&&-1||1):e.scrollTop,u(),r(a,d)},f=o(!0),i=o(!1);i(),e.addEventListener("scroll",f,KJ);const s=t.options.useScrollendEvent&&QJ;return s&&e.addEventListener("scrollend",i,KJ),()=>{e.removeEventListener("scroll",f),s&&e.removeEventListener("scrollend",i)}},B9e=(t,r,e)=>{if(r!=null&&r.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[e.options.horizontal?"inlineSize":"blockSize"])}return t[e.options.horizontal?"offsetWidth":"offsetHeight"]},$9e=(t,{adjustments:r=0,behavior:e},n)=>{var a,u;const o=t+r;(u=(a=n.scrollElement)==null?void 0:a.scrollTo)==null||u.call(a,{[n.options.horizontal?"left":"top"]:o,behavior:e})};class U9e{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const n=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(a=>{a.forEach(u=>{const o=()=>{this._measureElement(u.target,u)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var a;(a=n())==null||a.disconnect(),e=null},observe:a=>{var u;return(u=n())==null?void 0:u.observe(a,{box:"border-box"})},unobserve:a=>{var u;return(u=n())==null?void 0:u.unobserve(a)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([n,a])=>{typeof a>"u"&&delete e[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:D9e,rangeExtractor:N9e,onChange:()=>{},measureElement:B9e,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var n,a;(a=(n=this.options).onChange)==null||a.call(n,this,e)},this.maybeNotify=c2(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,u)=>{this.scrollAdjustments=0,this.scrollDirection=u?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=u,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,n)=>{const a=new Map,u=new Map;for(let o=n-1;o>=0;o--){const f=e[o];if(a.has(f.lane))continue;const i=u.get(f.lane);if(i==null||f.end>i.end?u.set(f.lane,f):f.end<i.end&&a.set(f.lane,!0),a.size===this.options.lanes)break}return u.size===this.options.lanes?Array.from(u.values()).sort((o,f)=>o.end===f.end?o.index-f.index:o.end-f.end)[0]:void 0},this.getMeasurementOptions=c2(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,n,a,u,o)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:n,scrollMargin:a,getItemKey:u,enabled:o}),{key:!1}),this.getMeasurements=c2(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:n,scrollMargin:a,getItemKey:u,enabled:o},f)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const i=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const s=this.measurementsCache.slice(0,i);for(let d=i;d<e;d++){const l=u(d),h=this.options.lanes===1?s[d-1]:this.getFurthestMeasurement(s,d),y=h?h.end+this.options.gap:n+a,b=f.get(l),C=typeof b=="number"?b:this.options.estimateSize(d),m=y+C,c=h?h.lane:d%this.options.lanes;s[d]={index:d,start:y,size:C,end:m,key:l,lane:c}}return this.measurementsCache=s,s},{key:!1,debug:()=>this.options.debug}),this.calculateRange=c2(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,n,a,u)=>this.range=e.length>0&&n>0?H9e({measurements:e,outerSize:n,scrollOffset:a,lanes:u}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=c2(()=>{let e=null,n=null;const a=this.calculateRange();return a&&(e=a.startIndex,n=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,n]},(e,n,a,u,o)=>u===null||o===null?[]:e({startIndex:u,endIndex:o,overscan:n,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const n=this.options.indexAttribute,a=e.getAttribute(n);return a?parseInt(a,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(e,n)=>{const a=this.indexFromElement(e),u=this.measurementsCache[a];if(!u)return;const o=u.key,f=this.elementsCache.get(o);f!==e&&(f&&this.observer.unobserve(f),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(a,this.options.measureElement(e,n,this))},this.resizeItem=(e,n)=>{const a=this.measurementsCache[e];if(!a)return;const u=this.itemSizeCache.get(a.key)??a.size,o=n-u;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,o,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,n)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((n,a)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(a))});return}this._measureElement(e,void 0)},this.getVirtualItems=c2(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,n)=>{const a=[];for(let u=0,o=e.length;u<o;u++){const f=e[u],i=n[f];a.push(i)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const n=this.getMeasurements();if(n.length!==0)return NF(n[npe(0,n.length-1,a=>NF(n[a]).start,e)])},this.getOffsetForAlignment=(e,n,a=0)=>{const u=this.getSize(),o=this.getScrollOffset();n==="auto"&&(n=e>=o+u?"end":"start"),n==="center"?e+=(a-u)/2:n==="end"&&(e-=u);const f=this.getTotalSize()-u;return Math.max(Math.min(f,e),0)},this.getOffsetForIndex=(e,n="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const a=this.measurementsCache[e];if(!a)return;const u=this.getSize(),o=this.getScrollOffset();if(n==="auto")if(a.end>=o+u-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];const f=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(f,n,a.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:n="start",behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,n),{adjustments:void 0,behavior:a})},this.scrollToIndex=(e,{align:n="auto",behavior:a}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const u=this.getOffsetForIndex(e,n);if(!u)return;const[o,f]=u;this._scrollToOffset(o,{adjustments:void 0,behavior:a}),a!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[s]=NF(this.getOffsetForIndex(e,f)),d=this.getScrollOffset();O9e(s,d)||this.scrollToIndex(e,{align:f,behavior:a})}else this.scrollToIndex(e,{align:f,behavior:a})}))},this.scrollBy=(e,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var e;const n=this.getMeasurements();let a;if(n.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((e=n[n.length-1])==null?void 0:e.end)??0;else{const u=Array(this.options.lanes).fill(null);let o=n.length-1;for(;o>=0&&u.some(f=>f===null);){const f=n[o];u[f.lane]===null&&(u[f.lane]=f.end),o--}a=Math.max(...u.filter(f=>f!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:n,behavior:a})=>{this.options.scrollToFn(e,{behavior:a,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(r)}}const npe=(t,r,e,n)=>{for(;t<=r;){const a=(t+r)/2|0,u=e(a);if(u<n)t=a+1;else if(u>n)r=a-1;else return a}return t>0?t-1:0};function H9e({measurements:t,outerSize:r,scrollOffset:e,lanes:n}){const a=t.length-1,u=i=>t[i].start;if(t.length<=n)return{startIndex:0,endIndex:a};let o=npe(0,a,u,e),f=o;if(n===1)for(;f<a&&t[f].end<e+r;)f++;else if(n>1){const i=Array(n).fill(0);for(;f<a&&i.some(d=>d<e+r);){const d=t[f];i[d.lane]=d.end,f++}const s=Array(n).fill(e+r);for(;o>=0&&s.some(d=>d>=e);){const d=t[o];s[d.lane]=d.start,o--}o=Math.max(0,o-o%n),f=Math.min(a,f+(n-1-f%n))}return{startIndex:o,endIndex:f}}const JJ=typeof document<"u"?bt.useLayoutEffect:bt.useEffect;function j9e(t){const r=bt.useReducer(()=>({}),{})[1],e={...t,onChange:(a,u)=>{var o;u?nM.flushSync(r):r(),(o=t.onChange)==null||o.call(t,a,u)}},[n]=bt.useState(()=>new U9e(e));return n.setOptions(e),JJ(()=>n._didMount(),[]),JJ(()=>n._willUpdate()),n}function OD(t){return j9e({observeElementRect:F9e,observeElementOffset:z9e,scrollToFn:$9e,...t})}function kD({searchQuery:t,onQueryChanged:r,controls:e,disabled:n=!1,placeholder:a="",className:u}){return He.jsxs("div",{className:_i(u,"search-field"),children:[He.jsx(nh,{disabled:n,rightElement:t?He.jsx(Ta,{disabled:n,variant:"minimal",onClick:()=>{r("")},icon:Ti.CROSS}):He.jsx(Hs,{icon:Ti.SEARCH}),placeholder:a,value:t,onChange:o=>r(o.target.value)}),e]})}const DD=({label:t,additionalElements:r=void 0,isOpen:e=!0,collapseClassName:n="",contentStyles:a={},contentClassName:u="",keepChildrenMounted:o=!0,onExpandToggle:f,children:i,isDisabled:s=!1})=>{const[d,l]=uo.useState(e);bt.useEffect(()=>{l(e)},[e]);const h=d?Ti.CARET_UP:Ti.CARET_DOWN;return He.jsxs("div",{className:_i("collapsible-component",n),children:[He.jsxs("div",{className:"collapsible-controls",children:[i&&He.jsx(Ta,{size:"small",variant:"minimal",onClick:s?void 0:()=>{f&&f(),l(!d)},endIcon:h,children:t}),!i&&He.jsx("div",{className:"collapsible-label-wrap",children:He.jsx("div",{className:"collapsible-label",children:t})}),r&&r]}),i&&He.jsx(uW,{isOpen:d,keepChildrenMounted:o,children:He.jsx("div",{className:_i(u),style:a,children:i})})]})},V9e="empty-collapsible",LW=({header:t,value:r})=>He.jsx("tr",{children:t==="shard_spec"&&typeof r=="object"?He.jsxs(He.Fragment,{children:[He.jsx("th",{children:Bge[t]}),He.jsx("td",{children:He.jsx("table",{className:"ttnn-table alt-two-tone-rows",children:He.jsx("tbody",{children:Object.entries(r).map(([e,n])=>n!==void 0?He.jsxs("tr",{children:[He.jsx("th",{children:LJ(e)}),He.jsx("td",{children:typeof n!="string"?JSON.stringify(n):n})]},e):null)})})})]}):He.jsxs(He.Fragment,{children:[He.jsx("th",{children:LJ(t)}),He.jsx("td",{children:r})]})});function G9e({argument:t,onCollapse:r}){var o;const[e,n]=bt.useState(!1),a=t.value.split(`
|
@@ -5244,4 +5244,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
5244
5244
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u=!0,o=!1,f;return{s:function(){e=e.call(t)},n:function(){var s=e.next();return u=s.done,s},e:function(s){o=!0,f=s},f:function(){try{!u&&e.return!=null&&e.return()}finally{if(o)throw f}}}}function Xtr(t,r){var e;if(t){if(typeof t=="string")return oce(t,r);var n=Gd(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Pw(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oce(t,r)}}function oce(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function Ktr(t,r){var e=new Zb;return ku(t).call(t,function(n){var a;ku(a=n.edges).call(a,function(u){u.connected&&e.add(u)})}),ku(e).call(e,function(n){var a=n.from.id,u=n.to.id;r[a]==null&&(r[a]=0),(r[u]==null||r[a]>=r[u])&&(r[u]=r[a]+1)}),r}function Qtr(t){return LTe(function(r){var e,n;return PTe(e=ep(n=r.edges).call(n,function(a){return t.has(a.toId)})).call(e,function(a){return a.to===r})},function(r,e){return e>r},"from",t)}function Jtr(t){return LTe(function(r){var e,n;return PTe(e=ep(n=r.edges).call(n,function(a){return t.has(a.toId)})).call(e,function(a){return a.from===r})},function(r,e){return e<r},"to",t)}function LTe(t,r,e,n){var a,u=Rx(null),o=ETe(a=Uy(sTe(n).call(n))).call(a,function(y,b){return y+1+b.edges.length},0),f=e+"Id",i=e==="to"?1:-1,s=Ytr(n),d;try{var l=function(){var b=nf(d.value,2),C=b[0],m=b[1];if(!n.has(C)||!t(m))return 0;u[C]=0;for(var c=[m],v=0,g,p=function(){var w,T;if(!n.has(C))return 0;var E=u[g.id]+i;if(ku(w=ep(T=g.edges).call(T,function(x){return x.connected&&x.to!==x.from&&x[e]!==g&&n.has(x.toId)&&n.has(x.fromId)})).call(w,function(x){var S=x[f],_=u[S];(_==null||r(E,_))&&(u[S]=E,c.push(x[e]))}),v>o)return{v:{v:Ktr(n,u)}};++v},I;g=c.pop();)if(I=p(),I!==0&&I)return I.v},h;for(s.s();!(d=s.n()).done;)if(h=l(),h!==0&&h)return h.v}catch(y){s.e(y)}finally{s.f()}return u}var qtr=function(){function t(){Qa(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return Ja(t,[{key:"addRelation",value:function(e,n){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(n),this.parentReference[n]===void 0&&(this.parentReference[n]=[]),this.parentReference[n].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,n){n!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=n,this.treeIndex=Math.max(n,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var n=this,a={},u=function o(f){if(a[f]!==void 0)return a[f];var i=n.levels[f];if(n.childrenReference[f]){var s=n.childrenReference[f];if(s.length>0)for(var d=0;d<s.length;d++)i=Math.max(i,o(s[d]))}return a[f]=i,i};return u(e)}},{key:"levelDownstream",value:function(e,n){this.levels[n.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[n.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var n=1e9;for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(n=Math.min(this.levels[a],n));for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&this.levels[u]!==void 0&&(this.levels[u]-=n)}},{key:"getTreeSize",value:function(e,n){var a=1e9,u=-1e9,o=1e9,f=-1e9;for(var i in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,i)&&this.trees[i]===n){var s=e[i];a=Math.min(s.x,a),u=Math.max(s.x,u),o=Math.min(s.y,o),f=Math.max(s.y,f)}return{min_x:a,max_x:u,min_y:o,max_y:f}}},{key:"hasSameParent",value:function(e,n){var a=this.parentReference[e.id],u=this.parentReference[n.id];if(a===void 0||u===void 0)return!1;for(var o=0;o<a.length;o++)for(var f=0;f<u.length;f++)if(a[o]==u[f])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,n){return this.trees[e.id]===this.trees[n.id]}},{key:"getLevels",value:function(){return tf(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,n){this.distributionOrdering[n]===void 0&&(this.distributionOrdering[n]=[]);var a=!1,u=this.distributionOrdering[n];for(var o in u)if(u[o]===e){a=!0;break}a||(this.distributionOrdering[n].push(e),this.distributionIndex[e.id]=this.distributionOrdering[n].length-1)}}]),t}(),err=function(){function t(r){Qa(this,t),this.body=r,this._resetRNG(Math.random()+":"+Ek()),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"}},uh(this.options,this.defaultOptions),this.bindEventListeners()}return Ja(t,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){e.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(e.options.hierarchical.enabled===!0){var n=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",n,!1)}})}},{key:"setOptions",value:function(e,n){if(e!==void 0){var a=this.options.hierarchical,u=a.enabled;if(E_(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),jm(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),a.enabled===!0)return u===!0&&this.body.emitter.emit("refresh",!0),a.direction==="RL"||a.direction==="DU"?a.levelSeparation>0&&(a.levelSeparation*=-1):a.levelSeparation<0&&(a.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(n);if(u===!0)return this.body.emitter.emit("refresh"),Yu(n,this.optionsBackup)}return n}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=f9(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var n=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:n.enabled===void 0?!0:n.enabled,solver:"hierarchicalRepulsion"},n.enabled=n.enabled===void 0?!0:n.enabled,n.solver=n.solver||"barnesHut"):_u(e.physics)==="object"?(n.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,n.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(n.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var a=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:a};else{var u=e.edges.smooth;u.type!==void 0&&u.type!=="dynamic"&&(a=u.type),this.optionsBackup.edges={smooth:{enabled:u.enabled===void 0?!0:u.enabled,type:u.type===void 0?"dynamic":u.type,roundness:u.roundness===void 0?.5:u.roundness,forceDirection:u.forceDirection===void 0?!1:u.forceDirection}},e.edges.smooth={enabled:u.enabled===void 0?!0:u.enabled,type:a,roundness:u.roundness===void 0?.5:u.roundness,forceDirection:u.forceDirection===void 0?!1:u.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",a)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var n=e.length+50,a=0;a<e.length;a++){var u=e[a],o=2*Math.PI*this._rng();u.x===void 0&&(u.x=n*Math.cos(o)),u.y===void 0&&(u.y=n*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,n=0,a=0;a<e.length;a++){var u=this.body.nodes[e[a]];u.predefinedPosition===!0&&(n+=1)}if(n<.5*e.length){var o=10,f=0,i=this.options.clusterThreshold,s={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>i){for(var d=e.length;e.length>i&&f<=o;){f+=1;var l=e.length;f%3===0?this.body.modules.clustering.clusterBridges(s):this.body.modules.clustering.clusterOutliers(s);var h=e.length;if(l==h&&f%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*d)})}f>o&&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();for(var y=70,b=0;b<e.length;b++){var C=this.body.nodes[e[b]];C.predefinedPosition===!1&&(C.x+=(.5-this._rng())*y,C.y+=(.5-this._rng())*y)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=lg.getRangeCore(this.body.nodes,this.body.nodeIndices),n=lg.findCenter(e),a=0;a<this.body.nodeIndices.length;a++){var u=this.body.nodes[this.body.nodeIndices[a]];u.x-=n.x,u.y-=n.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var n=0;n<this.body.nodeIndices.length;n++)this.body.nodes[this.body.nodeIndices[n]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[n],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){var e,n,a=!1,u=!1;this.lastNodeOnLevel={},this.hierarchical=new qtr;for(n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&(e=this.body.nodes[n],e.options.level!==void 0?(a=!0,this.hierarchical.levels[n]=e.options.level):u=!0);if(u===!0&&a===!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(u===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var f in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,f)&&this.hierarchical.ensureLevel(f);var i=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(i),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,n=!1,a={},u=function(){for(var g=f(),p=0,I=0;I<g.length-1;I++){var A=g[I].max-g[I+1].min;p+=A+e.options.hierarchical.treeSpacing,o(I+1,p)}},o=function(g,p){var I=e.hierarchical.trees;for(var A in I)Object.prototype.hasOwnProperty.call(I,A)&&I[A]===g&&e.direction.shift(A,p)},f=function(){for(var g=[],p=0;p<e.hierarchical.numTrees();p++)g.push(e.direction.getTreeSize(p));return g},i=function v(g,p){if(!p[g.id]&&(p[g.id]=!0,e.hierarchical.childrenReference[g.id])){var I=e.hierarchical.childrenReference[g.id];if(I.length>0)for(var A=0;A<I.length;A++)v(e.body.nodes[I[A]],p)}},s=function(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,I=1e9,A=1e9,w=1e9,T=-1e9;for(var E in g)if(Object.prototype.hasOwnProperty.call(g,E)){var x=e.body.nodes[E],S=e.hierarchical.levels[x.id],_=e.direction.getPosition(x),L=e._getSpaceAroundNode(x,g),k=nf(L,2),F=k[0],N=k[1];I=Math.min(F,I),A=Math.min(N,A),S<=p&&(w=Math.min(_,w),T=Math.max(_,T))}return[w,T,I,A]},d=function(g,p){var I=e.hierarchical.getMaxLevel(g.id),A=e.hierarchical.getMaxLevel(p.id);return Math.min(I,A)},l=function(g,p,I){for(var A=e.hierarchical,w=0;w<p.length;w++){var T=p[w],E=A.distributionOrdering[T];if(E.length>1)for(var x=0;x<E.length-1;x++){var S=E[x],_=E[x+1];A.hasSameParent(S,_)&&A.inSameSubNetwork(S,_)&&g(S,_,I)}}},h=function(g,p){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,A=e.direction.getPosition(g),w=e.direction.getPosition(p),T=Math.abs(w-A),E=e.options.hierarchical.nodeSpacing;if(T>E){var x={},S={};i(g,x),i(p,S);var _=d(g,p),L=s(x,_),k=s(S,_),F=L[1],N=k[0],P=k[2],z=Math.abs(F-N);if(z>E){var M=F-N+E;M<-P+E&&(M=-P+E),M<0&&(e._shiftBlock(p.id,M),n=!0,I===!0&&e._centerParent(p))}}},y=function(g,p){for(var I=p.id,A=p.edges,w=e.hierarchical.levels[p.id],T=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,E={},x=[],S=0;S<A.length;S++){var _=A[S];if(_.toId!=_.fromId){var L=_.toId==I?_.from:_.to;E[A[S].id]=L,e.hierarchical.levels[L.id]<w&&x.push(_)}}var k=function(D,O){for(var j=0,G=0;G<O.length;G++)if(E[O[G].id]!==void 0){var W=e.direction.getPosition(E[O[G].id])-D;j+=W/Math.sqrt(W*W+T)}return j},F=function(D,O){for(var j=0,G=0;G<O.length;G++)if(E[O[G].id]!==void 0){var W=e.direction.getPosition(E[O[G].id])-D;j-=T*Math.pow(W*W+T,-1.5)}return j},N=function(D,O){for(var j=e.direction.getPosition(p),G={},W=0;W<D;W++){var X=k(j,O),Y=F(j,O),Q=40,H=Math.max(-Q,Math.min(Q,Math.round(X/Y)));if(j=j-H,G[j]!==void 0)break;G[j]=W}return j},P=function(D){var O=e.direction.getPosition(p);if(a[p.id]===void 0){var j={};i(p,j),a[p.id]=j}var G=s(a[p.id]),W=G[2],X=G[3],Y=D-O,Q=0;Y>0?Q=Math.min(Y,X-e.options.hierarchical.nodeSpacing):Y<0&&(Q=-Math.min(-Y,W-e.options.hierarchical.nodeSpacing)),Q!=0&&(e._shiftBlock(p.id,Q),n=!0)},z=function(D){var O=e.direction.getPosition(p),j=e._getSpaceAroundNode(p),G=nf(j,2),W=G[0],X=G[1],Y=D-O,Q=O;Y>0?Q=Math.min(O+(X-e.options.hierarchical.nodeSpacing),D):Y<0&&(Q=Math.max(O-(W-e.options.hierarchical.nodeSpacing),D)),Q!==O&&(e.direction.setPosition(p,Q),n=!0)},M=N(g,x);P(M),M=N(g,A),z(M)},b=function(g){var p=e.hierarchical.getLevels();p=Mx(p).call(p);for(var I=0;I<g;I++){n=!1;for(var A=0;A<p.length;A++)for(var w=p[A],T=e.hierarchical.distributionOrdering[w],E=0;E<T.length;E++)y(1e3,T[E]);if(n!==!0)break}},C=function(g){var p=e.hierarchical.getLevels();p=Mx(p).call(p);for(var I=0;I<g&&(n=!1,l(h,p,!0),n===!0);I++);},m=function(){for(var g in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,g)&&e._centerParent(e.body.nodes[g])},c=function(){var g=e.hierarchical.getLevels();g=Mx(g).call(g);for(var p=0;p<g.length;p++)for(var I=g[p],A=e.hierarchical.distributionOrdering[I],w=0;w<A.length;w++)e._centerParent(A[w])};this.options.hierarchical.blockShifting===!0&&(C(5),m()),this.options.hierarchical.edgeMinimization===!0&&b(20),this.options.hierarchical.parentCentralization===!0&&c(),u()}},{key:"_getSpaceAroundNode",value:function(e,n){var a=!0;n===void 0&&(a=!1);var u=this.hierarchical.levels[e.id];if(u!==void 0){var o=this.hierarchical.distributionIndex[e.id],f=this.direction.getPosition(e),i=this.hierarchical.distributionOrdering[u],s=1e9,d=1e9;if(o!==0){var l=i[o-1];if(a===!0&&n[l.id]===void 0||a===!1){var h=this.direction.getPosition(l);s=f-h}}if(o!=i.length-1){var y=i[o+1];if(a===!0&&n[y.id]===void 0||a===!1){var b=this.direction.getPosition(y);d=Math.min(d,b-f)}}return[s,d]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var n=this.hierarchical.parentReference[e.id],a=0;a<n.length;a++){var u=n[a],o=this.body.nodes[u],f=this.hierarchical.childrenReference[u];if(f!==void 0){var i=this._getCenterPosition(f),s=this.direction.getPosition(o),d=this._getSpaceAroundNode(o),l=nf(d,2),h=l[0],y=l[1],b=s-i;(b<0&&Math.abs(b)<y-this.options.hierarchical.nodeSpacing||b>0&&Math.abs(b)<h-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,i)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a,u=tf(e[n]);u=this._indexArrayToNodes(u),$E(a=this.direction).call(a,u);for(var o=0,f=0;f<u.length;f++){var i=u[f];if(this.positionedNodes[i.id]===void 0){var s=this.options.hierarchical.nodeSpacing,d=s*o;o>0&&(d=this.direction.getPosition(u[f-1])+s),this.direction.setPosition(i,d,n),this._validatePositionAndContinue(i,n,d),o++}}}}},{key:"_placeBranchNodes",value:function(e,n){var a,u=this.hierarchical.childrenReference[e];if(u!==void 0){for(var o=[],f=0;f<u.length;f++)o.push(this.body.nodes[u[f]]);$E(a=this.direction).call(a,o);for(var i=0;i<o.length;i++){var s=o[i],d=this.hierarchical.levels[s.id];if(d>n&&this.positionedNodes[s.id]===void 0){var l=this.options.hierarchical.nodeSpacing,h=void 0;i===0?h=this.direction.getPosition(this.body.nodes[e]):h=this.direction.getPosition(o[i-1])+l,this.direction.setPosition(s,h,d),this._validatePositionAndContinue(s,d,h)}else return}var y=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],y,n)}}},{key:"_validatePositionAndContinue",value:function(e,n,a){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[n]!==void 0){var u=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[n]]);if(a-u<this.options.hierarchical.nodeSpacing){var o=u+this.options.hierarchical.nodeSpacing-a,f=this._findCommonParent(this.lastNodeOnLevel[n],e.id);this._shiftBlock(f.withChild,o)}}this.lastNodeOnLevel[n]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,n)}}},{key:"_indexArrayToNodes",value:function(e){for(var n=[],a=0;a<e.length;a++)n.push(this.body.nodes[e[a]]);return n}},{key:"_getDistribution",value:function(){var e={},n,a;for(n in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,n)){a=this.body.nodes[n];var u=this.hierarchical.levels[n]===void 0?0:this.hierarchical.levels[n];this.direction.fix(a,u),e[u]===void 0&&(e[u]={}),e[u][n]=a}return e}},{key:"_getActiveEdges",value:function(e){var n=this,a=[];return fl(e.edges,function(u){var o;Ql(o=n.body.edgeIndices).call(o,u.id)!==-1&&a.push(u)}),a}},{key:"_getHubSizes",value:function(){var e=this,n={},a=this.body.nodeIndices;fl(a,function(o){var f=e.body.nodes[o],i=e._getActiveEdges(f).length;n[i]=!0});var u=[];return fl(n,function(o){u.push(Number(o))}),$E(u).call(u,function(o,f){return f-o}),u}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,n=function(i,s){e.hierarchical.levelDownstream(i,s)},a=this._getHubSizes(),u=function(){var i=a[o];if(i===0)return 1;fl(e.body.nodeIndices,function(s){var d=e.body.nodes[s];i===e._getActiveEdges(d).length&&e._crawlNetwork(n,s)})},o=0;o<a.length&&!u();++o);}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,n=1e5,a=function(f,i,s){},u=function(f,i,s){var d=e.hierarchical.levels[f.id];d===void 0&&(d=e.hierarchical.levels[f.id]=n);var l=a(lg.cloneOptions(f,"node"),lg.cloneOptions(i,"node"),lg.cloneOptions(s,"edge"));e.hierarchical.levels[i.id]=d+l};this._crawlNetwork(u),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,n=this,a=ETe(e=this.body.nodeIndices).call(e,function(u,o){return u.set(o,n.body.nodes[o]),u},new K2e);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Jtr(a):this.hierarchical.levels=Qtr(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,n=function(u,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[u.id]&&e.hierarchical.addRelation(u.id,o.id)};this._crawlNetwork(n),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},a=arguments.length>1?arguments[1]:void 0,u={},o=function h(y,b){if(u[y.id]===void 0){e.hierarchical.setTreeIndex(y,b),u[y.id]=!0;for(var C,m=e._getActiveEdges(y),c=0;c<m.length;c++){var v=m[c];v.connected===!0&&(v.toId==y.id?C=v.from:C=v.to,y.id!=C.id&&(n(y,C,v),h(C,b)))}}};if(a===void 0)for(var f=0,i=0;i<this.body.nodeIndices.length;i++){var s=this.body.nodeIndices[i];if(u[s]===void 0){var d=this.body.nodes[s];o(d,f),f+=1}}else{var l=this.body.nodes[a];if(l===void 0){console.error("Node not found:",a);return}o(l)}}},{key:"_shiftBlock",value:function(e,n){var a=this,u={},o=function f(i){if(!u[i]){u[i]=!0,a.direction.shift(i,n);var s=a.hierarchical.childrenReference[i];if(s!==void 0)for(var d=0;d<s.length;d++)f(s[d])}};o(e)}},{key:"_findCommonParent",value:function(e,n){var a=this,u={},o=function i(s,d){var l=a.hierarchical.parentReference[d];if(l!==void 0)for(var h=0;h<l.length;h++){var y=l[h];s[y]=!0,i(s,y)}},f=function i(s,d){var l=a.hierarchical.parentReference[d];if(l!==void 0)for(var h=0;h<l.length;h++){var y=l[h];if(s[y]!==void 0)return{foundParent:y,withChild:d};var b=i(s,y);if(b.foundParent!==null)return b}return{foundParent:null,withChild:d}};return o(u,e),f(u,n)}},{key:"setDirectionStrategy",value:function(){var e=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";e?this.direction=new ktr(this):this.direction=new Dtr(this)}},{key:"_getCenterPosition",value:function(e){for(var n=1e9,a=-1e9,u=0;u<e.length;u++){var o=void 0;if(e[u].id!==void 0)o=e[u];else{var f=e[u];o=this.body.nodes[f]}var i=this.direction.getPosition(o);n=Math.min(n,i),a=Math.max(a,i)}return .5*(n+a)}}]),t}();function trr(t,r){var e=typeof GI<"u"&&Lw(t)||t["@@iterator"];if(!e){if(Au(t)||(e=rrr(t))||r){e&&(t=e);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(s){throw s},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
5245
5245
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u=!0,o=!1,f;return{s:function(){e=e.call(t)},n:function(){var s=e.next();return u=s.done,s},e:function(s){o=!0,f=s},f:function(){try{!u&&e.return!=null&&e.return()}finally{if(o)throw f}}}}function rrr(t,r){var e;if(t){if(typeof t=="string")return sce(t,r);var n=Gd(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Pw(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sce(t,r)}}function sce(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var nrr=function(){function t(r,e,n,a){var u=this,o,f;Qa(this,t),this.body=r,this.canvas=e,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}},uh(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){u._clean()}),this.body.emitter.on("_dataChanged",Na(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",Na(f=this._restore).call(f,this))}return Ja(t,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,n,a){n!==void 0&&(n.locale!==void 0?this.options.locale=n.locale:this.options.locale=a.locale,n.locales!==void 0?this.options.locales=n.locales:this.options.locales=a.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Yu(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){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())}},{key:"disableEditMode",value:function(){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())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,n;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var a=this.selectionHandler.getSelectedNodeCount(),u=this.selectionHandler.getSelectedEdgeCount(),o=a+u,f=this.options.locales[this.options.locale],i=!1;this.options.addNode!==!1&&(this._createAddNodeButton(f),i=!0),this.options.addEdge!==!1&&(i===!0?this._createSeperator(1):i=!0,this._createAddEdgeButton(f)),a===1&&typeof this.options.editNode=="function"?(i===!0?this._createSeperator(2):i=!0,this._createEditNodeButton(f)):u===1&&a===0&&this.options.editEdge!==!1&&(i===!0?this._createSeperator(3):i=!0,this._createEditEdgeButton(f)),o!==0&&(a>0&&this.options.deleteNode!==!1?(i===!0&&this._createSeperator(4),this._createDeleteButton(f)):a===0&&this.options.deleteEdge!==!1&&(i===!0&&this._createSeperator(4),this._createDeleteButton(f))),this._bindElementEvents(this.closeDiv,Na(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",Na(n=this.showManipulatorToolbar).call(n,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var n,a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,Na(n=this.toggleEditMode).call(n,this))}this._temporaryBindEvent("click",Na(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var n=this.selectionHandler.getSelectedNodes()[0];if(n!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(n.isCluster!==!0){var a=Yu({},n.options,!1);if(a.x=n.x,a.y=n.y,this.options.editNode.length===2)this.options.editNode(a,function(u){u!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(u),e.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()}},{key:"addEdgeMode",value:function(){var e,n,a,u,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var f,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,Na(f=this.toggleEditMode).call(f,this))}this._temporaryBindUI("onTouch",Na(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",Na(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDrag",Na(a=this._dragControlNode).call(a,this)),this._temporaryBindUI("onRelease",Na(u=this._finishConnect).call(u,this)),this._temporaryBindUI("onDragStart",Na(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",_u(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var n,a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,Na(n=this.toggleEditMode).call(n,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var u,o,f,i,s=this.body.edges[this.edgeBeingEditedId],d=this._getNewTargetNode(s.from.x,s.from.y),l=this._getNewTargetNode(s.to.x,s.to.y);this.temporaryIds.nodes.push(d.id),this.temporaryIds.nodes.push(l.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this.body.nodes[l.id]=l,this.body.nodeIndices.push(l.id),this._temporaryBindUI("onTouch",Na(u=this._controlNodeTouch).call(u,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",Na(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",Na(f=this._controlNodeDrag).call(f,this)),this._temporaryBindUI("onDragEnd",Na(i=this._controlNodeDragEnd).call(i,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(h){var y=s.edgeType.findBorderPositions(h);d.selected===!1&&(d.x=y.from.x,d.y=y.from.y),l.selected===!1&&(l.x=y.to.x,l.y=y.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var n=this.selectionHandler.getSelectedNodeIds(),a=this.selectionHandler.getSelectedEdgeIds(),u=void 0;if(n.length>0){for(var o=0;o<n.length;o++)if(this.body.nodes[n[o]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(u=this.options.deleteNode)}else a.length>0&&typeof this.options.deleteEdge=="function"&&(u=this.options.deleteEdge);if(typeof u=="function"){var f={nodes:n,edges:a};if(u.length===2)u(f,function(i){i!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(i.edges),e.body.data.nodes.getDataSet().remove(i.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(a),this.body.data.nodes.getDataSet().remove(n),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){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,n;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(n=this.options.locales[this.options.locale])===null||n===void 0?void 0:n.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)}}},{key:"_getNewTargetNode",value:function(e,n){var a=Yu({},this.options.controlNodeStyle);a.id="targetNode"+zE(),a.hidden=!1,a.physics=!1,a.x=e,a.y=n;var u=this.body.functions.createNode(a);return u.shape.boundingBox={left:e,right:e,top:n,bottom:n},u}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},TC(this.editModeDiv);var n=this.options.locales[this.options.locale],a=this._createButton("editMode","vis-edit vis-edit-mode",n.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(a),this._bindElementEvents(a,Na(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(TC(this.editModeDiv),TC(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,n=trr(lA(e=this._domEventListenerCleanupQueue).call(e,0)),a;try{for(n.s();!(a=n.n()).done;){var u=a.value;u()}}catch(o){n.e(o)}finally{n.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),TC(this.manipulationDiv),TC(this.editModeDiv),TC(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}},{key:"_createSeperator",value:function(){var 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])}},{key:"_createAddNodeButton",value:function(e){var n,a=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,Na(n=this.addNodeMode).call(n,this))}},{key:"_createAddEdgeButton",value:function(e){var n,a=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,Na(n=this.addEdgeMode).call(n,this))}},{key:"_createEditNodeButton",value:function(e){var n,a=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,Na(n=this.editNode).call(n,this))}},{key:"_createEditEdgeButton",value:function(e){var n,a=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,Na(n=this.editEdgeMode).call(n,this))}},{key:"_createDeleteButton",value:function(e){var n,a;this.options.rtl?a="vis-delete-rtl":a="vis-delete";var u=this._createButton("delete",a,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(u),this._bindElementEvents(u,Na(n=this.deleteSelected).call(n,this))}},{key:"_createBackButton",value:function(e){var n,a=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,Na(n=this.showManipulatorToolbar).call(n,this))}},{key:"_createButton",value:function(e,n,a){var u=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 "+n,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=u,this.manipulationDOM[e+"Label"].innerText=a,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,n){this.temporaryEventFunctions.push({event:e,boundFunction:n}),this.body.emitter.on(e,n)}},{key:"_temporaryBindUI",value:function(e,n){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=n;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+S4(tf(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e<this.temporaryEventFunctions.length;e++){var n=this.temporaryEventFunctions[e].event,a=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(n,a)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,n){var a=new NT(e,{});Nk(a,n),this._domEventListenerCleanupQueue.push(function(){a.destroy()});var u=function(f){var i=f.keyCode,s=f.key;(s==="Enter"||s===" "||i===13||i===32)&&n()};e.addEventListener("keyup",u,!1),this._domEventListenerCleanupQueue.push(function(){e.removeEventListener("keyup",u,!1)})}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){var n;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var a=Ql(n=this.body.edgeIndices).call(n,this.temporaryIds.edges[e]);if(a!==-1){var u;lA(u=this.body.edgeIndices).call(u,a,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var f;delete this.body.nodes[this.temporaryIds.nodes[o]];var i=Ql(f=this.body.nodeIndices).call(f,this.temporaryIds.nodes[o]);if(i!==-1){var s;lA(s=this.body.nodeIndices).call(s,i,1)}}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=uh({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,n=this.selectionHandler._pointerToPositionObject(e),a=this.body.nodes[this.temporaryIds.nodes[0]],u=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var f=a.isOverlappingWith(n),i=u.isOverlappingWith(n);f===!0?(this.selectedControlNode=a,o.edgeType.from=a):i===!0&&(this.selectedControlNode=u,o.edgeType.to=u),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(e){this.body.emitter.emit("disablePhysics");var n=this.body.functions.getPointer(e.center),a=this.canvas.DOMtoCanvas(n);this.selectedControlNode!==void 0?(this.selectedControlNode.x=a.x,this.selectedControlNode.y=a.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var n=this.body.functions.getPointer(e.center),a=this.selectionHandler._pointerToPositionObject(n),u=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(a),f=void 0,i=o.length-1;i>=0;i--)if(o[i]!==this.selectedControlNode.id){f=this.body.nodes[o[i]];break}if(f!==void 0&&this.selectedControlNode!==void 0)if(f.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var s=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===s.id?this._performEditEdge(f.id,u.to.id):this._performEditEdge(u.from.id,f.id)}else u.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=uh({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var n=this.lastTouch,a=this.selectionHandler.getNodeAt(n);if(a!==void 0)if(a.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var u=this._getNewTargetNode(a.x,a.y);this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id);var o=this.body.functions.createEdge({id:"connectionEdge"+zE(),from:a.id,to:u.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(u.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var n=this.body.functions.getPointer(e.center),a=this.selectionHandler._pointerToPositionObject(n),u=void 0;this.temporaryIds.edges[0]!==void 0&&(u=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(a),f=void 0,i=o.length-1;i>=0;i--){var s;if(Ql(s=this.temporaryIds.nodes).call(s,o[i])===-1){f=this.body.nodes[o[i]];break}}if(e.controlEdge={from:u,to:f?f.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,n),this.temporaryIds.nodes[0]!==void 0){var d=this.body.nodes[this.temporaryIds.nodes[0]];d.x=this.canvas._XconvertDOMtoCanvas(n.x),d.y=this.canvas._YconvertDOMtoCanvas(n.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var n=this.body.functions.getPointer(e.center),a=this.selectionHandler._pointerToPositionObject(n),u=void 0;this.temporaryIds.edges[0]!==void 0&&(u=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(a),f=void 0,i=o.length-1;i>=0;i--){var s;if(Ql(s=this.temporaryIds.nodes).call(s,o[i])===-1){f=this.body.nodes[o[i]];break}}this._cleanupTemporaryNodesAndEdges(),f!==void 0&&(f.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[u]!==void 0&&this.body.nodes[f.id]!==void 0&&this._performAddEdge(u,f.id)),e.controlEdge={from:u,to:f?f.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,n),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var n=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,n,void 0,!0)}},{key:"_performAddNode",value:function(e){var n=this,a={id:zE(),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(a,function(u){u!=null&&n.inMode==="addNode"&&n.body.data.nodes.getDataSet().add(u),n.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(a),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,n){var a=this,u={from:e,to:n};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(u,function(o){o!=null&&a.inMode==="addEdge"&&(a.body.data.edges.getDataSet().add(o),a.selectionHandler.unselectAll(),a.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(u),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,n){var a=this,u={id:this.edgeBeingEditedId,from:e,to:n,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(_u(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(u,function(f){f==null||a.inMode!=="editEdge"?(a.body.edges[u.id].updateEdgeType(),a.body.emitter.emit("_redraw"),a.showManipulatorToolbar()):(a.body.data.edges.getDataSet().update(f),a.selectionHandler.unselectAll(),a.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(u),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}(),Xa="string",Oa="boolean",Vi="number",iE="array",jo="object",OTe="dom",irr="any",T$=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],_$={borderWidth:{number:Vi},borderWidthSelected:{number:Vi,undefined:"undefined"},brokenImage:{string:Xa,undefined:"undefined"},chosen:{label:{boolean:Oa,function:"function"},node:{boolean:Oa,function:"function"},__type__:{object:jo,boolean:Oa}},color:{border:{string:Xa},background:{string:Xa},highlight:{border:{string:Xa},background:{string:Xa},__type__:{object:jo,string:Xa}},hover:{border:{string:Xa},background:{string:Xa},__type__:{object:jo,string:Xa}},__type__:{object:jo,string:Xa}},opacity:{number:Vi,undefined:"undefined"},fixed:{x:{boolean:Oa},y:{boolean:Oa},__type__:{object:jo,boolean:Oa}},font:{align:{string:Xa},color:{string:Xa},size:{number:Vi},face:{string:Xa},background:{string:Xa},strokeWidth:{number:Vi},strokeColor:{string:Xa},vadjust:{number:Vi},multi:{boolean:Oa,string:Xa},bold:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},boldital:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},ital:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},mono:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},__type__:{object:jo,string:Xa}},group:{string:Xa,number:Vi,undefined:"undefined"},heightConstraint:{minimum:{number:Vi},valign:{string:Xa},__type__:{object:jo,boolean:Oa,number:Vi}},hidden:{boolean:Oa},icon:{face:{string:Xa},code:{string:Xa},size:{number:Vi},color:{string:Xa},weight:{string:Xa,number:Vi},__type__:{object:jo}},id:{string:Xa,number:Vi},image:{selected:{string:Xa,undefined:"undefined"},unselected:{string:Xa,undefined:"undefined"},__type__:{object:jo,string:Xa}},imagePadding:{top:{number:Vi},right:{number:Vi},bottom:{number:Vi},left:{number:Vi},__type__:{object:jo,number:Vi}},label:{string:Xa,undefined:"undefined"},labelHighlightBold:{boolean:Oa},level:{number:Vi,undefined:"undefined"},margin:{top:{number:Vi},right:{number:Vi},bottom:{number:Vi},left:{number:Vi},__type__:{object:jo,number:Vi}},mass:{number:Vi},physics:{boolean:Oa},scaling:{min:{number:Vi},max:{number:Vi},label:{enabled:{boolean:Oa},min:{number:Vi},max:{number:Vi},maxVisible:{number:Vi},drawThreshold:{number:Vi},__type__:{object:jo,boolean:Oa}},customScalingFunction:{function:"function"},__type__:{object:jo}},shadow:{enabled:{boolean:Oa},color:{string:Xa},size:{number:Vi},x:{number:Vi},y:{number:Vi},__type__:{object:jo,boolean:Oa}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:Oa,array:iE},borderRadius:{number:Vi},interpolation:{boolean:Oa},useImageSize:{boolean:Oa},useBorderWithImage:{boolean:Oa},coordinateOrigin:{string:["center","top-left"]},__type__:{object:jo}},size:{number:Vi},title:{string:Xa,dom:OTe,undefined:"undefined"},value:{number:Vi,undefined:"undefined"},widthConstraint:{minimum:{number:Vi},maximum:{number:Vi},__type__:{object:jo,boolean:Oa,number:Vi}},x:{number:Vi},y:{number:Vi},__type__:{object:jo}},arr={configure:{enabled:{boolean:Oa},filter:{boolean:Oa,string:Xa,array:iE,function:"function"},container:{dom:OTe},showButton:{boolean:Oa},__type__:{object:jo,boolean:Oa,string:Xa,array:iE,function:"function"}},edges:{arrows:{to:{enabled:{boolean:Oa},scaleFactor:{number:Vi},type:{string:T$},imageHeight:{number:Vi},imageWidth:{number:Vi},src:{string:Xa},__type__:{object:jo,boolean:Oa}},middle:{enabled:{boolean:Oa},scaleFactor:{number:Vi},type:{string:T$},imageWidth:{number:Vi},imageHeight:{number:Vi},src:{string:Xa},__type__:{object:jo,boolean:Oa}},from:{enabled:{boolean:Oa},scaleFactor:{number:Vi},type:{string:T$},imageWidth:{number:Vi},imageHeight:{number:Vi},src:{string:Xa},__type__:{object:jo,boolean:Oa}},__type__:{string:["from","to","middle"],object:jo}},endPointOffset:{from:{number:Vi},to:{number:Vi},__type__:{object:jo,number:Vi}},arrowStrikethrough:{boolean:Oa},background:{enabled:{boolean:Oa},color:{string:Xa},size:{number:Vi},dashes:{boolean:Oa,array:iE},__type__:{object:jo,boolean:Oa}},chosen:{label:{boolean:Oa,function:"function"},edge:{boolean:Oa,function:"function"},__type__:{object:jo,boolean:Oa}},color:{color:{string:Xa},highlight:{string:Xa},hover:{string:Xa},inherit:{string:["from","to","both"],boolean:Oa},opacity:{number:Vi},__type__:{object:jo,string:Xa}},dashes:{boolean:Oa,array:iE},font:{color:{string:Xa},size:{number:Vi},face:{string:Xa},background:{string:Xa},strokeWidth:{number:Vi},strokeColor:{string:Xa},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:Vi},multi:{boolean:Oa,string:Xa},bold:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},boldital:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},ital:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},mono:{color:{string:Xa},size:{number:Vi},face:{string:Xa},mod:{string:Xa},vadjust:{number:Vi},__type__:{object:jo,string:Xa}},__type__:{object:jo,string:Xa}},hidden:{boolean:Oa},hoverWidth:{function:"function",number:Vi},label:{string:Xa,undefined:"undefined"},labelHighlightBold:{boolean:Oa},length:{number:Vi,undefined:"undefined"},physics:{boolean:Oa},scaling:{min:{number:Vi},max:{number:Vi},label:{enabled:{boolean:Oa},min:{number:Vi},max:{number:Vi},maxVisible:{number:Vi},drawThreshold:{number:Vi},__type__:{object:jo,boolean:Oa}},customScalingFunction:{function:"function"},__type__:{object:jo}},selectionWidth:{function:"function",number:Vi},selfReferenceSize:{number:Vi},selfReference:{size:{number:Vi},angle:{number:Vi},renderBehindTheNode:{boolean:Oa},__type__:{object:jo}},shadow:{enabled:{boolean:Oa},color:{string:Xa},size:{number:Vi},x:{number:Vi},y:{number:Vi},__type__:{object:jo,boolean:Oa}},smooth:{enabled:{boolean:Oa},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:Vi},forceDirection:{string:["horizontal","vertical","none"],boolean:Oa},__type__:{object:jo,boolean:Oa}},title:{string:Xa,undefined:"undefined"},width:{number:Vi},widthConstraint:{maximum:{number:Vi},__type__:{object:jo,boolean:Oa,number:Vi}},value:{number:Vi,undefined:"undefined"},__type__:{object:jo}},groups:{useDefaultGroups:{boolean:Oa},__any__:_$,__type__:{object:jo}},interaction:{dragNodes:{boolean:Oa},dragView:{boolean:Oa},hideEdgesOnDrag:{boolean:Oa},hideEdgesOnZoom:{boolean:Oa},hideNodesOnDrag:{boolean:Oa},hover:{boolean:Oa},keyboard:{enabled:{boolean:Oa},speed:{x:{number:Vi},y:{number:Vi},zoom:{number:Vi},__type__:{object:jo}},bindToWindow:{boolean:Oa},autoFocus:{boolean:Oa},__type__:{object:jo,boolean:Oa}},multiselect:{boolean:Oa},navigationButtons:{boolean:Oa},selectable:{boolean:Oa},selectConnectedEdges:{boolean:Oa},hoverConnectedEdges:{boolean:Oa},tooltipDelay:{number:Vi},zoomView:{boolean:Oa},zoomSpeed:{number:Vi},__type__:{object:jo}},layout:{randomSeed:{undefined:"undefined",number:Vi,string:Xa},improvedLayout:{boolean:Oa},clusterThreshold:{number:Vi},hierarchical:{enabled:{boolean:Oa},levelSeparation:{number:Vi},nodeSpacing:{number:Vi},treeSpacing:{number:Vi},blockShifting:{boolean:Oa},edgeMinimization:{boolean:Oa},parentCentralization:{boolean:Oa},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:jo,boolean:Oa}},__type__:{object:jo}},manipulation:{enabled:{boolean:Oa},initiallyActive:{boolean:Oa},addNode:{boolean:Oa,function:"function"},addEdge:{boolean:Oa,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:jo,boolean:Oa,function:"function"}},deleteNode:{boolean:Oa,function:"function"},deleteEdge:{boolean:Oa,function:"function"},controlNodeStyle:_$,__type__:{object:jo,boolean:Oa}},nodes:_$,physics:{enabled:{boolean:Oa},barnesHut:{theta:{number:Vi},gravitationalConstant:{number:Vi},centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},damping:{number:Vi},avoidOverlap:{number:Vi},__type__:{object:jo}},forceAtlas2Based:{theta:{number:Vi},gravitationalConstant:{number:Vi},centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},damping:{number:Vi},avoidOverlap:{number:Vi},__type__:{object:jo}},repulsion:{centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},nodeDistance:{number:Vi},damping:{number:Vi},__type__:{object:jo}},hierarchicalRepulsion:{centralGravity:{number:Vi},springLength:{number:Vi},springConstant:{number:Vi},nodeDistance:{number:Vi},damping:{number:Vi},avoidOverlap:{number:Vi},__type__:{object:jo}},maxVelocity:{number:Vi},minVelocity:{number:Vi},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:Oa},iterations:{number:Vi},updateInterval:{number:Vi},onlyDynamicEdges:{boolean:Oa},fit:{boolean:Oa},__type__:{object:jo,boolean:Oa}},timestep:{number:Vi},adaptiveTimestep:{boolean:Oa},wind:{x:{number:Vi},y:{number:Vi},__type__:{object:jo}},__type__:{object:jo,boolean:Oa}},autoResize:{boolean:Oa},clickToUse:{boolean:Oa},locale:{string:Xa},locales:{__any__:{any:irr},__type__:{object:jo}},height:{string:Xa},width:{string:Xa},__type__:{object:jo}},kTe={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]}}},orr=function(r,e,n){var a;return!!(oI(r).call(r,"physics")&&oI(a=kTe.physics.solver).call(a,e)&&n.physics.solver!==e&&e!=="wind")},srr=function(){function t(){Qa(this,t)}return Ja(t,[{key:"getDistances",value:function(e,n,a){for(var u={},o=e.edges,f=0;f<n.length;f++){var i=n[f],s={};u[i]=s;for(var d=0;d<n.length;d++)s[n[d]]=f==d?0:1e9}for(var l=0;l<a.length;l++){var h=o[a[l]];h.connected===!0&&u[h.fromId]!==void 0&&u[h.toId]!==void 0&&(u[h.fromId][h.toId]=1,u[h.toId][h.fromId]=1)}for(var y=n.length,b=0;b<y;b++)for(var C=n[b],m=u[C],c=0;c<y-1;c++)for(var v=n[c],g=u[v],p=c+1;p<y;p++){var I=n[p],A=u[I],w=Math.min(g[I],g[C]+m[I]);g[I]=w,A[v]=w}return u}}]),t}(),lrr=function(){function t(r,e,n){Qa(this,t),this.body=r,this.springLength=e,this.springConstant=n,this.distanceSolver=new srr}return Ja(t,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=this.distanceSolver.getDistances(this.body,e,n);this._createL_matrix(u),this._createK_matrix(u),this._createE_matrix();for(var o=.01,f=1,i=0,s=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),d=5,l=1e9,h=0,y=0,b=0,C=0,m=0;l>o&&i<s;){i+=1;var c=this._getHighestEnergyNode(a),v=nf(c,4);for(h=v[0],l=v[1],y=v[2],b=v[3],C=l,m=0;C>f&&m<d;){m+=1,this._moveNode(h,y,b);var g=this._getEnergy(h),p=nf(g,3);C=p[0],y=p[1],b=p[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var n=this.body.nodeIndices,a=this.body.nodes,u=0,o=n[0],f=0,i=0,s=0;s<n.length;s++){var d=n[s];if(a[d].predefinedPosition!==!0||a[d].isCluster===!0&&e===!0||a[d].options.fixed.x!==!0||a[d].options.fixed.y!==!0){var l=this._getEnergy(d),h=nf(l,3),y=h[0],b=h[1],C=h[2];u<y&&(u=y,o=d,f=b,i=C)}}return[o,u,f,i]}},{key:"_getEnergy",value:function(e){var n=nf(this.E_sums[e],2),a=n[0],u=n[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(u,2));return[o,a,u]}},{key:"_moveNode",value:function(e,n,a){for(var u=this.body.nodeIndices,o=this.body.nodes,f=0,i=0,s=0,d=o[e].x,l=o[e].y,h=this.K_matrix[e],y=this.L_matrix[e],b=0;b<u.length;b++){var C=u[b];if(C!==e){var m=o[C].x,c=o[C].y,v=h[C],g=y[C],p=1/Math.pow(Math.pow(d-m,2)+Math.pow(l-c,2),1.5);f+=v*(1-g*Math.pow(l-c,2)*p),i+=v*(g*(d-m)*(l-c)*p),s+=v*(1-g*Math.pow(d-m,2)*p)}}var I=f,A=i,w=n,T=s,E=a,x=(w/I+E/A)/(A/I-T/A),S=-(A*x+w)/I;o[e].x+=S,o[e].y+=x,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var n=this.body.nodeIndices,a=this.springLength;this.L_matrix=[];for(var u=0;u<n.length;u++){this.L_matrix[n[u]]={};for(var o=0;o<n.length;o++)this.L_matrix[n[u]][n[o]]=a*e[n[u]][n[o]]}}},{key:"_createK_matrix",value:function(e){var n=this.body.nodeIndices,a=this.springConstant;this.K_matrix=[];for(var u=0;u<n.length;u++){this.K_matrix[n[u]]={};for(var o=0;o<n.length;o++)this.K_matrix[n[u]][n[o]]=a*Math.pow(e[n[u]][n[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,n=this.body.nodes;this.E_matrix={},this.E_sums={};for(var a=0;a<e.length;a++)this.E_matrix[e[a]]=[];for(var u=0;u<e.length;u++){for(var o=e[u],f=n[o].x,i=n[o].y,s=0,d=0,l=u;l<e.length;l++){var h=e[l];if(h!==o){var y=n[h].x,b=n[h].y,C=1/Math.sqrt(Math.pow(f-y,2)+Math.pow(i-b,2));this.E_matrix[o][l]=[this.K_matrix[o][h]*(f-y-this.L_matrix[o][h]*(f-y)*C),this.K_matrix[o][h]*(i-b-this.L_matrix[o][h]*(i-b)*C)],this.E_matrix[h][u]=this.E_matrix[o][l],s+=this.E_matrix[o][l][0],d+=this.E_matrix[o][l][1]}}this.E_sums[o]=[s,d]}}},{key:"_updateE_matrix",value:function(e){for(var n=this.body.nodeIndices,a=this.body.nodes,u=this.E_matrix[e],o=this.K_matrix[e],f=this.L_matrix[e],i=a[e].x,s=a[e].y,d=0,l=0,h=0;h<n.length;h++){var y=n[h];if(y!==e){var b=u[h],C=b[0],m=b[1],c=a[y].x,v=a[y].y,g=1/Math.sqrt(Math.pow(i-c,2)+Math.pow(s-v,2)),p=o[y]*(i-c-f[y]*(i-c)*g),I=o[y]*(s-v-f[y]*(s-v)*g);u[h]=[p,I],d+=p,l+=I;var A=this.E_sums[y];A[0]+=p-C,A[1]+=I-m}}this.E_sums[e]=[d,l]}}]),t}();function Fo(t,r,e){var n,a,u,o,f=this;if(!(this instanceof Fo))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:iZt,clickToUse:!1},uh(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:Na(n=this.on).call(n,this),off:Na(a=this.off).call(a,this),emit:Na(u=this.emit).call(u,this),once:Na(o=this.once).call(o,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 sZt(function(){return f.body.emitter.emit("_requestRedraw")}),this.groups=new wYt,this.canvas=new Uqt(this.body),this.selectionHandler=new Per(this.body,this.canvas),this.interactionHandler=new Zqt(this.body,this.canvas,this.selectionHandler),this.view=new jqt(this.body,this.canvas),this.renderer=new Nqt(this.body,this.canvas),this.physics=new _qt(this.body),this.layoutEngine=new err(this.body),this.clustering=new kqt(this.body),this.manipulation=new nrr(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new uJt(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new pqt(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new lrr(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(r)}Lxe(Fo.prototype);Fo.prototype.setOptions=function(t){var r=this;if(t===null&&(t=void 0),t!==void 0){var e=DWt.validate(t,arr);e===!0&&console.error("%cErrors have been found in the supplied options object.",N2e);var n=["locale","locales","clickToUse"];if(E_(n,this.options,t),t.locale!==void 0&&(t.locale=aZt(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 OWt(this,this.body.container,kTe,this.canvas.pixelRatio,orr)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){var a={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Yu(a.nodes,this.nodesHandler.options),Yu(a.edges,this.edgesHandler.options),Yu(a.layout,this.layoutEngine.options),Yu(a.interaction,this.selectionHandler.options),Yu(a.interaction,this.renderer.options),Yu(a.interaction,this.interactionHandler.options),Yu(a.manipulation,this.manipulation.options),Yu(a.physics,this.physics.options),Yu(a.global,this.canvas.options),Yu(a.global,this.options),this.configurator.setModuleOptions(a)}t.clickToUse!==void 0?t.clickToUse===!0?this.activator===void 0&&(this.activator=new LWt(this.canvas.frame),this.activator.on("change",function(){r.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")}};Fo.prototype._updateVisibleIndices=function(){var t=this.body.nodes,r=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&!this.clustering._isClusteredNode(e)&&t[e].options.hidden===!1&&this.body.nodeIndices.push(t[e].id);for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n],u=t[a.fromId],o=t[a.toId],f=u!==void 0&&o!==void 0,i=!this.clustering._isClusteredEdge(n)&&a.options.hidden===!1&&f&&u.options.hidden===!1&&o.options.hidden===!1;i&&this.body.edgeIndices.push(a.id)}};Fo.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})};Fo.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);");var r=GWt(t.dot);this.setData(r);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);");var e=WWt(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")};Fo.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(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(var r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];TC(this.body.container)};Fo.prototype._updateValueRange=function(t){var r,e=void 0,n=void 0,a=0;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var u=t[r].getValue();u!==void 0&&(e=e===void 0?u:Math.min(u,e),n=n===void 0?u:Math.max(u,n),a+=u)}if(e!==void 0&&n!==void 0)for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].setValueRange(e,n,a)};Fo.prototype.isActive=function(){return!this.activator||this.activator.active};Fo.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};Fo.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};Fo.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};Fo.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};Fo.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};Fo.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};Fo.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};Fo.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};Fo.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};Fo.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};Fo.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};Fo.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};Fo.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};Fo.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};Fo.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};Fo.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};Fo.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};Fo.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};Fo.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};Fo.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};Fo.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};Fo.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};Fo.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};Fo.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};Fo.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};Fo.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};Fo.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};Fo.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};Fo.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};Fo.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};Fo.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)};Fo.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};Fo.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};Fo.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};Fo.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};Fo.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};Fo.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};Fo.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};Fo.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};Fo.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};Fo.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};Fo.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};Fo.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};Fo.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};Fo.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};Fo.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};Fo.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};Fo.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};Fo.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};Fo.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};Fo.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};Fo.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const urr=({operationList:t,operationId:r})=>{var N,P,z,M;const e=bt.useRef(null),n=SI(),a=bt.useRef(null),[u,o]=bt.useState(!0),[f,i]=bt.useState(1),s=r!==void 0?r:t[0].id??0,[d,l]=bt.useState(r??0),h=bt.useRef(d),[y,b]=bt.useState(""),[C,m]=bt.useState([]),[c,v]=bt.useState(null),g=bt.useMemo(()=>t.flatMap(R=>R.outputs.flatMap(D=>D.consumers.map(O=>({from:R.id,to:O,arrows:"to",label:`${oy(D.shape)}
|
5246
5246
|
${pI(D.dtype)}`})))),[t]),p=bt.useMemo(()=>{const R=new Set;return g.forEach(({from:D,to:O})=>{R.add(D),R.add(O)}),R},[g]),I=bt.useMemo(()=>new H5(t.filter(R=>p.has(R.id)).map(R=>({id:R.id,label:`${R.id} ${R.name}
|
5247
|
-
${R.operationFileIdentifier}`,shape:"box"}))),[t,p]),A=bt.useCallback(R=>{var O;const D=Math.min(R,3);i(D),(O=a.current)==null||O.moveTo({scale:D})},[a]),w=bt.useMemo(()=>c===null||C.length===0?0:(c+1)%C.length,[c,C.length]),T=bt.useMemo(()=>c===null||C.length===0?0:(c-1+C.length)%C.length,[c,C.length]),E=bt.useCallback(R=>{a.current&&!u&&(C.length>R&&k(C[R]),a.current.selectNodes(C,!1)),v(R)},[u,C]),x=()=>{m([]),v(null),b(""),a.current&&(a.current.selectNodes([],!0),a.current.focus(s,{scale:f,animation:{duration:500,easingFunction:"easeInOutQuad"}}),l(s))},S=()=>{if(!y)return m([]),null;const D=I.get({filter:O=>{var j;return(j=O.label)==null?void 0:j.toLowerCase().includes(y.toLowerCase())}}).map(O=>O.id);return m(D),D[0]||null};bt.useEffect(()=>(o(!0),setTimeout(()=>{e.current&&requestAnimationFrame(()=>{a.current=new Fo(e.current,{nodes:I,edges:g},{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 R,D;o(!1),(R=a.current)==null||R.focus(s,{scale:f,animation:{duration:500,easingFunction:"easeInOutQuad"}}),(D=a.current)==null||D.selectNodes([s],!0),l(s),h.current=s}),a.current.on("click",R=>{var D;if(R.edges.length>0){const O=R.edges[0],j=g.find(G=>G.id===O);(j==null?void 0:j.to)===h.current?k((j==null?void 0:j.from)||null):k((j==null?void 0:j.to)||null)}else(D=a.current)==null||D.selectNodes([],!0),l(null),h.current=null}),a.current.on("zoom",R=>{var D;R.scale<=3?i(R.scale):(D=a.current)==null||D.moveTo({scale:3})})})}),()=>{var R,D,O,j,G;(R=a.current)==null||R.off("zoom"),(D=a.current)==null||D.off("click"),(O=a.current)==null||O.off("dragEnd"),(j=a.current)==null||j.off("afterDrawing"),(G=a.current)==null||G.destroy(),a.current=null}),[g]);const _=R=>{if(I===null||R===null)return null;const D=I.getIds(),O=D.indexOf(R);return O!==-1&&O<D.length-1?D[O+1]:null},L=R=>{if(I===null||R===null)return null;const D=I.getIds(),O=D.indexOf(R);return O>0?D[O-1]:null},k=bt.useCallback(R=>{R!==null&&a.current&&(a.current.focus(R,{scale:f,animation:{duration:500,easingFunction:"easeInOutCubic"}}),a.current.selectNodes([R],!0),l(R),h.current=R)},[a,f]),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(_s,{placement:sl.TOP,content:`Go to previous operation ${L(d)}`,disabled:u,children:He.jsx(Ta,{icon:Ti.ArrowLeft,onClick:()=>k(L(d)||0),disabled:!L(d)||u,variant:"outlined"})}),He.jsx(_s,{disabled:u,placement:sl.TOP,content:`Center on operation ${F}`,children:He.jsx(Ta,{variant:"outlined",onClick:()=>k(F),disabled:u,children:F})}),He.jsx(_s,{placement:sl.TOP,content:`Go to next operation ${_(d)}`,disabled:u,children:He.jsx(Ta,{icon:Ti.ArrowRight,onClick:()=>k(_(d)||0),disabled:!_(d)||u,variant:"outlined"})}),He.jsx(nh,{className:"node-name-filter",placeholder:"Filter by operation name",value:y,onChange:R=>b(R.target.value),disabled:u,rightElement:y?He.jsx(Ta,{variant:"minimal",onClick:()=>{x()},icon:Ti.CROSS}):He.jsx(Ta,{variant:"minimal",disabled:!0,icon:Ti.CROSS})}),He.jsx(Ta,{icon:Ti.SEARCH,onClick:()=>{S(),setTimeout(()=>{E(0)},200)},disabled:u||!y,variant:"outlined"}),He.jsx(Ta,{icon:Ti.ArrowLeft,onClick:()=>{E(T)},disabled:u||C.length===0,variant:"outlined"}),C.length,He.jsx(Ta,{icon:Ti.ArrowRight,onClick:()=>{E(w)},disabled:u||C.length===0,variant:"outlined"})]}),He.jsxs("div",{className:"slider-wrapper",children:[He.jsx(GRe,{disabled:u,children:"Scale"}),He.jsx(jU,{min:.1,max:3,labelRenderer:R=>`${R.toFixed(2)}`,stepSize:.01,labelStepSize:.75,labelPrecision:1,value:f,onChange:A,disabled:u})]})]}),d!==null&&!u&&He.jsxs("div",{className:"operation-graph-props",children:[He.jsxs("h2",{className:"operation-name",children:[d," ",(N=t.find(R=>R.id===d))==null?void 0:N.name," (",(P=t.find(R=>R.id===d))==null?void 0:P.operationFileIdentifier,")"]}),He.jsx(Ta,{className:"navigate-button",endIcon:Ti.SEGMENTED_CONTROL,intent:lo.PRIMARY,onClick:()=>n(`/operations/${d}`),children:"Memory Details"}),He.jsx("h3",{children:"Inputs 123:"}),He.jsx("div",{className:"tensors",children:(z=t.find(R=>R.id===d))==null?void 0:z.inputs.map((R,D)=>He.jsx(lce,{tensor:R},`input-${d} ${R.id} ${D}`))}),He.jsx("h3",{children:"Outputs:"}),He.jsx("div",{className:"tensors",children:(M=t.find(R=>R.id===d))==null?void 0:M.outputs.map((R,D)=>He.jsx(lce,{tensor:R},`output-${d} ${R.id} ${D}`))})]}),u&&He.jsx("div",{className:"graph-tree-loader",children:He.jsx(Tv,{})}),He.jsx("div",{className:"operation-graph-container",ref:e}),He.jsx("aside",{className:"aside",children:"Scroll to zoom. Drag to pan. Click a node to see operation details."})]})},lce=({tensor:t})=>He.jsxs("div",{className:"tensor-details",children:[He.jsx("h3",{children:oy(t.shape)}),He.jsx("div",{children:t.dtype}),He.jsx("div",{children:t.layout}),He.jsx("div",{children:t.buffer_type!==null&&Lh[t.buffer_type]}),He.jsx("div",{children:t.operationIdentifier&&[t.operationIdentifier]}),t!=null&&t.memory_config?Object.entries(t.memory_config).map(([r,e])=>He.jsx("table",{children:He.jsx("tbody",{children:He.jsx(LW,{header:r,value:e},r)})},r)):null]}),crr=()=>{const{data:t,isLoading:r}=yg(),{operationId:e}=ade(),n=Ko(z3);U3();const a=bt.useMemo(()=>n?t==null?void 0:t.filter(u=>n[0]&&u.id<=n[1]):t,[t,n]);return He.jsxs("div",{className:"data-padding",children:[He.jsx(kA,{title:"GraphTree"}),r||a===void 0||a.length===0?He.jsx("div",{className:"graph-tree-loader",children:He.jsx(Tv,{})}):He.jsx(urr,{operationList:a,operationId:e?parseInt(e,10):void 0})]})},M6=[{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"}],frr=["op_code","bound","total_percent","device_time","op_to_op_gap","cores","dram","dram_percent","flops","flops_percent","math_fidelity","high_dispatch"],uce=1,cce=5,fce=({data:t,comparisonData:r,filters:e,provideMatmulAdvice:n,hiliteHighDispatch:a,matches:u,highlightRows:o,normaliseData:f})=>{const{activeFilters:i}=DZ("math_fidelity",t||[]),{sortTableFields:s,changeSorting:d,sortingColumn:l,sortDirection:h}=VZ(null),y=SW(),{data:b}=yg(),C=bt.useMemo(()=>M6.filter(g=>g.filterable).map(g=>g.key),[]),m=bt.useMemo(()=>{let g=t;hce(e)&&C&&(g=g.filter(I=>!(e&&Object.entries(e).filter(([w,T])=>String(T).length).some(([w,T])=>!dce(I,w).toLowerCase().includes(T.toLowerCase()))))),(i==null?void 0:i.length)>0&&(g=g.filter(I=>(I==null?void 0:I.math_fidelity)!==null&&i.includes(I.math_fidelity)));const p=g.map(I=>({...I,id:I.id?parseInt(I.id,10):null,total_percent:I.total_percent?parseFloat(I.total_percent):null,device_time:I.device_time?parseFloat(I.device_time):null,op_to_op_gap:I.op_to_op_gap?parseFloat(I.op_to_op_gap):null,cores:I.cores?parseInt(I.cores,10):null,dram:I.dram?parseFloat(I.dram):null,dram_percent:I.dram_percent?parseFloat(I.dram_percent):null,flops:I.flops?parseFloat(I.flops):null,flops_percent:I.flops_percent?parseFloat(I.flops_percent):null}));return s(p)},[t,s,e,C,i]),c=bt.useMemo(()=>{let g=r||[];hce(e)&&C&&(g=g.filter(I=>!(e&&Object.entries(e).filter(([w,T])=>String(T).length).some(([w,T])=>!dce(I,w).toLowerCase().includes(T.toLowerCase()))))),(i==null?void 0:i.length)>0&&(g=g.filter(I=>(I==null?void 0:I.math_fidelity)!==null&&i.includes(I.math_fidelity)));const p=g.map(I=>({...I,id:I.id?parseInt(I.id,10):null,total_percent:I.total_percent?parseFloat(I.total_percent):null,device_time:I.device_time?parseFloat(I.device_time):null,op_to_op_gap:I.op_to_op_gap?parseFloat(I.op_to_op_gap):null,cores:I.cores?parseInt(I.cores,10):null,dram:I.dram?parseFloat(I.dram):null,dram_percent:I.dram_percent?parseFloat(I.dram_percent):null,flops:I.flops?parseFloat(I.flops):null,flops_percent:I.flops_percent?parseFloat(I.flops_percent):null}));return s(p)},[r,s,e,C,i]),v=[...M6.slice(0,uce),...y.length>0?[{label:"OP",key:"op",sortable:!0}]:[],...M6.slice(uce,cce),...a?[{label:"Slow",key:"high_dispatch"}]:[],...M6.slice(cce)];return He.jsxs("table",{className:"perf-table monospace",children:[He.jsx("thead",{children:He.jsx("tr",{children:v.map(g=>{const p=l===g.key?h===X1.ASC?X1.DESC:X1.ASC:h;return He.jsx("th",{className:"cell-header",children:g.sortable?He.jsxs(Ta,{onClick:()=>d(g.key)(p),variant:h5.MINIMAL,size:kG.SMALL,children:[He.jsx("span",{className:"header-label",children:g.label}),l===g.key?He.jsx(Hs,{className:_i({"is-active":l===g.key},"sort-icon"),icon:h===X1.ASC?Ti.CARET_DOWN:Ti.CARET_UP}):He.jsx(Hs,{className:_i("sort-icon"),icon:Ti.CARET_DOWN})]}):He.jsx("span",{className:"header-label no-button",children:g.label})},g.key)})})}),He.jsx("tbody",{children:m.map((g,p)=>He.jsxs(bt.Fragment,{children:[He.jsx("tr",{className:_i({"missing-data":o&&(g.missing||g.raw_op_code.includes("MISSING")),"added-data":o&&!g.missing&&(u==null?void 0:u.some(I=>parseInt(I.id,10)===parseInt(g.id,10)&&I.raw_op_code===g.raw_op_code)),"row-pattern":r&&f}),children:v.map(I=>He.jsx("td",{className:_i("cell",{"align-right":I.key==="math_fidelity"}),children:eq(g,I,b,e==null?void 0:e[I.key])},I.key))}),c[p]&&He.jsx("tr",{className:_i({"missing-data":o&&(g.missing||g.raw_op_code.includes("MISSING")),"added-data":o&&!g.missing&&(u==null?void 0:u.some(I=>parseInt(I.id,10)===parseInt(g.id,10)&&I.raw_op_code===g.raw_op_code)),"row-pattern":r&&f},"comparison-row"),children:v.map(I=>He.jsx("td",{className:_i("cell",{"align-right":I.key==="math_fidelity"}),children:frr.includes(I.key)&&c[p]&&(I.key!=="op_code"||I.key==="op_code"&&hrr(g.op_code))&&He.jsx(He.Fragment,{children:eq(c[p],I,b,e==null?void 0:e[I.key])})},I.key))}),n&&g.op_code.includes("Matmul")&&He.jsx("tr",{children:He.jsx("td",{colSpan:v.length,className:"cell advice",children:He.jsx("ul",{children:g==null?void 0:g.advice.map((I,A)=>He.jsx("li",{children:I},`advice-${A}`))})})})]},p))})]})};function hce(t){return t?Object.values(t).some(r=>r.length>0):!1}const dce=(t,r)=>{var n;return((n=t[r])==null?void 0:n.toString())||""},hrr=t=>t.toLowerCase().includes("matmul")||t.toLowerCase().includes("conv"),FS={id:"",advice:[],total_percent:"",bound:"",op_code:"MISSING",raw_op_code:"MISSING",device_time:"",op_to_op_gap:"",cores:"",dram:"",dram_percent:"",flops:"",flops_percent:"",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:""},Yb=[],R6="MISSING - ";function drr(t,r){Yb.length=0;const e=[],n=[];let a=0,u=0;for(;a<t.length&&u<r.length;){const o=t[a],f=r[u],i=o.raw_op_code,s=f.raw_op_code;if(i===s)e.push(o),n.push(f),a++,u++;else{const d=t.slice(a+1).findIndex(b=>b.raw_op_code===s),l=r.slice(u+1).findIndex(b=>b.raw_op_code===i),h=d>=0?a+1+d:null,y=l>=0?u+1+l:null;if(h!==null&&(y===null||h-a<=y-u))for(;a<h;)e.push(t[a]),n.push({...FS,op_code:`${R6} ${t[a].raw_op_code}`}),Yb.push(t[a]),a++;else if(y!==null)for(;u<y;)n.push(r[u]),e.push({...FS,op_code:`${R6} ${r[u].raw_op_code}`}),Yb.push(r[u]),u++;else e.push(o),n.push(f),a++,u++}}for(;a<t.length;)e.push(t[a]),n.push({...FS,op_code:`${R6} ${t[a].raw_op_code}`}),Yb.push(t[a]),a++;for(;u<r.length;)e.push(FS),n.push({...FS,op_code:`${R6} ${r[u].raw_op_code}`}),Yb.push(r[u]),u++;return[e,n]}const vce=[{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"}],vrr=({data:t,comparisonData:r})=>{const{getFilterOptions:e,updateFilters:n,activeFilters:a,FilterItem:u}=DZ("math_fidelity",t||[]),{sortTableFields:o,changeSorting:f,sortingColumn:i}=VZ(null),s=SW(),d=Ko(Uf),l=Ko(hy),[h,y]=bt.useState(!0),[b,C]=bt.useState(!1),[m,c]=bt.useState(!1),[v,g]=bt.useState(!1),[p,I]=bt.useState("perf-table-1"),[A,w]=bt.useState(!0),[T,E]=bt.useState(!0),x=bt.useMemo(()=>vce.filter(z=>z.filterable).map(z=>z.key),[]),[S,_]=bt.useState(Object.fromEntries(x.map(z=>[z,""]))),L=bt.useMemo(()=>(t==null?void 0:t.map(z=>{var D;const M=parseInt(z.op_to_op_gap,10),R=(D=s.find(O=>O.perfId===z.id))==null?void 0:D.opId;return{...z,high_dispatch:!!M&&M>6.5,op:R}}))||[],[t,s]),k=bt.useMemo(()=>(r==null?void 0:r.map(z=>{var D;const M=parseInt(z.op_to_op_gap,10),R=(D=s.find(O=>O.perfId===z.id))==null?void 0:D.opId;return{...z,high_dispatch:!!M&&M>6.5,op:R}}))||[],[r,s]),F=bt.useMemo(()=>{let z=L;grr(S)&&x&&(z=z.filter(R=>!(S&&Object.entries(S).filter(([O,j])=>String(j).length).some(([O,j])=>!prr(R,O).toLowerCase().includes(j.toLowerCase()))))),(a==null?void 0:a.length)>0&&(z=z.filter(R=>(R==null?void 0:R.math_fidelity)!==null&&a.includes(R.math_fidelity)));const M=z.map(R=>({...R,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}));return o(M)},[L,o,S,x,a]),N=(z,M)=>{_({...S,[z]:M??""})},P=bt.useMemo(()=>drr(L,k),[L,k]);return bt.useEffect(()=>{l||(E(!1),w(!1))},[l]),He.jsxs(He.Fragment,{children:[He.jsx(af,{className:"expand-button",label:h?"Merged device data":"Expanded device data",onChange:()=>y(!h),checked:h&&v,disabled:!v}),He.jsx(af,{className:"expand-button",label:"Show Matmul optimization analysis",onChange:()=>C(!b),checked:b}),He.jsx(af,{className:"expand-button",label:"Highlight high dispatch ops",onChange:()=>c(!m),checked:m}),He.jsx(af,{labelElement:He.jsx(_s,{content:"Tries to match up operations between the performance reports",children:He.jsxs(He.Fragment,{children:[He.jsx("span",{children:"Normalise performance data"}),He.jsx(Hs,{icon:Ti.SMALL_INFO_SIGN})]})}),onChange:()=>w(!A),checked:A,disabled:!l}),He.jsx(af,{labelElement:He.jsx(_s,{content:"Highlights rows where ops have been added or are missing after normalising the data",children:He.jsxs(He.Fragment,{children:[He.jsx("span",{children:"Highlight row difference"}),He.jsx(Hs,{icon:Ti.SMALL_INFO_SIGN})]})}),onChange:()=>E(!T),checked:T,disabled:!l||!A}),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:F.length!==(t==null?void 0:t.length)?`Showing ${F.length} of ${t==null?void 0:t.length} rows`:`Showing ${F.length} rows`})})]}),He.jsxs("div",{className:"filters",children:[x.map(z=>{var M;return He.jsx(kD,{onQueryChanged:R=>N(z,R),placeholder:`Filter ${(M=vce.find(R=>R.key===z))==null?void 0:M.label}`,searchQuery:(S==null?void 0:S[z])||""},z)}),He.jsx(epe,{items:t?e():[],placeholder:"Math fidelity filter...",onItemSelect:z=>n(z),selectedItems:a,itemRenderer:(z,M)=>u(String(z)),tagRenderer:z=>z,onRemove:z=>n(z),itemPredicate:(z,M)=>!z||String(M).toLowerCase().includes(z.toLowerCase()),noResults:He.jsx(AA,{disabled:!0,text:"No results.",roleStructure:"listoption"}),resetOnSelect:!0}),He.jsx(Ta,{onClick:()=>f(null)(null),variant:h5.OUTLINED,disabled:i===null,children:"Reset sort"})]}),He.jsxs(dW,{selectedTabId:p,onChange:I,renderActiveTabPanelOnly:!0,size:kG.LARGE,children:[He.jsx(gI,{id:"perf-table-1",title:d,icon:Ti.TH_LIST,panel:He.jsx(fce,{data:A?P[0]:L,comparisonData:A?P[1]:[],filters:S,provideMatmulAdvice:b,hiliteHighDispatch:m,matches:Yb,highlightRows:T,normaliseData:A})}),l&&(k!=null&&k.length)?He.jsx(gI,{id:"perf-table-2",title:l,icon:Ti.TH_LIST,panel:He.jsx(fce,{data:A?P[1]:k,comparisonData:A?P[0]:[],filters:S,provideMatmulAdvice:b,hiliteHighDispatch:m,matches:Yb,highlightRows:T,normaliseData:A})}):null]})]}),He.jsx("hr",{}),m&&q9e(L)]})};function grr(t){return t?Object.values(t).some(r=>r.length>0):!1}const prr=(t,r)=>{var n;return((n=t[r])==null?void 0:n.toString())||""},gce={grayskull:108,wormhole_b0:64};function mrr(t,r){const e=Math.max(...r.filter(n=>n.cores).map(n=>parseInt(n.cores??"0",10)));return e>gce[t]?e:gce[t]}const S$="#575757",E$="#575757",P2="#FFF";function Nw({chartData:t,configuration:r,title:e}){var u,o,f,i,s,d,l,h,y,b,C,m,c,v,g;const n={autosize:!0,paper_bgcolor:"transparent",plot_bgcolor:"transparent",showlegend:r.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:r.barMode,xaxis:{gridcolor:S$,linecolor:E$,color:P2,title:{font:{color:P2},text:(o=(u=r.xAxis)==null?void 0:u.title)==null?void 0:o.text},fixedrange:!0,zeroline:!1,range:(f=r.xAxis)==null?void 0:f.range,tickformat:(i=r.xAxis)==null?void 0:i.tickformat,hoverformat:(s=r.xAxis)==null?void 0:s.hoverformat},yaxis:{gridcolor:S$,linecolor:E$,color:P2,title:{standoff:20,font:{color:P2},text:(l=(d=r.yAxis)==null?void 0:d.title)==null?void 0:l.text},automargin:!0,fixedrange:!0,zeroline:!1,range:(h=r.yAxis)==null?void 0:h.range,tickformat:(y=r.yAxis)==null?void 0:y.tickformat,hoverformat:(b=r.yAxis)==null?void 0:b.hoverformat},yaxis2:{gridcolor:S$,linecolor:E$,color:P2,title:{standoff:20,font:{color:P2},text:(m=(C=r.yAxis2)==null?void 0:C.title)==null?void 0:m.text},overlaying:"y",side:"right",automargin:!0,fixedrange:!0,zeroline:!1,range:(c=r.yAxis2)==null?void 0:c.range,tickformat:(v=r.yAxis2)==null?void 0:v.tickformat,hoverformat:(g=r.yAxis2)==null?void 0:g.hoverformat}},a={displayModeBar:!1,displaylogo:!1,responsive:!0};return He.jsxs("div",{className:_i("chart-container",{"legend-instructions":r.showLegend}),children:[He.jsx("h3",{children:e}),He.jsx(BW,{className:"chart",data:t,layout:n,config:a,useResizeHandler:!0})]})}const s0=(t,r="",e="")=>t!==0?e:r,yrr=["#008BF8","#58B73B"],Arr=["#E27414","#E8C547"],M_=t=>yrr[t],p9=t=>Arr[t];function Crr({datasets:t=[]}){const r=Ko(Uf),e=Ko(hy),n=bt.useMemo(()=>t.map((u,o)=>({x:u==null?void 0:u.map(f=>f.cores),y:u==null?void 0:u.map(f=>f.device_time),mode:"markers",type:"scatter",name:s0(o,r,e),marker:{size:10,color:M_(o)},hovertemplate:"Cores: %{x}<br />Device Kernel Duration: %{y} ns"})),[t,e,r]),a={showLegend:!0,xAxis:{title:{text:"Core Count"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"}};return He.jsx(Nw,{title:"Device Kernel Duration vs Core Count",chartData:n,configuration:a})}function Irr({maxCores:t,datasets:r=[]}){const e=Ko(Uf),n=Ko(hy),a=r.reduce((i,s)=>Math.max(i,(s==null?void 0:s.length)||0),0),u=bt.useMemo(()=>r.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+1),y:i==null?void 0:i.map(d=>d.cores),type:"bar",hovertemplate:"Operation: %{x}<br />Cores: %{y}",name:s0(s,e,n),showlegend:!0,legendgroup:`group${s}`,marker:{color:M_(s)}})),[r,e,n]),o=bt.useMemo(()=>r.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+1),y:i==null?void 0:i.map(d=>d.device_time),yaxis:"y2",hovertemplate:"Operation: %{x}<br />Device Kernel Duration: %{y} ns",name:s0(s,e,n),showlegend:!0,legendgroup:`group${s}`,marker:{color:p9(s)}})),[r,e,n]),f={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(Nw,{title:"Core Count + Device Kernel Runtime",chartData:[...u,...o],configuration:f})}function brr({selectedOpCodes:t,datasets:r=[]}){const e=Ko(Uf),n=Ko(hy),a=r.flat(),u=bt.useMemo(()=>[...new Set(a==null?void 0:a.filter(s=>s.raw_op_code!==void 0).map(s=>s.raw_op_code))],[a]),o=bt.useMemo(()=>r.map((s,d)=>u.map(l=>{var h;return{x:[`Op Count ${r.length>1?`(${d+1})`:""}`],y:[s.filter(y=>y.raw_op_code===l).length/s.length],type:"bar",name:s0(d,e,n),hovertemplate:`${l}<br />%{y:.1%}`,marker:{color:(h=t.find(y=>y.opCode===l))==null?void 0:h.colour}}})),[r,u,t,e,n]),f=bt.useMemo(()=>r.map((s,d)=>u.map(l=>{var h;return{x:[`Runtime % ${r.length>1?`(${d+1})`:""}`],y:[s.filter(y=>y.raw_op_code===l).reduce(pce,0)/s.reduce(pce,0)],type:"bar",name:s0(d,e,n),hovertemplate:`${l}<br />%{y:.1%}`,marker:{color:(h=t.find(y=>y.opCode===l))==null?void 0:h.colour}}})),[r,u,t,e,n]),i={margin:{l:0,r:0,b:0,t:0},barMode:"stack",yAxis:{tickformat:".0%",range:[0,1]}};return He.jsx(Nw,{title:"Operation Count vs Runtime Contribution",chartData:[...o.flat(),...f.flat()],configuration:i})}const pce=(t,r)=>t+(r.device_time?parseInt(r.device_time,10):0),xrr=({filteredPerfData:t,comparisonData:r,maxCores:e,selectedOpCodes:n})=>{const a=[t,...r||[]].filter(u=>u.length>0);return He.jsxs("div",{className:"charts",children:[He.jsx(brr,{datasets:a,selectedOpCodes:n}),He.jsx(Irr,{datasets:a,maxCores:e}),He.jsx(Crr,{datasets:a})]})},wrr=25;function Trr({opCodeOptions:t,selectedOpCodes:r,updateOpCodes:e}){const[n,a]=bt.useState(!0),[u,o]=bt.useState(!1);bt.useEffect(()=>{r.length===0&&(a(!1),o(!1)),r.length>0&&r.length<t.length&&(a(!1),o(!0)),r.length===t.length&&(a(!0),o(!1))},[r,t]);const f=()=>{e(n?[]:t)},i=()=>n?"Deselect all":"Select all",s=d=>He.jsxs(He.Fragment,{children:[He.jsx("span",{className:"label",children:d.opCode.length>wrr?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(i3,{checked:n,indeterminate:u,id:"select-all",onChange:f,label:i()})}),t.sort((d,l)=>d.opCode.localeCompare(l.opCode)).map(d=>He.jsx("div",{className:"option",children:He.jsx(i3,{className:"label-container",checked:r.map(l=>l.opCode).includes(d.opCode),id:d.opCode,labelElement:s(d),onChange:()=>{const l=r.includes(d)?r.filter(h=>h!==d):[...r,d];e(l)}},d.opCode)},d.opCode))]})})}const _rr=["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 IX(t,r){const e=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(!cg(e)||!cg(n)||!cg(a))return 0;const u=n*1e3,o=e/u*(r/a);return cg(o)?o:0}function mce({datasets:t=[],maxCores:r}){const e=Ko(Uf),n=Ko(hy),a=bt.useMemo(()=>t.map((f,i)=>({x:f==null?void 0:f.map((s,d)=>d+1),y:f==null?void 0:f.map(s=>s.cores),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Cores: %{y}<extra></extra>",name:s0(i,e,n),legendgroup:`group${i}`,marker:{color:M_(i)}})),[t,e,n]),u=bt.useMemo(()=>t.map((f,i)=>({x:f==null?void 0:f.map((s,d)=>d+1),y:f==null?void 0:f.map(s=>IX(s,r)).filter(s=>s!==-1),yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:s0(i,e,n),legendgroup:`group${i}`,marker:{color:p9(i)}})),[t,e,n,r]),o={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,OW(t)]},yAxis:{title:{text:"Core Count"},tickformat:"d",hoverformat:",.2r",range:[0,r]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Nw,{title:"Core Count + Utilization",chartData:[...a,...u],configuration:o})}const Srr={autosize:!0,paper_bgcolor:"transparent",margin:{l:50,r:50,b:50,t:50},showlegend:!1};function yce({reportTitle:t,data:r=[],opCodes:e,className:n=""}){const a=bt.useMemo(()=>[...new Set(r==null?void 0:r.filter(o=>o.raw_op_code!==void 0).map(o=>o.raw_op_code))],[r]),u=bt.useMemo(()=>({values:a.map(o=>r.filter(f=>f.raw_op_code===o).length),labels:[...a],type:"pie",textinfo:"percent",hovertemplate:"%{label}<br />Count: %{value}<extra></extra>",marker:{colors:a.map(o=>{var f;return(f=e.find(i=>i.opCode===o))==null?void 0:f.colour})},outsidetextfont:{color:"white"}}),[r,e,a]);return He.jsxs("div",{className:_i("operation-types-chart",n),children:[He.jsx("h3",{children:"Operation Types"}),He.jsx("p",{children:t}),He.jsx(BW,{className:"chart",data:[u],layout:Srr,config:lFe,useResizeHandler:!0})]})}const Ace=()=>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 Cce({datasets:t=[],maxCores:r}){const e=Ko(Uf),n=Ko(hy),a=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+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:s0(s,e,n),legendgroup:`group${s}`,marker:{color:M_(s)}})),[t,e,n]),u=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+1),y:(i==null?void 0:i.map(d=>IX(d,r)).filter(d=>d!==-1))??[],yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:s0(s,e,n),legendgroup:`group${s}`,marker:{color:p9(s)}})),[t,r,e,n]),o=Math.max(...a.flatMap(i=>i.y??[])),f={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{range:[0,OW(t)],title:{text:"Operation"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,o]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Nw,{title:"Device Kernel Duration + Utilization",chartData:[...a,...u],configuration:f})}function Ice({datasets:t,maxCores:r}){const e=Ko(Uf),n=Ko(hy),a=bt.useMemo(()=>t.map((o,f)=>({x:o==null?void 0:o.map(i=>i.device_time),y:o==null?void 0:o.map(i=>IX(i,r)).filter(i=>i!==-1),mode:"markers",type:"scatter",name:s0(f,e,n),marker:{size:10,color:M_(f)},hovertemplate:"Duration: %{x} ns<br />Utilization: %{y}"})),[t,r,e,n]),u={showLegend:!0,xAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"},yAxis:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%"}};return He.jsx(Nw,{title:"Utilization vs Device Kernel Duration",chartData:a,configuration:u})}function bce({datasets:t=[]}){const r=Ko(Uf),e=Ko(hy),n=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+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:s0(s,r,e),legendgroup:`group${s}`,marker:{color:M_(s)}})),[t,r,e]),a=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+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:s0(s,r,e),legendgroup:`group${s}`,marker:{color:p9(s)}})),[t,r,e]),u=Math.max(...t.flatMap(i=>i.map(s=>parseFloat(s.device_time)*1e3))),o=Math.max(...t.flatMap(i=>i.map(s=>parseFloat(s.pm_ideal_ns)))),f={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,OW(t)]},yAxis:{title:{text:"Time (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,Math.max(u,o)]}};return He.jsx(Nw,{title:"Device Time + Ideal Time",chartData:[...n,...a],configuration:f})}const Err=({chartData:t,secondaryData:r=[],maxCores:e,opCodeOptions:n})=>{const a=Ko(Uf),u=Ko(hy),o=[t,...r||[]].filter(s=>s.length>0),f=bt.useMemo(()=>o.map(s=>s.filter(d=>d.raw_op_code.toLowerCase().includes("matmul"))),[o]),i=bt.useMemo(()=>o.map(s=>s.filter(d=>d.raw_op_code.toLowerCase().includes("conv"))),[o]);return He.jsxs("div",{className:"charts",children:[He.jsx("h2",{children:"Matmul operations"}),f.filter(s=>s.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(mce,{datasets:f,maxCores:e}),He.jsx(bce,{datasets:f}),He.jsx(Cce,{datasets:f,maxCores:e}),He.jsx(Ice,{datasets:f,maxCores:e})]}):He.jsx(Ace,{}),He.jsx("h2",{children:"Conv operations"}),i.filter(s=>s.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(mce,{datasets:i,maxCores:e}),He.jsx(bce,{datasets:i}),He.jsx(Cce,{datasets:i,maxCores:e}),He.jsx(Ice,{datasets:i,maxCores:e})]}):He.jsx(Ace,{}),He.jsx("h2",{children:"All operations"}),He.jsxs("div",{className:"operation-types-charts",children:[a&&He.jsx(yce,{className:"flex-chart",reportTitle:u?a:"",data:t,opCodes:n}),u&&He.jsx(yce,{className:"flex-chart",reportTitle:a?u:"",data:r[0],opCodes:n})]})]})};function Mrr(){var T;const[t,r]=Xl(hy),e=Ko(Uf),[n,a]=Xl(fge),{data:u,isLoading:o}=L8e(),{data:f,isLoading:i}=PD(e),{data:s}=O8e(t),{data:d}=Xge(),l=jge();U3();const h=bt.useMemo(()=>Array.from(new Set([...(f==null?void 0:f.map(x=>x.raw_op_code).filter(x=>x!==void 0))||[],...(s==null?void 0:s.map(x=>x.raw_op_code).filter(x=>x!==void 0))||[]])).map((x,S)=>({opCode:x,colour:_rr[S]})),[f,s]),[y,b]=bt.useState("tab-1"),[C,m]=bt.useState([]),[c,v]=bt.useState([]),[g,p]=bt.useState(h);bt.useEffect(()=>{t===e&&r(null)},[t,e,r]),bt.useEffect(()=>{t&&l&&a([l[0],l[1]])},[t,a,l]),bt.useEffect(()=>{v((s==null?void 0:s.filter(E=>g.length?g.map(x=>x.opCode).includes(E.raw_op_code??""):!1))||[])},[g,s]),bt.useEffect(()=>{m((f==null?void 0:f.filter(E=>g.length?g.map(x=>x.opCode).includes(E.raw_op_code??""):!1))||[])},[g,f]),bt.useEffect(()=>{p(h)},[h]);const I=bt.useMemo(()=>!t&&n&&C.length>0?C.filter(E=>{const x=parseInt(E==null?void 0:E.id,10);return x>=n[0]&&x<=n[1]}):C,[n,C,t]);if(i||o)return He.jsx(Tv,{});const A=((T=u==null?void 0:u.deviceMeta)==null?void 0:T.architecture)??FO.WORMHOLE,w=f?mrr(A,f):0;return He.jsxs("div",{className:"performance data-padding",children:[He.jsx(kA,{title:"Performance"}),He.jsx("h1",{className:"page-title",children:"Performance analysis"}),d?He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Compare"}),subLabel:"Select a performance report to compare",children:He.jsxs("div",{className:"folder-selection",children:[He.jsx(sH,{items:d.filter(E=>E.reportName!==e),value:t,handleSelect:E=>r(E.reportName)}),He.jsx(Ta,{className:"clear-selection",variant:h5.OUTLINED,icon:Ti.CROSS,onClick:()=>r(null)})]})}):He.jsx(Tv,{}),He.jsxs(dW,{id:"performance-tabs",selectedTabId:y,onChange:b,renderActiveTabPanelOnly:!0,size:kG.LARGE,children:[He.jsx(gI,{id:"tab-1",title:"Table",icon:Ti.TH,panel:He.jsx(vrr,{data:I,comparisonData:c})}),He.jsx(gI,{id:"tab-2",title:"Charts",icon:Ti.TIMELINE_AREA_CHART,panel:He.jsxs("div",{className:"chart-tab",children:[He.jsxs("p",{children:[He.jsx("strong",{children:"Arch:"})," ",A]}),He.jsxs("p",{children:[He.jsx("strong",{children:"Cores:"})," ",w]}),f?He.jsxs(He.Fragment,{children:[He.jsxs("div",{className:"charts-container",children:[He.jsx(Trr,{opCodeOptions:h,selectedOpCodes:g,updateOpCodes:p}),He.jsx(xrr,{filteredPerfData:I,comparisonData:[c],maxCores:w,selectedOpCodes:g})]}),He.jsxs("div",{className:"charts-container non-filterable-charts",children:[He.jsx("span",{}),He.jsx("div",{children:He.jsx(Err,{chartData:I,secondaryData:[s||[]],maxCores:w,opCodeOptions:h})})]})]}):null]})})]})]})}const Rrr={[Wo.IDLE]:Ti.DOT,[Wo.PROGRESS]:Ti.DOT,[Wo.FAILED]:Ti.CROSS,[Wo.OK]:Ti.TICK},Prr={[Wo.IDLE]:lo.NONE,[Wo.PROGRESS]:lo.WARNING,[Wo.FAILED]:lo.DANGER,[Wo.OK]:lo.SUCCESS},Lrr=()=>{const[t,r]=bt.useState(null),{uploadNpeFile:e}=Kge(),[n,a]=Xl(AD),[u,o]=bt.useState(Wo.IDLE),f=async i=>{var l,h,y,b;if(r("Uploading..."),o(Wo.PROGRESS),!i.target.files)return;const s=(l=i.target.files)==null?void 0:l[0],d=await e(i.target.files);if(d.status!==200)o(Wo.FAILED),r((h=d==null?void 0:d.data)==null?void 0:h.message);else if(((y=d==null?void 0:d.data)==null?void 0:y.status)!==Wo.OK)o(Wo.FAILED),r((b=d==null?void 0:d.data)==null?void 0:b.message);else{const C=s.name;a(C),B1("Active NPE",C),o(Wo.OK),r(`${C} uploaded successfully`)}};return He.jsxs("div",{className:"npe-file-loader",children:[He.jsx(Lve,{text:n??"Choose file...",onInputChange:f}),He.jsx("div",{className:`verify-connection-item status-${Wo[u]}`,children:u?He.jsxs(He.Fragment,{children:[He.jsx(Hs,{className:"connection-status-icon",icon:Rrr[u],size:20,intent:Prr[u]}),He.jsx("span",{className:"connection-status-text",children:t})]}):null})]})},zS={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 F0=(t=>(t.NOC0="NOC0",t.NOC1="NOC1",t))(F0||{}),k1=(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))(k1||{}),ms=(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))(ms||{});const M$=({width:t,height:r,data:e,isMulticolor:n=!1,style:a})=>{const o=new Map,f=new Map,i=e.filter((d,l,h)=>l===h.findIndex(y=>y.nocId===d.nocId&&y.color===d.color));i.forEach(d=>{if(!o.has(d.nocId))o.set(d.nocId,1);else{const l=o.get(d.nocId);o.set(d.nocId,l+1)}}),o.forEach((d,l)=>{f.set(l,[5,(d-1)*5])});const s=[];return He.jsx("svg",{width:t,height:r,style:a,"aria-description":i.map(d=>d.nocId).join(","),children:He.jsx("g",{children:i.map((d,l)=>{const h=s.find(b=>b.nocId===d.nocId),y=h?h.counter:0;return h?h.counter+=1:s.push({nocId:d.nocId,counter:1}),He.jsxs(bt.Fragment,{children:[He.jsx("line",{x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,stroke:d.color,strokeWidth:1,...n?{strokeDasharray:f.get(d.nocId).join(",")}:{},...n?{strokeDashoffset:y*f.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"})]},`${l}-${d.x1}-${d.y1}-${d.x2}-${d.y2}`)})})})},Q5=50,rh={x:25,y:Q5-25},DTe=5,Ob=-5,kb=-5,Db=DTe,Nb=DTe,hC={x:Q5-10,y:10},Av=2,xce=["#FFFFFF","#FF0000","#0000FF","#FFFF00","#FF00FF","#FF4500","rgb(91,131,19)","#9400D3","#FFD700","#1E90FF","#007500","#FF69B4","#BA55D3","#7FFF00","#B22222"];function*Orr(){let t=0;for(;;)yield xce[t],t=(t+1)%xce.length}const krr=Orr(),zL=new Map,NTe=t=>(zL.has(t)||zL.set(t,krr.next().value),zL.get(t)||"#ffffff"),Drr=()=>{zL.clear()},FTe=(t,r)=>{let e=0,n=0,a=0,u=0,o=9,f=9,i="",s=0,d=0,l={p1:"",p2:"",p3:""};switch(t){case k1.NOC1_NORTH:d=0,e=rh.x+Db,a=rh.y+Nb,n=rh.x+Db,u=0,l={p1:`${n-f/2},${u+o+d}`,p2:`${n+f/2},${u+o+d}`,p3:`${n},${u+d}`};break;case k1.NOC1_WEST:d=0,e=rh.x+Db,n=0,a=rh.y+Nb,u=rh.y+Nb,l={p1:`${n+o+d},${u-f/2}`,p2:`${n+o+d},${u+f/2}`,p3:`${n+d},${u}`};break;case k1.NOC0_SOUTH:d=2,e=rh.x+Ob,n=rh.x+Ob,a=rh.y+kb,u=Q5,l={p1:`${n-f/2},${u-o-d}`,p2:`${n+f/2},${u-o-d}`,p3:`${n},${u-d}`};break;case k1.NOC0_EAST:d=2,e=rh.x+Ob,n=Q5,a=rh.y+kb,u=rh.y+kb,l={p1:`${n-o-d},${u-f/2}`,p2:`${n-o-d},${u+f/2}`,p3:`${n-d},${u}`};break;case k1.NOC0_OUT:f=7,o=7,d=2,e=rh.x+Ob-Av,n=hC.x+Ob-Av,a=rh.y+kb-Av,u=hC.y+kb-Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break;case k1.NOC0_IN:f=7,o=7,d=2,e=hC.x+Ob+Av,n=rh.x+Ob+Av,u=rh.y+kb+Av,a=hC.y+kb+Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break;case k1.NOC1_OUT:f=7,o=7,d=0,e=rh.x+Db-Av,n=hC.x+Db-Av,a=rh.y+Nb-Av,u=hC.y+Nb-Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break;case k1.NOC1_IN:f=7,o=7,d=0,e=hC.x+Db+Av,n=rh.x+Db+Av,u=rh.y+Nb+Av,a=hC.y+Nb+Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break}return{x2:n,y2:u,x1:e,y1:a,arrow:l,transform:i,color:r,nocId:t}},SC=(t,r=0,e=!1)=>{if(t===-1)return"rgb(100, 100, 100)";const n=150,u=(Math.min(t,n)-r)/(n-r),o=Math.round(u*255);return e?`rgb(${o},${o},${255-o})`:`rgb(${o}, ${255-o}, 0)`},wce=t=>t.map(r=>FTe(r.nocId,NTe(r.transfer))),Nrr=({timestepList:t,canvasWidth:r,nocType:e=null})=>{const n=bt.useRef(null),a=30,[u,o]=bt.useState(null),f=bt.useMemo(()=>({worst:t.map(d=>{if(e){const y=Math.max(-1,...d.link_demand.filter(C=>C[ms.NOC_ID].indexOf(e)===0).map(C=>C[ms.DEMAND])),b=SC(y);return{value:y,color:b}}const l=Math.max(-1,...d.link_demand.map(y=>y[ms.DEMAND])),h=SC(l);return{value:l,color:h}}),utilization:t.map(d=>{if(e){const l=d.noc[e];if(l)return{value:l.avg_link_util,color:SC(l.avg_link_util)}}return{value:d.avg_link_util,color:SC(d.avg_link_util)}}),demand:t.map(d=>{if(e){const h=d.noc[e];if(h)return{value:h.avg_link_demand,color:SC(h.avg_link_demand)}}const l=SC(d.avg_link_demand);return{value:d.avg_link_demand,color:l}})}),[e,t]);bt.useEffect(()=>{const d=n.current,l=d==null?void 0:d.getContext("2d");if(!d||!l)return;l.clearRect(0,0,d.width,d.height);const h=d.width/f.worst.length;f.worst.forEach(({color:y},b)=>{l.fillStyle=y,l.fillRect(b*h,0,h,d.height/3)}),f.utilization.forEach(({color:y},b)=>{l.fillStyle=y,l.fillRect(b*h,d.height/3,h,d.height/3*2)}),f.demand.forEach(({color:y},b)=>{l.fillStyle=y,l.fillRect(b*h,d.height/3*2,h,d.height)})},[f,r,a]);const i=d=>{const l=n.current;if(l){const h=l.getBoundingClientRect(),y=d.clientX-h.left,b=h.width/f.worst.length,C=Math.floor(y/b);C>-1?o({x:y,y:0,text:He.jsxs("div",{children:[e!==void 0&&He.jsxs("div",{children:["Selected ",e]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:f.worst[C].color}})," ","Max Demand:"," ",f.worst[C].value>-1?`${f.worst[C].value.toFixed(3)} %`:"N/A"]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:f.utilization[C].color}}),` Avg Utilization: ${f.utilization[C].value.toFixed(3)} %`]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:f.demand[C].color}}),` Avg Demand: ${f.demand[C].value.toFixed(3)} %`]})]})}):(n.current&&(n.current.style.cursor="default"),o(null))}},s=()=>{o(null)};return He.jsxs(He.Fragment,{children:[u&&He.jsx(_s,{content:u.text,position:sl.TOP,hoverOpenDelay:0,hoverCloseDelay:0,isOpen:!0,usePortal:!0,minimal:!0,modifiers:{offset:{enabled:!0,options:{offset:[u.x,a*1.5]}}},children:He.jsx("div",{style:{position:"absolute",top:0,left:`${u.x}px`,width:"0",height:"0",backgroundColor:"red",zIndex:100}})}),He.jsx("canvas",{style:{width:"100%",height:`${a}px`},ref:n,width:r,height:a,onMouseMove:i,onMouseLeave:s})]})},Frr=({groupedTransfersByNoCID:t,selectedNode:r,showActiveTransfers:e,highlightedTransfer:n,setHighlightedTransfer:a,congestionData:u,nocType:o})=>He.jsx("div",{className:"side-data",children:Object.keys(t).length!==0&&He.jsxs(He.Fragment,{children:[He.jsxs("h3",{children:["Active transfers through ",r==null?void 0:r.coords.join("-"),He.jsx(Ta,{variant:"minimal",icon:Ti.CROSS,onClick:()=>e(null)})]}),Object.entries(t).map(([f,i])=>{const s=u.find(l=>l[ms.NOC_ID]===f),d=s?s[ms.DEMAND]:0;return He.jsxs("div",{className:"local-transfer-ctn",children:[He.jsxs("h4",{children:["NOC ID: ",f,He.jsx("span",{className:"color-square",style:{backgroundColor:SC(d)}}),d.toFixed(2)]}),i.map(l=>He.jsxs("div",{className:"local-transfer",style:{opacity:n===null||n===l?1:.25},onMouseOver:()=>a(l),onMouseOut:()=>a(null),children:[He.jsx("div",{className:"color-square",style:{backgroundColor:NTe(l.id)}}),l.id,He.jsxs("div",{children:[He.jsx("span",{className:"transfer-src",children:l.src.join("-")})," ",He.jsx(Hs,{size:12,icon:Ti.ArrowRight})," ",He.jsx("span",{className:"transfer-dst",children:l.dst.length===1?l.dst[0].join("-"):`${l.dst[0].join("-")} - ${l.dst[l.dst.length-1].join("-")}`})]}),He.jsxs("div",{children:[Mh(l.total_bytes),"B"]}),He.jsx("div",{children:l.noc_event_type}),He.jsx("div",{children:He.jsxs("div",{className:"route",children:[l.route[0].injection_rate.toFixed(2)," b/cycle"]})})]},l.id))]},f)})]})}),zrr=({info:t,numTransfers:r})=>{const e=u=>zS[u]!==void 0&&zS[u]!==null,n=(u,o)=>{if(!zS[u])return null;const i=zS[u],s=i.units,d=i.decimals!==void 0?i.decimals:2;return`${typeof o=="number"?Number(o).toFixed(d):o} ${s}`},a=u=>{const o=zS[u];if(!o)return null;const{label:f,description:i}=o;return He.jsx(_s,{content:i,children:f?`${f}: `:u})};return He.jsx("div",{className:"metadata",children:He.jsxs(DD,{label:He.jsx("h3",{className:"title",children:"Run summary"}),isOpen:!0,children:[He.jsx("div",{children:t&&Object.keys(t).map(u=>e(u)&&t[u]!==void 0?He.jsxs("div",{children:[He.jsxs("span",{children:[a(u),": "]}),He.jsx("span",{children:n(u,t[u])})]},u):null)}),He.jsx("hr",{}),He.jsxs("div",{children:[He.jsx("span",{children:"Active transfers:"}),He.jsx("span",{children:r})]})]})})},Brr=({id:t,width:r,height:e,cores:n,dram:a,eth:u,pcie:o,showActiveTransfers:f,isAnnotatingCores:i,TENSIX_SIZE:s})=>{const d=l=>{const[h,y]=l;return n!=null&&n.some(b=>b[0]===h&&b[1]===y)?He.jsx("div",{className:"node-type-label node-type-c",children:"T"}):a!=null&&a.some(b=>b[0]===h&&b[1]===y)?He.jsx("div",{className:"node-type-label node-type-d",children:"d"}):u!=null&&u.some(b=>b[0]===h&&b[1]===y)?He.jsx("div",{className:"node-type-label node-type-e",children:"e"}):o!=null&&o.some(b=>b[0]===h&&b[1]===y)?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(${r||0}, ${s}px)`,gridTemplateRows:`repeat(${e||0}, ${s}px)`},children:[He.jsx("div",{className:"chip-id",children:t}),Array.from({length:r}).map((l,h)=>Array.from({length:e}).map((y,b)=>He.jsx("div",{className:"tensix empty-tensix",onClick:()=>f(null),style:{gridColumn:h+1,gridRow:b+1,width:`${s}px`,height:`${s}px`},children:i?d([b,h]):""},`${h}-${b}`)))]})},$rr=({transfer:t,clusterChip:r,index:e,getOriginOpacity:n})=>He.jsxs(He.Fragment,{children:[t.src&&r.id===t.src[ms.CHIP_ID]&&He.jsx("div",{className:"tensix src-dst src",style:{gridColumn:t.src[ms.X]+1,gridRow:t.src[ms.Y]+1,opacity:n(t)}},`${t.id}-src-${e}`),t.dst.map(a=>{var o;const u=((o=t.src)==null?void 0:o.toString())===a.toString()?"both":"dst";return r.id===a[ms.CHIP_ID]?He.jsx("div",{className:_i("tensix src-dst",u),style:{gridColumn:a[ms.X]+1,gridRow:a[ms.Y]+1,opacity:n(t)}},`${t.id}-dst-${e}-${a[ms.Y]}-${a[ms.X]}`):null})]}),Urr=25,Tce=25,D1=Q5,L2=D1,_ce=1,Sce=2,Hrr=({npeData:t})=>{var me,pe;const[r,e]=bt.useState(null),[n,a]=bt.useState(0),u=t.timestep_data[n],o=t.noc_transfers.filter(se=>u==null?void 0:u.active_transfers.includes(se.id)),[f,i]=bt.useState(null),[s,d]=bt.useState([]),[l,h]=bt.useState(null),[y,b]=bt.useState(0);let C=0;const[m,c]=bt.useState(.75),v=Object.entries(t.chips).map(([se,ne])=>(C=Math.max(C,ne[tg.X]),{id:parseInt(se,10),coords:ne})),[g,p]=bt.useState(!1),[I,A]=bt.useState(!0),[w,T]=bt.useState(null),E=se=>{T(w===void 0?se===F0.NOC0?F0.NOC1:F0.NOC0:w!==se?null:se===F0.NOC0?F0.NOC1:F0.NOC0)},[x,S]=bt.useState(window.innerWidth);bt.useEffect(()=>{const se=()=>S(window.innerWidth);return window.addEventListener("resize",se),()=>window.removeEventListener("resize",se)},[]);const{architecture:_,cores:L,dram:k,eth:F,pcie:N}=D8e(t.common_info.arch),P=((me=_.grid)==null?void 0:me.x_size)||10,z=((pe=_.grid)==null?void 0:pe.y_size)||12;bt.useEffect(()=>{Drr(),g&&re()},[n,g]),bt.useEffect(()=>{O(),a(0),h(null),d([]),e(null)},[t]);const M=bt.useMemo(()=>{const se=new Map;return s.forEach(ne=>{ne.route.forEach(J=>{J.links.forEach(ue=>{const[he,le,ee]=ue,ve=se.get(he)||[];ve[le]=ve[le]||[],ve[le][ee]=ve[le][ee]||[],ve[le][ee].push({transfer:ne.id,nocId:ue[ms.NOC_ID]}),se.set(he,ve)})})}),se},[s]),R=bt.useMemo(()=>{if(!(l!=null&&l.coords))return{};const[se,ne,J]=l.coords,ue={};return s.forEach(he=>{he.route.forEach(le=>{le.links.forEach(ee=>{const[ve,de,Ae]=ee;if(ne===de&&J===Ae&&se===ve){const be=ee[ms.NOC_ID];ue[be]||(ue[be]=[]),ue[be].push(he)}})})}),ue},[s,l]),D=(se=_ce)=>{b(se),clearInterval(f);const ne=t.timestep_data.length,J=setInterval(()=>{a(ue=>ue<ne-1?ue+1:0)},100/se);i(J)},O=()=>(b(0),clearInterval(f)),j=()=>{D()},G=()=>{D(Sce)},W=()=>{O()},X=()=>{O();const se=t.timestep_data.length;h(null),d([]),a(ne=>ne>0?ne-1:se-1)},Y=()=>{O(),h(null),d([]);const se=t.timestep_data.length;a(ne=>ne<se-1?ne+1:0)},Q=se=>{O(),a(se),h(null),d([])},H=(se,ne)=>{if(K(),se===null){d([]),h(null);return}if((l==null?void 0:l.index)===ne){h(null),d([]);return}ne!==void 0&&h({index:ne,coords:[se[ms.CHIP_ID],se[ms.Y],se[ms.X]]}),W();const J=t.timestep_data[n].active_transfers.map(ue=>{var ee;const he=t.noc_transfers.find(ve=>ve.id===ue),le=(ee=he==null?void 0:he.route)==null?void 0:ee.map(ve=>ve.links.some(de=>de[ms.Y]===se[ms.Y]&&de[ms.X]===se[ms.X]&&(w===null||de[ms.NOC_ID].indexOf(w)===0))?ve:null).filter(ve=>ve!==null);if(le&&le.length>0)return he}).filter(ue=>ue!==void 0);d(J)},K=()=>{p(!1),d([])},re=()=>{p(!0),h(null);const se=t.timestep_data[n].active_transfers.map(ne=>t.noc_transfers.find(J=>J.id===ne)).filter(ne=>ne!==void 0);d(se)},oe=se=>{if(g)return 0;if(r!==null&&r.id===se.id)return 1;if(r!==null)return .15;if(s.length===0)return 0;const ne=s.some(J=>J.id===se.id);return s.length!==0&&!ne?.15:.5},ce=x-x/t.timestep_data.length-Tce;return He.jsxs("div",{className:"npe",children:[He.jsx(zrr,{info:t.common_info,numTransfers:o.length}),He.jsxs("div",{className:"header",children:[He.jsxs(ay,{className:"npe-controls",children:[He.jsx(Ta,{icon:Ti.StepBackward,onClick:X}),He.jsx(Ta,{icon:Ti.Play,intent:y===_ce?lo.PRIMARY:lo.NONE,onClick:j}),He.jsx(Ta,{icon:Ti.FastForward,onClick:G,intent:y===Sce?lo.PRIMARY:lo.NONE}),He.jsx(Ta,{icon:Ti.STOP,onClick:W}),He.jsx(Ta,{icon:Ti.StepForward,onClick:Y}),"|",He.jsx(af,{label:"Show all active transfers",checked:g,onChange:()=>g?K():re()}),He.jsx(af,{label:"Annotate cores",checked:I,onChange:()=>A(!I)}),He.jsx(af,{label:"NOC0",checked:w===F0.NOC0||w===null,onChange:()=>E(F0.NOC0)}),He.jsx(af,{label:"NOC1",checked:w===F0.NOC1||w===null,onChange:()=>E(F0.NOC1)}),"|",He.jsxs("label",{children:["Zoom",He.jsx(jU,{"aria-label":"zoom",min:.1,max:2,stepSize:.1,labelStepSize:1,value:m,onChange:se=>c(se),labelRenderer:se=>`${se.toFixed(1)}`})]})]}),He.jsxs("div",{style:{position:"relative",width:`${ce}px`},children:[He.jsx(jU,{min:0,max:t.timestep_data.length-1,stepSize:1,labelStepSize:t.timestep_data.length>Urr?t.timestep_data.length/20:1,value:n,onChange:se=>Q(se)}),He.jsx("div",{className:"bp5-slider-progress duplicate",style:{width:`${x-Tce}px`}})]}),He.jsx(Nrr,{timestepList:t.timestep_data,canvasWidth:x,nocType:w})]}),He.jsxs("div",{className:"split-grid",children:[He.jsx("div",{className:_i("chip-cluster-wrap",{"details-open":l!==null}),style:{gridTemplateColumns:`repeat(${C||0}, ${(D1+1)*P}px)`,zoom:m},children:v.map(se=>{var ne;return He.jsxs("div",{className:"chip",style:{gridColumn:se.coords[tg.X]+1,gridRow:se.coords[tg.Y]+1},children:[He.jsx(Brr,{id:se.id,width:P,height:z,cores:L,dram:k,eth:F,pcie:N,showActiveTransfers:H,isAnnotatingCores:I,TENSIX_SIZE:D1}),He.jsxs("div",{className:"tensix-grid congestion",style:{display:"grid",gridTemplateColumns:`repeat(${P}, ${D1}px)`,gridTemplateRows:`repeat(${z}, ${D1}px)`},children:[o.map((J,ue)=>He.jsx($rr,{transfer:J,clusterChip:se,index:ue,getOriginOpacity:oe},`${J.id}-${ue}`)),u==null?void 0:u.link_demand.map((J,ue)=>J[ms.CHIP_ID]===se.id&&(w===null||J[ms.NOC_ID].indexOf(w)===0)?He.jsxs("button",{type:"button",className:`tensix ${J[ms.Y]}-${J[ms.X]}`,style:{position:"relative",gridColumn:J[ms.X]+1,gridRow:J[ms.Y]+1},onClick:()=>H(J,ue),children:[He.jsx(M$,{style:{opacity:r!==null||s.length!==0?.15:1},width:L2,height:L2,data:[FTe(J[ms.NOC_ID],SC(J[ms.DEMAND]))],isMulticolor:!1}),He.jsxs("div",{style:{fontSize:"9px",position:"absolute",top:0},children:[J[ms.Y],"-",J[ms.X]]})]},`${ue}-${J[ms.Y]}-${J[ms.X]}-${J[ms.NOC_ID]}`):null)]}),He.jsx("div",{className:"tensix-grid transfers",style:{gridTemplateColumns:`repeat(${P}, ${D1}px)`,gridTemplateRows:`repeat(${z}, ${D1}px)`},children:(ne=M.get(se.id))==null?void 0:ne.map((J,ue)=>He.jsx(He.Fragment,{children:J.map((he,le)=>He.jsx("div",{className:(l==null?void 0:l.coords[ms.Y])===ue&&(l==null?void 0:l.coords[ms.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(M$,{style:{...r!==null?{opacity:.25}:{opacity:1}},width:L2,height:L2,data:wce(he),isMulticolor:!0})})},`selected-transfer-${ue}-${le}`))},`device-${se.id}-row-${ue}`))}),r!==null&&He.jsx("div",{className:"tensix-grid transfer-single",style:{gridTemplateColumns:`repeat(${P}, ${D1}px)`,gridTemplateRows:`repeat(${z}, ${D1}px)`},children:r==null?void 0:r.route.map(J=>J.links.map(ue=>ue[ms.CHIP_ID]===se.id?He.jsx("div",{className:"tensix",style:{position:"relative",gridColumn:ue[ms.X]+1,gridRow:ue[ms.Y]+1},children:He.jsx("div",{className:"transfer-render-ctn",children:He.jsx(M$,{width:L2,height:L2,data:wce([{transfer:r.id,nocId:ue[ms.NOC_ID]}]),isMulticolor:!1})})},`${ue[ms.Y]}-${ue[ms.X]}-${ue[ms.NOC_ID]}`):null))})]})})}),He.jsx(Frr,{groupedTransfersByNoCID:R,selectedNode:l,congestionData:u==null?void 0:u.link_demand.filter(se=>se[ms.Y]===(l==null?void 0:l.coords[ms.Y])&&se[ms.X]===(l==null?void 0:l.coords[ms.X])),showActiveTransfers:H,highlightedTransfer:r,setHighlightedTransfer:e,nocType:w})]})]})},mV=t=>{if(!t)return null;const r=/^(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?$/,e=t.match(r);if(!e)return null;const[,n,a,u,o]=e;return{major:parseInt(n,10),minor:parseInt(a,10),patch:parseInt(u,10),...o?{prerelease:o}:{}}},zTe="1.0.0",Ece=He.jsx("a",{target:"_blank",href:"https://github.com/tenstorrent/tt-npe",rel:"noreferrer",children:"tt-npe"}),jrr=()=>{const t=Ko(AD),{data:r,isLoading:e}=w8e(t);return He.jsxs(He.Fragment,{children:[He.jsx(kA,{title:"NPE"}),He.jsx("h1",{className:"page-title",children:"NOC performance estimator"}),He.jsx(Lrr,{}),e?He.jsx(Tv,{}):r?Vrr(r)?He.jsx(Hrr,{npeData:r}):He.jsxs(He.Fragment,{children:[He.jsxs("p",{children:["Invalid NPE data or version. Current supported version is ",zTe," got ",r.common_info.version||"null",";"]}),He.jsxs("p",{children:["Use ",Ece," to generate new NPE dataset",Mce(r.common_info.version)?He.jsxs(He.Fragment,{children:[" ","or install an older version of the visualizer"," ",He.jsxs("pre",{children:["pip install ttnn-visualizer==",Mce(r.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 ",Ece," for details on how to generate NPE files."]})]})]})},Vrr=t=>{if(!["common_info","noc_transfers","timestep_data"].every(u=>u in t))return!1;const n=mV(t.common_info.version);if(!n)return!1;const a=mV(zTe);return(n==null?void 0:n.major)===(a==null?void 0:a.major)},Mce=t=>{switch(mV(t)){case null:case void 0:return"0.32.3";default:return""}},BTe=[{index:!0,element:He.jsx(L9e,{})},{path:os.OPERATIONS,element:He.jsx(aNe,{})},{path:`${os.OPERATIONS}/:operationId`,element:He.jsx(Idt,{})},{path:os.TENSORS,element:He.jsx(Sdt,{})},{path:os.BUFFERS,element:He.jsx(fpt,{})},{path:os.STYLEGUIDE,element:He.jsx(vpt,{})},{path:`${os.GRAPHTREE}/:operationId?`,element:He.jsx(crr,{})},{path:os.PERFORMANCE,element:He.jsx(Mrr,{})},{path:os.NPE,element:He.jsx(jrr,{})},{path:os.CLUSTER,element:null}],Grr=cM({enter:"Toastify--animate Toastify__bounce-enter",exit:" no-toast-animation Toastify__bounce-exit",appendPosition:!0,collapseDuration:0,collapse:!0});function Wrr(){const t="0.37.0",r=qm(u0),e=qm(Uf),n=qm(AD),{data:a}=EW(),u=fy(),o=u.state;return bt.useEffect(()=>{var f,i,s;a!=null&&a.active_report&&(r(((f=a.active_report)==null?void 0:f.profiler_name)??null),e(((i=a.active_report)==null?void 0:i.performance_name)??null),n(((s=a.active_report)==null?void 0:s.npe_name)??null))},[a,r,e,n]),He.jsxs("div",{className:YT,children:[He.jsx(kA,{defaultTitle:"TT-NN Visualizer",titleTemplate:"%s | TT-NN Visualizer",children:He.jsx("meta",{charSet:"utf-8"})}),He.jsx("header",{className:"app-header",children:He.jsxs("nav",{className:"nav-container",children:[He.jsxs("a",{href:os.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($8e,{})]})}),He.jsxs("main",{children:[He.jsx(e9e,{routes:BTe}),u.pathname===os.CLUSTER&&(o==null?void 0:o.background)&&He.jsx(J8e,{}),He.jsx($Oe,{position:"top-right",autoClose:!1,newestOnTop:!1,closeOnClick:!0,closeButton:!1,theme:"light",transition:Grr})]}),He.jsx(W8e,{})]})}const l1=Object.create(null);l1.open="0";l1.close="1";l1.ping="2";l1.pong="3";l1.message="4";l1.upgrade="5";l1.noop="6";const BL=Object.create(null);Object.keys(l1).forEach(t=>{BL[l1[t]]=t});const yV={type:"error",data:"parser error"},$Te=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",UTe=typeof ArrayBuffer=="function",HTe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,bX=({type:t,data:r},e,n)=>$Te&&r instanceof Blob?e?n(r):Rce(r,n):UTe&&(r instanceof ArrayBuffer||HTe(r))?e?n(r):Rce(new Blob([r]),n):n(l1[t]+(r||"")),Rce=(t,r)=>{const e=new FileReader;return e.onload=function(){const n=e.result.split(",")[1];r("b"+(n||""))},e.readAsDataURL(t)};function Pce(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let R$;function Zrr(t,r){if($Te&&t.data instanceof Blob)return t.data.arrayBuffer().then(Pce).then(r);if(UTe&&(t.data instanceof ArrayBuffer||HTe(t.data)))return r(Pce(t.data));bX(t,!1,e=>{R$||(R$=new TextEncoder),r(R$.encode(e))})}const Lce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",aE=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Lce.length;t++)aE[Lce.charCodeAt(t)]=t;const Yrr=t=>{let r=t.length*.75,e=t.length,n,a=0,u,o,f,i;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);const s=new ArrayBuffer(r),d=new Uint8Array(s);for(n=0;n<e;n+=4)u=aE[t.charCodeAt(n)],o=aE[t.charCodeAt(n+1)],f=aE[t.charCodeAt(n+2)],i=aE[t.charCodeAt(n+3)],d[a++]=u<<2|o>>4,d[a++]=(o&15)<<4|f>>2,d[a++]=(f&3)<<6|i&63;return s},Xrr=typeof ArrayBuffer=="function",xX=(t,r)=>{if(typeof t!="string")return{type:"message",data:jTe(t,r)};const e=t.charAt(0);return e==="b"?{type:"message",data:Krr(t.substring(1),r)}:BL[e]?t.length>1?{type:BL[e],data:t.substring(1)}:{type:BL[e]}:yV},Krr=(t,r)=>{if(Xrr){const e=Yrr(t);return jTe(e,r)}else return{base64:!0,data:t}},jTe=(t,r)=>{switch(r){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},VTe="",Qrr=(t,r)=>{const e=t.length,n=new Array(e);let a=0;t.forEach((u,o)=>{bX(u,!1,f=>{n[o]=f,++a===e&&r(n.join(VTe))})})},Jrr=(t,r)=>{const e=t.split(VTe),n=[];for(let a=0;a<e.length;a++){const u=xX(e[a],r);if(n.push(u),u.type==="error")break}return n};function qrr(){return new TransformStream({transform(t,r){Zrr(t,e=>{const n=e.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 u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,n)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(a[0]|=128),r.enqueue(a),r.enqueue(e)})}})}let P$;function P6(t){return t.reduce((r,e)=>r+e.length,0)}function L6(t,r){if(t[0].length===r)return t.shift();const e=new Uint8Array(r);let n=0;for(let a=0;a<r;a++)e[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)),e}function enr(t,r){P$||(P$=new TextDecoder);const e=[];let n=0,a=-1,u=!1;return new TransformStream({transform(o,f){for(e.push(o);;){if(n===0){if(P6(e)<1)break;const i=L6(e,1);u=(i[0]&128)===128,a=i[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(P6(e)<2)break;const i=L6(e,2);a=new DataView(i.buffer,i.byteOffset,i.length).getUint16(0),n=3}else if(n===2){if(P6(e)<8)break;const i=L6(e,8),s=new DataView(i.buffer,i.byteOffset,i.length),d=s.getUint32(0);if(d>Math.pow(2,21)-1){f.enqueue(yV);break}a=d*Math.pow(2,32)+s.getUint32(4),n=3}else{if(P6(e)<a)break;const i=L6(e,a);f.enqueue(xX(u?i:P$.decode(i),r)),n=0}if(a===0||a>t){f.enqueue(yV);break}}}})}const GTe=4;function oh(t){if(t)return tnr(t)}function tnr(t){for(var r in oh.prototype)t[r]=oh.prototype[r];return t}oh.prototype.on=oh.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this};oh.prototype.once=function(t,r){function e(){this.off(t,e),r.apply(this,arguments)}return e.fn=r,this.on(t,e),this};oh.prototype.off=oh.prototype.removeListener=oh.prototype.removeAllListeners=oh.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+t];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,a=0;a<e.length;a++)if(n=e[a],n===r||n.fn===r){e.splice(a,1);break}return e.length===0&&delete this._callbacks["$"+t],this};oh.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),e=this._callbacks["$"+t],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(e){e=e.slice(0);for(var n=0,a=e.length;n<a;++n)e[n].apply(this,r)}return this};oh.prototype.emitReserved=oh.prototype.emit;oh.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};oh.prototype.hasListeners=function(t){return!!this.listeners(t).length};const m9=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,e)=>e(r,0),Wm=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),rnr="arraybuffer";function WTe(t,...r){return r.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const nnr=Wm.setTimeout,inr=Wm.clearTimeout;function y9(t,r){r.useNativeTimers?(t.setTimeoutFn=nnr.bind(Wm),t.clearTimeoutFn=inr.bind(Wm)):(t.setTimeoutFn=Wm.setTimeout.bind(Wm),t.clearTimeoutFn=Wm.clearTimeout.bind(Wm))}const anr=1.33;function onr(t){return typeof t=="string"?snr(t):Math.ceil((t.byteLength||t.size)*anr)}function snr(t){let r=0,e=0;for(let n=0,a=t.length;n<a;n++)r=t.charCodeAt(n),r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:(n++,e+=4);return e}function ZTe(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function lnr(t){let r="";for(let e in t)t.hasOwnProperty(e)&&(r.length&&(r+="&"),r+=encodeURIComponent(e)+"="+encodeURIComponent(t[e]));return r}function unr(t){let r={},e=t.split("&");for(let n=0,a=e.length;n<a;n++){let u=e[n].split("=");r[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return r}class cnr extends Error{constructor(r,e,n){super(r),this.description=e,this.context=n,this.type="TransportError"}}class wX extends oh{constructor(r){super(),this.writable=!1,y9(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,e,n){return super.emitReserved("error",new cnr(r,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const e=xX(r,this.socket.binaryType);this.onPacket(e)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,e={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const e=lnr(r);return e.length?"?"+e:""}}class fnr extends wX{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const e=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||e()})),this.writable||(n++,this.once("drain",function(){--n||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const e=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)};Jrr(r,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,Qrr(r,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=ZTe()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(r,e)}}let YTe=!1;try{YTe=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const hnr=YTe;function dnr(){}class vnr extends fnr{constructor(r){if(super(r),typeof location<"u"){const e=location.protocol==="https:";let n=location.port;n||(n=e?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||n!==r.port}}doWrite(r,e){const n=this.request({method:"POST",data:r});n.on("success",e),n.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(e,n)=>{this.onError("xhr poll error",e,n)}),this.pollXhr=r}}let zT=class $L extends oh{constructor(r,e,n){super(),this.createRequest=r,y9(this,n),this._opts=n,this._method=n.method||"GET",this._uri=e,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var r;const e=WTe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(e);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{}(r=this._opts.cookieJar)===null||r===void 0||r.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=$L.requestsCount++,$L.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=dnr,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $L.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};zT.requestsCount=0;zT.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Oce);else if(typeof addEventListener=="function"){const t="onpagehide"in Wm?"pagehide":"unload";addEventListener(t,Oce,!1)}}function Oce(){for(let t in zT.requests)zT.requests.hasOwnProperty(t)&&zT.requests[t].abort()}const gnr=function(){const t=XTe({xdomain:!1});return t&&t.responseType!==null}();class pnr extends vnr{constructor(r){super(r);const e=r&&r.forceBase64;this.supportsBinary=gnr&&!e}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new zT(XTe,this.uri(),r)}}function XTe(t){const r=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||hnr))return new XMLHttpRequest}catch{}if(!r)try{return new Wm[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const KTe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class mnr extends wX{get name(){return"websocket"}doOpen(){const r=this.uri(),e=this.opts.protocols,n=KTe?{}:WTe(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(r,e,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=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let e=0;e<r.length;e++){const n=r[e],a=e===r.length-1;bX(n,this.supportsBinary,u=>{try{this.doWrite(n,u)}catch{}a&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=ZTe()),this.supportsBinary||(e.b64=1),this.createUri(r,e)}}const L$=Wm.WebSocket||Wm.MozWebSocket;class ynr extends mnr{createSocket(r,e,n){return KTe?new L$(r,e,n):e?new L$(r,e):new L$(r)}doWrite(r,e){this.ws.send(e)}}class Anr extends wX{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const e=enr(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=r.readable.pipeThrough(e).getReader(),a=qrr();a.readable.pipeTo(r.writable),this._writer=a.writable.getWriter();const u=()=>{n.read().then(({done:f,value:i})=>{f||(this.onPacket(i),u())}).catch(f=>{})};u();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let e=0;e<r.length;e++){const n=r[e],a=e===r.length-1;this._writer.write(n).then(()=>{a&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const Cnr={websocket:ynr,webtransport:Anr,polling:pnr},Inr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bnr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function AV(t){if(t.length>8e3)throw"URI too long";const r=t,e=t.indexOf("["),n=t.indexOf("]");e!=-1&&n!=-1&&(t=t.substring(0,e)+t.substring(e,n).replace(/:/g,";")+t.substring(n,t.length));let a=Inr.exec(t||""),u={},o=14;for(;o--;)u[bnr[o]]=a[o]||"";return e!=-1&&n!=-1&&(u.source=r,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=xnr(u,u.path),u.queryKey=wnr(u,u.query),u}function xnr(t,r){const e=/\/{2,9}/g,n=r.replace(e,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&n.splice(0,1),r.slice(-1)=="/"&&n.splice(n.length-1,1),n}function wnr(t,r){const e={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,u){a&&(e[a]=u)}),e}const CV=typeof addEventListener=="function"&&typeof removeEventListener=="function",UL=[];CV&&addEventListener("offline",()=>{UL.forEach(t=>t())},!1);class uI extends oh{constructor(r,e){if(super(),this.binaryType=rnr,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(e=r,r=null),r){const n=AV(r);e.hostname=n.host,e.secure=n.protocol==="https"||n.protocol==="wss",e.port=n.port,n.query&&(e.query=n.query)}else e.host&&(e.hostname=AV(e.host).host);y9(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.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},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=unr(this.opts.query)),CV&&(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"})},UL.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const e=Object.assign({},this.opts.query);e.EIO=GTe,e.transport=r,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&uI.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(r);e.open(),this.setTransport(e)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",uI.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=r.data,this._onError(e);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),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 r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const a=this.writeBuffer[n].data;if(a&&(e+=onr(a)),n>0&&e>this._maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,m9(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,e,n){return this._sendPacket("message",r,e,n),this}send(r,e,n){return this._sendPacket("message",r,e,n),this}_sendPacket(r,e,n,a){if(typeof e=="function"&&(a=e,e=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const u={type:r,data:e,options:n};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),r()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():r()}):this.upgrading?n():r()),this}_onError(r){if(uI.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,e){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(),CV&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=UL.indexOf(this._offlineEventListener);n!==-1&&UL.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,e),this.writeBuffer=[],this._prevBufferLen=0}}}uI.protocol=GTe;class Tnr extends uI{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let e=this.createTransport(r),n=!1;uI.priorWebsocketSuccess=!1;const a=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",l=>{if(!n)if(l.type==="pong"&&l.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;uI.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=e.name,this.emitReserved("upgradeError",h)}}))};function u(){n||(n=!0,d(),e.close(),e=null)}const o=l=>{const h=new Error("probe error: "+l);h.transport=e.name,u(),this.emitReserved("upgradeError",h)};function f(){o("transport closed")}function i(){o("socket closed")}function s(l){e&&l.name!==e.name&&u()}const d=()=>{e.removeListener("open",a),e.removeListener("error",o),e.removeListener("close",f),this.off("close",i),this.off("upgrading",s)};e.once("open",a),e.once("error",o),e.once("close",f),this.once("close",i),this.once("upgrading",s),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const e=[];for(let n=0;n<r.length;n++)~this.transports.indexOf(r[n])&&e.push(r[n]);return e}}let _nr=class extends Tnr{constructor(r,e={}){const n=typeof r=="object"?r:e;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>Cnr[a]).filter(a=>!!a)),super(r,n)}};function Snr(t,r="",e){let n=t;e=e||typeof location<"u"&&location,t==null&&(t=e.protocol+"//"+e.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=e.protocol+t:t=e.host+t),/^(https?|wss?):\/\//.test(t)||(typeof e<"u"?t=e.protocol+"//"+t:t="https://"+t),n=AV(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 u=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+u+":"+n.port+r,n.href=n.protocol+"://"+u+(e&&e.port===n.port?"":":"+n.port),n}const Enr=typeof ArrayBuffer=="function",Mnr=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,QTe=Object.prototype.toString,Rnr=typeof Blob=="function"||typeof Blob<"u"&&QTe.call(Blob)==="[object BlobConstructor]",Pnr=typeof File=="function"||typeof File<"u"&&QTe.call(File)==="[object FileConstructor]";function TX(t){return Enr&&(t instanceof ArrayBuffer||Mnr(t))||Rnr&&t instanceof Blob||Pnr&&t instanceof File}function HL(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(HL(t[e]))return!0;return!1}if(TX(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return HL(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&HL(t[e]))return!0;return!1}function Lnr(t){const r=[],e=t.data,n=t;return n.data=IV(e,r),n.attachments=r.length,{packet:n,buffers:r}}function IV(t,r){if(!t)return t;if(TX(t)){const e={_placeholder:!0,num:r.length};return r.push(t),e}else if(Array.isArray(t)){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=IV(t[n],r);return e}else if(typeof t=="object"&&!(t instanceof Date)){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=IV(t[n],r));return e}return t}function Onr(t,r){return t.data=bV(t.data,r),delete t.attachments,t}function bV(t,r){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<r.length)return r[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=bV(t[e],r);else if(typeof t=="object")for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=bV(t[e],r));return t}const knr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Dnr=5;var bl;(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"})(bl||(bl={}));class Nnr{constructor(r){this.replacer=r}encode(r){return(r.type===bl.EVENT||r.type===bl.ACK)&&HL(r)?this.encodeAsBinary({type:r.type===bl.EVENT?bl.BINARY_EVENT:bl.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let e=""+r.type;return(r.type===bl.BINARY_EVENT||r.type===bl.BINARY_ACK)&&(e+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(e+=r.nsp+","),r.id!=null&&(e+=r.id),r.data!=null&&(e+=JSON.stringify(r.data,this.replacer)),e}encodeAsBinary(r){const e=Lnr(r),n=this.encodeAsString(e.packet),a=e.buffers;return a.unshift(n),a}}function kce(t){return Object.prototype.toString.call(t)==="[object Object]"}class _X extends oh{constructor(r){super(),this.reviver=r}add(r){let e;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(r);const n=e.type===bl.BINARY_EVENT;n||e.type===bl.BINARY_ACK?(e.type=n?bl.EVENT:bl.ACK,this.reconstructor=new Fnr(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(TX(r)||r.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(r),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let e=0;const n={type:Number(r.charAt(0))};if(bl[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===bl.BINARY_EVENT||n.type===bl.BINARY_ACK){const u=e+1;for(;r.charAt(++e)!=="-"&&e!=r.length;);const o=r.substring(u,e);if(o!=Number(o)||r.charAt(e)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(r.charAt(e+1)==="/"){const u=e+1;for(;++e&&!(r.charAt(e)===","||e===r.length););n.nsp=r.substring(u,e)}else n.nsp="/";const a=r.charAt(e+1);if(a!==""&&Number(a)==a){const u=e+1;for(;++e;){const o=r.charAt(e);if(o==null||Number(o)!=o){--e;break}if(e===r.length)break}n.id=Number(r.substring(u,e+1))}if(r.charAt(++e)){const u=this.tryParse(r.substr(e));if(_X.isPayloadValid(n.type,u))n.data=u;else throw new Error("invalid payload")}return n}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,e){switch(r){case bl.CONNECT:return kce(e);case bl.DISCONNECT:return e===void 0;case bl.CONNECT_ERROR:return typeof e=="string"||kce(e);case bl.EVENT:case bl.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&knr.indexOf(e[0])===-1);case bl.ACK:case bl.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Fnr{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const e=Onr(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const znr=Object.freeze(Object.defineProperty({__proto__:null,Decoder:_X,Encoder:Nnr,get PacketType(){return bl},protocol:Dnr},Symbol.toStringTag,{value:"Module"}));function U0(t,r,e){return t.on(r,e),function(){t.off(r,e)}}const Bnr=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class JTe extends oh{constructor(r,e,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=r,this.nsp=e,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 r=this.io;this.subs=[U0(r,"open",this.onopen.bind(this)),U0(r,"packet",this.onpacket.bind(this)),U0(r,"error",this.onerror.bind(this)),U0(r,"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(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...e){var n,a,u;if(Bnr.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(e.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const o={type:bl.EVENT,data:e};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const d=this.ids++,l=e.pop();this._registerAckCallback(d,l),o.id=d}const f=(a=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||a===void 0?void 0:a.writable,i=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!f||(i?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(r,e){var n;const a=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(a===void 0){this.acks[r]=e;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===r&&this.sendBuffer.splice(f,1);e.call(this,new Error("operation has timed out"))},a),o=(...f)=>{this.io.clearTimeoutFn(u),e.apply(this,f)};o.withError=!0,this.acks[r]=o}emitWithAck(r,...e){return new Promise((n,a)=>{const u=(o,f)=>o?a(o):n(f);u.withError=!0,e.push(u),this.emit(r,...e)})}_addToQueue(r){let e;typeof r[r.length-1]=="function"&&(e=r.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((a,...u)=>n!==this._queue[0]?void 0:(a!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(a)):(this._queue.shift(),e&&e(null,...u)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const e=this._queue[0];e.pending&&!r||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:bl.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(n=>String(n.id)===r)){const n=this.acks[r];delete this.acks[r],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case bl.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.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 bl.EVENT:case bl.BINARY_EVENT:this.onevent(r);break;case bl.ACK:case bl.BINARY_ACK:this.onack(r);break;case bl.DISCONNECT:this.ondisconnect();break;case bl.CONNECT_ERROR:this.destroy();const n=new Error(r.data.message);n.data=r.data.data,this.emitReserved("connect_error",n);break}}onevent(r){const e=r.data||[];r.id!=null&&e.push(this.ack(r.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const e=this;let n=!1;return function(...a){n||(n=!0,e.packet({type:bl.ACK,id:r,data:a}))}}onack(r){const e=this.acks[r.id];typeof e=="function"&&(delete this.acks[r.id],e.withError&&r.data.unshift(null),e.apply(this,r.data))}onconnect(r,e){this.id=r,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:bl.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(r===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(r===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,r.data)}}}function R_(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}R_.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),e=Math.floor(r*this.jitter*t);t=Math.floor(r*10)&1?t+e:t-e}return Math.min(t,this.max)|0};R_.prototype.reset=function(){this.attempts=0};R_.prototype.setMin=function(t){this.ms=t};R_.prototype.setMax=function(t){this.max=t};R_.prototype.setJitter=function(t){this.jitter=t};class xV extends oh{constructor(r,e){var n;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(e=r,r=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,y9(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((n=e.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new R_({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=r;const a=e.parser||znr;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var e;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(e=this.backoff)===null||e===void 0||e.setMin(r),this)}randomizationFactor(r){var e;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(e=this.backoff)===null||e===void 0||e.setJitter(r),this)}reconnectionDelayMax(r){var e;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(e=this.backoff)===null||e===void 0||e.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new _nr(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const a=U0(e,"open",function(){n.onopen(),r&&r()}),u=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),r?r(f):this.maybeReconnectOnOpen()},o=U0(e,"error",u);if(this._timeout!==!1){const f=this._timeout,i=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),e.close()},f);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}return this.subs.push(a),this.subs.push(o),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(U0(r,"ping",this.onping.bind(this)),U0(r,"data",this.ondata.bind(this)),U0(r,"error",this.onerror.bind(this)),U0(r,"close",this.onclose.bind(this)),U0(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(e){this.onclose("parse error",e)}}ondecoded(r){m9(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,e){let n=this.nsps[r];return n?this._autoConnect&&!n.active&&n.connect():(n=new JTe(this,r,e),this.nsps[r]=n),n}_destroy(r){const e=Object.keys(this.nsps);for(const n of e)if(this.nsps[n].active)return;this._close()}_packet(r){const e=this.encoder.encode(r);for(let n=0;n<e.length;n++)this.engine.write(e[n],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,e){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(a=>{a?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",a)):r.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const BS={};function jL(t,r){typeof t=="object"&&(r=t,t=void 0),r=r||{};const e=Snr(t,r.path||"/socket.io"),n=e.source,a=e.id,u=e.path,o=BS[a]&&u in BS[a].nsps,f=r.forceNew||r["force new connection"]||r.multiplex===!1||o;let i;return f?i=new xV(n,r):(BS[a]||(BS[a]=new xV(n,r)),i=BS[a]),e.query&&!r.query&&(r.query=e.queryKey),i.socket(e.path,r)}Object.assign(jL,{Manager:xV,Socket:JTe,io:jL,connect:jL});const D0=jL(`http://localhost:8000?instanceId=${wW()}`),$nr=bt.createContext(null),Unr=({children:t})=>{const[r,e]=Xl(bC),n=wW();return bt.useEffect(()=>(D0.on("connect",()=>{e(a=>({...a,status:tm.INACTIVE})),console.log(`Socket connected with ID: ${D0.id}`)}),D0.on("disconnect",a=>{console.log(`Socket disconnected: ${a}`)}),D0.on("connect_error",a=>{console.error(`Socket connection error: ${a.message}`)}),D0.on("reconnect",a=>{console.log(`Socket reconnected after ${a} attempts`)}),D0.on("fileTransferProgress",a=>{a.instanceId===n&&e({currentFileName:a.current_file_name,numberOfFiles:a.number_of_files,percentOfCurrent:a.percent_of_current,finishedFiles:a.finished_files,status:a.status})}),()=>{D0.off("connect"),D0.off("disconnect"),D0.off("connect_error"),D0.off("reconnect")}),[n,e]),He.jsx($nr.Provider,{value:D0,children:t})},Hnr=XEe([{path:os.HOME,element:He.jsx(Wrr,{}),errorElement:He.jsx(vOe,{}),children:BTe}]);I4e.onlyShowFocusOnTabs();const jnr=new A5e({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});k$.createRoot(document.getElementById("root")).render(He.jsx(w5e,{client:jnr,children:He.jsx(Qve,{children:He.jsx(uo.StrictMode,{children:He.jsx(Unr,{children:He.jsx(gPe,{children:He.jsx($Ee,{router:Hnr})})})})})}));export{Fa as I,Q2 as _,J2 as a,EQ as b,_Re as p};
|
5247
|
+
${R.operationFileIdentifier}`,shape:"box"}))),[t,p]),A=bt.useCallback(R=>{var O;const D=Math.min(R,3);i(D),(O=a.current)==null||O.moveTo({scale:D})},[a]),w=bt.useMemo(()=>c===null||C.length===0?0:(c+1)%C.length,[c,C.length]),T=bt.useMemo(()=>c===null||C.length===0?0:(c-1+C.length)%C.length,[c,C.length]),E=bt.useCallback(R=>{a.current&&!u&&(C.length>R&&k(C[R]),a.current.selectNodes(C,!1)),v(R)},[u,C]),x=()=>{m([]),v(null),b(""),a.current&&(a.current.selectNodes([],!0),a.current.focus(s,{scale:f,animation:{duration:500,easingFunction:"easeInOutQuad"}}),l(s))},S=()=>{if(!y)return m([]),null;const D=I.get({filter:O=>{var j;return(j=O.label)==null?void 0:j.toLowerCase().includes(y.toLowerCase())}}).map(O=>O.id);return m(D),D[0]||null};bt.useEffect(()=>(o(!0),setTimeout(()=>{e.current&&requestAnimationFrame(()=>{a.current=new Fo(e.current,{nodes:I,edges:g},{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 R,D;o(!1),(R=a.current)==null||R.focus(s,{scale:f,animation:{duration:500,easingFunction:"easeInOutQuad"}}),(D=a.current)==null||D.selectNodes([s],!0),l(s),h.current=s}),a.current.on("click",R=>{var D;if(R.edges.length>0){const O=R.edges[0],j=g.find(G=>G.id===O);(j==null?void 0:j.to)===h.current?k((j==null?void 0:j.from)||null):k((j==null?void 0:j.to)||null)}else(D=a.current)==null||D.selectNodes([],!0),l(null),h.current=null}),a.current.on("zoom",R=>{var D;R.scale<=3?i(R.scale):(D=a.current)==null||D.moveTo({scale:3})})})}),()=>{var R,D,O,j,G;(R=a.current)==null||R.off("zoom"),(D=a.current)==null||D.off("click"),(O=a.current)==null||O.off("dragEnd"),(j=a.current)==null||j.off("afterDrawing"),(G=a.current)==null||G.destroy(),a.current=null}),[g]);const _=R=>{if(I===null||R===null)return null;const D=I.getIds(),O=D.indexOf(R);return O!==-1&&O<D.length-1?D[O+1]:null},L=R=>{if(I===null||R===null)return null;const D=I.getIds(),O=D.indexOf(R);return O>0?D[O-1]:null},k=bt.useCallback(R=>{R!==null&&a.current&&(a.current.focus(R,{scale:f,animation:{duration:500,easingFunction:"easeInOutCubic"}}),a.current.selectNodes([R],!0),l(R),h.current=R)},[a,f]),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(_s,{placement:sl.TOP,content:`Go to previous operation ${L(d)}`,disabled:u,children:He.jsx(Ta,{icon:Ti.ArrowLeft,onClick:()=>k(L(d)||0),disabled:!L(d)||u,variant:"outlined"})}),He.jsx(_s,{disabled:u,placement:sl.TOP,content:`Center on operation ${F}`,children:He.jsx(Ta,{variant:"outlined",onClick:()=>k(F),disabled:u,children:F})}),He.jsx(_s,{placement:sl.TOP,content:`Go to next operation ${_(d)}`,disabled:u,children:He.jsx(Ta,{icon:Ti.ArrowRight,onClick:()=>k(_(d)||0),disabled:!_(d)||u,variant:"outlined"})}),He.jsx(nh,{className:"node-name-filter",placeholder:"Filter by operation name",value:y,onChange:R=>b(R.target.value),disabled:u,rightElement:y?He.jsx(Ta,{variant:"minimal",onClick:()=>{x()},icon:Ti.CROSS}):He.jsx(Ta,{variant:"minimal",disabled:!0,icon:Ti.CROSS})}),He.jsx(Ta,{icon:Ti.SEARCH,onClick:()=>{S(),setTimeout(()=>{E(0)},200)},disabled:u||!y,variant:"outlined"}),He.jsx(Ta,{icon:Ti.ArrowLeft,onClick:()=>{E(T)},disabled:u||C.length===0,variant:"outlined"}),C.length,He.jsx(Ta,{icon:Ti.ArrowRight,onClick:()=>{E(w)},disabled:u||C.length===0,variant:"outlined"})]}),He.jsxs("div",{className:"slider-wrapper",children:[He.jsx(GRe,{disabled:u,children:"Scale"}),He.jsx(jU,{min:.1,max:3,labelRenderer:R=>`${R.toFixed(2)}`,stepSize:.01,labelStepSize:.75,labelPrecision:1,value:f,onChange:A,disabled:u})]})]}),d!==null&&!u&&He.jsxs("div",{className:"operation-graph-props",children:[He.jsxs("h2",{className:"operation-name",children:[d," ",(N=t.find(R=>R.id===d))==null?void 0:N.name," (",(P=t.find(R=>R.id===d))==null?void 0:P.operationFileIdentifier,")"]}),He.jsx(Ta,{className:"navigate-button",endIcon:Ti.SEGMENTED_CONTROL,intent:lo.PRIMARY,onClick:()=>n(`/operations/${d}`),children:"Memory Details"}),He.jsx("h3",{children:"Inputs 123:"}),He.jsx("div",{className:"tensors",children:(z=t.find(R=>R.id===d))==null?void 0:z.inputs.map((R,D)=>He.jsx(lce,{tensor:R},`input-${d} ${R.id} ${D}`))}),He.jsx("h3",{children:"Outputs:"}),He.jsx("div",{className:"tensors",children:(M=t.find(R=>R.id===d))==null?void 0:M.outputs.map((R,D)=>He.jsx(lce,{tensor:R},`output-${d} ${R.id} ${D}`))})]}),u&&He.jsx("div",{className:"graph-tree-loader",children:He.jsx(Tv,{})}),He.jsx("div",{className:"operation-graph-container",ref:e}),He.jsx("aside",{className:"aside",children:"Scroll to zoom. Drag to pan. Click a node to see operation details."})]})},lce=({tensor:t})=>He.jsxs("div",{className:"tensor-details",children:[He.jsx("h3",{children:oy(t.shape)}),He.jsx("div",{children:t.dtype}),He.jsx("div",{children:t.layout}),He.jsx("div",{children:t.buffer_type!==null&&Lh[t.buffer_type]}),He.jsx("div",{children:t.operationIdentifier&&[t.operationIdentifier]}),t!=null&&t.memory_config?Object.entries(t.memory_config).map(([r,e])=>He.jsx("table",{children:He.jsx("tbody",{children:He.jsx(LW,{header:r,value:e},r)})},r)):null]}),crr=()=>{const{data:t,isLoading:r}=yg(),{operationId:e}=ade(),n=Ko(z3);U3();const a=bt.useMemo(()=>n?t==null?void 0:t.filter(u=>n[0]&&u.id<=n[1]):t,[t,n]);return He.jsxs("div",{className:"data-padding",children:[He.jsx(kA,{title:"GraphTree"}),r||a===void 0||a.length===0?He.jsx("div",{className:"graph-tree-loader",children:He.jsx(Tv,{})}):He.jsx(urr,{operationList:a,operationId:e?parseInt(e,10):void 0})]})},M6=[{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"}],frr=["op_code","bound","total_percent","device_time","op_to_op_gap","cores","dram","dram_percent","flops","flops_percent","math_fidelity","high_dispatch"],uce=1,cce=5,fce=({data:t,comparisonData:r,filters:e,provideMatmulAdvice:n,hiliteHighDispatch:a,matches:u,highlightRows:o,normaliseData:f})=>{const{activeFilters:i}=DZ("math_fidelity",t||[]),{sortTableFields:s,changeSorting:d,sortingColumn:l,sortDirection:h}=VZ(null),y=SW(),{data:b}=yg(),C=bt.useMemo(()=>M6.filter(g=>g.filterable).map(g=>g.key),[]),m=bt.useMemo(()=>{let g=t;hce(e)&&C&&(g=g.filter(I=>!(e&&Object.entries(e).filter(([w,T])=>String(T).length).some(([w,T])=>!dce(I,w).toLowerCase().includes(T.toLowerCase()))))),(i==null?void 0:i.length)>0&&(g=g.filter(I=>(I==null?void 0:I.math_fidelity)!==null&&i.includes(I.math_fidelity)));const p=g.map(I=>({...I,id:I.id?parseInt(I.id,10):null,total_percent:I.total_percent?parseFloat(I.total_percent):null,device_time:I.device_time?parseFloat(I.device_time):null,op_to_op_gap:I.op_to_op_gap?parseFloat(I.op_to_op_gap):null,cores:I.cores?parseInt(I.cores,10):null,dram:I.dram?parseFloat(I.dram):null,dram_percent:I.dram_percent?parseFloat(I.dram_percent):null,flops:I.flops?parseFloat(I.flops):null,flops_percent:I.flops_percent?parseFloat(I.flops_percent):null}));return s(p)},[t,s,e,C,i]),c=bt.useMemo(()=>{let g=r||[];hce(e)&&C&&(g=g.filter(I=>!(e&&Object.entries(e).filter(([w,T])=>String(T).length).some(([w,T])=>!dce(I,w).toLowerCase().includes(T.toLowerCase()))))),(i==null?void 0:i.length)>0&&(g=g.filter(I=>(I==null?void 0:I.math_fidelity)!==null&&i.includes(I.math_fidelity)));const p=g.map(I=>({...I,id:I.id?parseInt(I.id,10):null,total_percent:I.total_percent?parseFloat(I.total_percent):null,device_time:I.device_time?parseFloat(I.device_time):null,op_to_op_gap:I.op_to_op_gap?parseFloat(I.op_to_op_gap):null,cores:I.cores?parseInt(I.cores,10):null,dram:I.dram?parseFloat(I.dram):null,dram_percent:I.dram_percent?parseFloat(I.dram_percent):null,flops:I.flops?parseFloat(I.flops):null,flops_percent:I.flops_percent?parseFloat(I.flops_percent):null}));return s(p)},[r,s,e,C,i]),v=[...M6.slice(0,uce),...y.length>0?[{label:"OP",key:"op",sortable:!0}]:[],...M6.slice(uce,cce),...a?[{label:"Slow",key:"high_dispatch"}]:[],...M6.slice(cce)];return He.jsxs("table",{className:"perf-table monospace",children:[He.jsx("thead",{children:He.jsx("tr",{children:v.map(g=>{const p=l===g.key?h===X1.ASC?X1.DESC:X1.ASC:h;return He.jsx("th",{className:"cell-header",children:g.sortable?He.jsxs(Ta,{onClick:()=>d(g.key)(p),variant:h5.MINIMAL,size:kG.SMALL,children:[He.jsx("span",{className:"header-label",children:g.label}),l===g.key?He.jsx(Hs,{className:_i({"is-active":l===g.key},"sort-icon"),icon:h===X1.ASC?Ti.CARET_DOWN:Ti.CARET_UP}):He.jsx(Hs,{className:_i("sort-icon"),icon:Ti.CARET_DOWN})]}):He.jsx("span",{className:"header-label no-button",children:g.label})},g.key)})})}),He.jsx("tbody",{children:m.map((g,p)=>He.jsxs(bt.Fragment,{children:[He.jsx("tr",{className:_i({"missing-data":o&&(g.missing||g.raw_op_code.includes("MISSING")),"added-data":o&&!g.missing&&(u==null?void 0:u.some(I=>parseInt(I.id,10)===parseInt(g.id,10)&&I.raw_op_code===g.raw_op_code)),"row-pattern":r&&f}),children:v.map(I=>He.jsx("td",{className:_i("cell",{"align-right":I.key==="math_fidelity"}),children:eq(g,I,b,e==null?void 0:e[I.key])},I.key))}),c[p]&&He.jsx("tr",{className:_i({"missing-data":o&&(g.missing||g.raw_op_code.includes("MISSING")),"added-data":o&&!g.missing&&(u==null?void 0:u.some(I=>parseInt(I.id,10)===parseInt(g.id,10)&&I.raw_op_code===g.raw_op_code)),"row-pattern":r&&f},"comparison-row"),children:v.map(I=>He.jsx("td",{className:_i("cell",{"align-right":I.key==="math_fidelity"}),children:frr.includes(I.key)&&c[p]&&(I.key!=="op_code"||I.key==="op_code"&&hrr(g.op_code))&&He.jsx(He.Fragment,{children:eq(c[p],I,b,e==null?void 0:e[I.key])})},I.key))}),n&&g.op_code.includes("Matmul")&&He.jsx("tr",{children:He.jsx("td",{colSpan:v.length,className:"cell advice",children:He.jsx("ul",{children:g==null?void 0:g.advice.map((I,A)=>He.jsx("li",{children:I},`advice-${A}`))})})})]},p))})]})};function hce(t){return t?Object.values(t).some(r=>r.length>0):!1}const dce=(t,r)=>{var n;return((n=t[r])==null?void 0:n.toString())||""},hrr=t=>t.toLowerCase().includes("matmul")||t.toLowerCase().includes("conv"),FS={id:"",advice:[],total_percent:"",bound:"",op_code:"MISSING",raw_op_code:"MISSING",device_time:"",op_to_op_gap:"",cores:"",dram:"",dram_percent:"",flops:"",flops_percent:"",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:""},Yb=[],R6="MISSING - ";function drr(t,r){Yb.length=0;const e=[],n=[];let a=0,u=0;for(;a<t.length&&u<r.length;){const o=t[a],f=r[u],i=o.raw_op_code,s=f.raw_op_code;if(i===s)e.push(o),n.push(f),a++,u++;else{const d=t.slice(a+1).findIndex(b=>b.raw_op_code===s),l=r.slice(u+1).findIndex(b=>b.raw_op_code===i),h=d>=0?a+1+d:null,y=l>=0?u+1+l:null;if(h!==null&&(y===null||h-a<=y-u))for(;a<h;)e.push(t[a]),n.push({...FS,op_code:`${R6} ${t[a].raw_op_code}`}),Yb.push(t[a]),a++;else if(y!==null)for(;u<y;)n.push(r[u]),e.push({...FS,op_code:`${R6} ${r[u].raw_op_code}`}),Yb.push(r[u]),u++;else e.push(o),n.push(f),a++,u++}}for(;a<t.length;)e.push(t[a]),n.push({...FS,op_code:`${R6} ${t[a].raw_op_code}`}),Yb.push(t[a]),a++;for(;u<r.length;)e.push(FS),n.push({...FS,op_code:`${R6} ${r[u].raw_op_code}`}),Yb.push(r[u]),u++;return[e,n]}const vce=[{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"}],vrr=({data:t,comparisonData:r})=>{const{getFilterOptions:e,updateFilters:n,activeFilters:a,FilterItem:u}=DZ("math_fidelity",t||[]),{sortTableFields:o,changeSorting:f,sortingColumn:i}=VZ(null),s=SW(),d=Ko(Uf),l=Ko(hy),[h,y]=bt.useState(!0),[b,C]=bt.useState(!1),[m,c]=bt.useState(!1),[v,g]=bt.useState(!1),[p,I]=bt.useState("perf-table-1"),[A,w]=bt.useState(!0),[T,E]=bt.useState(!0),x=bt.useMemo(()=>vce.filter(z=>z.filterable).map(z=>z.key),[]),[S,_]=bt.useState(Object.fromEntries(x.map(z=>[z,""]))),L=bt.useMemo(()=>(t==null?void 0:t.map(z=>{var D;const M=parseInt(z.op_to_op_gap,10),R=(D=s.find(O=>O.perfId===z.id))==null?void 0:D.opId;return{...z,high_dispatch:!!M&&M>6.5,op:R}}))||[],[t,s]),k=bt.useMemo(()=>(r==null?void 0:r.map(z=>{var D;const M=parseInt(z.op_to_op_gap,10),R=(D=s.find(O=>O.perfId===z.id))==null?void 0:D.opId;return{...z,high_dispatch:!!M&&M>6.5,op:R}}))||[],[r,s]),F=bt.useMemo(()=>{let z=L;grr(S)&&x&&(z=z.filter(R=>!(S&&Object.entries(S).filter(([O,j])=>String(j).length).some(([O,j])=>!prr(R,O).toLowerCase().includes(j.toLowerCase()))))),(a==null?void 0:a.length)>0&&(z=z.filter(R=>(R==null?void 0:R.math_fidelity)!==null&&a.includes(R.math_fidelity)));const M=z.map(R=>({...R,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}));return o(M)},[L,o,S,x,a]),N=(z,M)=>{_({...S,[z]:M??""})},P=bt.useMemo(()=>drr(L,k),[L,k]);return bt.useEffect(()=>{l||(E(!1),w(!1))},[l]),He.jsxs(He.Fragment,{children:[He.jsx(af,{className:"expand-button",label:h?"Merged device data":"Expanded device data",onChange:()=>y(!h),checked:h&&v,disabled:!v}),He.jsx(af,{className:"expand-button",label:"Show Matmul optimization analysis",onChange:()=>C(!b),checked:b}),He.jsx(af,{className:"expand-button",label:"Highlight high dispatch ops",onChange:()=>c(!m),checked:m}),He.jsx(af,{labelElement:He.jsx(_s,{content:"Tries to match up operations between the performance reports",children:He.jsxs(He.Fragment,{children:[He.jsx("span",{children:"Normalise performance data"}),He.jsx(Hs,{icon:Ti.SMALL_INFO_SIGN})]})}),onChange:()=>w(!A),checked:A,disabled:!l}),He.jsx(af,{labelElement:He.jsx(_s,{content:"Highlights rows where ops have been added or are missing after normalising the data",children:He.jsxs(He.Fragment,{children:[He.jsx("span",{children:"Highlight row difference"}),He.jsx(Hs,{icon:Ti.SMALL_INFO_SIGN})]})}),onChange:()=>E(!T),checked:T,disabled:!l||!A}),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:F.length!==(t==null?void 0:t.length)?`Showing ${F.length} of ${t==null?void 0:t.length} rows`:`Showing ${F.length} rows`})})]}),He.jsxs("div",{className:"filters",children:[x.map(z=>{var M;return He.jsx(kD,{onQueryChanged:R=>N(z,R),placeholder:`Filter ${(M=vce.find(R=>R.key===z))==null?void 0:M.label}`,searchQuery:(S==null?void 0:S[z])||""},z)}),He.jsx(epe,{items:t?e():[],placeholder:"Math fidelity filter...",onItemSelect:z=>n(z),selectedItems:a,itemRenderer:(z,M)=>u(String(z)),tagRenderer:z=>z,onRemove:z=>n(z),itemPredicate:(z,M)=>!z||String(M).toLowerCase().includes(z.toLowerCase()),noResults:He.jsx(AA,{disabled:!0,text:"No results.",roleStructure:"listoption"}),resetOnSelect:!0}),He.jsx(Ta,{onClick:()=>f(null)(null),variant:h5.OUTLINED,disabled:i===null,children:"Reset sort"})]}),He.jsxs(dW,{selectedTabId:p,onChange:I,renderActiveTabPanelOnly:!0,size:kG.LARGE,children:[He.jsx(gI,{id:"perf-table-1",title:d,icon:Ti.TH_LIST,panel:He.jsx(fce,{data:A?P[0]:L,comparisonData:A?P[1]:[],filters:S,provideMatmulAdvice:b,hiliteHighDispatch:m,matches:Yb,highlightRows:T,normaliseData:A})}),l&&(k!=null&&k.length)?He.jsx(gI,{id:"perf-table-2",title:l,icon:Ti.TH_LIST,panel:He.jsx(fce,{data:A?P[1]:k,comparisonData:A?P[0]:[],filters:S,provideMatmulAdvice:b,hiliteHighDispatch:m,matches:Yb,highlightRows:T,normaliseData:A})}):null]})]}),He.jsx("hr",{}),m&&q9e(L)]})};function grr(t){return t?Object.values(t).some(r=>r.length>0):!1}const prr=(t,r)=>{var n;return((n=t[r])==null?void 0:n.toString())||""},gce={grayskull:108,wormhole_b0:64};function mrr(t,r){const e=Math.max(...r.filter(n=>n.cores).map(n=>parseInt(n.cores??"0",10)));return e>gce[t]?e:gce[t]}const S$="#575757",E$="#575757",P2="#FFF";function Nw({chartData:t,configuration:r,title:e}){var u,o,f,i,s,d,l,h,y,b,C,m,c,v,g;const n={autosize:!0,paper_bgcolor:"transparent",plot_bgcolor:"transparent",showlegend:r.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:r.barMode,xaxis:{gridcolor:S$,linecolor:E$,color:P2,title:{font:{color:P2},text:(o=(u=r.xAxis)==null?void 0:u.title)==null?void 0:o.text},fixedrange:!0,zeroline:!1,range:(f=r.xAxis)==null?void 0:f.range,tickformat:(i=r.xAxis)==null?void 0:i.tickformat,hoverformat:(s=r.xAxis)==null?void 0:s.hoverformat},yaxis:{gridcolor:S$,linecolor:E$,color:P2,title:{standoff:20,font:{color:P2},text:(l=(d=r.yAxis)==null?void 0:d.title)==null?void 0:l.text},automargin:!0,fixedrange:!0,zeroline:!1,range:(h=r.yAxis)==null?void 0:h.range,tickformat:(y=r.yAxis)==null?void 0:y.tickformat,hoverformat:(b=r.yAxis)==null?void 0:b.hoverformat},yaxis2:{gridcolor:S$,linecolor:E$,color:P2,title:{standoff:20,font:{color:P2},text:(m=(C=r.yAxis2)==null?void 0:C.title)==null?void 0:m.text},overlaying:"y",side:"right",automargin:!0,fixedrange:!0,zeroline:!1,range:(c=r.yAxis2)==null?void 0:c.range,tickformat:(v=r.yAxis2)==null?void 0:v.tickformat,hoverformat:(g=r.yAxis2)==null?void 0:g.hoverformat}},a={displayModeBar:!1,displaylogo:!1,responsive:!0};return He.jsxs("div",{className:_i("chart-container",{"legend-instructions":r.showLegend}),children:[He.jsx("h3",{children:e}),He.jsx(BW,{className:"chart",data:t,layout:n,config:a,useResizeHandler:!0})]})}const s0=(t,r="",e="")=>t!==0?e:r,yrr=["#008BF8","#58B73B"],Arr=["#E27414","#E8C547"],M_=t=>yrr[t],p9=t=>Arr[t];function Crr({datasets:t=[]}){const r=Ko(Uf),e=Ko(hy),n=bt.useMemo(()=>t.map((u,o)=>({x:u==null?void 0:u.map(f=>f.cores),y:u==null?void 0:u.map(f=>f.device_time),mode:"markers",type:"scatter",name:s0(o,r,e),marker:{size:10,color:M_(o)},hovertemplate:"Cores: %{x}<br />Device Kernel Duration: %{y} ns"})),[t,e,r]),a={showLegend:!0,xAxis:{title:{text:"Core Count"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"}};return He.jsx(Nw,{title:"Device Kernel Duration vs Core Count",chartData:n,configuration:a})}function Irr({maxCores:t,datasets:r=[]}){const e=Ko(Uf),n=Ko(hy),a=r.reduce((i,s)=>Math.max(i,(s==null?void 0:s.length)||0),0),u=bt.useMemo(()=>r.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+1),y:i==null?void 0:i.map(d=>d.cores),type:"bar",hovertemplate:"Operation: %{x}<br />Cores: %{y}",name:s0(s,e,n),showlegend:!0,legendgroup:`group${s}`,marker:{color:M_(s)}})),[r,e,n]),o=bt.useMemo(()=>r.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+1),y:i==null?void 0:i.map(d=>d.device_time),yaxis:"y2",hovertemplate:"Operation: %{x}<br />Device Kernel Duration: %{y} ns",name:s0(s,e,n),showlegend:!0,legendgroup:`group${s}`,marker:{color:p9(s)}})),[r,e,n]),f={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(Nw,{title:"Core Count + Device Kernel Runtime",chartData:[...u,...o],configuration:f})}function brr({selectedOpCodes:t,datasets:r=[]}){const e=Ko(Uf),n=Ko(hy),a=r.flat(),u=bt.useMemo(()=>[...new Set(a==null?void 0:a.filter(s=>s.raw_op_code!==void 0).map(s=>s.raw_op_code))],[a]),o=bt.useMemo(()=>r.map((s,d)=>u.map(l=>{var h;return{x:[`Op Count ${r.length>1?`(${d+1})`:""}`],y:[s.filter(y=>y.raw_op_code===l).length/s.length],type:"bar",name:s0(d,e,n),hovertemplate:`${l}<br />%{y:.1%}`,marker:{color:(h=t.find(y=>y.opCode===l))==null?void 0:h.colour}}})),[r,u,t,e,n]),f=bt.useMemo(()=>r.map((s,d)=>u.map(l=>{var h;return{x:[`Runtime % ${r.length>1?`(${d+1})`:""}`],y:[s.filter(y=>y.raw_op_code===l).reduce(pce,0)/s.reduce(pce,0)],type:"bar",name:s0(d,e,n),hovertemplate:`${l}<br />%{y:.1%}`,marker:{color:(h=t.find(y=>y.opCode===l))==null?void 0:h.colour}}})),[r,u,t,e,n]),i={margin:{l:0,r:0,b:0,t:0},barMode:"stack",yAxis:{tickformat:".0%",range:[0,1]}};return He.jsx(Nw,{title:"Operation Count vs Runtime Contribution",chartData:[...o.flat(),...f.flat()],configuration:i})}const pce=(t,r)=>t+(r.device_time?parseInt(r.device_time,10):0),xrr=({filteredPerfData:t,comparisonData:r,maxCores:e,selectedOpCodes:n})=>{const a=[t,...r||[]].filter(u=>u.length>0);return He.jsxs("div",{className:"charts",children:[He.jsx(brr,{datasets:a,selectedOpCodes:n}),He.jsx(Irr,{datasets:a,maxCores:e}),He.jsx(Crr,{datasets:a})]})},wrr=25;function Trr({opCodeOptions:t,selectedOpCodes:r,updateOpCodes:e}){const[n,a]=bt.useState(!0),[u,o]=bt.useState(!1);bt.useEffect(()=>{r.length===0&&(a(!1),o(!1)),r.length>0&&r.length<t.length&&(a(!1),o(!0)),r.length===t.length&&(a(!0),o(!1))},[r,t]);const f=()=>{e(n?[]:t)},i=()=>n?"Deselect all":"Select all",s=d=>He.jsxs(He.Fragment,{children:[He.jsx("span",{className:"label",children:d.opCode.length>wrr?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(i3,{checked:n,indeterminate:u,id:"select-all",onChange:f,label:i()})}),t.sort((d,l)=>d.opCode.localeCompare(l.opCode)).map(d=>He.jsx("div",{className:"option",children:He.jsx(i3,{className:"label-container",checked:r.map(l=>l.opCode).includes(d.opCode),id:d.opCode,labelElement:s(d),onChange:()=>{const l=r.includes(d)?r.filter(h=>h!==d):[...r,d];e(l)}},d.opCode)},d.opCode))]})})}const _rr=["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 IX(t,r){const e=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(!cg(e)||!cg(n)||!cg(a))return 0;const u=n*1e3,o=e/u*(r/a);return cg(o)?o:0}function mce({datasets:t=[],maxCores:r}){const e=Ko(Uf),n=Ko(hy),a=bt.useMemo(()=>t.map((f,i)=>({x:f==null?void 0:f.map((s,d)=>d+1),y:f==null?void 0:f.map(s=>s.cores),type:"bar",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Cores: %{y}<extra></extra>",name:s0(i,e,n),legendgroup:`group${i}`,marker:{color:M_(i)}})),[t,e,n]),u=bt.useMemo(()=>t.map((f,i)=>({x:f==null?void 0:f.map((s,d)=>d+1),y:f==null?void 0:f.map(s=>IX(s,r)).filter(s=>s!==-1),yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:s0(i,e,n),legendgroup:`group${i}`,marker:{color:p9(i)}})),[t,e,n,r]),o={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,OW(t)]},yAxis:{title:{text:"Core Count"},tickformat:"d",hoverformat:",.2r",range:[0,r]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Nw,{title:"Core Count + Utilization",chartData:[...a,...u],configuration:o})}const Srr={autosize:!0,paper_bgcolor:"transparent",margin:{l:50,r:50,b:50,t:50},showlegend:!1};function yce({reportTitle:t,data:r=[],opCodes:e,className:n=""}){const a=bt.useMemo(()=>[...new Set(r==null?void 0:r.filter(o=>o.raw_op_code!==void 0).map(o=>o.raw_op_code))],[r]),u=bt.useMemo(()=>({values:a.map(o=>r.filter(f=>f.raw_op_code===o).length),labels:[...a],type:"pie",textinfo:"percent",hovertemplate:"%{label}<br />Count: %{value}<extra></extra>",marker:{colors:a.map(o=>{var f;return(f=e.find(i=>i.opCode===o))==null?void 0:f.colour})},outsidetextfont:{color:"white"}}),[r,e,a]);return He.jsxs("div",{className:_i("operation-types-chart",n),children:[He.jsx("h3",{children:"Operation Types"}),He.jsx("p",{children:t}),He.jsx(BW,{className:"chart",data:[u],layout:Srr,config:lFe,useResizeHandler:!0})]})}const Ace=()=>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 Cce({datasets:t=[],maxCores:r}){const e=Ko(Uf),n=Ko(hy),a=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+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:s0(s,e,n),legendgroup:`group${s}`,marker:{color:M_(s)}})),[t,e,n]),u=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+1),y:(i==null?void 0:i.map(d=>IX(d,r)).filter(d=>d!==-1))??[],yaxis:"y2",hovertemplate:"<b>%{data.name}</b><br />Operation: %{x}<br />Utilization: %{y}<extra></extra>",name:s0(s,e,n),legendgroup:`group${s}`,marker:{color:p9(s)}})),[t,r,e,n]),o=Math.max(...a.flatMap(i=>i.y??[])),f={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{range:[0,OW(t)],title:{text:"Operation"}},yAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,o]},yAxis2:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%",range:[0,1]}};return He.jsx(Nw,{title:"Device Kernel Duration + Utilization",chartData:[...a,...u],configuration:f})}function Ice({datasets:t,maxCores:r}){const e=Ko(Uf),n=Ko(hy),a=bt.useMemo(()=>t.map((o,f)=>({x:o==null?void 0:o.map(i=>i.device_time),y:o==null?void 0:o.map(i=>IX(i,r)).filter(i=>i!==-1),mode:"markers",type:"scatter",name:s0(f,e,n),marker:{size:10,color:M_(f)},hovertemplate:"Duration: %{x} ns<br />Utilization: %{y}"})),[t,r,e,n]),u={showLegend:!0,xAxis:{title:{text:"Device Kernel Duration (ns)"},tickformat:"d",hoverformat:",.2r"},yAxis:{title:{text:"Utilization (%)"},tickformat:".0%",hoverformat:".2%"}};return He.jsx(Nw,{title:"Utilization vs Device Kernel Duration",chartData:a,configuration:u})}function bce({datasets:t=[]}){const r=Ko(Uf),e=Ko(hy),n=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+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:s0(s,r,e),legendgroup:`group${s}`,marker:{color:M_(s)}})),[t,r,e]),a=bt.useMemo(()=>t.map((i,s)=>({x:i==null?void 0:i.map((d,l)=>l+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:s0(s,r,e),legendgroup:`group${s}`,marker:{color:p9(s)}})),[t,r,e]),u=Math.max(...t.flatMap(i=>i.map(s=>parseFloat(s.device_time)*1e3))),o=Math.max(...t.flatMap(i=>i.map(s=>parseFloat(s.pm_ideal_ns)))),f={margin:{l:100,r:0,b:50,t:0},showLegend:!0,xAxis:{title:{text:"Operation"},range:[0,OW(t)]},yAxis:{title:{text:"Time (ns)"},tickformat:"d",hoverformat:",.2r",range:[0,Math.max(u,o)]}};return He.jsx(Nw,{title:"Device Time + Ideal Time",chartData:[...n,...a],configuration:f})}const Err=({chartData:t,secondaryData:r=[],maxCores:e,opCodeOptions:n})=>{const a=Ko(Uf),u=Ko(hy),o=[t,...r||[]].filter(s=>s.length>0),f=bt.useMemo(()=>o.map(s=>s.filter(d=>d.raw_op_code.toLowerCase().includes("matmul"))),[o]),i=bt.useMemo(()=>o.map(s=>s.filter(d=>d.raw_op_code.toLowerCase().includes("conv"))),[o]);return He.jsxs("div",{className:"charts",children:[He.jsx("h2",{children:"Matmul operations"}),f.filter(s=>s.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(mce,{datasets:f,maxCores:e}),He.jsx(bce,{datasets:f}),He.jsx(Cce,{datasets:f,maxCores:e}),He.jsx(Ice,{datasets:f,maxCores:e})]}):He.jsx(Ace,{}),He.jsx("h2",{children:"Conv operations"}),i.filter(s=>s.length).length>0?He.jsxs(He.Fragment,{children:[He.jsx(mce,{datasets:i,maxCores:e}),He.jsx(bce,{datasets:i}),He.jsx(Cce,{datasets:i,maxCores:e}),He.jsx(Ice,{datasets:i,maxCores:e})]}):He.jsx(Ace,{}),He.jsx("h2",{children:"All operations"}),He.jsxs("div",{className:"operation-types-charts",children:[a&&He.jsx(yce,{className:"flex-chart",reportTitle:u?a:"",data:t,opCodes:n}),u&&He.jsx(yce,{className:"flex-chart",reportTitle:a?u:"",data:r[0],opCodes:n})]})]})};function Mrr(){var T;const[t,r]=Xl(hy),e=Ko(Uf),[n,a]=Xl(fge),{data:u,isLoading:o}=L8e(),{data:f,isLoading:i}=PD(e),{data:s}=O8e(t),{data:d}=Xge(),l=jge();U3();const h=bt.useMemo(()=>Array.from(new Set([...(f==null?void 0:f.map(x=>x.raw_op_code).filter(x=>x!==void 0))||[],...(s==null?void 0:s.map(x=>x.raw_op_code).filter(x=>x!==void 0))||[]])).map((x,S)=>({opCode:x,colour:_rr[S]})),[f,s]),[y,b]=bt.useState("tab-1"),[C,m]=bt.useState([]),[c,v]=bt.useState([]),[g,p]=bt.useState(h);bt.useEffect(()=>{t===e&&r(null)},[t,e,r]),bt.useEffect(()=>{t&&l&&a([l[0],l[1]])},[t,a,l]),bt.useEffect(()=>{v((s==null?void 0:s.filter(E=>g.length?g.map(x=>x.opCode).includes(E.raw_op_code??""):!1))||[])},[g,s]),bt.useEffect(()=>{m((f==null?void 0:f.filter(E=>g.length?g.map(x=>x.opCode).includes(E.raw_op_code??""):!1))||[])},[g,f]),bt.useEffect(()=>{p(h)},[h]);const I=bt.useMemo(()=>!t&&n&&C.length>0?C.filter(E=>{const x=parseInt(E==null?void 0:E.id,10);return x>=n[0]&&x<=n[1]}):C,[n,C,t]);if(i||o)return He.jsx(Tv,{});const A=((T=u==null?void 0:u.deviceMeta)==null?void 0:T.architecture)??FO.WORMHOLE,w=f?mrr(A,f):0;return He.jsxs("div",{className:"performance data-padding",children:[He.jsx(kA,{title:"Performance"}),He.jsx("h1",{className:"page-title",children:"Performance analysis"}),d?He.jsx(Nf,{className:"form-group",label:He.jsx("h3",{className:"label",children:"Compare"}),subLabel:"Select a performance report to compare",children:He.jsxs("div",{className:"folder-selection",children:[He.jsx(sH,{items:d.filter(E=>E.reportName!==e),value:t,handleSelect:E=>r(E.reportName)}),He.jsx(Ta,{className:"clear-selection",variant:h5.OUTLINED,icon:Ti.CROSS,onClick:()=>r(null)})]})}):He.jsx(Tv,{}),He.jsxs(dW,{id:"performance-tabs",selectedTabId:y,onChange:b,renderActiveTabPanelOnly:!0,size:kG.LARGE,children:[He.jsx(gI,{id:"tab-1",title:"Table",icon:Ti.TH,panel:He.jsx(vrr,{data:I,comparisonData:c})}),He.jsx(gI,{id:"tab-2",title:"Charts",icon:Ti.TIMELINE_AREA_CHART,panel:He.jsxs("div",{className:"chart-tab",children:[He.jsxs("p",{children:[He.jsx("strong",{children:"Arch:"})," ",A]}),He.jsxs("p",{children:[He.jsx("strong",{children:"Cores:"})," ",w]}),f?He.jsxs(He.Fragment,{children:[He.jsxs("div",{className:"charts-container",children:[He.jsx(Trr,{opCodeOptions:h,selectedOpCodes:g,updateOpCodes:p}),He.jsx(xrr,{filteredPerfData:I,comparisonData:[c],maxCores:w,selectedOpCodes:g})]}),He.jsxs("div",{className:"charts-container non-filterable-charts",children:[He.jsx("span",{}),He.jsx("div",{children:He.jsx(Err,{chartData:I,secondaryData:[s||[]],maxCores:w,opCodeOptions:h})})]})]}):null]})})]})]})}const Rrr={[Wo.IDLE]:Ti.DOT,[Wo.PROGRESS]:Ti.DOT,[Wo.FAILED]:Ti.CROSS,[Wo.OK]:Ti.TICK},Prr={[Wo.IDLE]:lo.NONE,[Wo.PROGRESS]:lo.WARNING,[Wo.FAILED]:lo.DANGER,[Wo.OK]:lo.SUCCESS},Lrr=()=>{const[t,r]=bt.useState(null),{uploadNpeFile:e}=Kge(),[n,a]=Xl(AD),[u,o]=bt.useState(Wo.IDLE),f=async i=>{var l,h,y,b;if(r("Uploading..."),o(Wo.PROGRESS),!i.target.files)return;const s=(l=i.target.files)==null?void 0:l[0],d=await e(i.target.files);if(d.status!==200)o(Wo.FAILED),r((h=d==null?void 0:d.data)==null?void 0:h.message);else if(((y=d==null?void 0:d.data)==null?void 0:y.status)!==Wo.OK)o(Wo.FAILED),r((b=d==null?void 0:d.data)==null?void 0:b.message);else{const C=s.name;a(C),B1("Active NPE",C),o(Wo.OK),r(`${C} uploaded successfully`)}};return He.jsxs("div",{className:"npe-file-loader",children:[He.jsx(Lve,{text:n??"Choose file...",onInputChange:f}),He.jsx("div",{className:`verify-connection-item status-${Wo[u]}`,children:u?He.jsxs(He.Fragment,{children:[He.jsx(Hs,{className:"connection-status-icon",icon:Rrr[u],size:20,intent:Prr[u]}),He.jsx("span",{className:"connection-status-text",children:t})]}):null})]})},zS={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 F0=(t=>(t.NOC0="NOC0",t.NOC1="NOC1",t))(F0||{}),k1=(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))(k1||{}),ms=(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))(ms||{});const M$=({width:t,height:r,data:e,isMulticolor:n=!1,style:a})=>{const o=new Map,f=new Map,i=e.filter((d,l,h)=>l===h.findIndex(y=>y.nocId===d.nocId&&y.color===d.color));i.forEach(d=>{if(!o.has(d.nocId))o.set(d.nocId,1);else{const l=o.get(d.nocId);o.set(d.nocId,l+1)}}),o.forEach((d,l)=>{f.set(l,[5,(d-1)*5])});const s=[];return He.jsx("svg",{width:t,height:r,style:a,"aria-description":i.map(d=>d.nocId).join(","),children:He.jsx("g",{children:i.map((d,l)=>{const h=s.find(b=>b.nocId===d.nocId),y=h?h.counter:0;return h?h.counter+=1:s.push({nocId:d.nocId,counter:1}),He.jsxs(bt.Fragment,{children:[He.jsx("line",{x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,stroke:d.color,strokeWidth:1,...n?{strokeDasharray:f.get(d.nocId).join(",")}:{},...n?{strokeDashoffset:y*f.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"})]},`${l}-${d.x1}-${d.y1}-${d.x2}-${d.y2}`)})})})},Q5=50,rh={x:25,y:Q5-25},DTe=5,Ob=-5,kb=-5,Db=DTe,Nb=DTe,hC={x:Q5-10,y:10},Av=2,xce=["#FFFFFF","#FF0000","#0000FF","#FFFF00","#FF00FF","#FF4500","rgb(91,131,19)","#9400D3","#FFD700","#1E90FF","#007500","#FF69B4","#BA55D3","#7FFF00","#B22222"];function*Orr(){let t=0;for(;;)yield xce[t],t=(t+1)%xce.length}const krr=Orr(),zL=new Map,NTe=t=>(zL.has(t)||zL.set(t,krr.next().value),zL.get(t)||"#ffffff"),Drr=()=>{zL.clear()},FTe=(t,r)=>{let e=0,n=0,a=0,u=0,o=9,f=9,i="",s=0,d=0,l={p1:"",p2:"",p3:""};switch(t){case k1.NOC1_NORTH:d=0,e=rh.x+Db,a=rh.y+Nb,n=rh.x+Db,u=0,l={p1:`${n-f/2},${u+o+d}`,p2:`${n+f/2},${u+o+d}`,p3:`${n},${u+d}`};break;case k1.NOC1_WEST:d=0,e=rh.x+Db,n=0,a=rh.y+Nb,u=rh.y+Nb,l={p1:`${n+o+d},${u-f/2}`,p2:`${n+o+d},${u+f/2}`,p3:`${n+d},${u}`};break;case k1.NOC0_SOUTH:d=2,e=rh.x+Ob,n=rh.x+Ob,a=rh.y+kb,u=Q5,l={p1:`${n-f/2},${u-o-d}`,p2:`${n+f/2},${u-o-d}`,p3:`${n},${u-d}`};break;case k1.NOC0_EAST:d=2,e=rh.x+Ob,n=Q5,a=rh.y+kb,u=rh.y+kb,l={p1:`${n-o-d},${u-f/2}`,p2:`${n-o-d},${u+f/2}`,p3:`${n-d},${u}`};break;case k1.NOC0_OUT:f=7,o=7,d=2,e=rh.x+Ob-Av,n=hC.x+Ob-Av,a=rh.y+kb-Av,u=hC.y+kb-Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break;case k1.NOC0_IN:f=7,o=7,d=2,e=hC.x+Ob+Av,n=rh.x+Ob+Av,u=rh.y+kb+Av,a=hC.y+kb+Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break;case k1.NOC1_OUT:f=7,o=7,d=0,e=rh.x+Db-Av,n=hC.x+Db-Av,a=rh.y+Nb-Av,u=hC.y+Nb-Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break;case k1.NOC1_IN:f=7,o=7,d=0,e=hC.x+Db+Av,n=rh.x+Db+Av,u=rh.y+Nb+Av,a=hC.y+Nb+Av,l={p1:`${n-f/2},${u+o-d}`,p2:`${n+f/2},${u+o-d}`,p3:`${n},${u-d}`},s=Math.atan2(u-a,n-e)*180/Math.PI+90,i=`rotate(${s} ${n} ${u})`;break}return{x2:n,y2:u,x1:e,y1:a,arrow:l,transform:i,color:r,nocId:t}},SC=(t,r=0,e=!1)=>{if(t===-1)return"rgb(100, 100, 100)";const n=150,u=(Math.min(t,n)-r)/(n-r),o=Math.round(u*255);return e?`rgb(${o},${o},${255-o})`:`rgb(${o}, ${255-o}, 0)`},wce=t=>t.map(r=>FTe(r.nocId,NTe(r.transfer))),Nrr=({timestepList:t,canvasWidth:r,nocType:e=null})=>{const n=bt.useRef(null),a=30,[u,o]=bt.useState(null),f=bt.useMemo(()=>({worst:t.map(d=>{if(e){const y=Math.max(-1,...d.link_demand.filter(C=>C[ms.NOC_ID].indexOf(e)===0).map(C=>C[ms.DEMAND])),b=SC(y);return{value:y,color:b}}const l=Math.max(-1,...d.link_demand.map(y=>y[ms.DEMAND])),h=SC(l);return{value:l,color:h}}),utilization:t.map(d=>{if(e){const l=d.noc[e];if(l)return{value:l.avg_link_util,color:SC(l.avg_link_util)}}return{value:d.avg_link_util,color:SC(d.avg_link_util)}}),demand:t.map(d=>{if(e){const h=d.noc[e];if(h)return{value:h.avg_link_demand,color:SC(h.avg_link_demand)}}const l=SC(d.avg_link_demand);return{value:d.avg_link_demand,color:l}})}),[e,t]);bt.useEffect(()=>{const d=n.current,l=d==null?void 0:d.getContext("2d");if(!d||!l)return;l.clearRect(0,0,d.width,d.height);const h=d.width/f.worst.length;f.worst.forEach(({color:y},b)=>{l.fillStyle=y,l.fillRect(b*h,0,h,d.height/3)}),f.utilization.forEach(({color:y},b)=>{l.fillStyle=y,l.fillRect(b*h,d.height/3,h,d.height/3*2)}),f.demand.forEach(({color:y},b)=>{l.fillStyle=y,l.fillRect(b*h,d.height/3*2,h,d.height)})},[f,r,a]);const i=d=>{const l=n.current;if(l){const h=l.getBoundingClientRect(),y=d.clientX-h.left,b=h.width/f.worst.length,C=Math.floor(y/b);C>-1?o({x:y,y:0,text:He.jsxs("div",{children:[e!==void 0&&He.jsxs("div",{children:["Selected ",e]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:f.worst[C].color}})," ","Max Demand:"," ",f.worst[C].value>-1?`${f.worst[C].value.toFixed(3)} %`:"N/A"]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:f.utilization[C].color}}),` Avg Utilization: ${f.utilization[C].value.toFixed(3)} %`]}),He.jsxs("div",{children:[He.jsx("span",{style:{width:"10px",height:"10px",display:"inline-block",backgroundColor:f.demand[C].color}}),` Avg Demand: ${f.demand[C].value.toFixed(3)} %`]})]})}):(n.current&&(n.current.style.cursor="default"),o(null))}},s=()=>{o(null)};return He.jsxs(He.Fragment,{children:[u&&He.jsx(_s,{content:u.text,position:sl.TOP,hoverOpenDelay:0,hoverCloseDelay:0,isOpen:!0,usePortal:!0,minimal:!0,modifiers:{offset:{enabled:!0,options:{offset:[u.x,a*1.5]}}},children:He.jsx("div",{style:{position:"absolute",top:0,left:`${u.x}px`,width:"0",height:"0",backgroundColor:"red",zIndex:100}})}),He.jsx("canvas",{style:{width:"100%",height:`${a}px`},ref:n,width:r,height:a,onMouseMove:i,onMouseLeave:s})]})},Frr=({groupedTransfersByNoCID:t,selectedNode:r,showActiveTransfers:e,highlightedTransfer:n,setHighlightedTransfer:a,congestionData:u,nocType:o})=>He.jsx("div",{className:"side-data",children:Object.keys(t).length!==0&&He.jsxs(He.Fragment,{children:[He.jsxs("h3",{children:["Active transfers through ",r==null?void 0:r.coords.join("-"),He.jsx(Ta,{variant:"minimal",icon:Ti.CROSS,onClick:()=>e(null)})]}),Object.entries(t).map(([f,i])=>{const s=u.find(l=>l[ms.NOC_ID]===f),d=s?s[ms.DEMAND]:0;return He.jsxs("div",{className:"local-transfer-ctn",children:[He.jsxs("h4",{children:["NOC ID: ",f,He.jsx("span",{className:"color-square",style:{backgroundColor:SC(d)}}),d.toFixed(2)]}),i.map(l=>He.jsxs("div",{className:"local-transfer",style:{opacity:n===null||n===l?1:.25},onMouseOver:()=>a(l),onMouseOut:()=>a(null),children:[He.jsx("div",{className:"color-square",style:{backgroundColor:NTe(l.id)}}),l.id,He.jsxs("div",{children:[He.jsx("span",{className:"transfer-src",children:l.src.join("-")})," ",He.jsx(Hs,{size:12,icon:Ti.ArrowRight})," ",He.jsx("span",{className:"transfer-dst",children:l.dst.length===1?l.dst[0].join("-"):`${l.dst[0].join("-")} - ${l.dst[l.dst.length-1].join("-")}`})]}),He.jsxs("div",{children:[Mh(l.total_bytes),"B"]}),He.jsx("div",{children:l.noc_event_type}),He.jsx("div",{children:He.jsxs("div",{className:"route",children:[l.route[0].injection_rate.toFixed(2)," b/cycle"]})})]},l.id))]},f)})]})}),zrr=({info:t,numTransfers:r})=>{const e=u=>zS[u]!==void 0&&zS[u]!==null,n=(u,o)=>{if(!zS[u])return null;const i=zS[u],s=i.units,d=i.decimals!==void 0?i.decimals:2;return`${typeof o=="number"?Number(o).toFixed(d):o} ${s}`},a=u=>{const o=zS[u];if(!o)return null;const{label:f,description:i}=o;return He.jsx(_s,{content:i,children:f?`${f}: `:u})};return He.jsx("div",{className:"metadata",children:He.jsxs(DD,{label:He.jsx("h3",{className:"title",children:"Run summary"}),isOpen:!0,children:[He.jsx("div",{children:t&&Object.keys(t).map(u=>e(u)&&t[u]!==void 0?He.jsxs("div",{children:[He.jsxs("span",{children:[a(u),": "]}),He.jsx("span",{children:n(u,t[u])})]},u):null)}),He.jsx("hr",{}),He.jsxs("div",{children:[He.jsx("span",{children:"Active transfers:"}),He.jsx("span",{children:r})]})]})})},Brr=({id:t,width:r,height:e,cores:n,dram:a,eth:u,pcie:o,showActiveTransfers:f,isAnnotatingCores:i,TENSIX_SIZE:s})=>{const d=l=>{const[h,y]=l;return n!=null&&n.some(b=>b[0]===h&&b[1]===y)?He.jsx("div",{className:"node-type-label node-type-c",children:"T"}):a!=null&&a.some(b=>b[0]===h&&b[1]===y)?He.jsx("div",{className:"node-type-label node-type-d",children:"d"}):u!=null&&u.some(b=>b[0]===h&&b[1]===y)?He.jsx("div",{className:"node-type-label node-type-e",children:"e"}):o!=null&&o.some(b=>b[0]===h&&b[1]===y)?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(${r||0}, ${s}px)`,gridTemplateRows:`repeat(${e||0}, ${s}px)`},children:[He.jsx("div",{className:"chip-id",children:t}),Array.from({length:r}).map((l,h)=>Array.from({length:e}).map((y,b)=>He.jsx("div",{className:"tensix empty-tensix",onClick:()=>f(null),style:{gridColumn:h+1,gridRow:b+1,width:`${s}px`,height:`${s}px`},children:i?d([b,h]):""},`${h}-${b}`)))]})},$rr=({transfer:t,clusterChip:r,index:e,getOriginOpacity:n})=>He.jsxs(He.Fragment,{children:[t.src&&r.id===t.src[ms.CHIP_ID]&&He.jsx("div",{className:"tensix src-dst src",style:{gridColumn:t.src[ms.X]+1,gridRow:t.src[ms.Y]+1,opacity:n(t)}},`${t.id}-src-${e}`),t.dst.map(a=>{var o;const u=((o=t.src)==null?void 0:o.toString())===a.toString()?"both":"dst";return r.id===a[ms.CHIP_ID]?He.jsx("div",{className:_i("tensix src-dst",u),style:{gridColumn:a[ms.X]+1,gridRow:a[ms.Y]+1,opacity:n(t)}},`${t.id}-dst-${e}-${a[ms.Y]}-${a[ms.X]}`):null})]}),Urr=25,Tce=25,D1=Q5,L2=D1,_ce=1,Sce=2,Hrr=({npeData:t})=>{var me,pe;const[r,e]=bt.useState(null),[n,a]=bt.useState(0),u=t.timestep_data[n],o=t.noc_transfers.filter(se=>u==null?void 0:u.active_transfers.includes(se.id)),[f,i]=bt.useState(null),[s,d]=bt.useState([]),[l,h]=bt.useState(null),[y,b]=bt.useState(0);let C=0;const[m,c]=bt.useState(.75),v=Object.entries(t.chips).map(([se,ne])=>(C=Math.max(C,ne[tg.X]),{id:parseInt(se,10),coords:ne})),[g,p]=bt.useState(!1),[I,A]=bt.useState(!0),[w,T]=bt.useState(null),E=se=>{T(w===void 0?se===F0.NOC0?F0.NOC1:F0.NOC0:w!==se?null:se===F0.NOC0?F0.NOC1:F0.NOC0)},[x,S]=bt.useState(window.innerWidth);bt.useEffect(()=>{const se=()=>S(window.innerWidth);return window.addEventListener("resize",se),()=>window.removeEventListener("resize",se)},[]);const{architecture:_,cores:L,dram:k,eth:F,pcie:N}=D8e(t.common_info.arch),P=((me=_.grid)==null?void 0:me.x_size)||10,z=((pe=_.grid)==null?void 0:pe.y_size)||12;bt.useEffect(()=>{Drr(),g&&re()},[n,g]),bt.useEffect(()=>{O(),a(0),h(null),d([]),e(null)},[t]);const M=bt.useMemo(()=>{const se=new Map;return s.forEach(ne=>{ne.route.forEach(J=>{J.links.forEach(ue=>{const[he,le,ee]=ue,ve=se.get(he)||[];ve[le]=ve[le]||[],ve[le][ee]=ve[le][ee]||[],ve[le][ee].push({transfer:ne.id,nocId:ue[ms.NOC_ID]}),se.set(he,ve)})})}),se},[s]),R=bt.useMemo(()=>{if(!(l!=null&&l.coords))return{};const[se,ne,J]=l.coords,ue={};return s.forEach(he=>{he.route.forEach(le=>{le.links.forEach(ee=>{const[ve,de,Ae]=ee;if(ne===de&&J===Ae&&se===ve){const be=ee[ms.NOC_ID];ue[be]||(ue[be]=[]),ue[be].push(he)}})})}),ue},[s,l]),D=(se=_ce)=>{b(se),clearInterval(f);const ne=t.timestep_data.length,J=setInterval(()=>{a(ue=>ue<ne-1?ue+1:0)},100/se);i(J)},O=()=>(b(0),clearInterval(f)),j=()=>{D()},G=()=>{D(Sce)},W=()=>{O()},X=()=>{O();const se=t.timestep_data.length;h(null),d([]),a(ne=>ne>0?ne-1:se-1)},Y=()=>{O(),h(null),d([]);const se=t.timestep_data.length;a(ne=>ne<se-1?ne+1:0)},Q=se=>{O(),a(se),h(null),d([])},H=(se,ne)=>{if(K(),se===null){d([]),h(null);return}if((l==null?void 0:l.index)===ne){h(null),d([]);return}ne!==void 0&&h({index:ne,coords:[se[ms.CHIP_ID],se[ms.Y],se[ms.X]]}),W();const J=t.timestep_data[n].active_transfers.map(ue=>{var ee;const he=t.noc_transfers.find(ve=>ve.id===ue),le=(ee=he==null?void 0:he.route)==null?void 0:ee.map(ve=>ve.links.some(de=>de[ms.Y]===se[ms.Y]&&de[ms.X]===se[ms.X]&&(w===null||de[ms.NOC_ID].indexOf(w)===0))?ve:null).filter(ve=>ve!==null);if(le&&le.length>0)return he}).filter(ue=>ue!==void 0);d(J)},K=()=>{p(!1),d([])},re=()=>{p(!0),h(null);const se=t.timestep_data[n].active_transfers.map(ne=>t.noc_transfers.find(J=>J.id===ne)).filter(ne=>ne!==void 0);d(se)},oe=se=>{if(g)return 0;if(r!==null&&r.id===se.id)return 1;if(r!==null)return .15;if(s.length===0)return 0;const ne=s.some(J=>J.id===se.id);return s.length!==0&&!ne?.15:.5},ce=x-x/t.timestep_data.length-Tce;return He.jsxs("div",{className:"npe",children:[He.jsx(zrr,{info:t.common_info,numTransfers:o.length}),He.jsxs("div",{className:"header",children:[He.jsxs(ay,{className:"npe-controls",children:[He.jsx(Ta,{icon:Ti.StepBackward,onClick:X}),He.jsx(Ta,{icon:Ti.Play,intent:y===_ce?lo.PRIMARY:lo.NONE,onClick:j}),He.jsx(Ta,{icon:Ti.FastForward,onClick:G,intent:y===Sce?lo.PRIMARY:lo.NONE}),He.jsx(Ta,{icon:Ti.STOP,onClick:W}),He.jsx(Ta,{icon:Ti.StepForward,onClick:Y}),"|",He.jsx(af,{label:"Show all active transfers",checked:g,onChange:()=>g?K():re()}),He.jsx(af,{label:"Annotate cores",checked:I,onChange:()=>A(!I)}),He.jsx(af,{label:"NOC0",checked:w===F0.NOC0||w===null,onChange:()=>E(F0.NOC0)}),He.jsx(af,{label:"NOC1",checked:w===F0.NOC1||w===null,onChange:()=>E(F0.NOC1)}),"|",He.jsxs("label",{children:["Zoom",He.jsx(jU,{"aria-label":"zoom",min:.1,max:2,stepSize:.1,labelStepSize:1,value:m,onChange:se=>c(se),labelRenderer:se=>`${se.toFixed(1)}`})]})]}),He.jsxs("div",{style:{position:"relative",width:`${ce}px`},children:[He.jsx(jU,{min:0,max:t.timestep_data.length-1,stepSize:1,labelStepSize:t.timestep_data.length>Urr?t.timestep_data.length/20:1,value:n,onChange:se=>Q(se)}),He.jsx("div",{className:"bp5-slider-progress duplicate",style:{width:`${x-Tce}px`}})]}),He.jsx(Nrr,{timestepList:t.timestep_data,canvasWidth:x,nocType:w})]}),He.jsxs("div",{className:"split-grid",children:[He.jsx("div",{className:_i("chip-cluster-wrap",{"details-open":l!==null}),style:{gridTemplateColumns:`repeat(${C||0}, ${(D1+1)*P}px)`,zoom:m},children:v.map(se=>{var ne;return He.jsxs("div",{className:"chip",style:{gridColumn:se.coords[tg.X]+1,gridRow:se.coords[tg.Y]+1},children:[He.jsx(Brr,{id:se.id,width:P,height:z,cores:L,dram:k,eth:F,pcie:N,showActiveTransfers:H,isAnnotatingCores:I,TENSIX_SIZE:D1}),He.jsxs("div",{className:"tensix-grid congestion",style:{display:"grid",gridTemplateColumns:`repeat(${P}, ${D1}px)`,gridTemplateRows:`repeat(${z}, ${D1}px)`},children:[o.map((J,ue)=>He.jsx($rr,{transfer:J,clusterChip:se,index:ue,getOriginOpacity:oe},`${J.id}-${ue}`)),u==null?void 0:u.link_demand.map((J,ue)=>J[ms.CHIP_ID]===se.id&&(w===null||J[ms.NOC_ID].indexOf(w)===0)?He.jsxs("button",{type:"button",className:`tensix ${J[ms.Y]}-${J[ms.X]}`,style:{position:"relative",gridColumn:J[ms.X]+1,gridRow:J[ms.Y]+1},onClick:()=>H(J,ue),children:[He.jsx(M$,{style:{opacity:r!==null||s.length!==0?.15:1},width:L2,height:L2,data:[FTe(J[ms.NOC_ID],SC(J[ms.DEMAND]))],isMulticolor:!1}),He.jsxs("div",{style:{fontSize:"9px",position:"absolute",top:0},children:[J[ms.Y],"-",J[ms.X]]})]},`${ue}-${J[ms.Y]}-${J[ms.X]}-${J[ms.NOC_ID]}`):null)]}),He.jsx("div",{className:"tensix-grid transfers",style:{gridTemplateColumns:`repeat(${P}, ${D1}px)`,gridTemplateRows:`repeat(${z}, ${D1}px)`},children:(ne=M.get(se.id))==null?void 0:ne.map((J,ue)=>He.jsx(He.Fragment,{children:J.map((he,le)=>He.jsx("div",{className:(l==null?void 0:l.coords[ms.Y])===ue&&(l==null?void 0:l.coords[ms.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(M$,{style:{...r!==null?{opacity:.25}:{opacity:1}},width:L2,height:L2,data:wce(he),isMulticolor:!0})})},`selected-transfer-${ue}-${le}`))},`device-${se.id}-row-${ue}`))}),r!==null&&He.jsx("div",{className:"tensix-grid transfer-single",style:{gridTemplateColumns:`repeat(${P}, ${D1}px)`,gridTemplateRows:`repeat(${z}, ${D1}px)`},children:r==null?void 0:r.route.map(J=>J.links.map(ue=>ue[ms.CHIP_ID]===se.id?He.jsx("div",{className:"tensix",style:{position:"relative",gridColumn:ue[ms.X]+1,gridRow:ue[ms.Y]+1},children:He.jsx("div",{className:"transfer-render-ctn",children:He.jsx(M$,{width:L2,height:L2,data:wce([{transfer:r.id,nocId:ue[ms.NOC_ID]}]),isMulticolor:!1})})},`${ue[ms.Y]}-${ue[ms.X]}-${ue[ms.NOC_ID]}`):null))})]})})}),He.jsx(Frr,{groupedTransfersByNoCID:R,selectedNode:l,congestionData:u==null?void 0:u.link_demand.filter(se=>se[ms.Y]===(l==null?void 0:l.coords[ms.Y])&&se[ms.X]===(l==null?void 0:l.coords[ms.X])),showActiveTransfers:H,highlightedTransfer:r,setHighlightedTransfer:e,nocType:w})]})]})},mV=t=>{if(!t)return null;const r=/^(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?$/,e=t.match(r);if(!e)return null;const[,n,a,u,o]=e;return{major:parseInt(n,10),minor:parseInt(a,10),patch:parseInt(u,10),...o?{prerelease:o}:{}}},zTe="1.0.0",Ece=He.jsx("a",{target:"_blank",href:"https://github.com/tenstorrent/tt-npe",rel:"noreferrer",children:"tt-npe"}),jrr=()=>{const t=Ko(AD),{data:r,isLoading:e}=w8e(t);return He.jsxs(He.Fragment,{children:[He.jsx(kA,{title:"NPE"}),He.jsx("h1",{className:"page-title",children:"NOC performance estimator"}),He.jsx(Lrr,{}),e?He.jsx(Tv,{}):r?Vrr(r)?He.jsx(Hrr,{npeData:r}):He.jsxs(He.Fragment,{children:[He.jsxs("p",{children:["Invalid NPE data or version. Current supported version is ",zTe," got ",r.common_info.version||"null",";"]}),He.jsxs("p",{children:["Use ",Ece," to generate new NPE dataset",Mce(r.common_info.version)?He.jsxs(He.Fragment,{children:[" ","or install an older version of the visualizer"," ",He.jsxs("pre",{children:["pip install ttnn-visualizer==",Mce(r.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 ",Ece," for details on how to generate NPE files."]})]})]})},Vrr=t=>{if(!["common_info","noc_transfers","timestep_data"].every(u=>u in t))return!1;const n=mV(t.common_info.version);if(!n)return!1;const a=mV(zTe);return(n==null?void 0:n.major)===(a==null?void 0:a.major)},Mce=t=>{switch(mV(t)){case null:case void 0:return"0.32.3";default:return""}},BTe=[{index:!0,element:He.jsx(L9e,{})},{path:os.OPERATIONS,element:He.jsx(aNe,{})},{path:`${os.OPERATIONS}/:operationId`,element:He.jsx(Idt,{})},{path:os.TENSORS,element:He.jsx(Sdt,{})},{path:os.BUFFERS,element:He.jsx(fpt,{})},{path:os.STYLEGUIDE,element:He.jsx(vpt,{})},{path:`${os.GRAPHTREE}/:operationId?`,element:He.jsx(crr,{})},{path:os.PERFORMANCE,element:He.jsx(Mrr,{})},{path:os.NPE,element:He.jsx(jrr,{})},{path:os.CLUSTER,element:null}],Grr=cM({enter:"Toastify--animate Toastify__bounce-enter",exit:" no-toast-animation Toastify__bounce-exit",appendPosition:!0,collapseDuration:0,collapse:!0});function Wrr(){const t="0.37.1",r=qm(u0),e=qm(Uf),n=qm(AD),{data:a}=EW(),u=fy(),o=u.state;return bt.useEffect(()=>{var f,i,s;a!=null&&a.active_report&&(r(((f=a.active_report)==null?void 0:f.profiler_name)??null),e(((i=a.active_report)==null?void 0:i.performance_name)??null),n(((s=a.active_report)==null?void 0:s.npe_name)??null))},[a,r,e,n]),He.jsxs("div",{className:YT,children:[He.jsx(kA,{defaultTitle:"TT-NN Visualizer",titleTemplate:"%s | TT-NN Visualizer",children:He.jsx("meta",{charSet:"utf-8"})}),He.jsx("header",{className:"app-header",children:He.jsxs("nav",{className:"nav-container",children:[He.jsxs("a",{href:os.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($8e,{})]})}),He.jsxs("main",{children:[He.jsx(e9e,{routes:BTe}),u.pathname===os.CLUSTER&&(o==null?void 0:o.background)&&He.jsx(J8e,{}),He.jsx($Oe,{position:"top-right",autoClose:!1,newestOnTop:!1,closeOnClick:!0,closeButton:!1,theme:"light",transition:Grr})]}),He.jsx(W8e,{})]})}const l1=Object.create(null);l1.open="0";l1.close="1";l1.ping="2";l1.pong="3";l1.message="4";l1.upgrade="5";l1.noop="6";const BL=Object.create(null);Object.keys(l1).forEach(t=>{BL[l1[t]]=t});const yV={type:"error",data:"parser error"},$Te=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",UTe=typeof ArrayBuffer=="function",HTe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,bX=({type:t,data:r},e,n)=>$Te&&r instanceof Blob?e?n(r):Rce(r,n):UTe&&(r instanceof ArrayBuffer||HTe(r))?e?n(r):Rce(new Blob([r]),n):n(l1[t]+(r||"")),Rce=(t,r)=>{const e=new FileReader;return e.onload=function(){const n=e.result.split(",")[1];r("b"+(n||""))},e.readAsDataURL(t)};function Pce(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let R$;function Zrr(t,r){if($Te&&t.data instanceof Blob)return t.data.arrayBuffer().then(Pce).then(r);if(UTe&&(t.data instanceof ArrayBuffer||HTe(t.data)))return r(Pce(t.data));bX(t,!1,e=>{R$||(R$=new TextEncoder),r(R$.encode(e))})}const Lce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",aE=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Lce.length;t++)aE[Lce.charCodeAt(t)]=t;const Yrr=t=>{let r=t.length*.75,e=t.length,n,a=0,u,o,f,i;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);const s=new ArrayBuffer(r),d=new Uint8Array(s);for(n=0;n<e;n+=4)u=aE[t.charCodeAt(n)],o=aE[t.charCodeAt(n+1)],f=aE[t.charCodeAt(n+2)],i=aE[t.charCodeAt(n+3)],d[a++]=u<<2|o>>4,d[a++]=(o&15)<<4|f>>2,d[a++]=(f&3)<<6|i&63;return s},Xrr=typeof ArrayBuffer=="function",xX=(t,r)=>{if(typeof t!="string")return{type:"message",data:jTe(t,r)};const e=t.charAt(0);return e==="b"?{type:"message",data:Krr(t.substring(1),r)}:BL[e]?t.length>1?{type:BL[e],data:t.substring(1)}:{type:BL[e]}:yV},Krr=(t,r)=>{if(Xrr){const e=Yrr(t);return jTe(e,r)}else return{base64:!0,data:t}},jTe=(t,r)=>{switch(r){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},VTe="",Qrr=(t,r)=>{const e=t.length,n=new Array(e);let a=0;t.forEach((u,o)=>{bX(u,!1,f=>{n[o]=f,++a===e&&r(n.join(VTe))})})},Jrr=(t,r)=>{const e=t.split(VTe),n=[];for(let a=0;a<e.length;a++){const u=xX(e[a],r);if(n.push(u),u.type==="error")break}return n};function qrr(){return new TransformStream({transform(t,r){Zrr(t,e=>{const n=e.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 u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,n)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(a[0]|=128),r.enqueue(a),r.enqueue(e)})}})}let P$;function P6(t){return t.reduce((r,e)=>r+e.length,0)}function L6(t,r){if(t[0].length===r)return t.shift();const e=new Uint8Array(r);let n=0;for(let a=0;a<r;a++)e[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)),e}function enr(t,r){P$||(P$=new TextDecoder);const e=[];let n=0,a=-1,u=!1;return new TransformStream({transform(o,f){for(e.push(o);;){if(n===0){if(P6(e)<1)break;const i=L6(e,1);u=(i[0]&128)===128,a=i[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(P6(e)<2)break;const i=L6(e,2);a=new DataView(i.buffer,i.byteOffset,i.length).getUint16(0),n=3}else if(n===2){if(P6(e)<8)break;const i=L6(e,8),s=new DataView(i.buffer,i.byteOffset,i.length),d=s.getUint32(0);if(d>Math.pow(2,21)-1){f.enqueue(yV);break}a=d*Math.pow(2,32)+s.getUint32(4),n=3}else{if(P6(e)<a)break;const i=L6(e,a);f.enqueue(xX(u?i:P$.decode(i),r)),n=0}if(a===0||a>t){f.enqueue(yV);break}}}})}const GTe=4;function oh(t){if(t)return tnr(t)}function tnr(t){for(var r in oh.prototype)t[r]=oh.prototype[r];return t}oh.prototype.on=oh.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this};oh.prototype.once=function(t,r){function e(){this.off(t,e),r.apply(this,arguments)}return e.fn=r,this.on(t,e),this};oh.prototype.off=oh.prototype.removeListener=oh.prototype.removeAllListeners=oh.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+t];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,a=0;a<e.length;a++)if(n=e[a],n===r||n.fn===r){e.splice(a,1);break}return e.length===0&&delete this._callbacks["$"+t],this};oh.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),e=this._callbacks["$"+t],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(e){e=e.slice(0);for(var n=0,a=e.length;n<a;++n)e[n].apply(this,r)}return this};oh.prototype.emitReserved=oh.prototype.emit;oh.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};oh.prototype.hasListeners=function(t){return!!this.listeners(t).length};const m9=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,e)=>e(r,0),Wm=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),rnr="arraybuffer";function WTe(t,...r){return r.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const nnr=Wm.setTimeout,inr=Wm.clearTimeout;function y9(t,r){r.useNativeTimers?(t.setTimeoutFn=nnr.bind(Wm),t.clearTimeoutFn=inr.bind(Wm)):(t.setTimeoutFn=Wm.setTimeout.bind(Wm),t.clearTimeoutFn=Wm.clearTimeout.bind(Wm))}const anr=1.33;function onr(t){return typeof t=="string"?snr(t):Math.ceil((t.byteLength||t.size)*anr)}function snr(t){let r=0,e=0;for(let n=0,a=t.length;n<a;n++)r=t.charCodeAt(n),r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:(n++,e+=4);return e}function ZTe(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function lnr(t){let r="";for(let e in t)t.hasOwnProperty(e)&&(r.length&&(r+="&"),r+=encodeURIComponent(e)+"="+encodeURIComponent(t[e]));return r}function unr(t){let r={},e=t.split("&");for(let n=0,a=e.length;n<a;n++){let u=e[n].split("=");r[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return r}class cnr extends Error{constructor(r,e,n){super(r),this.description=e,this.context=n,this.type="TransportError"}}class wX extends oh{constructor(r){super(),this.writable=!1,y9(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,e,n){return super.emitReserved("error",new cnr(r,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const e=xX(r,this.socket.binaryType);this.onPacket(e)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,e={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const e=lnr(r);return e.length?"?"+e:""}}class fnr extends wX{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const e=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||e()})),this.writable||(n++,this.once("drain",function(){--n||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const e=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)};Jrr(r,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,Qrr(r,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=ZTe()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(r,e)}}let YTe=!1;try{YTe=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const hnr=YTe;function dnr(){}class vnr extends fnr{constructor(r){if(super(r),typeof location<"u"){const e=location.protocol==="https:";let n=location.port;n||(n=e?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||n!==r.port}}doWrite(r,e){const n=this.request({method:"POST",data:r});n.on("success",e),n.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(e,n)=>{this.onError("xhr poll error",e,n)}),this.pollXhr=r}}let zT=class $L extends oh{constructor(r,e,n){super(),this.createRequest=r,y9(this,n),this._opts=n,this._method=n.method||"GET",this._uri=e,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var r;const e=WTe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(e);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{}(r=this._opts.cookieJar)===null||r===void 0||r.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=$L.requestsCount++,$L.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=dnr,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $L.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};zT.requestsCount=0;zT.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Oce);else if(typeof addEventListener=="function"){const t="onpagehide"in Wm?"pagehide":"unload";addEventListener(t,Oce,!1)}}function Oce(){for(let t in zT.requests)zT.requests.hasOwnProperty(t)&&zT.requests[t].abort()}const gnr=function(){const t=XTe({xdomain:!1});return t&&t.responseType!==null}();class pnr extends vnr{constructor(r){super(r);const e=r&&r.forceBase64;this.supportsBinary=gnr&&!e}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new zT(XTe,this.uri(),r)}}function XTe(t){const r=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||hnr))return new XMLHttpRequest}catch{}if(!r)try{return new Wm[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const KTe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class mnr extends wX{get name(){return"websocket"}doOpen(){const r=this.uri(),e=this.opts.protocols,n=KTe?{}:WTe(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(r,e,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=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let e=0;e<r.length;e++){const n=r[e],a=e===r.length-1;bX(n,this.supportsBinary,u=>{try{this.doWrite(n,u)}catch{}a&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=ZTe()),this.supportsBinary||(e.b64=1),this.createUri(r,e)}}const L$=Wm.WebSocket||Wm.MozWebSocket;class ynr extends mnr{createSocket(r,e,n){return KTe?new L$(r,e,n):e?new L$(r,e):new L$(r)}doWrite(r,e){this.ws.send(e)}}class Anr extends wX{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const e=enr(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=r.readable.pipeThrough(e).getReader(),a=qrr();a.readable.pipeTo(r.writable),this._writer=a.writable.getWriter();const u=()=>{n.read().then(({done:f,value:i})=>{f||(this.onPacket(i),u())}).catch(f=>{})};u();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let e=0;e<r.length;e++){const n=r[e],a=e===r.length-1;this._writer.write(n).then(()=>{a&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const Cnr={websocket:ynr,webtransport:Anr,polling:pnr},Inr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bnr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function AV(t){if(t.length>8e3)throw"URI too long";const r=t,e=t.indexOf("["),n=t.indexOf("]");e!=-1&&n!=-1&&(t=t.substring(0,e)+t.substring(e,n).replace(/:/g,";")+t.substring(n,t.length));let a=Inr.exec(t||""),u={},o=14;for(;o--;)u[bnr[o]]=a[o]||"";return e!=-1&&n!=-1&&(u.source=r,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=xnr(u,u.path),u.queryKey=wnr(u,u.query),u}function xnr(t,r){const e=/\/{2,9}/g,n=r.replace(e,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&n.splice(0,1),r.slice(-1)=="/"&&n.splice(n.length-1,1),n}function wnr(t,r){const e={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,u){a&&(e[a]=u)}),e}const CV=typeof addEventListener=="function"&&typeof removeEventListener=="function",UL=[];CV&&addEventListener("offline",()=>{UL.forEach(t=>t())},!1);class uI extends oh{constructor(r,e){if(super(),this.binaryType=rnr,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(e=r,r=null),r){const n=AV(r);e.hostname=n.host,e.secure=n.protocol==="https"||n.protocol==="wss",e.port=n.port,n.query&&(e.query=n.query)}else e.host&&(e.hostname=AV(e.host).host);y9(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.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},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=unr(this.opts.query)),CV&&(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"})},UL.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const e=Object.assign({},this.opts.query);e.EIO=GTe,e.transport=r,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&uI.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(r);e.open(),this.setTransport(e)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",uI.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=r.data,this._onError(e);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),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 r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const a=this.writeBuffer[n].data;if(a&&(e+=onr(a)),n>0&&e>this._maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,m9(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,e,n){return this._sendPacket("message",r,e,n),this}send(r,e,n){return this._sendPacket("message",r,e,n),this}_sendPacket(r,e,n,a){if(typeof e=="function"&&(a=e,e=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const u={type:r,data:e,options:n};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),r()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():r()}):this.upgrading?n():r()),this}_onError(r){if(uI.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,e){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(),CV&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=UL.indexOf(this._offlineEventListener);n!==-1&&UL.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,e),this.writeBuffer=[],this._prevBufferLen=0}}}uI.protocol=GTe;class Tnr extends uI{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let e=this.createTransport(r),n=!1;uI.priorWebsocketSuccess=!1;const a=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",l=>{if(!n)if(l.type==="pong"&&l.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;uI.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=e.name,this.emitReserved("upgradeError",h)}}))};function u(){n||(n=!0,d(),e.close(),e=null)}const o=l=>{const h=new Error("probe error: "+l);h.transport=e.name,u(),this.emitReserved("upgradeError",h)};function f(){o("transport closed")}function i(){o("socket closed")}function s(l){e&&l.name!==e.name&&u()}const d=()=>{e.removeListener("open",a),e.removeListener("error",o),e.removeListener("close",f),this.off("close",i),this.off("upgrading",s)};e.once("open",a),e.once("error",o),e.once("close",f),this.once("close",i),this.once("upgrading",s),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const e=[];for(let n=0;n<r.length;n++)~this.transports.indexOf(r[n])&&e.push(r[n]);return e}}let _nr=class extends Tnr{constructor(r,e={}){const n=typeof r=="object"?r:e;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>Cnr[a]).filter(a=>!!a)),super(r,n)}};function Snr(t,r="",e){let n=t;e=e||typeof location<"u"&&location,t==null&&(t=e.protocol+"//"+e.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=e.protocol+t:t=e.host+t),/^(https?|wss?):\/\//.test(t)||(typeof e<"u"?t=e.protocol+"//"+t:t="https://"+t),n=AV(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 u=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+u+":"+n.port+r,n.href=n.protocol+"://"+u+(e&&e.port===n.port?"":":"+n.port),n}const Enr=typeof ArrayBuffer=="function",Mnr=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,QTe=Object.prototype.toString,Rnr=typeof Blob=="function"||typeof Blob<"u"&&QTe.call(Blob)==="[object BlobConstructor]",Pnr=typeof File=="function"||typeof File<"u"&&QTe.call(File)==="[object FileConstructor]";function TX(t){return Enr&&(t instanceof ArrayBuffer||Mnr(t))||Rnr&&t instanceof Blob||Pnr&&t instanceof File}function HL(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(HL(t[e]))return!0;return!1}if(TX(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return HL(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&HL(t[e]))return!0;return!1}function Lnr(t){const r=[],e=t.data,n=t;return n.data=IV(e,r),n.attachments=r.length,{packet:n,buffers:r}}function IV(t,r){if(!t)return t;if(TX(t)){const e={_placeholder:!0,num:r.length};return r.push(t),e}else if(Array.isArray(t)){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=IV(t[n],r);return e}else if(typeof t=="object"&&!(t instanceof Date)){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=IV(t[n],r));return e}return t}function Onr(t,r){return t.data=bV(t.data,r),delete t.attachments,t}function bV(t,r){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<r.length)return r[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=bV(t[e],r);else if(typeof t=="object")for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=bV(t[e],r));return t}const knr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Dnr=5;var bl;(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"})(bl||(bl={}));class Nnr{constructor(r){this.replacer=r}encode(r){return(r.type===bl.EVENT||r.type===bl.ACK)&&HL(r)?this.encodeAsBinary({type:r.type===bl.EVENT?bl.BINARY_EVENT:bl.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let e=""+r.type;return(r.type===bl.BINARY_EVENT||r.type===bl.BINARY_ACK)&&(e+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(e+=r.nsp+","),r.id!=null&&(e+=r.id),r.data!=null&&(e+=JSON.stringify(r.data,this.replacer)),e}encodeAsBinary(r){const e=Lnr(r),n=this.encodeAsString(e.packet),a=e.buffers;return a.unshift(n),a}}function kce(t){return Object.prototype.toString.call(t)==="[object Object]"}class _X extends oh{constructor(r){super(),this.reviver=r}add(r){let e;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(r);const n=e.type===bl.BINARY_EVENT;n||e.type===bl.BINARY_ACK?(e.type=n?bl.EVENT:bl.ACK,this.reconstructor=new Fnr(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(TX(r)||r.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(r),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let e=0;const n={type:Number(r.charAt(0))};if(bl[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===bl.BINARY_EVENT||n.type===bl.BINARY_ACK){const u=e+1;for(;r.charAt(++e)!=="-"&&e!=r.length;);const o=r.substring(u,e);if(o!=Number(o)||r.charAt(e)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(r.charAt(e+1)==="/"){const u=e+1;for(;++e&&!(r.charAt(e)===","||e===r.length););n.nsp=r.substring(u,e)}else n.nsp="/";const a=r.charAt(e+1);if(a!==""&&Number(a)==a){const u=e+1;for(;++e;){const o=r.charAt(e);if(o==null||Number(o)!=o){--e;break}if(e===r.length)break}n.id=Number(r.substring(u,e+1))}if(r.charAt(++e)){const u=this.tryParse(r.substr(e));if(_X.isPayloadValid(n.type,u))n.data=u;else throw new Error("invalid payload")}return n}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,e){switch(r){case bl.CONNECT:return kce(e);case bl.DISCONNECT:return e===void 0;case bl.CONNECT_ERROR:return typeof e=="string"||kce(e);case bl.EVENT:case bl.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&knr.indexOf(e[0])===-1);case bl.ACK:case bl.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Fnr{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const e=Onr(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const znr=Object.freeze(Object.defineProperty({__proto__:null,Decoder:_X,Encoder:Nnr,get PacketType(){return bl},protocol:Dnr},Symbol.toStringTag,{value:"Module"}));function U0(t,r,e){return t.on(r,e),function(){t.off(r,e)}}const Bnr=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class JTe extends oh{constructor(r,e,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=r,this.nsp=e,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 r=this.io;this.subs=[U0(r,"open",this.onopen.bind(this)),U0(r,"packet",this.onpacket.bind(this)),U0(r,"error",this.onerror.bind(this)),U0(r,"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(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...e){var n,a,u;if(Bnr.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(e.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const o={type:bl.EVENT,data:e};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const d=this.ids++,l=e.pop();this._registerAckCallback(d,l),o.id=d}const f=(a=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||a===void 0?void 0:a.writable,i=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!f||(i?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(r,e){var n;const a=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(a===void 0){this.acks[r]=e;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===r&&this.sendBuffer.splice(f,1);e.call(this,new Error("operation has timed out"))},a),o=(...f)=>{this.io.clearTimeoutFn(u),e.apply(this,f)};o.withError=!0,this.acks[r]=o}emitWithAck(r,...e){return new Promise((n,a)=>{const u=(o,f)=>o?a(o):n(f);u.withError=!0,e.push(u),this.emit(r,...e)})}_addToQueue(r){let e;typeof r[r.length-1]=="function"&&(e=r.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((a,...u)=>n!==this._queue[0]?void 0:(a!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(a)):(this._queue.shift(),e&&e(null,...u)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const e=this._queue[0];e.pending&&!r||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:bl.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(n=>String(n.id)===r)){const n=this.acks[r];delete this.acks[r],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case bl.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.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 bl.EVENT:case bl.BINARY_EVENT:this.onevent(r);break;case bl.ACK:case bl.BINARY_ACK:this.onack(r);break;case bl.DISCONNECT:this.ondisconnect();break;case bl.CONNECT_ERROR:this.destroy();const n=new Error(r.data.message);n.data=r.data.data,this.emitReserved("connect_error",n);break}}onevent(r){const e=r.data||[];r.id!=null&&e.push(this.ack(r.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const e=this;let n=!1;return function(...a){n||(n=!0,e.packet({type:bl.ACK,id:r,data:a}))}}onack(r){const e=this.acks[r.id];typeof e=="function"&&(delete this.acks[r.id],e.withError&&r.data.unshift(null),e.apply(this,r.data))}onconnect(r,e){this.id=r,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:bl.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(r===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(r===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,r.data)}}}function R_(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}R_.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),e=Math.floor(r*this.jitter*t);t=Math.floor(r*10)&1?t+e:t-e}return Math.min(t,this.max)|0};R_.prototype.reset=function(){this.attempts=0};R_.prototype.setMin=function(t){this.ms=t};R_.prototype.setMax=function(t){this.max=t};R_.prototype.setJitter=function(t){this.jitter=t};class xV extends oh{constructor(r,e){var n;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(e=r,r=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,y9(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((n=e.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new R_({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=r;const a=e.parser||znr;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var e;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(e=this.backoff)===null||e===void 0||e.setMin(r),this)}randomizationFactor(r){var e;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(e=this.backoff)===null||e===void 0||e.setJitter(r),this)}reconnectionDelayMax(r){var e;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(e=this.backoff)===null||e===void 0||e.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new _nr(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const a=U0(e,"open",function(){n.onopen(),r&&r()}),u=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),r?r(f):this.maybeReconnectOnOpen()},o=U0(e,"error",u);if(this._timeout!==!1){const f=this._timeout,i=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),e.close()},f);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}return this.subs.push(a),this.subs.push(o),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(U0(r,"ping",this.onping.bind(this)),U0(r,"data",this.ondata.bind(this)),U0(r,"error",this.onerror.bind(this)),U0(r,"close",this.onclose.bind(this)),U0(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(e){this.onclose("parse error",e)}}ondecoded(r){m9(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,e){let n=this.nsps[r];return n?this._autoConnect&&!n.active&&n.connect():(n=new JTe(this,r,e),this.nsps[r]=n),n}_destroy(r){const e=Object.keys(this.nsps);for(const n of e)if(this.nsps[n].active)return;this._close()}_packet(r){const e=this.encoder.encode(r);for(let n=0;n<e.length;n++)this.engine.write(e[n],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,e){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(a=>{a?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",a)):r.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const BS={};function jL(t,r){typeof t=="object"&&(r=t,t=void 0),r=r||{};const e=Snr(t,r.path||"/socket.io"),n=e.source,a=e.id,u=e.path,o=BS[a]&&u in BS[a].nsps,f=r.forceNew||r["force new connection"]||r.multiplex===!1||o;let i;return f?i=new xV(n,r):(BS[a]||(BS[a]=new xV(n,r)),i=BS[a]),e.query&&!r.query&&(r.query=e.queryKey),i.socket(e.path,r)}Object.assign(jL,{Manager:xV,Socket:JTe,io:jL,connect:jL});const D0=jL(`http://localhost:8000?instanceId=${wW()}`),$nr=bt.createContext(null),Unr=({children:t})=>{const[r,e]=Xl(bC),n=wW();return bt.useEffect(()=>(D0.on("connect",()=>{e(a=>({...a,status:tm.INACTIVE})),console.log(`Socket connected with ID: ${D0.id}`)}),D0.on("disconnect",a=>{console.log(`Socket disconnected: ${a}`)}),D0.on("connect_error",a=>{console.error(`Socket connection error: ${a.message}`)}),D0.on("reconnect",a=>{console.log(`Socket reconnected after ${a} attempts`)}),D0.on("fileTransferProgress",a=>{a.instanceId===n&&e({currentFileName:a.current_file_name,numberOfFiles:a.number_of_files,percentOfCurrent:a.percent_of_current,finishedFiles:a.finished_files,status:a.status})}),()=>{D0.off("connect"),D0.off("disconnect"),D0.off("connect_error"),D0.off("reconnect")}),[n,e]),He.jsx($nr.Provider,{value:D0,children:t})},Hnr=XEe([{path:os.HOME,element:He.jsx(Wrr,{}),errorElement:He.jsx(vOe,{}),children:BTe}]);I4e.onlyShowFocusOnTabs();const jnr=new A5e({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});k$.createRoot(document.getElementById("root")).render(He.jsx(w5e,{client:jnr,children:He.jsx(Qve,{children:He.jsx(uo.StrictMode,{children:He.jsx(Unr,{children:He.jsx(gPe,{children:He.jsx($Ee,{router:Hnr})})})})})}));export{Fa as I,Q2 as _,J2 as a,EQ as b,_Re as p};
|