@kylincloud/flamegraph 0.36.1 → 0.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/flamegraphRenderWorker.js +1 -1
- package/dist/flamegraphRenderWorker.js.map +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +4 -4
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.esm.js +4 -4
- package/dist/index.node.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/ProfilerTable.tsx +2 -2
- package/src/sass/flamegraph.scss +7 -0
package/dist/index.node.cjs.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("zod"),r=require("react-dom"),a=require("./logo-v3-small.svg"),o="undefined"!=typeof document?document.currentScript:null,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,c={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/var
|
|
6
|
+
*/var u,f=(l||(l=1,u=c,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=r(e,n.call(this,a)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return this&&this[n]||n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var a="";for(var o in n)e.call(n,o)&&n[o]&&(a=r(a,this&&this[o]||o));return a}function r(e,t){return t?e?e+" "+t:e+t:e}u.exports?(t.default=t,u.exports=t):window.classNames=t}()),c.exports),d=s(f);
|
|
7
7
|
/*!
|
|
8
8
|
* Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
|
|
9
9
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
10
10
|
* Copyright 2025 Fonticons, Inc.
|
|
11
11
|
*/
|
|
12
|
-
function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function w(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=R(e))||t){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}function j(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw r}}return s}}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function R(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}var F=function(){},P={},I={},E=null,L={mark:F,measure:F};try{"undefined"!=typeof window&&(P=window),"undefined"!=typeof document&&(I=document),"undefined"!=typeof MutationObserver&&(E=MutationObserver),"undefined"!=typeof performance&&(L=performance)}catch(ie){}var D=(P.navigator||{}).userAgent,B=void 0===D?"":D,A=P,O=I,z=E,$=L;A.document;var V,H=!!O.documentElement&&!!O.head&&"function"==typeof O.addEventListener&&"function"==typeof O.createElement,W=~B.indexOf("MSIE")||~B.indexOf("Trident/"),U={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},J=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],Q="classic",X="duotone",Y="sharp",q="sharp-duotone",Z="chisel",G="etch",K="jelly",ee="jelly-duo",te="jelly-fill",ne="notdog",ae="notdog-duo",re="slab",oe="slab-press",ie="thumbprint",se="utility",le="utility-duo",ce="utility-fill",ue="whiteboard",fe=[Q,X,Y,q,Z,G,K,ee,te,ne,ae,re,oe,ie,se,le,ce,ue];j(j(j(j(j(j(j(j(j(j(V={},Q,"Classic"),X,"Duotone"),Y,"Sharp"),q,"Sharp Duotone"),Z,"Chisel"),G,"Etch"),K,"Jelly"),ee,"Jelly Duo"),te,"Jelly Fill"),ne,"Notdog"),j(j(j(j(j(j(j(j(V,ae,"Notdog Duo"),re,"Slab"),oe,"Slab Press"),ie,"Thumbprint"),se,"Utility"),le,"Utility Duo"),ce,"Utility Fill"),ue,"Whiteboard");var de=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),he=["fak","fa-kit","fakd","fa-kit-duotone"],me={fak:"kit","fa-kit":"kit"},pe={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"};j(j({},"kit","Kit"),"kit-duotone","Kit Duotone");var ge,ve={kit:"fak"},be={"kit-duotone":"fakd"},ye="duotone-group",xe="swap-opacity",we="primary",ke="secondary";j(j(j(j(j(j(j(j(j(j(ge={},"classic","Classic"),"duotone","Duotone"),"sharp","Sharp"),"sharp-duotone","Sharp Duotone"),"chisel","Chisel"),"etch","Etch"),"jelly","Jelly"),"jelly-duo","Jelly Duo"),"jelly-fill","Jelly Fill"),"notdog","Notdog"),j(j(j(j(j(j(j(j(ge,"notdog-duo","Notdog Duo"),"slab","Slab"),"slab-press","Slab Press"),"thumbprint","Thumbprint"),"utility","Utility"),"utility-duo","Utility Duo"),"utility-fill","Utility Fill"),"whiteboard","Whiteboard");j(j({},"kit","Kit"),"kit-duotone","Kit Duotone");var je={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},Se=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"]),Ne=[1,2,3,4,5,6,7,8,9,10],Ce=Ne.concat([11,12,13,14,15,16,17,18,19,20]),Te=[].concat(T(Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]})),["solid","regular","light","thin","duotone","brands","semibold"],["aw","fw","pull-left","pull-right"],["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",ye,xe,we,ke]).concat(Ne.map(function(e){return"".concat(e,"x")})).concat(Ce.map(function(e){return"w-".concat(e)})),_e="___FONT_AWESOME___",Me="svg-inline--fa",Re="data-fa-i2svg",Fe="data-fa-pseudo-element",Pe="data-prefix",Ie="data-icon",Ee="fontawesome-i2svg",Le=["HTML","HEAD","STYLE","SCRIPT"],De=["::before","::after",":before",":after"],Be=function(){try{return"production"===process.env.NODE_ENV}catch(e){return!1}}();function Ae(e){return new Proxy(e,{get:function(e,t){return t in e?e[t]:e[Q]}})}var Oe=N({},U);Oe[Q]=N(N(N(N({},{"fa-duotone":"duotone"}),U[Q]),me),pe);var ze=Ae(Oe),$e=N({},{chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}});$e[Q]=N(N(N(N({},{duotone:"fad"}),$e[Q]),ve),be);var Ve=Ae($e),He=N({},je);He[Q]=N(N({},He[Q]),{fak:"fa-kit"});var We=Ae(He),Ue=N({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}});Ue[Q]=N(N({},Ue[Q]),{"fa-kit":"fak"}),Ae(Ue);var Je=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,Qe="fa-layers-text",Xe=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i;Ae(N({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}}));var Ye=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],qe={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Ze=[].concat(T(["kit"]),T(Te)),Ge=A.FontAwesomeConfig||{};if(O&&"function"==typeof O.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=C(e,2),n=t[0],a=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=O.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=r&&(Ge[a]=r)})}var Ke={styleDefault:"solid",familyDefault:Q,cssPrefix:"fa",replacementClass:Me,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Ge.familyPrefix&&(Ge.cssPrefix=Ge.familyPrefix);var et=N(N({},Ke),Ge);et.autoReplaceSvg||(et.observeMutations=!1);var tt={};Object.keys(Ke).forEach(function(e){Object.defineProperty(tt,e,{enumerable:!0,set:function(t){et[e]=t,nt.forEach(function(e){return e(tt)})},get:function(){return et[e]}})}),Object.defineProperty(tt,"familyPrefix",{enumerable:!0,set:function(e){et.cssPrefix=e,nt.forEach(function(e){return e(tt)})},get:function(){return et.cssPrefix}}),A.FontAwesomeConfig=tt;var nt=[];var at=16,rt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function ot(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function it(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function st(e){return e.classList?it(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function lt(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ct(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function ut(e){return e.size!==rt.size||e.x!==rt.x||e.y!==rt.y||e.rotate!==rt.rotate||e.flipX||e.flipY}function ft(){var e="fa",t=Me,n=tt.cssPrefix,a=tt.replacementClass,r=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";\n --fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";\n --fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";\n --fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";\n --fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";\n --fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";\n --fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";\n --fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";\n --fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";\n --fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";\n --fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";\n --fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";\n --fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";\n --fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";\n}\n\n.svg-inline--fa {\n box-sizing: content-box;\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285714em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left,\n.svg-inline--fa .fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-pull-right,\n.svg-inline--fa .fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.fa-layers .svg-inline--fa {\n inset: 0;\n margin: auto;\n position: absolute;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xs {\n font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-sm {\n font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-lg {\n font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xl {\n font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-2xl {\n font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-width-auto {\n --fa-width: auto;\n}\n\n.fa-fw,\n.fa-width-fixed {\n --fa-width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-inline-start: var(--fa-li-margin, 2.5em);\n padding-inline-start: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n/* Heads Up: Bordered Icons will not be supported in the future!\n - This feature will be deprecated in the next major release of Font Awesome (v8)!\n - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.\n*/\n/* Notes:\n* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)\n* --@{v.$css-prefix}-border-padding =\n ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it\'s vertical alignment)\n ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)\n*/\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.0625em);\n box-sizing: var(--fa-border-box-sizing, content-box);\n padding: var(--fa-border-padding, 0.1875em 0.25em);\n}\n\n.fa-pull-left,\n.fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right,\n.fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n .fa-bounce,\n .fa-fade,\n .fa-beat-fade,\n .fa-flip,\n .fa-pulse,\n .fa-shake,\n .fa-spin,\n .fa-spin-pulse {\n animation: none !important;\n transition: none !important;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.svg-inline--fa.fa-inverse {\n fill: var(--fa-inverse, #fff);\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n line-height: 2em;\n position: relative;\n vertical-align: middle;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.svg-inline--fa.fa-stack-1x {\n --fa-width: 1.25em;\n height: 1em;\n width: var(--fa-width);\n}\n.svg-inline--fa.fa-stack-2x {\n --fa-width: 2.5em;\n height: 2em;\n width: var(--fa-width);\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n inset: 0;\n margin: auto;\n position: absolute;\n z-index: var(--fa-stack-z-index, auto);\n}';if(n!==e||a!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");r=r.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(s,".".concat(a))}return r}var dt=!1;function ht(){tt.autoAddCss&&!dt&&(!function(e){if(e&&H){var t=O.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=O.head.childNodes,a=null,r=n.length-1;r>-1;r--){var o=n[r],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(a=o)}O.head.insertBefore(t,a)}}(ft()),dt=!0)}var mt={mixout:function(){return{dom:{css:ft,insertCss:ht}}},hooks:function(){return{beforeDOMElementCreation:function(){ht()},beforeI2svg:function(){ht()}}}},pt=A||{};pt[_e]||(pt[_e]={}),pt[_e].styles||(pt[_e].styles={}),pt[_e].hooks||(pt[_e].hooks={}),pt[_e].shims||(pt[_e].shims=[]);var gt=pt[_e],vt=[],bt=function(){O.removeEventListener("DOMContentLoaded",bt),yt=1,vt.map(function(e){return e()})},yt=!1;function xt(e){var t=e.tag,n=e.attributes,a=void 0===n?{}:n,r=e.children,o=void 0===r?[]:r;return"string"==typeof e?lt(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(lt(e[n]),'" ')},"").trim()}(a),">").concat(o.map(xt).join(""),"</").concat(t,">")}function wt(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}H&&((yt=(O.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(O.readyState))||O.addEventListener("DOMContentLoaded",bt));var kt=function(e,t,n,a){var r,o,i,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(r=1,i=e[s[0]]):(r=0,i=n);r<l;r++)i=c(i,e[o=s[r]],o,e);return i};function jt(e){return 1!==T(e).length?null:e.codePointAt(0).toString(16)}function St(e){return Object.keys(e).reduce(function(t,n){var a=e[n];return!!a.icon?t[a.iconName]=a.icon:t[n]=a,t},{})}function Nt(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,a=void 0!==n&&n,r=St(t);"function"!=typeof gt.hooks.addPack||a?gt.styles[e]=N(N({},gt.styles[e]||{}),r):gt.hooks.addPack(e,St(t)),"fas"===e&&Nt("fa",t)}var Ct=gt.styles,Tt=gt.shims,_t=Object.keys(We),Mt=_t.reduce(function(e,t){return e[t]=Object.keys(We[t]),e},{}),Rt=null,Ft={},Pt={},It={},Et={},Lt={};function Dt(e,t){var n,a=t.split("-"),r=a[0],o=a.slice(1).join("-");return r!==e||""===o||(n=o,~Ze.indexOf(n))?null:o}var Bt,At=function(){var e=function(e){return kt(Ct,function(t,n,a){return t[a]=kt(n,e,{}),t},{})};Ft=e(function(e,t,n){(t[3]&&(e[t[3]]=n),t[2])&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n});return e}),Pt=e(function(e,t,n){(e[n]=n,t[2])&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n});return e}),Lt=e(function(e,t,n){var a=t[2];return e[n]=n,a.forEach(function(t){e[t]=n}),e});var t="far"in Ct||tt.autoFetchSvg,n=kt(Tt,function(e,n){var a=n[0],r=n[1],o=n[2];return"far"!==r||t||(r="fas"),"string"==typeof a&&(e.names[a]={prefix:r,iconName:o}),"number"==typeof a&&(e.unicodes[a.toString(16)]={prefix:r,iconName:o}),e},{names:{},unicodes:{}});It=n.names,Et=n.unicodes,Rt=Ht(tt.styleDefault,{family:tt.familyDefault})};function Ot(e,t){return(Ft[e]||{})[t]}function zt(e,t){return(Lt[e]||{})[t]}function $t(e){return It[e]||{prefix:null,iconName:null}}function Vt(){return Rt}Bt=function(e){Rt=Ht(e.styleDefault,{family:tt.familyDefault})},nt.push(Bt),At();function Ht(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).family,n=void 0===t?Q:t,a=ze[n][e];if(n===X&&!e)return"fad";var r=Ve[n][e]||Ve[n][a],o=e in gt.styles?e:null;return r||o||null}function Wt(e){return e.sort().filter(function(e,t,n){return n.indexOf(e)===t})}var Ut=Se.concat(he);function Jt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skipLookups,n=void 0!==t&&t,a=null,r=Wt(e.filter(function(e){return Ut.includes(e)})),o=Wt(e.filter(function(e){return!Ut.includes(e)})),i=C(r.filter(function(e){return a=e,!J.includes(e)}),1)[0],s=void 0===i?null:i,l=function(e){var t=Q,n=_t.reduce(function(e,t){return e[t]="".concat(tt.cssPrefix,"-").concat(t),e},{});return fe.forEach(function(a){(e.includes(n[a])||e.some(function(e){return Mt[a].includes(e)}))&&(t=a)}),t}(r),c=N(N({},function(e){var t=[],n=null;return e.forEach(function(e){var a=Dt(tt.cssPrefix,e);a?n=a:e&&t.push(e)}),{iconName:n,rest:t}}(o)),{},{prefix:Ht(s,{family:l})});return N(N(N({},c),function(e){var t=e.values,n=e.family,a=e.canonical,r=e.givenPrefix,o=void 0===r?"":r,i=e.styles,s=void 0===i?{}:i,l=e.config,c=void 0===l?{}:l,u=n===X,f=t.includes("fa-duotone")||t.includes("fad"),d="duotone"===c.familyDefault,h="fad"===a.prefix||"fa-duotone"===a.prefix;!u&&(f||d||h)&&(a.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(a.prefix="fab");if(!a.prefix&&Qt.includes(n)){if(Object.keys(s).find(function(e){return Xt.includes(e)})||c.autoFetchSvg){var m=de.get(n).defaultShortPrefixId;a.prefix=m,a.iconName=zt(a.prefix,a.iconName)||a.iconName}}"fa"!==a.prefix&&"fa"!==o||(a.prefix=Vt()||"fas");return a}({values:e,family:l,styles:Ct,config:tt,canonical:c,givenPrefix:a})),function(e,t,n){var a=n.prefix,r=n.iconName;if(e||!a||!r)return{prefix:a,iconName:r};var o="fa"===t?$t(r):{},i=zt(a,r);r=o.iconName||i||r,"far"!==(a=o.prefix||a)||Ct.far||!Ct.fas||tt.autoFetchSvg||(a="fas");return{prefix:a,iconName:r}}(n,a,c))}var Qt=fe.filter(function(e){return e!==Q||e!==X}),Xt=Object.keys(je).filter(function(e){return e!==Q}).map(function(e){return Object.keys(je[e])}).flat();var Yt=function(){return w(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}},[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=n.reduce(this._pullDefinitions,{});Object.keys(r).forEach(function(t){e.definitions[t]=N(N({},e.definitions[t]||{}),r[t]),Nt(t,r[t]);var n=We[Q][t];n&&Nt(n,r[t]),At()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map(function(t){var a=n[t],r=a.prefix,o=a.iconName,i=a.icon,s=i[2];e[r]||(e[r]={}),s.length>0&&s.forEach(function(t){"string"==typeof t&&(e[r][t]=i)}),e[r][o]=i}),e}}])}(),qt=[],Zt={},Gt={},Kt=Object.keys(Gt);function en(e,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];return(Zt[e]||[]).forEach(function(e){t=e.apply(null,[t].concat(a))}),t}function tn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];(Zt[e]||[]).forEach(function(e){e.apply(null,n)})}function nn(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Gt[e]?Gt[e].apply(null,t):void 0}function an(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Vt();if(t)return t=zt(n,t)||t,wt(rn.definitions,n,t)||wt(gt.styles,n,t)}var rn=new Yt,on={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return H?(tn("beforeI2svg",e),nn("pseudoElements2svg",e),nn("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoReplaceSvgRoot;!1===tt.autoReplaceSvg&&(tt.autoReplaceSvg=!0),tt.observeMutations=!0,e=function(){ln({autoReplaceSvgRoot:n}),tn("watch",t)},H&&(yt?setTimeout(e,0):vt.push(e))}},sn={noAuto:function(){tt.autoReplaceSvg=!1,tt.observeMutations=!1,tn("noAuto")},config:tt,dom:on,parse:{icon:function(e){if(null===e)return null;if("object"===M(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:zt(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=Ht(e[0]);return{prefix:n,iconName:zt(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(tt.cssPrefix,"-"))>-1||e.match(Je))){var a=Jt(e.split(" "),{skipLookups:!0});return{prefix:a.prefix||Vt(),iconName:zt(a.prefix,a.iconName)||a.iconName}}if("string"==typeof e){var r=Vt();return{prefix:r,iconName:zt(r,e)||e}}}},library:rn,findIconDefinition:an,toHtml:xt},ln=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,t=void 0===e?O:e;(Object.keys(gt.styles).length>0||tt.autoFetchSvg)&&H&&tt.autoReplaceSvg&&sn.dom.i2svg({node:t})};function cn(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return xt(e)})}}),Object.defineProperty(e,"node",{get:function(){if(H){var t=O.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function un(e){var t=e.icons,n=t.main,a=t.mask,r=e.prefix,o=e.iconName,i=e.transform,s=e.symbol,l=e.maskId,c=e.extra,u=e.watchable,f=void 0!==u&&u,d=a.found?a:n,h=d.width,m=d.height,p=[tt.replacementClass,o?"".concat(tt.cssPrefix,"-").concat(o):""].filter(function(e){return-1===c.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(c.classes).join(" "),g={children:[],attributes:N(N({},c.attributes),{},{"data-prefix":r,"data-icon":o,class:p,role:c.attributes.role||"img",viewBox:"0 0 ".concat(h," ").concat(m)})};(function(e){return["aria-label","aria-labelledby","title","role"].some(function(t){return t in e})})(c.attributes)||c.attributes["aria-hidden"]||(g.attributes["aria-hidden"]="true"),f&&(g.attributes[Re]="");var v=N(N({},g),{},{prefix:r,iconName:o,main:n,mask:a,maskId:l,transform:i,symbol:s,styles:N({},c.styles)}),b=a.found&&n.found?nn("generateAbstractMask",v)||{children:[],attributes:{}}:nn("generateAbstractIcon",v)||{children:[],attributes:{}},y=b.children,x=b.attributes;return v.children=y,v.attributes=x,s?function(e){var t=e.prefix,n=e.iconName,a=e.children,r=e.attributes,o=e.symbol,i=!0===o?"".concat(t,"-").concat(tt.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:N(N({},r),{},{id:i}),children:a}]}]}(v):function(e){var t=e.children,n=e.main,a=e.mask,r=e.attributes,o=e.styles,i=e.transform;if(ut(i)&&n.found&&!a.found){var s={x:n.width/n.height/2,y:.5};r.style=ct(N(N({},o),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:r,children:t}]}(v)}function fn(e){var t=e.content,n=e.width,a=e.height,r=e.transform,o=e.extra,i=e.watchable,s=void 0!==i&&i,l=N(N({},o.attributes),{},{class:o.classes.join(" ")});s&&(l[Re]="");var c=N({},o.styles);ut(r)&&(c.transform=function(e){var t=e.transform,n=e.width,a=void 0===n?16:n,r=e.height,o=void 0===r?16:r,i="";return i+=W?"translate(".concat(t.x/at-a/2,"em, ").concat(t.y/at-o/2,"em) "):"translate(calc(-50% + ".concat(t.x/at,"em), calc(-50% + ").concat(t.y/at,"em)) "),i+="scale(".concat(t.size/at*(t.flipX?-1:1),", ").concat(t.size/at*(t.flipY?-1:1),") "),i+"rotate(".concat(t.rotate,"deg) ")}({transform:r,width:n,height:a}),c["-webkit-transform"]=c.transform);var u=ct(c);u.length>0&&(l.style=u);var f=[];return f.push({tag:"span",attributes:l,children:[t]}),f}var dn=gt.styles;function hn(e){var t=e[0],n=e[1],a=C(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(a)?{tag:"g",attributes:{class:"".concat(tt.cssPrefix,"-").concat(qe.GROUP)},children:[{tag:"path",attributes:{class:"".concat(tt.cssPrefix,"-").concat(qe.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(tt.cssPrefix,"-").concat(qe.PRIMARY),fill:"currentColor",d:a[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:a}}}}var mn={found:!1,width:512,height:512};function pn(e,t){var n=t;return"fa"===t&&null!==tt.styleDefault&&(t=Vt()),new Promise(function(a,r){if("fa"===n){var o=$t(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&dn[t]&&dn[t][e])return a(hn(dn[t][e]));!function(e,t){Be||tt.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),a(N(N({},mn),{},{icon:tt.showMissingIcons&&e&&nn("missingIconAbstract")||{}}))})}var gn=function(){},vn=tt.measurePerformance&&$&&$.mark&&$.measure?$:{mark:gn,measure:gn},bn='FA "7.1.0"',yn=function(e){vn.mark("".concat(bn," ").concat(e," ends")),vn.measure("".concat(bn," ").concat(e),"".concat(bn," ").concat(e," begins"),"".concat(bn," ").concat(e," ends"))},xn=function(e){return vn.mark("".concat(bn," ").concat(e," begins")),function(){return yn(e)}},wn=function(){};function kn(e){return"string"==typeof(e.getAttribute?e.getAttribute(Re):null)}function jn(e){return O.createElementNS("http://www.w3.org/2000/svg",e)}function Sn(e){return O.createElement(e)}function Nn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).ceFn,n=void 0===t?"svg"===e.tag?jn:Sn:t;if("string"==typeof e)return O.createTextNode(e);var a=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(t){a.setAttribute(t,e.attributes[t])}),(e.children||[]).forEach(function(e){a.appendChild(Nn(e,{ceFn:n}))}),a}var Cn={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(Nn(e),t)}),null===t.getAttribute(Re)&&tt.keepOriginalSource){var n=O.createComment(function(e){var t=" ".concat(e.outerHTML," ");return"".concat(t,"Font Awesome fontawesome.com ")}(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){var t=e[0],n=e[1];if(~st(t).indexOf(tt.replacementClass))return Cn.replace(e);var a=new RegExp("".concat(tt.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var r=n[0].attributes.class.split(" ").reduce(function(e,t){return t===tt.replacementClass||t.match(a)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=r.toSvg.join(" "),0===r.toNode.length?t.removeAttribute("class"):t.setAttribute("class",r.toNode.join(" "))}var o=n.map(function(e){return xt(e)}).join("\n");t.setAttribute(Re,""),t.innerHTML=o}};function Tn(e){e()}function _n(e,t){var n="function"==typeof t?t:wn;if(0===e.length)n();else{var a=Tn;"async"===tt.mutateApproach&&(a=A.requestAnimationFrame||Tn),a(function(){var t=!0===tt.autoReplaceSvg?Cn.replace:Cn[tt.autoReplaceSvg]||Cn.replace,a=xn("mutate");e.map(t),a(),n()})}}var Mn=!1;function Rn(){Mn=!0}function Fn(){Mn=!1}var Pn=null;function In(e){if(z&&tt.observeMutations){var t=e.treeCallback,n=void 0===t?wn:t,a=e.nodeCallback,r=void 0===a?wn:a,o=e.pseudoElementsCallback,i=void 0===o?wn:o,s=e.observeMutationsRoot,l=void 0===s?O:s;Pn=new z(function(e){if(!Mn){var t=Vt();it(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!kn(e.addedNodes[0])&&(tt.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&tt.searchPseudoElements&&i([e.target],!0),"attributes"===e.type&&kn(e.target)&&~Ye.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute(Pe):null,n=e.getAttribute?e.getAttribute(Ie):null;return t&&n}(e.target)){var a=Jt(st(e.target)),o=a.prefix,s=a.iconName;e.target.setAttribute(Pe,o||t),s&&e.target.setAttribute(Ie,s)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(tt.replacementClass)&&r(e.target);var l})}}),H&&Pn.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function En(e){var t,n,a=e.getAttribute("data-prefix"),r=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",i=Jt(st(e));return i.prefix||(i.prefix=Vt()),a&&r&&(i.prefix=a,i.iconName=r),i.iconName&&i.prefix||(i.prefix&&o.length>0&&(i.iconName=(t=i.prefix,n=e.innerText,(Pt[t]||{})[n]||Ot(i.prefix,jt(e.innerText)))),!i.iconName&&tt.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function Ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=En(e),a=n.iconName,r=n.prefix,o=n.rest,i=function(e){return it(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{})}(e),s=en("parseNodeAttributes",{},e),l=t.styleParser?function(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(e,t){var n=t.split(":"),a=n[0],r=n.slice(1);return a&&r.length>0&&(e[a]=r.join(":").trim()),e},{})),n}(e):[];return N({iconName:a,prefix:r,transform:rt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:i}},s)}var Dn=gt.styles;function Bn(e){var t="nest"===tt.autoReplaceSvg?Ln(e,{styleParser:!1}):Ln(e);return~t.extra.classes.indexOf(Qe)?nn("generateLayersText",e,t):nn("generateSvgReplacementMutation",e,t)}function An(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!H)return Promise.resolve();var n=O.documentElement.classList,a=function(e){return n.add("".concat(Ee,"-").concat(e))},r=function(e){return n.remove("".concat(Ee,"-").concat(e))},o=tt.autoFetchSvg?[].concat(T(he),T(Se)):J.concat(Object.keys(Dn));o.includes("fa")||o.push("fa");var i=[".".concat(Qe,":not([").concat(Re,"])")].concat(o.map(function(e){return".".concat(e,":not([").concat(Re,"])")})).join(", ");if(0===i.length)return Promise.resolve();var s=[];try{s=it(e.querySelectorAll(i))}catch(e){}if(!(s.length>0))return Promise.resolve();a("pending"),r("complete");var l=xn("onTree"),c=s.reduce(function(e,t){try{var n=Bn(t);n&&e.push(n)}catch(e){Be||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){_n(n,function(){a("active"),a("complete"),r("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function On(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Bn(e).then(function(e){e&&_n([e],t)})}var zn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,a=void 0===n?rt:n,r=t.symbol,o=void 0!==r&&r,i=t.mask,s=void 0===i?null:i,l=t.maskId,c=void 0===l?null:l,u=t.classes,f=void 0===u?[]:u,d=t.attributes,h=void 0===d?{}:d,m=t.styles,p=void 0===m?{}:m;if(e){var g=e.prefix,v=e.iconName,b=e.icon;return cn(N({type:"icon"},e),function(){return tn("beforeDOMElementCreation",{iconDefinition:e,params:t}),un({icons:{main:hn(b),mask:s?hn(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:v,transform:N(N({},rt),a),symbol:o,maskId:c,extra:{attributes:h,styles:p,classes:f}})})}},$n={mixout:function(){return{icon:(e=zn,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(t||{}).icon?t:an(t||{}),r=n.mask;return r&&(r=(r||{}).icon?r:an(r||{})),e(a,N(N({},n),{},{mask:r}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=An,e.nodeCallback=On,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?O:t,a=e.callback;return An(n,void 0===a?function(){}:a)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,a=t.prefix,r=t.transform,o=t.symbol,i=t.mask,s=t.maskId,l=t.extra;return new Promise(function(t,c){Promise.all([pn(n,a),i.iconName?pn(i.iconName,i.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(i){var c=C(i,2),u=c[0],f=c[1];t([e,un({icons:{main:u,mask:f},prefix:a,iconName:n,transform:r,symbol:o,maskId:s,extra:l,watchable:!0})])}).catch(c)})},e.generateAbstractIcon=function(e){var t,n=e.children,a=e.attributes,r=e.main,o=e.transform,i=ct(e.styles);return i.length>0&&(a.style=i),ut(o)&&(t=nn("generateAbstractTransformGrouping",{main:r,transform:o,containerWidth:r.width,iconWidth:r.width})),n.push(t||r.icon),{children:n,attributes:a}}}},Vn={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,a=void 0===n?[]:n;return cn({type:"layer"},function(){tn("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(tt.cssPrefix,"-layers")].concat(T(a)).join(" ")},children:n}]})}}}},Hn={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.title;var n=t.classes,a=void 0===n?[]:n,r=t.attributes,o=void 0===r?{}:r,i=t.styles,s=void 0===i?{}:i;return cn({type:"counter",content:e},function(){return tn("beforeDOMElementCreation",{content:e,params:t}),function(e){var t=e.content,n=e.extra,a=N(N({},n.attributes),{},{class:n.classes.join(" ")}),r=ct(n.styles);r.length>0&&(a.style=r);var o=[];return o.push({tag:"span",attributes:a,children:[t]}),o}({content:e.toString(),extra:{attributes:o,styles:s,classes:["".concat(tt.cssPrefix,"-layers-counter")].concat(T(a))}})})}}}},Wn={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,a=void 0===n?rt:n,r=t.classes,o=void 0===r?[]:r,i=t.attributes,s=void 0===i?{}:i,l=t.styles,c=void 0===l?{}:l;return cn({type:"text",content:e},function(){return tn("beforeDOMElementCreation",{content:e,params:t}),fn({content:e,transform:N(N({},rt),a),extra:{attributes:s,styles:c,classes:["".concat(tt.cssPrefix,"-layers-text")].concat(T(o))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.transform,a=t.extra,r=null,o=null;if(W){var i=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();r=s.width/i,o=s.height/i}return Promise.resolve([e,fn({content:e.innerHTML,width:r,height:o,transform:n,extra:a,watchable:!0})])}}},Un=new RegExp('"',"ug"),Jn=[1105920,1112319],Qn=N(N(N(N({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),Xn=Object.keys(Qn).reduce(function(e,t){return e[t.toLowerCase()]=Qn[t],e},{}),Yn=Object.keys(Xn).reduce(function(e,t){var n=Xn[t];return e[t]=n[900]||T(Object.entries(n))[0][1],e},{});function qn(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(a,r){if(null!==e.getAttribute(n))return a();var o,i,s,l=it(e.children).filter(function(e){return e.getAttribute(Fe)===t})[0],c=A.getComputedStyle(e,t),u=c.getPropertyValue("font-family"),f=u.match(Xe),d=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(l&&!f)return e.removeChild(l),a();if(f&&"none"!==h&&""!==h){var m=c.getPropertyValue("content"),p=function(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),a=parseInt(t),r=isNaN(a)?"normal":a;return(Xn[n]||{})[r]||Yn[n]}(u,d),g=function(e){return jt(T(e.replace(Un,""))[0]||"")}(m),v=f[0].startsWith("FontAwesome"),b=function(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content").replace(Un,""),a=n.codePointAt(0),r=a>=Jn[0]&&a<=Jn[1],o=2===n.length&&n[0]===n[1];return r||o||t}(c),y=Ot(p,g),x=y;if(v){var w=(i=Et[o=g],s=Ot("fas",o),i||(s?{prefix:"fas",iconName:s}:null)||{prefix:null,iconName:null});w.iconName&&w.prefix&&(y=w.iconName,p=w.prefix)}if(!y||b||l&&l.getAttribute(Pe)===p&&l.getAttribute(Ie)===x)a();else{e.setAttribute(n,x),l&&e.removeChild(l);var k={iconName:null,prefix:null,transform:rt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},j=k.extra;j.attributes[Fe]=t,pn(y,p).then(function(r){var o=un(N(N({},k),{},{icons:{main:r,mask:{prefix:null,iconName:null,rest:[]}},prefix:p,iconName:x,extra:j,watchable:!0})),i=O.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(i,e.firstChild):e.appendChild(i),i.outerHTML=o.map(function(e){return xt(e)}).join("\n"),e.removeAttribute(n),a()}).catch(r)}}else a()})}function Zn(e){return Promise.all([qn(e,"::before"),qn(e,"::after")])}function Gn(e){return!(e.parentNode===document.head||~Le.indexOf(e.tagName.toUpperCase())||e.getAttribute(Fe)||e.parentNode&&"svg"===e.parentNode.tagName)}var Kn=function(e){return!!e&&De.some(function(t){return e.includes(t)})},ea=function(e){if(!e)return[];var t=new Set,n=e.split(/,(?![^()]*\))/).map(function(e){return e.trim()});n=n.flatMap(function(e){return e.includes("(")?e:e.split(",").map(function(e){return e.trim()})});var a,r=k(n);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(Kn(o)){var i=De.reduce(function(e,t){return e.replace(t,"")},o);""!==i&&"*"!==i&&t.add(i)}}}catch(e){r.e(e)}finally{r.f()}return t};function ta(e){if(H){var t;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])t=e;else if(tt.searchPseudoElementsFullScan)t=e.querySelectorAll("*");else{var n,a=new Set,r=k(document.styleSheets);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{var i,s=k(o.cssRules);try{for(s.s();!(i=s.n()).done;){var l,c=i.value,u=k(ea(c.selectorText));try{for(u.s();!(l=u.n()).done;){var f=l.value;a.add(f)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){s.e(e)}finally{s.f()}}catch(e){tt.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(o.href," (").concat(e.message,')\nIf it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.'))}}}catch(e){r.e(e)}finally{r.f()}if(!a.size)return;var d=Array.from(a).join(", ");try{t=e.querySelectorAll(d)}catch(e){}}return new Promise(function(e,n){var a=it(t).filter(Gn).map(Zn),r=xn("searchPseudoElements");Rn(),Promise.all(a).then(function(){r(),Fn(),e()}).catch(function(){r(),Fn(),n()})})}}var na={hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=ta,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?O:t;tt.searchPseudoElements&&ta(n)}}},aa=!1,ra=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),a=n[0],r=n.slice(1).join("-");if(a&&"h"===r)return e.flipX=!0,e;if(a&&"v"===r)return e.flipY=!0,e;if(r=parseFloat(r),isNaN(r))return e;switch(a){case"grow":e.size=e.size+r;break;case"shrink":e.size=e.size-r;break;case"left":e.x=e.x-r;break;case"right":e.x=e.x+r;break;case"up":e.y=e.y-r;break;case"down":e.y=e.y+r;break;case"rotate":e.rotate=e.rotate+r}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},oa={mixout:function(){return{parse:{transform:function(e){return ra(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=ra(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,a=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(a/2," 256)")},i="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={outer:o,inner:{transform:"".concat(i," ").concat(s," ").concat(l)},path:{transform:"translate(".concat(r/2*-1," -256)")}};return{tag:"g",attributes:N({},c.outer),children:[{tag:"g",attributes:N({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:N(N({},t.icon.attributes),c.path)}]}]}}}},ia={x:0,y:0,width:"100%",height:"100%"};function sa(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var la={hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),a=n?Jt(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return a.prefix||(a.prefix=Vt()),e.mask=a,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,a=e.attributes,r=e.main,o=e.mask,i=e.maskId,s=e.transform,l=r.width,c=r.icon,u=o.width,f=o.icon,d=function(e){var t=e.transform,n=e.containerWidth,a=e.iconWidth,r={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(32*t.x,", ").concat(32*t.y,") "),i="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:r,inner:{transform:"".concat(o," ").concat(i," ").concat(s)},path:{transform:"translate(".concat(a/2*-1," -256)")}}}({transform:s,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:N(N({},ia),{},{fill:"white"})},m=c.children?{children:c.children.map(sa)}:{},p={tag:"g",attributes:N({},d.inner),children:[sa(N({tag:c.tag,attributes:N(N({},c.attributes),d.path)},m))]},g={tag:"g",attributes:N({},d.outer),children:[p]},v="mask-".concat(i||ot()),b="clip-".concat(i||ot()),y={tag:"mask",attributes:N(N({},ia),{},{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},x={tag:"defs",children:[{tag:"clipPath",attributes:{id:b},children:(t=f,"g"===t.tag?t.children:[t])},y]};return n.push(x,{tag:"rect",attributes:N({fill:"currentColor","clip-path":"url(#".concat(b,")"),mask:"url(#".concat(v,")")},ia)}),{children:n,attributes:a}}}},ca={provides:function(e){var t=!1;A.matchMedia&&(t=A.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:N(N({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var r=N(N({},a),{},{attributeName:"opacity"}),o={tag:"circle",attributes:N(N({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:N(N({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:N(N({},r),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:N(N({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:N(N({},r),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:N(N({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:N(N({},r),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};!function(e,t){var n=t.mixoutsTo;qt=e,Zt={},Object.keys(Gt).forEach(function(e){-1===Kt.indexOf(e)&&delete Gt[e]}),qt.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(n[e]=t[e]),"object"===M(t[e])&&Object.keys(t[e]).forEach(function(a){n[e]||(n[e]={}),n[e][a]=t[e][a]})}),e.hooks){var a=e.hooks();Object.keys(a).forEach(function(e){Zt[e]||(Zt[e]=[]),Zt[e].push(a[e])})}e.provides&&e.provides(Gt)})}([mt,$n,Vn,Hn,Wn,na,{mixout:function(){return{dom:{unwatch:function(){Rn(),aa=!0}}}},hooks:function(){return{bootstrap:function(){In(en("mutationObserverCallbacks",{}))},noAuto:function(){Pn&&Pn.disconnect()},watch:function(e){var t=e.observeMutationsRoot;aa?Fn():In(en("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},oa,la,ca,{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol"),a=null!==n&&(""===n||n);return e.symbol=a,e}}}}],{mixoutsTo:sn});var ua=sn.config,fa=sn.parse,da=sn.icon;function ha(e){return t=e,(t-=0)==t?e:(e=e.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():"")).charAt(0).toLowerCase()+e.slice(1);var t}function ma(e){return e.charAt(0).toUpperCase()+e.slice(1)}var pa=new Map;function ga(e){if(pa.has(e))return pa.get(e);const t={};let n=0;const a=e.length;for(;n<a;){const r=e.indexOf(";",n),o=-1===r?a:r,i=e.slice(n,o).trim();if(i){const e=i.indexOf(":");if(e>0){const n=i.slice(0,e).trim(),a=i.slice(e+1).trim();if(n&&a){const e=ha(n);t[e.startsWith("webkit")?ma(e):e]=a}}}n=o+1}if(1e3===pa.size){const e=pa.keys().next().value;e&&pa.delete(e)}return pa.set(e,t),t}var va=function e(t,n,a={}){if("string"==typeof n)return n;const r=(n.children||[]).map(n=>e(t,n)),o=n.attributes||{},i={};for(const[e,t]of Object.entries(o))switch(!0){case"class"===e:i.className=t;break;case"style"===e:i.style=ga(String(t));break;case e.startsWith("aria-"):case e.startsWith("data-"):i[e.toLowerCase()]=t;break;default:i[ha(e)]=t}const{style:s,role:l,"aria-label":c,...u}=a;return s&&(i.style=i.style?{...i.style,...s}:s),l&&(i.role=l),c&&(i["aria-label"]=c,i["aria-hidden"]="false"),t(n.tag,{...u,...i},...r)}.bind(null,t.createElement),ba=(e,n)=>{const a=t.useId();return e||(n?a:void 0)};"undefined"!=typeof process&&process.env.FA_VERSION;var ya="searchPseudoElementsFullScan"in ua?"7.0.0":"6.0.0",xa=Number.parseInt(ya)>=7,wa="fa",ka="fa-beat",ja="fa-fade",Sa="fa-beat-fade",Na="fa-bounce",Ca="fa-shake",Ta="fa-spin",_a="fa-spin-pulse",Ma="fa-spin-reverse",Ra="fa-pulse",Fa={left:"fa-pull-left",right:"fa-pull-right"},Pa={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},Ia={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Ea="fa-border",La="fa-fw",Da="fa-flip",Ba="fa-flip-horizontal",Aa="fa-flip-vertical",Oa="fa-inverse",za="fa-rotate-by",$a="fa-swap-opacity",Va="fa-width-auto";function Ha(e){const t=ua.cssPrefix||ua.familyPrefix||wa;return t===wa?e:e.replace(new RegExp(String.raw`(?<=^|\s)${wa}-`,"g"),`${t}-`)}function Wa(e){if(e)return(e=>"object"==typeof e&&"icon"in e&&!!e.icon)(e)?e:fa.icon(e)}var Ua=new class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t="undefined"!=typeof process&&"development"===process.env.NODE_ENV}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}}("FontAwesomeIcon"),Ja={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},Qa=new Set(Object.keys(Ja)),Xa=t.forwardRef((e,t)=>{const n={...Ja,...e},{icon:a,mask:r,symbol:o,title:i,titleId:s,maskId:l,transform:c}=n,u=ba(l,Boolean(r)),f=ba(s,Boolean(i)),d=Wa(a);if(!d)return Ua.error("Icon lookup is undefined",a),null;const h=function(e){const{beat:t,fade:n,beatFade:a,bounce:r,shake:o,spin:i,spinPulse:s,spinReverse:l,pulse:c,fixedWidth:u,inverse:f,border:d,flip:h,size:m,rotation:p,pull:g,swapOpacity:v,rotateBy:b,widthAuto:y,className:x}=e,w=[];return x&&w.push(...x.split(" ")),t&&w.push(ka),n&&w.push(ja),a&&w.push(Sa),r&&w.push(Na),o&&w.push(Ca),i&&w.push(Ta),l&&w.push(Ma),s&&w.push(_a),c&&w.push(Ra),u&&w.push(La),f&&w.push(Oa),d&&w.push(Ea),!0===h&&w.push(Da),"horizontal"!==h&&"both"!==h||w.push(Ba),"vertical"!==h&&"both"!==h||w.push(Aa),null!=m&&w.push(Ia[m]),null!=p&&0!==p&&w.push(Pa[p]),null!=g&&w.push(Fa[g]),v&&w.push($a),xa?(b&&w.push(za),y&&w.push(Va),(ua.cssPrefix||ua.familyPrefix||wa)===wa?w:w.map(Ha)):w}(n),m="string"==typeof c?fa.transform(c):c,p=Wa(r),g=da(d,{...h.length>0&&{classes:h},...m&&{transform:m},...p&&{mask:p},symbol:o,title:i,titleId:f,maskId:u});if(!g)return Ua.error("Could not find icon",d),null;const{abstract:v}=g,b={ref:t};for(const e of(y=n,Object.keys(y)))Qa.has(e)||(b[e]=n[e]);var y;return va(v[0],b)});Xa.displayName="FontAwesomeIcon";var Ya={box:"Box-module_box__SQLj3",collapseBox:"Box-module_collapseBox__5A5Fc",padding:"Box-module_padding__dIJ-L",collapsedContent:"Box-module_collapsedContent__yn-0g",collapseTitle:"Box-module_collapseTitle__-R0ge",collapseIcon:"Box-module_collapseIcon__OAiTO",collapsed:"Box-module_collapsed__nf76f"};y.bind(Ya);const qa=["dotnetspy","ebpfspy","gospy","phpspy","pyspy","rbspy","nodespy","javaspy","pyroscope-rs","scrape","tracing","unknown"],Za=a.z.preprocess(e=>e&&qa.includes(e)?e:"unknown",a.z.enum(qa).default("unknown")),Ga=["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions"],Ka=a.z.preprocess(e=>"string"==typeof e&&Ga.includes(e)?e:"unknown",a.z.enum(["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions","unknown"])),er=a.z.object({names:a.z.array(a.z.preprocess(e=>e||"unknown",a.z.string().min(1))),levels:a.z.array(a.z.array(a.z.number())),numTicks:a.z.number(),maxSelf:a.z.number()}),tr=a.z.object({appName:a.z.string().optional(),name:a.z.string().optional(),startTime:a.z.number().optional(),endTime:a.z.number().optional(),query:a.z.string().optional(),maxNodes:a.z.number().optional(),format:a.z.enum(["single","double"]),sampleRate:a.z.number(),spyName:Za,units:Ka});a.z.object({version:a.z.number().min(1).max(1).default(1),flamebearer:er,metadata:tr,leftTicks:a.z.number().optional(),rightTicks:a.z.number().optional()});const nr={format:"single",jStep:4,jName:3,getBarOffset:(e,t)=>e[t],getBarTotal:(e,t)=>e[t+1],getBarTotalDiff:(e,t)=>0,getBarSelf:(e,t)=>e[t+2],getBarSelfDiff:(e,t)=>0,getBarName:(e,t)=>e[t+3]},ar={format:"double",jStep:7,jName:6,getBarOffset:(e,t)=>e[t]+e[t+3],getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarTotalDiff:(e,t)=>e[t+4]-e[t+1],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarSelfDiff:(e,t)=>e[t+5]-e[t+2],getBarName:(e,t)=>e[t+6]};function rr(e){switch(e){case"single":return nr;case"double":return ar;default:throw new Error(`Unsupported type: '${e}'`)}}const or=a.z.object({refType:a.z.string(),traceID:a.z.string(),spanID:a.z.string()}),ir=a.z.object({key:a.z.string(),type:a.z.string(),value:a.z.union([a.z.boolean(),a.z.number(),a.z.string()])}),sr=a.z.object({traceID:a.z.string(),spanID:a.z.string(),flags:a.z.string(),operationName:a.z.string(),references:a.z.array(or),startTime:a.z.number(),duration:a.z.number(),tags:a.z.array(ir),logs:a.z.object({timestamp:a.z.number(),fields:a.z.array(ir)}),processID:a.z.string(),warnings:a.z.any()}),lr=a.z.object({serviceName:a.z.string(),tags:a.z.array(ir)});a.z.object({traceID:a.z.string(),spans:a.z.array(sr),processes:a.z.record(lr),warnings:a.z.any()});const cr=a.z.object({watermark:a.z.object({}).optional(),startTime:a.z.number(),samples:a.z.array(a.z.number()),durationDelta:a.z.number()});a.z.record(a.z.string(),cr);const ur=22,fr=21.5;function dr(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function hr(e){if(null==e)return null;if("number"==typeof e)return{value:e,unit:"",hasLessThan:!1,sign:""};let t=String(e).trim().replace(/\u2212/g,"-");if(!t)return null;let n=!1;t.startsWith("<")&&(n=!0,t=t.slice(1).trim());const a=t.match(/^([+\-]?)(\d*\.?\d+)\s*(.*)$/);if(!a)return null;const r=a[1]||"",o=a[2],i=(a[3]||"").trim(),s=parseFloat(o);return Number.isFinite(s)?{value:s,unit:i,hasLessThan:n,sign:r}:null}function mr(e,t=!1){if(!e||!t)return e;const n=hr(e);if(!n)return e;const{unit:a}=n;let r=a;const o=a.toLowerCase();"ms"===o?r="毫秒":"μs"===o||"µs"===o||"us"===o?r="微秒":"second"===o||"seconds"===o?r="秒":"minute"===o||"minutes"===o||"min"===o||"mins"===o?r="分钟":"hour"===o||"hours"===o?r="小时":"day"===o||"days"===o?r="天":"month"===o||"months"===o?r="月":"year"!==o&&"years"!==o||(r="年");const i=String(e).match(/^([<\s]*)([+\-]?\d*\.?\d+)(.*)$/);if(!i)return e;return`${i[1]||""}${i[2]||""} ${r}`.trim()}const pr=[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}];function gr(e){return Math.round(1e4*e)/100}function vr(e,t){return(t-e)/e*100}function br(e,t,n){switch(n){case"samples":return new yr(e/t);case"objects":case"goroutines":case"lock_samples":case"exceptions":return new wr(e);case"bytes":return new kr(e);case"lock_nanoseconds":return new xr(e);case"trace_samples":return new yr(e/t,"",!0);default:return console.warn(`Unsupported unit: '${n}'. Defaulting to ''`),new yr(e/t," ")}}class yr{constructor(e,t,n){this.divider=1,this.enableSubsecondPrecision=!1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],this.units="",n&&(this.enableSubsecondPrecision=n,this.durations=[[1e3,"ms"],[1e3,"second"],...this.durations],this.suffix="μs",e*=1e6),this.units=t||"";for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e,t,n=!0){this.enableSubsecondPrecision&&(t/=1e6);const a=e/t/this.divider;let r=a.toFixed(2);return 0===a?r="0.00":(a>=0&&a<.01||a<=0&&a>-.01)&&(r="< 0.01"),n?`${r} ${this.units||`${this.suffix}${1===a||2===this.suffix.length?"":"s"}`}`:r}formatPrecise(e,t){this.enableSubsecondPrecision&&(t/=1e6);const n=e/t/this.divider;return`${parseFloat(n.toFixed(5))} ${this.units||`${this.suffix}${1===n||2===this.suffix.length?"":"s"}`}`}}class xr{constructor(e){this.divider=1,this.multiplier=1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],e/=1e9;for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/1e9/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}${1===t?"":"s"}`}formatPrecise(e){const t=e/1e9/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}${1===t?"":"s"}`}}class wr{constructor(e){this.divider=1,this.suffix="",this.objects=[[1e3,"K"],[1e3,"M"],[1e3,"G"],[1e3,"T"],[1e3,"P"]];for(let t=0;t<this.objects.length;t++){const n=this.objects[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}class kr{constructor(e){this.divider=1,this.suffix="bytes",this.bytes=[[1024,"KB"],[1024,"MB"],[1024,"GB"],[1024,"TB"],[1024,"PB"]];for(let t=0;t<this.bytes.length;t++){const n=this.bytes[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;{this.divider*=n[0],e/=n[0];const t=n[1];t?this.suffix=t:(console.warn("Could not calculate suffix"),this.suffix="")}}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}const jr="TAIL",Sr="HEAD";function Nr({mode:e,charSize:t,rectWidth:n,fullText:a,shortText:r}){if(e===jr){if(t*a.length<=n)return{mode:e,text:a,marginLeft:3};const o=t*r.length;return o<=n?{mode:e,text:r,marginLeft:3}:{mode:e,text:r,marginLeft:-(o-n+3)}}return{mode:e,text:a,marginLeft:3}}function Cr(e){return e===jr?{direction:"rtl",overflow:"hidden",textOverflow:"ellipsis"}:{overflow:"hidden",textOverflow:"ellipsis"}}function Tr(e,t){if(e===t)return 0;if(0===e)return 100;const n=(t-e)/e*100;return n>100?100:n<-100?-100:n}function _r(e,t){return r.rgb(e,e,e).alpha(t)}function Mr(e,t){if(0===t.length)return t;const n=function(e){switch(e){case"dotnetspy":return/^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/;case"ebpfspy":case"unknown":return/^(?<packageName>.+)$/;case"gospy":case"scrape":return/^(?<packageName>.*?\/.*?\.|.*?\.|.+)(?<functionName>.*)$/;case"phpspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/;case"pyspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/;case"rbspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/;case"nodespy":return/^(\.\/node_modules\/)?(?<packageName>[^/]*)(?<filename>.*\.?(jsx?|tsx?)?):(?<functionName>.*):(?<line_info>.*)$/;case"tracing":return/^(?<packageName>.+?):.*$/;case"javaspy":return/^(?<packageName>.+\/)(?<filename>.+\.)(?<functionName>.+)$/;case"pyroscope-rs":return/^(?<packageName>[^::]+)/}return/^(?<packageName>.+)$/}(e),a=t.match(n);return a&&a.groups?a.groups.packageName||"":t}function Rr(e,t){const n=function(e,t=0){let n,a,r,o,i,s,l,c;for(n=3&e.length,a=e.length-n,r=t,i=3432918353,s=461845907,c=0;c<a;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,r^=l,r=r<<13|r>>>19,o=5*(65535&r)+((5*(r>>>16)&65535)<<16)&4294967295,r=27492+(65535&o)+(((o>>>16)+58964&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:l^=255&e.charCodeAt(c);default:l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,r^=l}return r^=e.length,r^=r>>>16,r=2246822507*(65535&r)+((2246822507*(r>>>16)&65535)<<16)&4294967295,r^=r>>>13,r=3266489909*(65535&r)+((3266489909*(r>>>16)&65535)<<16)&4294967295,r^=r>>>16,r>>>0}(t,0),a=n%e.colors.length,r=e.colors[a];return r||(console.warn("Could not calculate color. Defaulting to the first one"),e.colors[0])}function Fr(e){const{goodColor:t,neutralColor:n,badColor:a}=e,i=o.scaleLinear().domain([-100,0,100]).range([t.rgb().toString(),n.rgb().toString(),a.rgb().toString()]);return e=>r(i(e).toString())}r.rgb(148,142,142),r.rgb(200,0,0),r.rgb(0,170,0),r("#48CE73");const Pr=new WeakMap,Ir=new WeakMap,Er=new WeakMap,Lr=new WeakMap;const Dr={collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",isZh:!1};function Br(e){var t,n,a,r,o,i,s,l;const c=performance.now(),u=!1!==e.renderRects,f=!1!==e.renderText,d=null!==(t=e.renderMode)&&void 0!==t?t:"normal",h=e.timeBudgetMs,{canvas:m,fitMode:p,units:g,tickToX:v,levels:b,palette:y}=e,{numTicks:x,sampleRate:w,pxPerTick:k}=e,{rangeMin:j,rangeMax:S}=e,{focusedNode:N,zoom:C}=e,T=e.messages||Dr,_=e.skipCanvasResize?m.width:function(e){if("clientWidth"in e&&"number"==typeof e.clientWidth)return e.clientWidth;return e.width}(m);if(e.skipCanvasResize||(m.width=_),j>=S)throw new Error("'rangeMin' should be strictly smaller than 'rangeMax'");const{format:M}=e,R=rr(M),F=m.getContext("2d");if(!F)throw new Error("Could not get ctx");const P=C.mapOrElse(()=>0,e=>e.i),I=br(x,w,g),E=N.isJust,L=N.mapOrElse(()=>0,e=>e.i),D=E?fr:0,B=!!e.highlightQuery&&e.highlightQuery.length>0,A=ur*(b.length-L)+(E?fr:0);e.skipCanvasResize||(m.height=A);const O="number"==typeof e.devicePixelRatio?e.devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1;!e.skipDprScale&&O>1&&(m.width*=O,m.height*=O,F.scale(O,O)),F.textBaseline="middle",F.font="400 11.5px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace";const z=F.measureText("a").width,{names:$}=e,V=function(e){const t=Pr.get(e);if(t)return t;const n=new Map;return Pr.set(e,n),n}(m),H=B?function(e,t){const n=Ir.get(e);if(n){const e=n.get(t);if(e)return e}const a=t.toLowerCase(),r=new Uint8Array(e.length);for(let t=1;t<e.length;t+=1){const n=e[t];n&&n.toLowerCase().includes(a)&&(r[t]=1)}const o=null!=n?n:new Map;return o.set(t,r),Ir.set(e,o),r}($,e.highlightQuery):null,W="single"===e.format?function(e,t,n){const a=`${t}|${n.name}`,r=Er.get(e);if(r){const e=r.get(a);if(e)return e}const o=new Array(e.length);for(let a=0;a<e.length;a+=1){const r=Mr(t,e[a]||"")||"";o[a]=Rr(n,r)}const i=null!=r?r:new Map;return i.set(a,o),Er.set(e,i),o}($,e.spyName,y):null,U="double"===e.format?Fr({name:y.name,goodColor:y.goodColor,neutralColor:y.neutralColor,badColor:y.badColor}):null,J=(e,t)=>{const n=e[t+R.jName];return!(!n||n<0||!H)&&1===H[n]},Q=null!==(n=e.startI)&&void 0!==n?n:0,X=null!==(a=e.startJ)&&void 0!==a?a:0;if(E&&"highlightOnly"!==d&&0===(null!==(r=e.levelStart)&&void 0!==r?r:0)&&0===Q&&0===X){const e=x*k;u&&(F.beginPath(),F.rect(0,0,x*k,fr),F.fillStyle=_r(200,1).rgb().string(),F.fill());const t=N.mapOrElse(()=>"total",e=>function(e,t){return 1===e?t.collapsedLevelsSingular:t.collapsedLevelsPlural.replace("{n}",String(e))}(e.i-1,T)),n=Nr({mode:p,charSize:z,rectWidth:e,fullText:t,shortText:t}),a=0,r=0,o=fr;if(f){F.beginPath(),F.rect(0,0,e,fr),F.save(),F.clip(),F.fillStyle="black";const t=Math.round(Math.max(a,0));F.fillText(n.text,t+n.marginLeft,r+o/2+1),F.restore()}}const Y=Math.max(0,null!==(o=e.levelStart)&&void 0!==o?o:0),q=b.length-L,Z=Math.min(q,null!==(i=e.levelEnd)&&void 0!==i?i:q),G=Math.max(Y,null!==(s=e.startI)&&void 0!==s?s:Y),K=Math.max(0,null!==(l=e.startJ)&&void 0!==l?l:0),{spyName:ee}=e,te=(t,n,a,r,o)=>{const i={level:t,j:n,i:a+N.mapOrElse(()=>0,e=>e.i),names:$,collapsed:r,selectedLevel:P,highlightModeOn:B,isHighlighted:o,spyName:ee,palette:y,colorByNameIndex:W,diffColorFn:U};switch(M){case"single":return function(e){const t=zr(e);if(t)return t;const n=rr("single"),a=e.selectedLevel>e.i?.33:1;let r=e.level[e.j+n.jName];void 0===r&&(console.warn("Could nto find level",{l:e.j,jName:n.jName,level:e.level}),r=-1);if(e.colorByNameIndex&&r>=0&&e.colorByNameIndex[r])return e.colorByNameIndex[r].alpha(a);const o=e.names[r]||"",i=Mr(e.spyName,o)||"";return Rr(e.palette,i).alpha(a)}({...i});case"double":return function(e){const t=zr(e);if(t)return t;const n=e.selectedLevel>e.i?.33:1,{leftRatio:a,rightRatio:r}=function(e,t,n,a){const r=ar;return n&&a?{leftRatio:r.getBarTotalLeft(e,t)/n,rightRatio:r.getBarTotalRght(e,t)/a}:(console.error("Properties 'rightTicks' and 'leftTicks' are required. Can't calculate ratio."),{leftRatio:0,rightRatio:0})}(e.level,e.j,e.leftTicks,e.rightTicks),o=gr(a),i=gr(r);if(e.diffColorFn)return e.diffColorFn(Tr(o,i)).alpha(n);return function(e,t,n){const a=Tr(t,n);return Fr(e)(a)}(e.palette,o,i).alpha(n)}({...i,leftTicks:e.leftTicks,rightTicks:e.rightTicks});default:throw new Error(`Unsupported format: ${M}`)}};if("highlightOnly"===d&&B&&u){const e=function(e,t){const n=Lr.get(e);if(n)return n;const a=rr(t),r=new Map;for(let t=0;t<e.length;t+=1){const n=e[t];for(let e=0;e<n.length;e+=a.jStep){const o=a.getBarName(n,e);if(void 0===o||o<0)continue;const i=r.get(o);i?i.push({i:t,j:e}):r.set(o,[{i:t,j:e}])}}return Lr.set(e,r),r}(b,M),t=[];for(let e=1;e<$.length;e+=1)H&&1===H[e]&&t.push(e);for(let n=0;n<t.length;n+=1){const a=t[n],r=e.get(a);if(r)for(let e=0;e<r.length;e+=1){const t=r[e],n=t.i-L;if(t.i<L||n<Y||n>=Z)continue;const a=b[t.i],o=v(R.getBarOffset(a,t.j)),i=n*ur+D,s=fr,l=R.getBarTotal(a,t.j),c=l*k<=5,u=l*k-(c?0:.5);if(u<=0)continue;F.beginPath(),F.rect(o,i,u,s);const f=te(a,t.j,n,c,!0);F.fillStyle=f.string(),F.fill()}}return{done:!0,nextI:Z,nextJ:0}}for(let e=G;e<Z;e+=1){const t=b[L+e];if(!t)throw new Error(`Could not find level: ${L+e}`);let n=e===G?K:0;for(;n<t.length;n+=R.jStep){const a=R.getBarOffset(t,n),r=v(a),o=e*ur+D,i=fr,s=B&&J(t,n);let l=R.getBarTotal(t,n);const m=l*k<=5;if(m)for(;n<t.length-R.jStep&&a+l===R.getBarOffset(t,n+R.jStep)&&R.getBarTotal(t,n+R.jStep)*k<=5&&s===(B&&J(t,n+R.jStep));)n+=R.jStep,l+=R.getBarTotal(t,n);const g=l*k-(m?0:.5);if(F.beginPath(),F.rect(r,o,g,i),u){if("forceGrey"===d)F.fillStyle=_r(200,.66).rgb().string();else{const a=te(t,n,e,m,s);F.fillStyle=a.string()}F.fill()}if(!f||m||"forceGrey"===d){if(h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep};continue}if(g<20)continue;const b=Ar($,n,M,t),y=Nr({mode:p,charSize:z,rectWidth:g,fullText:Or(b,l,w,I,T,V),shortText:b});F.save(),F.clip(),F.fillStyle="black";const x=Math.round(Math.max(r,0));if(F.fillText(y.text,x+y.marginLeft,o+i/2+1),F.restore(),h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep}}if(h&&performance.now()-c>h)return{done:!1,nextI:e+1,nextJ:0}}return{done:!0,nextI:Z,nextJ:0}}function Ar(e,t,n,a){let r=a[t+rr(n).jName];void 0===r&&(r=-1);const o=e[r];return o||(console.warn("Could not find function name for",{j:t,format:n,level:a,names:e}),"")}function Or(e,t,n,a,r,o){let i=null==o?void 0:o.get(t);if(!i){const e=a.format(t,n);i=mr(e,!!r.isZh)||e,null==o||o.set(t,i)}return`${e} (${i})`}function zr({collapsed:e,highlightModeOn:t,isHighlighted:n}){return e||t&&!n?_r(200,.66):null}class $r{constructor(e,t,n,a,r,o,i,s){if(this.flamebearer=e,this.canvas=t,this.focusedNode=n,this.fitMode=a,this.highlightQuery=r,this.zoom=o,this.palette=i,this.messages=s,this.cachedRange=null,this.cachedPxPerTick=null,this.tickToX=e=>{var t;const n=this.cachedRange?this.cachedRange.rangeMin:this.getRange().rangeMin,a=null!==(t=this.cachedPxPerTick)&&void 0!==t?t:this.pxPerTick();return(e-this.flamebearer.numTicks*n)*a},this.xyToBarPosition=e=>{const{ff:t}=this,{i:n,j:a}=this.xyToBarIndex(e.x,e.y),r=this.focusedNode.mapOrElse(()=>0,e=>e.i<0?0:e.i-1),o=this.flamebearer.levels[n];if(!o)throw new Error(`Could not find level: '${n}'`);const i=Math.max(this.tickToX(t.getBarOffset(o,a)),0);return{x:i,y:Math.max((n-r)*ur,0),width:Math.min(this.tickToX(t.getBarOffset(o,a)+t.getBarTotal(o,a))-i,this.getCanvasWidth())}},this.xyToBarData=e=>{const{i:t,j:n}=this.xyToBarIndex(e.x,e.y),a=this.flamebearer.levels[t];if(!a)throw new Error(`Could not find level: '${t}'`);switch(this.flamebearer.format){case"single":{const e=nr;return{format:"single",name:this.flamebearer.names[e.getBarName(a,n)],self:e.getBarSelf(a,n),offset:e.getBarOffset(a,n),total:e.getBarTotal(a,n)}}case"double":{const e=ar;return{format:"double",barTotal:e.getBarTotal(a,n),totalLeft:e.getBarTotalLeft(a,n),totalRight:e.getBarTotalRght(a,n),totalDiff:e.getBarTotalDiff(a,n),name:this.flamebearer.names[e.getBarName(a,n)]}}default:throw new Error("Unsupported type")}},this.isWithinBounds=(e,t)=>{if(e<0||e>this.getCanvasWidth())return!1;try{const{i:n,j:a}=this.xyToBarIndex(e,t);if(-1===a||-1===n)return!1}catch(e){return!1}return!0},this.zoom=o,this.focusedNode=n,this.flamebearer=e,this.canvas=t,this.highlightQuery=r,this.ff=rr(e.format),this.palette=i,this.messages=s,n.isJust&&o.isJust&&o.value.i<n.value.i)throw new Error("Zoom i level should be bigger than Focus")}render(e){var t;const{rangeMin:n,rangeMax:a,pxPerTick:r}=this.updateCachedMetrics(),o=null!==(t=null==e?void 0:e.highlightQueryOverride)&&void 0!==t?t:this.highlightQuery,i={canvas:this.canvas,format:this.flamebearer.format,numTicks:this.flamebearer.numTicks,sampleRate:this.flamebearer.sampleRate,names:this.flamebearer.names,levels:this.flamebearer.levels,spyName:this.flamebearer.spyName,units:this.flamebearer.units,maxSelf:this.flamebearer.maxSelf,rangeMin:n,rangeMax:a,fitMode:this.fitMode,highlightQuery:o,zoom:this.zoom,focusedNode:this.focusedNode,pxPerTick:r,tickToX:e=>(e-this.flamebearer.numTicks*n)*r,palette:this.palette,messages:this.messages,renderRects:null==e?void 0:e.renderRects,renderText:null==e?void 0:e.renderText,renderMode:null==e?void 0:e.renderMode,levelStart:null==e?void 0:e.levelStart,levelEnd:null==e?void 0:e.levelEnd,startI:null==e?void 0:e.startI,startJ:null==e?void 0:e.startJ,timeBudgetMs:null==e?void 0:e.timeBudgetMs,skipCanvasResize:null==e?void 0:e.skipCanvasResize,skipDprScale:null==e?void 0:e.skipDprScale,devicePixelRatio:null==e?void 0:e.devicePixelRatio},{format:s}=this.flamebearer;switch(s){case"single":return Br({...i,format:"single"});case"double":return Br({...i,leftTicks:this.flamebearer.leftTicks,rightTicks:this.flamebearer.rightTicks});default:throw new Error(`Invalid format: '${s}'`)}}pxPerTick(){if(null!==this.cachedPxPerTick)return this.cachedPxPerTick;const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,n}updateCachedMetrics(){const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,{rangeMin:e,rangeMax:t,pxPerTick:n}}getRange(){const{ff:e}=this,t=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},n=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},{zoom:a,focusedNode:r}=this;return a.match({Just:e=>r.match({Just:a=>{const r=n(a),o=t(e);return r.rangeMax-r.rangeMin<o.rangeMax-o.rangeMin?(console.warn("Focus is smaller than range, this shouldnt happen. Verify that the zoom is always bigger than the focus."),n(a)):t(e)},Nothing:()=>t(e)}),Nothing:()=>r.match({Just:e=>n(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})}getCanvasWidth(){return"clientWidth"in this.canvas&&"number"==typeof this.canvas.clientWidth?this.canvas.clientWidth:this.canvas.width}isFocused(){return this.focusedNode.isJust}binarySearchLevel(e,t){const{ff:n}=this;let a=0,r=t.length-n.jStep;for(;a<=r;){const o=n.jStep*(a/n.jStep+r/n.jStep>>1),i=this.tickToX(n.getBarOffset(t,o)),s=this.tickToX(n.getBarOffset(t,o)+n.getBarTotal(t,o));if(i<=e&&s>=e)return s-i>5?o:-1;i>e?r=o-n.jStep:a=o+n.jStep}return-1}xyToBarIndex(e,t){if(e<0||t<0)throw new Error(`x and y must be bigger than 0. x = ${e}, y = ${t}`);if(this.isFocused()&&t<=fr)return{i:0,j:0};const n=this.isFocused()?t-fr:t,a=this.focusedNode.mapOrElse(()=>0,e=>e.i<=0?0:e.i),r=this.zoom.match({Just:()=>this.focusedNode.match({Just:()=>a,Nothing:()=>0}),Nothing:()=>this.focusedNode.match({Just:()=>a,Nothing:()=>0})}),o=Math.floor(n/ur)+r;if(o>=0&&o<this.flamebearer.levels.length){const t=this.flamebearer.levels[o];if(!t)throw new Error(`Could not find level: '${o}'`);return{i:o,j:this.binarySearchLevel(e,t)}}return{i:0,j:0}}parseXY(e,t){const a={x:e,y:t};return this.isWithinBounds(e,t)?n.Maybe.of(a):n.Maybe.nothing()}xyToBar(e,t){return this.parseXY(e,t).map(n=>{const{i:a,j:r}=this.xyToBarIndex(e,t);return{i:a,j:r,...this.xyToBarPosition(n),...this.xyToBarData(n)}})}}function Vr(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Vr(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Hr(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Vr(e))&&(a&&(a+=" "),a+=t);return a}var Wr="NoData-module_noData__WuuID";function Ur(){return e.jsx("div",{"data-testid":"no-data",className:Wr,children:e.jsx("span",{children:"No data available"})})}var Jr,Qr,Xr={},Yr={};function qr(){return Jr||(Jr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-right",n=[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],a="f01e",r="M436.7 74.7L448 85.4 448 32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l47.9 0-7.6-7.2c-.2-.2-.4-.4-.6-.6-75-75-196.5-75-271.5 0s-75 196.5 0 271.5 196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c99.9-99.9 261.7-100 361.7-.3z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,a,r]},e.faArrowRotateRight=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Yr)),Yr}function Zr(){return Qr||(Qr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=qr();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faRedo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Xr)),Xr}var Gr,Kr=Zr(),eo={};function to(){return Gr||(Gr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="copy",n=[],a="f0c5",r="M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z";e.definition={prefix:"fas",iconName:t,icon:[448,512,n,a,r]},e.faCopy=e.definition,e.prefix="fas",e.iconName=t,e.width=448,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(eo)),eo}var no,ao=to(),ro={};function oo(){return no||(no=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="highlighter",n=[],a="f591",r="M315 315L473.4 99.9 444.1 70.6 229 229 315 315zm-187 5l0 0 0-71.7c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0 457.6 0 468.5 4.5 476.6 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5 0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5l-71.7 0-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l51.7-51.7 70.6 70.6-19.7 19.7c-4.5 4.5-10.6 7-17 7L24 512c-13.3 0-24-10.7-24-24l0-4.7c0-6.4 2.5-12.5 7-17z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,a,r]},e.faHighlighter=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(ro)),ro}var io,so,lo=oo(),co={},uo={};function fo(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="down-left-and-up-right-to-center",n=["compress-alt"],a="f422",r="M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,a,r]},e.faDownLeftAndUpRightToCenter=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(uo)),uo}function ho(){return so||(so=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=fo();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faCompressAlt=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(co)),co}var mo=ho();const po=e=>!!e&&"o"===e[0],go=l.unstable_batchedUpdates,vo=(e,t)=>!0===e||!(!e||!e[t]),bo=(e,t)=>"function"==typeof e?e(t):e,yo="_szhsinMenu",xo=(e,t)=>Object.defineProperty(t,yo,{value:e}),wo=(e,t)=>(t&&Object.keys(t).forEach(n=>{const a=e[n],r=t[n];e[n]="function"==typeof r&&a?(...e)=>{r(...e),a(...e)}:r}),e),ko=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:a}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+a+n))return e}};function jo(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function So(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const No=({block:e,element:n,modifiers:a,className:r})=>t.useMemo(()=>{const t=n?`${e}__${n}`:e;let o=t;a&&Object.keys(a).forEach(e=>{const n=a[e];n&&(o+=` ${t}--${!0===n?e:`${e}-${n}`}`)});let i="function"==typeof r?r(a):r;return"string"==typeof i&&(i=i.trim(),i&&(o+=` ${i}`)),o},[e,n,a,r]),Co="szh-menu",To=t.createContext(),_o=t.createContext({}),Mo=t.createContext({}),Ro=t.createContext({}),Fo=t.createContext({}),Po=t.createContext({}),Io=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Eo=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Lo=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Do=Object.freeze({FIRST:"first",LAST:"last"}),Bo=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Ao="absolute",Oo="none",zo={preventScroll:!0},$o=xo("MenuButton",t.forwardRef(function({className:n,isOpen:a,disabled:r,children:o,...i},s){const l=t.useMemo(()=>({open:a}),[a]);return e.jsx("button",{"aria-haspopup":!0,"aria-expanded":a,"aria-disabled":r||void 0,type:"button",disabled:r,...i,ref:s,className:No({block:"szh-menu-button",modifiers:l,className:n}),children:o})})),Vo=({className:n,containerRef:a,containerProps:r,children:o,isOpen:i,theming:s,transition:l,onClose:c})=>{const u=vo(l,"item");return e.jsx("div",{...wo({onKeyDown:({key:e})=>{if(e===Io.ESC)bo(c,{key:e,reason:Lo.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&bo(c,{reason:Lo.BLUR})}},r),className:No({block:"szh-menu-container",modifiers:t.useMemo(()=>({theme:s,itemTransition:u}),[s,u]),className:n}),style:{position:"absolute",...r?.style},ref:a,children:o})},Ho=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(n,a,r)=>{t?e||(e=setTimeout(()=>{e=0,a()},n)):r?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},Wo=(e,t)=>Math.round(e)===t?e:t,Uo=(e,t,n,a)=>{const r=(e=>{const t=e.getBoundingClientRect();return t.width=Wo(t.width,e.offsetWidth),t.height=Wo(t.height,e.offsetHeight),t})(t),o=e.getBoundingClientRect(),i=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),s=(e=>{if("string"!=typeof e)return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],a=isNaN(t[1])?n:t[1];return{top:n,right:a,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?a:t[3]}})(a),l=e=>e+o.left-i.left-s.left,c=e=>e+o.left+r.width-i.right+s.right,u=e=>e+o.top-i.top-s.top,f=e=>e+o.top+r.height-i.bottom+s.bottom;return{menuRect:r,containerRect:o,getLeftOverflow:l,getRightOverflow:c,getTopOverflow:u,getBottomOverflow:f,confineHorizontally:e=>{let t=l(e);if(t<0)e-=t;else{const n=c(e);n>0&&(t=l(e-=n),t<0&&(e-=t))}return e},confineVertically:e=>{let t=u(e);if(t<0)e-=t;else{const n=f(e);n>0&&(t=u(e-=n),t<0&&(e-=t))}return e}}},Jo=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:a,placeLeftX:r,placeRightX:o,getLeftOverflow:i,getRightOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v=d,b=a;"initial"!==h&&(b=c(b),"anchor"===h&&(b=Math.min(b,e.bottom-t.top),b=Math.max(b,e.top-t.top-n.height))),"left"===v?(m=r,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="right")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(r),(p>=0||-p<g)&&(m=r,v="left")))),"auto"===h&&(m=l(m));const y=f?(({arrowRef:e,menuY:t,anchorRect:n,containerRect:a,menuRect:r})=>{let o=n.top-a.top-t+n.height/2;const i=1.25*e.current.offsetHeight;return o=Math.max(i,o),o=Math.min(o,r.height-i),o})({menuY:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowY:y,x:m,y:b,computedDirection:v}},Qo=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:a,placeTopY:r,placeBottomY:o,getTopOverflow:i,getBottomOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v="top"===d?"top":"bottom",b=a;"initial"!==h&&(b=l(b),"anchor"===h&&(b=Math.min(b,e.right-t.left),b=Math.max(b,e.left-t.left-n.width))),"top"===v?(m=r,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="bottom")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(r),(p>=0||-p<g)&&(m=r,v="top")))),"auto"===h&&(m=c(m));const y=f?(({arrowRef:e,menuX:t,anchorRect:n,containerRect:a,menuRect:r})=>{let o=n.left-a.left-t+n.width/2;const i=1.25*e.current.offsetWidth;return o=Math.max(i,o),o=Math.min(o,r.width-i),o})({menuX:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowX:y,x:b,y:m,computedDirection:v}},Xo="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function Yo(e,t){"function"==typeof e?e(t):e.current=t}const qo=(e,n)=>t.useMemo(()=>e?n?t=>{Yo(e,t),Yo(n,t)}:e:n,[e,n]),Zo=({ariaLabel:n,menuClassName:a,menuStyle:r,arrow:o,arrowProps:i={},anchorPoint:s,anchorRef:c,containerRef:u,containerProps:f,externalRef:d,parentScrollingRef:h,align:m="start",direction:p="bottom",position:g="auto",overflow:v="visible",setDownOverflow:b,repositionFlag:y,captureFocus:x=!0,state:w,endTransition:k,isDisabled:j,menuItemFocus:S,gap:N=0,shift:C=0,children:T,onClose:_,focusProps:M,...R})=>{const[F,P]=t.useState({x:-9999,y:-9999}),[I,E]=t.useState({}),[L,D]=t.useState(),[B,A]=t.useState(p),[O]=t.useState(Ho),[z,$]=t.useReducer(e=>e+1,1),{transition:V,boundingBoxRef:H,boundingBoxPadding:W,rootMenuRef:U,rootAnchorRef:J,scrollNodesRef:Q,reposition:X,viewScroll:Y,submenuCloseDelay:q}=t.useContext(Po),{submenuCtx:Z,reposSubmenu:G=y}=t.useContext(Mo),K=t.useRef(),ee=t.useRef(),te=t.useRef(!1),{hoverItem:ne,dispatch:ae,updateItems:re}=(e=>{const[n,a]=t.useState(),r=t.useRef({items:[],hoverIndex:-1,sorted:!1}).current,o=t.useCallback((t,n)=>{const{items:o}=r;if(t)if(n)o.push(t);else{const n=o.indexOf(t);n>-1&&(o.splice(n,1),t.contains(document.activeElement)&&(e.current.focus(zo),a()))}else r.items=[];r.hoverIndex=-1,r.sorted=!1},[r,e]),i=t.useCallback((t,n,o)=>{const{items:i,hoverIndex:s}=r,l=()=>{if(r.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");i.sort((e,n)=>So(t,e)-So(t,n)),r.sorted=!0};let c,u=-1;switch(t){case Eo.RESET:break;case Eo.SET:c=n;break;case Eo.UNSET:c=e=>e===n?void 0:e;break;case Eo.FIRST:l(),u=0,c=i[u];break;case Eo.LAST:l(),u=i.length-1,c=i[u];break;case Eo.SET_INDEX:l(),u=o,c=i[u];break;case Eo.INCREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u++,u>=i.length&&(u=0),c=i[u];break;case Eo.DECREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u--,u<0&&(u=i.length-1),c=i[u];break;default:if("production"!==process.env.NODE_ENV)throw new Error(`[React-Menu] Unknown hover action type: ${t}`)}c||(u=-1),a(c),r.hoverIndex=u},[e,r]);return{hoverItem:n,dispatch:i,updateItems:o}})(K),oe=po(w),ie=vo(V,"open"),se=vo(V,"close"),le=Q.current,ce=t.useCallback(e=>{const t=K.current,n=u.current;if(!t||!n)return;const a=c?c.current?.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!a)return void("production"!==process.env.NODE_ENV&&console.warn("[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open."));le.menu||(le.menu=(H?H.current:ko(U.current))||window);const r=Uo(n,t,le.menu,W);let{arrowX:i,arrowY:l,x:f,y:d,computedDirection:h}=(({arrow:e,align:t,direction:n,gap:a,shift:r,position:o,anchorRect:i,arrowRef:s,positionHelpers:l})=>{const{menuRect:c,containerRect:u}=l,f="left"===n||"right"===n;let d=f?a:r,h=f?r:a;if(e){const e=s.current;f?d+=e.offsetWidth:h+=e.offsetHeight}const m=i.left-u.left-c.width-d,p=i.right-u.left+d,g=i.top-u.top-c.height-h,v=i.bottom-u.top+h;let b,y;"end"===t?(b=i.right-u.left-c.width,y=i.bottom-u.top-c.height):"center"===t?(b=i.left-u.left-(c.width-i.width)/2,y=i.top-u.top-(c.height-i.height)/2):(b=i.left-u.left,y=i.top-u.top),b+=d,y+=h;const x={...l,anchorRect:i,placeLeftX:m,placeRightX:p,placeLeftorRightY:y,placeTopY:g,placeBottomY:v,placeToporBottomX:b,arrowRef:s,arrow:e,direction:n,position:o};switch(n){case"left":case"right":return Jo(x);default:return Qo(x)}})({arrow:o,align:m,direction:p,gap:N,shift:C,position:g,anchorRect:a,arrowRef:ee,positionHelpers:r});const{menuRect:b}=r,y=b.height;if(!e&&"visible"!==v){const{getTopOverflow:e,getBottomOverflow:t}=r;let n,a;const o=t(d);if(o>0)n=y-o,a=o;else{const t=e(d);t<0&&(n=y+t,a=0-t,n>=0&&(d-=t))}n>=0&&D({height:n,overflowAmt:a})}o&&E({x:i,y:l}),P({x:f,y:d}),A(h)},[o,m,W,p,N,C,g,v,s,c,u,H,U,le]);Xo(()=>{oe&&(ce(),te.current&&$()),te.current=oe},[oe,ce,G]),Xo(()=>{L&&!b&&(K.current.scrollTop=0)},[L,b]),Xo(()=>re,[re]),t.useEffect(()=>{let{menu:e}=le;if(!oe||!e)return;if(e=e.addEventListener?e:window,!le.anchors){le.anchors=[];let t=ko(J&&J.current);for(;t&&t!==e;)le.anchors.push(t),t=ko(t)}let t=Y;if(le.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const n=()=>{"auto"===t?go(()=>ce(!0)):bo(_,{reason:Lo.SCROLL})},a=le.anchors.concat("initial"!==Y?e:[]);return a.forEach(e=>e.addEventListener("scroll",n)),()=>a.forEach(e=>e.removeEventListener("scroll",n))},[J,le,oe,_,Y,ce]);const ue=!!L&&L.overflowAmt>0;t.useEffect(()=>{if(ue||!oe||!h)return;const e=()=>go(ce),t=h.current;return t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)},[oe,ue,h,ce]),t.useEffect(()=>{if(!oe||"function"!=typeof ResizeObserver||"initial"===X)return;const e=[],t=new ResizeObserver(t=>t.forEach(({target:t})=>{e.indexOf(t)<0?e.push(t):l.flushSync(()=>{ce(),$()})})),n={box:"border-box"};t.observe(K.current,n);const a=c?.current;return a&&t.observe(a,n),()=>t.disconnect()},[oe,X,c,ce]),t.useEffect(()=>{if(!oe)return ae(Eo.RESET),void(se||D());const{position:e,alwaysUpdate:t}=S||{},n=()=>{e===Do.FIRST?ae(Eo.FIRST):e===Do.LAST?ae(Eo.LAST):e>=-1&&ae(Eo.SET_INDEX,void 0,e)};if(t)n();else if(x){const e=setTimeout(()=>{const e=K.current;e&&!e.contains(document.activeElement)&&(e.focus(zo),n())},ie?170:100);return()=>clearTimeout(e)}},[oe,ie,se,x,S,ae]);const fe=t.useMemo(()=>({isParentOpen:oe,submenuCtx:O,dispatch:ae,updateItems:re}),[oe,O,ae,re]);let de,he;L&&(b?he=L.overflowAmt:de=L.height);const me=t.useMemo(()=>({reposSubmenu:z,submenuCtx:O,overflow:v,overflowAmt:he,parentMenuRef:K,parentDir:B}),[z,O,v,he,B]),pe=de>=0?{maxHeight:de,overflow:v}:void 0,ge=t.useMemo(()=>({state:w,align:m,dir:B}),[w,m,B]),ve=t.useMemo(()=>({dir:B}),[B]),be=No({block:Co,element:"arrow",modifiers:ve,className:i.className}),ye=e.jsxs("ul",{role:"menu","aria-label":n,...jo(j),...wo({onPointerEnter:Z?.off,onPointerMove:e=>{e.stopPropagation(),O.on(q,()=>{ae(Eo.RESET),K.current.focus(zo)})},onPointerLeave:e=>{e.target===e.currentTarget&&O.off()},onKeyDown:e=>{switch(e.key){case Io.HOME:ae(Eo.FIRST);break;case Io.END:ae(Eo.LAST);break;case Io.UP:ae(Eo.DECREASE,ne);break;case Io.DOWN:ae(Eo.INCREASE,ne);break;case Io.SPACE:return void(e.target&&-1!==e.target.className.indexOf(Co)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===w&&D(),bo(k)}},R),ref:qo(d,K),className:No({block:Co,modifiers:ge,className:a}),style:{...r,...pe,margin:0,display:"closed"===w?"none":void 0,position:Ao,left:F.x,top:F.y},children:[o&&e.jsx("li",{"aria-hidden":!0,...i,className:be,style:{display:"block",position:Ao,left:I.x,top:I.y,...i.style},ref:ee}),e.jsx(Mo.Provider,{value:me,children:e.jsx(_o.Provider,{value:fe,children:e.jsx(To.Provider,{value:ne,children:bo(T,ge)})})})]});return f?e.jsx(Vo,{...f,isOpen:oe,children:ye}):ye},Go=t.forwardRef(function({"aria-label":n,className:a,containerProps:r,initialMounted:o,unmountOnClose:i,transition:s,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,reposition:d="auto",submenuOpenDelay:h=300,submenuCloseDelay:m=150,viewScroll:p="initial",portal:g,theming:v,onItemClick:b,...y},x){const w=t.useRef(null),k=t.useRef({}),{anchorRef:j,state:S,onClose:N}=y,C=t.useMemo(()=>({initialMounted:o,unmountOnClose:i,transition:s,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,rootMenuRef:w,rootAnchorRef:j,scrollNodesRef:k,reposition:d,viewScroll:p,submenuOpenDelay:h,submenuCloseDelay:m}),[o,i,s,c,j,u,f,d,p,h,m]),T=t.useMemo(()=>({handleClick(e,t){e.stopPropagation||bo(b,e);let n=e.keepOpen;void 0===n&&(n=t&&e.key===Io.SPACE),n||bo(N,{value:e.value,key:e.key,reason:Lo.CLICK})},handleClose(e){bo(N,{key:e,reason:Lo.CLICK})}}),[b,N]);if(!S)return null;const _=e.jsx(Po.Provider,{value:C,children:e.jsx(Ro.Provider,{value:T,children:e.jsx(Zo,{...y,ariaLabel:n||"Menu",externalRef:x,containerRef:w,containerProps:{className:a,containerRef:w,containerProps:r,theming:v,transition:s,onClose:N}})})});return!0===g&&"undefined"!=typeof document?l.createPortal(_,document.body):g?g.target?l.createPortal(_,g.target):g.stablePosition?null:_:_}),Ko=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ei=e=>({_s:e,status:Ko[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),ti=e=>e?6:5,ni=(e,t,n,a,r)=>{clearTimeout(a.current);const o=ei(e);t(o),n.current=o,r&&r({current:o})},ai=({enter:e=!0,exit:n=!0,preEnter:a,preExit:r,timeout:o,initialEntered:i,mountOnEnter:s,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=t.useState(()=>ei(i?2:ti(s))),d=t.useRef(u),h=t.useRef(),[m,p]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(o),g=t.useCallback(()=>{const e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return ti(t)}})(d.current._s,l);e&&ni(e,f,d,h,c)},[c,l]);return[u,t.useCallback(t=>{const o=e=>{switch(ni(e,f,d,h,c),e){case 1:m>=0&&(h.current=setTimeout(g,m));break;case 4:p>=0&&(h.current=setTimeout(g,p));break;case 0:case 3:h.current=((e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0))(o,e)}},i=d.current.isEnter;"boolean"!=typeof t&&(t=!i),t?!i&&o(e?a?0:1:2):i&&o(n?r?3:4:ti(l))},[g,c,e,n,a,r,m,p,l]),g]},ri=({initialOpen:e,initialMounted:n,unmountOnClose:a,transition:r,transitionTimeout:o=500,onMenuChange:i}={})=>{const s=vo(r,"open"),l=vo(r,"close"),[{status:c},u,f]=ai({initialEntered:e,mountOnEnter:!n,unmountOnExit:a,timeout:o,enter:s,exit:l,onStateChange:t.useCallback(({current:{isEnter:e,isResolved:t}})=>{!i||e&&s&&t||!e&&l&&t||i({open:e})},[i,s,l])});return[{state:Bo[c],endTransition:f},u]},oi=parseInt(t.version)<19,ii=t.forwardRef(function({"aria-label":n,captureFocus:a,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:s,...l},c){const[u,f,d]=(e=>{const[n,a]=ri(e),[r,o]=t.useState();return[{menuItemFocus:r,...n},a,(e,t)=>{o({position:e,alwaysUpdate:t}),a(!0)}]})({...l,onMenuChange:s}),{state:h}=u,m=po(h),p=t.useRef(null),g=((e,n)=>{if("production"!==process.env.NODE_ENV&&"function"!=typeof n)throw new Error("[React-Menu] useClick/useHover requires a function in the second parameter.");const[a]=t.useState({});return{onMouseDown:()=>{a.v=e&&"closed"!==e},onClick:e=>a.v?a.v=!1:n(!0,e)}})(h,(e,t)=>d(t.detail?void 0:Do.FIRST)),v=t.useCallback(e=>{f(!1),e.key&&p.current.focus()},[f]),b=bo(o,{open:m});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const y={...wo({onKeyDown:e=>{switch(e.key){case Io.UP:d(Do.LAST);break;case Io.DOWN:d(Do.FIRST);break;default:return}e.preventDefault()},...g},b.props),ref:qo(oi?b.ref:b.props.ref,p)};"MenuButton"===b.type[yo]&&(y.isOpen=m);const x=t.cloneElement(b,y);return t.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),e.jsxs(t.Fragment,{children:[x,e.jsx(Go,{...l,...u,"aria-label":n||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:p,ref:c,onClose:v})]})}),si=(e,n,a,r)=>{const[o,i,s]=(e=>{const[n,a]=t.useState(!1);return t.useEffect(()=>{!e&&a(!1)},[e]),[n,()=>!n&&a(!0),()=>a(!1)]})(a),{submenuCloseDelay:l}=t.useContext(Po),{isParentOpen:c,submenuCtx:u,dispatch:f,updateItems:d}=t.useContext(_o),h=()=>{!a&&!r&&f(Eo.SET,e.current)},m=()=>{!r&&f(Eo.UNSET,e.current)};return((e,t,n)=>{Xo(()=>{if("production"!==process.env.NODE_ENV&&!n)throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${t.current.outerHTML}`);if(e)return;const a=t.current;return n(a,!0),()=>{n(a)}},[e,t,n])})(r,e,d),t.useEffect(()=>{a&&c&&n.current&&n.current.focus()},[n,a,c]),{mouseOver:o,setHover:h,onBlur:e=>{a&&!e.currentTarget.contains(e.relatedTarget)&&m()},onPointerMove:e=>{r||(e.stopPropagation(),i(),u.on(l,h,h))},onPointerLeave:(e,t)=>{s(),u.off(),!t&&m()}}},li=((n,a)=>{const r=t.memo(a),o=t.forwardRef((n,a)=>{const o=t.useRef(null);return e.jsx(r,{...n,itemRef:o,externalRef:a,isHovering:t.useContext(To)===o.current})});return o.displayName=`WithHovering(${n})`,o})("MenuItem",function({className:n,value:a,href:r,type:o,checked:i,disabled:s,children:l,onClick:c,isHovering:u,itemRef:f,externalRef:d,...h}){const m=!!s,{mouseOver:p,setHover:g,...v}=si(f,f,u,m),b=t.useContext(Ro),y=t.useContext(Fo),x="radio"===o,w="checkbox"===o,k=!(!r||m||x||w),j=x?y.value===a:!!w&&!!i,S=e=>{if(m)return e.stopPropagation(),void e.preventDefault();const t={value:a,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),w&&(t.checked=!j),x&&(t.name=y.name),bo(c,t),x&&bo(y.onRadioChange,t),b.handleClick(t,w||x)},N=t.useMemo(()=>({type:o,disabled:m,hover:p||u,checked:j,anchor:k}),[o,m,p,u,j,k]),C=wo({...v,onPointerDown:g,onKeyDown:e=>{if(u)switch(e.key){case Io.ENTER:e.preventDefault();case Io.SPACE:k?f.current.click():S(e)}},onClick:S},h),T={role:x?"menuitemradio":w?"menuitemcheckbox":"menuitem","aria-checked":x||w?j:void 0,...jo(m,u),...C,ref:qo(d,f),className:No({block:Co,element:"item",modifiers:N,className:n}),children:t.useMemo(()=>bo(l,N),[l,N])};return k?e.jsx("li",{role:Oo,children:e.jsx("a",{href:r,...T})}):e.jsx("li",{...T})}),ci=t.memo(t.forwardRef(function({className:t,...n},a){return e.jsx("li",{role:Oo,...n,ref:a,className:No({block:Co,element:"header",className:t})})}));var ui="canvas-module_canvas__Iiaz4",fi="canvas-module_textCanvas__eFxM4",di="Highlight-module_highlight__1VV-X";function hi(n){const{canvasRef:a,barHeight:r,xyToHighlightData:o,zoom:i}=n,[s,l]=t.useState({height:"0px",visibility:"hidden"}),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null);t.useEffect(()=>{l({height:"0px",visibility:"hidden"})},[i]);const d=e=>{const t=c.current;if(!t)return void l(e);const n=f.current;n&&n.left===e.left&&n.top===e.top&&n.width===e.width&&n.visibility===e.visibility||(f.current=e,t.style.visibility=String(e.visibility||""),void 0!==e.left&&(t.style.left=String(e.left)),void 0!==e.top&&(t.style.top=String(e.top)),void 0!==e.width&&(t.style.width=String(e.width)),void 0!==e.height&&(t.style.height=String(e.height)))},h=e=>{u.current&&cancelAnimationFrame(u.current);const t=e.offsetX,n=e.offsetY;u.current=requestAnimationFrame(()=>{const e=o(t,n);if(e.isJust){const t=e.value;d({visibility:"visible",height:`${r}px`,...t})}else m()})},m=()=>{d({...f.current||{},visibility:"hidden"})};return t.useEffect(()=>{const e=a.current;return e?(e.addEventListener("mousemove",h),e.addEventListener("mouseout",m),()=>{e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",m),u.current&&cancelAnimationFrame(u.current)}):()=>{}},[a.current,h,m]),e.jsx("div",{ref:c,className:di,style:s,"data-testid":"flamegraph-highlight"})}var mi="ContextMenuHighlight-module_highlightContextMenu__WI1nK";const pi={height:"0px",visibility:"hidden"};function gi(n){const{node:a,barHeight:r}=n,[o,i]=t.useState(pi);return t.useEffect(()=>{a.match({Nothing:()=>i(pi),Just:e=>i({visibility:"visible",height:`${r}px`,...e})})},[a]),e.jsx("div",{className:mi,style:o,"data-testid":"flamegraph-highlight-contextmenu"})}const vi={name:"Default",goodColor:r.rgb(0,170,0),neutralColor:r.rgb(148,142,142),badColor:r.rgb(200,0,0),colors:[r.hsl(24,69,60),r.hsl(34,65,65),r.hsl(194,52,61),r.hsl(163,45,55),r.hsl(211,48,60),r.hsl(246,40,65),r.hsl(305,63,79),r.hsl(47,100,73),r.rgb(183,219,171),r.rgb(244,213,152),r.rgb(78,146,249),r.rgb(249,186,143),r.rgb(242,145,145),r.rgb(130,181,216),r.rgb(229,168,226),r.rgb(174,162,224),r.rgb(154,196,138),r.rgb(242,201,109),r.rgb(101,197,219),r.rgb(249,147,78),r.rgb(234,100,96),r.rgb(81,149,206),r.rgb(214,131,206),r.rgb(128,110,183)]},bi={...vi,name:"Color Blind",goodColor:r.rgb(26,133,255),neutralColor:r.rgb(148,142,142),badColor:r.rgb(220,50,32)};function yi(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M5,19.56c0,5.22,3.54,9.44,7.92,9.44h3.17c4.37,0,7.92-4.23,7.92-9.44v-7.56H5v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M14,1h-.82c-4.52,0-8.18,3.73-8.18,8.33v1.67H14V1Z"}),e.jsx("path",{d:"M15.82,1h-.82V11h9v-1.67c0-4.6-3.66-8.33-8.18-8.33Z"})]})}function xi(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M24,19.56c0,5.22-3.54,9.44-7.92,9.44h-3.17c-4.37,0-7.92-4.23-7.92-9.44v-7.56H24v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M15,1h.82c4.52,0,8.18,3.73,8.18,8.33v1.67H15V1Z"}),e.jsx("path",{d:"M13.18,1h.82V11H5v-1.67c0-4.6,3.66-8.33,8.18-8.33Z"})]})}var wi={tooltip:"Tooltip-module_tooltip__NMZ65",flamegraphDiffTooltip:"Tooltip-module_flamegraphDiffTooltip__Z983o",tooltipName:"Tooltip-module_tooltipName__y4Qs3",functionName:"Tooltip-module_functionName__z9LHO",tooltipTable:"Tooltip-module_tooltipTable__ct3pq",clickInfo:"Tooltip-module_clickInfo__Utux5"};const ki={location:"Location",self:"Self",total:"Total",baseline:"Baseline",comparison:"Comparison",diff:"Diff",noItemsFound:"No items found",diffNew:"new",diffRemoved:"removed",tooltipSamples:"Samples:",tooltipUnitTitles:{objects:{percent:"% of objects in RAM",formattedValue:"Objects in RAM",total:"% of total RAM"},goroutines:{percent:"% of goroutines",formattedValue:"Goroutines",total:"% of total goroutines"},bytes:{percent:"% of RAM",formattedValue:"RAM",total:"% of total bytes"},samples:{percent:"Share of CPU",formattedValue:"CPU Time",total:"% of total CPU"},lock_nanoseconds:{percent:"% of Time spent",formattedValue:"Time",total:"% of total seconds"},lock_samples:{percent:"% of contended locks",formattedValue:"Contended locks",total:"% of total locks"},trace_samples:{percent:"% of time",formattedValue:"Samples",total:"% of total samples"},exceptions:{percent:"% of thrown exceptions",formattedValue:"Thrown exceptions",total:"% of total thrown exceptions"},unknown:{percent:"Percentage",formattedValue:"Units",total:"% of total units"}},resetView:"Reset View",collapseNodesAbove:"Collapse nodes above",copyFunctionName:"Copy function name",highlightSimilarNodes:"Highlight similar nodes",clearHighlight:"Clear highlight",openInSandwichView:"Open in sandwich view",showTextTailFirst:"Show text tail first",showTextHeadFirst:"Show text head first",headFirst:"Head first",tailFirst:"Tail first",clickToHighlightNode:"Click to highlight node in flamegraph",rightClickForMoreNodeOptions:"Right click for more node viewing options",viewTable:"Table",viewTableAndFlamegraph:"Table and Flamegraph",viewFlamegraph:"Flamegraph",viewSandwich:"Sandwich",viewGraphviz:"GraphViz",more:"More",diffLegendRemovedLabel:"(-) Removed",diffLegendAddedLabel:"Added (+)",diffLegendSelectPalette:"Select a palette",paletteDefaultName:"Default",paletteColorBlindName:"Color Blind",paletteDefaultDesc:"(green to red)",paletteColorBlindDesc:"(blue to red)",searchPlaceholder:"Search...",syncSearchBars:"Sync Search Bars",unsyncSearchBars:"Unsync Search Bars",focusOnThisFunction:"Focus on this function",tableDoubleClickToFocus:"Double-click to focus in flamegraph",tableRightClickForOptions:"Right-click for more options",collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",ofTotal:"of total",clearFocus:"Clear focus",sampleCountFormat:[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}]},ji={...ki,location:"位置",self:"自身",total:"总计",baseline:"基线",comparison:"对比",diff:"差异",noItemsFound:"没有找到任何条目",diffNew:"新增",diffRemoved:"移除",tooltipSamples:"样本数:",tooltipUnitTitles:{objects:{percent:"RAM 中对象占比",formattedValue:"RAM 中对象数",total:"占总 RAM 的百分比"},goroutines:{percent:"协程占比",formattedValue:"协程数量",total:"占协程总数的百分比"},bytes:{percent:"RAM 占比",formattedValue:"RAM",total:"占总字节数的百分比"},samples:{percent:"CPU 占比",formattedValue:"CPU 时间",total:"占总 CPU 的百分比"},lock_nanoseconds:{percent:"耗时占比",formattedValue:"时间",total:"占总秒数的百分比"},lock_samples:{percent:"锁竞争事件占比",formattedValue:"锁竞争事件数",total:"占锁竞争总数的百分比"},trace_samples:{percent:"时间占比",formattedValue:"样本数",total:"占样本总数的百分比"},exceptions:{percent:"异常抛出占比",formattedValue:"异常数",total:"占异常总数的百分比"},unknown:{percent:"百分比",formattedValue:"单位",total:"占单位总量的百分比"}},resetView:"重置视图",collapseNodesAbove:"收起上方节点",copyFunctionName:"复制函数名",highlightSimilarNodes:"高亮相似节点",clearHighlight:"清除高亮",openInSandwichView:"在 sandwich 视图中查看",showTextTailFirst:"显示文本尾部优先",showTextHeadFirst:"显示文本头部优先",headFirst:"从头部开始显示",tailFirst:"从尾部开始显示",clickToHighlightNode:"点击火焰图节点高亮",rightClickForMoreNodeOptions:"右键查看更多节点选项",viewTable:"表格",viewTableAndFlamegraph:"表格 + 火焰图",viewFlamegraph:"火焰图",viewSandwich:"三明治视图",viewGraphviz:"调用图 (GraphViz)",more:"更多",diffLegendRemovedLabel:"(-) 减少",diffLegendAddedLabel:"增加 (+)",diffLegendSelectPalette:"选择颜色方案",paletteDefaultName:"默认",paletteColorBlindName:"色盲",paletteDefaultDesc:"(绿色 → 红色)",paletteColorBlindDesc:"(蓝色 → 红色)",searchPlaceholder:"搜索...",syncSearchBars:"同步搜索栏",unsyncSearchBars:"取消同步搜索栏",focusOnThisFunction:"聚焦到此函数",tableDoubleClickToFocus:"双击可聚焦到火焰图",tableRightClickForOptions:"右键查看更多选项",collapsedLevelsSingular:"总计(已折叠 1 层)",collapsedLevelsPlural:"总计(已折叠 {n} 层)",ofTotal:"占总量",clearFocus:"清除聚焦",sampleCountFormat:[{value:1e12,label:"兆"},{value:1e8,label:"亿"},{value:1e4,label:"万"},{value:1e3,label:"千"}]},Si=t.createContext(ki),Ni=Si,Ci=({messages:n,children:a})=>{const r=t.useMemo(()=>{var e;return{...ki,...n,tooltipUnitTitles:{...ki.tooltipUnitTitles,...null!==(e=null==n?void 0:n.tooltipUnitTitles)&&void 0!==e?e:{}}}},[n]);return e.jsx(Si.Provider,{value:r,children:a})},Ti=()=>t.useContext(Si);function _i(e){if(!e)return null;const t=e.replace(/,/g,"").trim();if(!t)return null;const n=Number(t);return Number.isFinite(n)?n:null}function Mi(e,t){if(!e||!t)return;const n=e.trim().replace(/\u2212/g,"-");return n&&"0"!==n?n.startsWith("+")?t.badColor.rgb().string():n.startsWith("-")?t.goodColor.rgb().string():void 0:void 0}function Ri(e,t,n){return n<t?t:Math.max(t,Math.min(n,e))}function Fi(e,t,n,a){const r=window.innerWidth,o=window.innerHeight,i=Math.max(0,n||0),s=Math.max(0,a||0);let l=e+12,c=t+20;return l+i+8>r&&(l=e-i-12),c+s+8>o&&(c=t-s-20),l=Ri(l,8,r-i-8),c=Ri(c,8,o-s-8),{left:l,top:c}}function Pi({shouldShowFooter:n=!0,shouldShowTitle:a=!0,dataSourceRef:r,clickInfoSide:o,setTooltipContent:i,palette:s}){const l=t.useRef(null),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null),[d,h]=t.useState({title:{text:"",diff:{text:"",color:""}},tooltipData:[]}),[m,p]=t.useState(),g=()=>{p({visibility:"hidden"}),h({title:{text:"",diff:{text:"",color:""}},tooltipData:[]})},v=t.useCallback(e=>{u.current&&cancelAnimationFrame(u.current);const t=e.clientX,n=e.clientY;u.current=requestAnimationFrame(()=>{if(!l.current)throw new Error("Missing tooltipElement");c.current={x:t,y:n},i(h,g,e);const a=l.current.clientWidth||0,r=l.current.clientHeight||0,{left:o,top:s}=Fi(t,n,a,r);p({top:s,left:o,visibility:"visible"})})},[i]);return t.useEffect(()=>{const e=r.current;if(!e)return()=>{};const t=()=>{g()},n=t=>{e.contains(t.target)||g()};return e.addEventListener("mousemove",v),e.addEventListener("mouseout",g),e.addEventListener("mouseleave",t),window.addEventListener("mousemove",n,{passive:!0}),window.addEventListener("blur",t),()=>{e.removeEventListener("mousemove",v),e.removeEventListener("mouseout",g),e.removeEventListener("mouseleave",t),window.removeEventListener("mousemove",n),window.removeEventListener("blur",t),u.current&&cancelAnimationFrame(u.current)}},[r.current,v]),t.useLayoutEffect(()=>{if(!l.current)return;if(!c.current)return;if(0===d.tooltipData.length)return;const{x:e,y:t}=c.current,n=l.current.getBoundingClientRect(),a=n.width,r=n.height,o=f.current;if(o&&Math.abs(o.w-a)<1&&Math.abs(o.h-r)<1)return;f.current={w:a,h:r};const{left:i,top:s}=Fi(e,t,a,r);p(e=>e&&e.left===i&&e.top===s&&"visible"===e.visibility?e:{...e||{},left:i,top:s,visibility:"visible"})},[d.tooltipData.length,d.title.text]),e.jsx("div",{"data-testid":"tooltip",className:Hr(wi.tooltip,{[wi.flamegraphDiffTooltip]:d.tooltipData.length>1}),style:{...m,textAlign:"center"},ref:l,children:d.tooltipData.length>0&&e.jsxs(e.Fragment,{children:[a&&e.jsx("div",{className:wi.tooltipName,"data-testid":"tooltip-title",children:d.title.text}),e.jsx("div",{className:wi.functionName,"data-testid":"tooltip-function-name",children:d.title.text}),d.title.diff.text.length>0?e.jsx(Ii,{data:d.tooltipData,diff:d.title.diff,palette:s}):e.jsx(Ii,{data:d.tooltipData,palette:s}),n&&e.jsx(Ei,{clickInfoSide:o})]})})}function Ii({data:t,diff:n,palette:a}){const r=Ti(),[o,i]=t,s="Location"!==r.location;if(!o)return null;let l;switch(o.tooltipType){case"flamegraph":l=()=>{const t=i&&function(e,t){const n=hr(e),a=hr(t);if(!n||!a)return"";const r=a.value-n.value;if(0===r)return"0";const o=r>0?"+":"-",i=Math.abs(r);let s;s=i>=100?i.toFixed(0):i>=10?i.toFixed(1):i.toFixed(2);const l=n.unit||a.unit;return l?`${o}${s} ${l}`:`${o}${s}`}(o.formattedValue,i.formattedValue),l=mr(t,s),c=i&&function(e,t){const n=_i(e),a=_i(t);if(null==n||null==a)return"";const r=a-n;return 0===r?"0":`${r>0?"+":"-"}${Math.abs(r).toLocaleString()}`}(o.samples,i.samples),u=mr(o.formattedValue,s),f=mr(null==i?void 0:i.formattedValue,s),d=null==n?void 0:n.color,h=Mi(t,a),m=Mi(c,a);return e.jsxs(e.Fragment,{children:[i&&e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{}),e.jsx("th",{children:r.baseline}),e.jsx("th",{children:r.comparison}),e.jsx("th",{children:r.diff})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsxs("td",{children:[r.tooltipUnitTitles[o.units].percent,":"]}),e.jsx("td",{children:o.percent}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.percent}),e.jsx("td",{style:{textAlign:"center"},children:n&&e.jsx("span",{"data-testid":"tooltip-diff",style:{color:d},children:n.text})})]})]}),e.jsxs("tr",{children:[e.jsxs("td",{children:[r.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:u}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:f}),e.jsx("td",{style:{textAlign:"center"},children:l&&e.jsx("span",{"data-testid":"tooltip-time-diff",style:h?{color:h}:void 0,children:l})})]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:r.tooltipSamples}),e.jsx("td",{children:o.samples}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.samples}),e.jsx("td",{style:{textAlign:"center"},children:c&&e.jsx("span",{"data-testid":"tooltip-samples-diff",style:m?{color:m}:void 0,children:c})})]})]})]})]})};break;case"table":l=()=>e.jsxs(e.Fragment,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{}),e.jsxs("td",{children:[r.self," (",r.tooltipUnitTitles[o.units].total,")"]}),e.jsxs("td",{children:[r.total," (",r.tooltipUnitTitles[o.units].total,")"]})]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsxs("td",{children:[r.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:o.self}),e.jsx("td",{children:o.total})]})})]});break;default:l=()=>null}return e.jsx("table",{"data-testid":"tooltip-table",className:Hr(wi.tooltipTable,{[wi[`${o.tooltipType}${i?"Diff":""}`]]:o.tooltipType}),style:{textAlign:"center",margin:"0 auto"},children:l()})}function Ei({clickInfoSide:t}){const n=Ti();let a;switch(t){case"right":a=e.jsxs(e.Fragment,{children:[e.jsx(yi,{}),e.jsx("span",{children:n.rightClickForMoreNodeOptions})]});break;case"left":a=e.jsxs(e.Fragment,{children:[e.jsx(xi,{}),e.jsx("span",{children:n.clickToHighlightNode})]});break;default:a=e.jsx(e.Fragment,{})}return e.jsx("div",{"data-testid":"tooltip-footer",className:wi.clickInfo,children:a})}function Li(n){const{format:a,canvasRef:r,xyToData:o,numTicks:i,sampleRate:s,units:l,leftTicks:c,rightTicks:u,palette:f}=n,d=Ti(),h=t.useCallback((e,t,n)=>{const r=br(i,s,l),h=o(n.offsetX,n.offsetY);let m;var p;if(h.isJust)switch(m=h.value,m.format){case"single":{const t={percent:(p=m.total/i,`${gr(p)}%`),samples:"trace_samples"===l?"":dr(m.total),units:l,formattedValue:r.format(m.total,s),tooltipType:"flamegraph"};e({title:{text:m.name,diff:{text:"",color:""}},tooltipData:[t]});break}case"double":{if("single"===a)throw new Error("props format is 'single' but it has been mapped to 'double'");const t=Di({formatter:r,sampleRate:s,totalLeft:m.totalLeft,leftTicks:c,totalRight:m.totalRight,rightTicks:u,title:m.name,units:l},f,d);e({title:t.title,tooltipData:t.tooltipData});break}default:throw new Error(`Unsupported format: '${m.format}'`)}else t()},[i,s,l,c,u,f,o,a,d]);return e.jsx(Pi,{dataSourceRef:r,clickInfoSide:"right",setTooltipContent:h,palette:f})}function Di({formatter:e,sampleRate:t,totalLeft:n,leftTicks:a,totalRight:r,rightTicks:o,title:i,units:s},l=vi,c){var u,f;const d=o>0?r/o:0,h=gr(a>0?n/a:0),m=gr(d),p={percent:`${h}%`,samples:dr(n),units:s,formattedValue:e.format(n,t),tooltipType:"flamegraph"},g={percent:`${m}%`,samples:dr(r),units:s,formattedValue:e.format(r,t),tooltipType:"flamegraph"};let v=vr(h,m);Number.isFinite(v)||(v=0);let b="";v>0?b=l.badColor.rgb().string():v<0&&(b=l.goodColor.rgb().string());let y="";return 0===n&&r>0?y=null!==(u=null==c?void 0:c.diffNew)&&void 0!==u?u:"新增":0===r&&n>0?y=null!==(f=null==c?void 0:c.diffRemoved)&&void 0!==f?f:"移除":0===v?y="0%":v>0?y=`+${v.toFixed(2)}%`:v<0&&(y=`${v.toFixed(2)}%`),{title:{text:i,diff:{text:y,color:b}},tooltipData:[p,g]}}var Bi="ContextMenu-module_menu__x-AtY";function Ai(n){const[a,r]=ri({transition:!0}),[o,i]=t.useState({x:0,y:0}),{canvasRef:s}=n,[l,c]=t.useState([]),{xyToMenuItems:u,onClose:f,onOpen:d}=n;return t.useEffect(()=>{r(!1);const e=s.current;if(!e)return()=>{};const t=e=>{e.preventDefault();const t=u(e.offsetX,e.offsetY);c(t);const n=e.clientX,a=e.clientY+20;i({x:n,y:a}),r(!0),d(e.offsetX,e.offsetY)};return e.addEventListener("contextmenu",t),()=>{e.removeEventListener("contextmenu",t)}},[u]),e.jsx(Go,{...a,className:Bi,anchorPoint:o,onClose:()=>{r(!1),f()},children:l})}var Oi="LogoLink-module_logoLink__oWRri";function zi(){return e.jsxs("a",{className:Oi,href:"https://github.com/pyroscope-io/pyroscope/",target:"_blank",rel:"noreferrer",children:[e.jsxs("svg",{width:"22px",height:"22px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("defs",{children:e.jsxs("radialGradient",{cx:"49.4236252%",cy:"92.6627823%",fx:"49.4236252%",fy:"92.6627823%",r:"195.066755%",gradientTransform:"translate(0.494236,0.926628),scale(1.000000,0.735610),rotate(-90.000000),translate(-0.494236,-0.926628)",id:"radialGradient-1",children:[e.jsx("stop",{stopColor:"#FFB90C",offset:"0%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"38.390924%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"50.5405%"}),e.jsx("stop",{stopColor:"#B51424",offset:"73.98091%"}),e.jsx("stop",{stopColor:"#B51424",offset:"100%"})]})}),e.jsx("g",{id:"Artboard",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:e.jsx("g",{id:"fire-part",transform:"translate(148.516736, 0.000000)",fillRule:"nonzero",children:e.jsxs("g",{id:"whole-thing",transform:"translate(363.983264, 495.000000) scale(-1, 1) rotate(-180.000000) translate(-363.983264, -495.000000) translate(0.483264, 0.000000)",children:[e.jsx("g",{id:"g70",transform:"translate(-0.000091, 0.685815)",fill:"url(#radialGradient-1)",children:e.jsx("path",{d:"M65.3646667,571.739321 L65.4492471,571.698868 C19.5139147,505.999969 -5.32464048,424.477859 1.04305801,336.877516 L1.04305801,336.877516 C14.0321963,158.179446 159.192462,13.7596653 338.059844,1.5917266 L338.059844,1.5917266 C419.418369,-3.93888015 495.500283,17.3823334 558.456522,57.4611191 L558.456522,57.4611191 L481.301947,162.097965 C437.516468,136.521928 399.367671,129.590556 363.486536,130.155994 L363.486536,130.155994 C234.497143,130.155994 129.556988,235.032238 129.556988,363.946998 L129.556988,363.946998 C129.556988,492.865683 234.497143,597.738003 363.486536,597.738003 L363.486536,597.738003 C492.483783,597.738003 597.427864,492.865683 597.427864,363.946998 L597.427864,363.946998 C597.41276,304.634864 581.39383,255.677522 530.630465,199.668053 L607.770843,95.1329436 C680.936847,161.576603 726.932594,257.364176 726.932594,363.946998 L726.932594,363.946998 C726.932594,458.031616 691.13483,543.75602 632.416071,608.271816 L632.416071,608.271816 L632.416071,608.275741 L533.597728,748.122808 L428.601388,617.203806 L434.703262,646.563419 C459.453008,765.59222 433.664131,889.543925 363.49439,988.853335 L363.49439,988.853335 L65.3646667,571.723019 L65.3646667,571.739321 Z",id:"path84"})}),e.jsx("g",{id:"blue",transform:"translate(191.447039, 191.331780)",children:e.jsxs("g",{id:"g88",transform:"translate(-0.000063, 0.685930)",children:[e.jsx("g",{id:"g94",transform:"translate(0.177296, 0.699054)",fill:"#3EC1D3",children:e.jsx("path",{d:"M171.862466,343.697728 C77.0961324,343.697728 -0.00497405932,266.647602 -0.00497405932,171.934957 C-0.00497405932,77.2182874 77.0961324,0.168162396 171.862466,0.168162396 C266.632828,0.168162396 343.741988,77.2182874 343.741988,171.934957 C343.741988,266.647602 266.632828,343.697728 171.862466,343.697728",id:"path96"})}),e.jsx("g",{id:"g98",transform:"translate(29.362379, 172.629585)",fill:"#FFFFFF",children:e.jsx("path",{d:"M22.8397982,0 L0.671669409,0 C0.671669409,78.2496309 64.380874,141.920035 142.678189,141.920035 L142.678189,119.765407 C76.6007327,119.765407 22.8397982,66.0372141 22.8397982,0",id:"path100"})})]})})]})})})]}),e.jsx("span",{children:"Pyroscope"})]})}const $i=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"})}),Vi=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"})}),Hi=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z"})}),Wi=({fill:t})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:t,children:[e.jsx("g",{id:"shape_squiggle",children:e.jsx("path",{d:"M60,38.42c-4.62,0-6.97-2.64-8.86-4.75-1.81-2.03-2.86-3.08-5.13-3.08s-3.32,1.06-5.13,3.08c-1.89,2.12-4.24,4.75-8.86,4.75s-6.97-2.64-8.87-4.75c-1.81-2.03-2.86-3.08-5.14-3.08s-3.33,1.06-5.14,3.08c-1.89,2.12-4.25,4.75-8.87,4.75-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5c2.28,0,3.33-1.06,5.14-3.09,1.89-2.12,4.25-4.75,8.87-4.75s6.97,2.64,8.87,4.75c1.81,2.03,2.86,3.09,5.14,3.09s3.32-1.06,5.13-3.08c1.89-2.12,4.24-4.75,8.86-4.75s6.97,2.64,8.86,4.75c1.81,2.03,2.86,3.08,5.13,3.08,1.38,0,2.5,1.12,2.5,2.5s-1.12,2.5-2.5,2.5Z"})}),e.jsxs("g",{id:"Layer_4",children:[e.jsx("rect",{x:"2",y:"8",width:"60",height:"14",rx:"3.94",ry:"3.94"}),e.jsx("path",{d:"M58.06,41h-18.64c-1.58,0-3.14,.42-4.5,1.22l-6.88,4.02c-1.87,1.09-4.19,1.09-6.06,0l-6.88-4.02c-1.37-.8-2.92-1.22-4.5-1.22H5.94c-2.18,0-3.94,1.76-3.94,3.94v7.12c0,2.18,1.76,3.94,3.94,3.94H58.06c2.18,0,3.94-1.76,3.94-3.94v-7.12c0-2.18-1.76-3.94-3.94-3.94Z"})]})]}),Ui=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"ab_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M16.71,41l-.42-2.45h-.16c-1.63,1.95-4.06,2.95-6.91,2.95-4.8,0-7.86-3.45-7.86-7.45,0-6.4,6.01-9.3,14.13-9.3v-.4c0-1.5-.84-3.2-4.38-3.2-2.48,0-4.9,.75-6.54,1.7l-1.42-4.75c1.69-.9,5.01-2.1,9.44-2.1,8.33,0,10.65,4.95,10.65,10.45v8.7c0,2.25,.11,4.4,.37,5.85h-6.91Zm-.95-11.7c-3.64,0-6.91,.9-6.91,4,0,2.1,1.37,3,3,3s3.22-1.05,3.74-2.6c.11-.35,.16-.8,.16-1.2v-3.2Z"}),e.jsx("path",{d:"M29.36,41c.11-1.79,.21-4.62,.21-7.25V6h7.7v13.46h.11c1.42-1.99,3.8-3.28,7.06-3.28,5.85,0,9.7,5.01,9.65,12.16,0,8.69-5.22,13.16-10.81,13.16-2.74,0-5.22-.99-6.91-3.72h-.11l-.37,3.23h-6.54Zm7.91-9.83c0,.55,.05,.99,.16,1.39,.58,1.94,2.16,3.18,4.01,3.18,3.11,0,4.9-2.53,4.9-7,0-3.92-1.58-6.8-4.9-6.8-1.85,0-3.53,1.39-3.95,3.28-.16,.4-.21,.94-.21,1.44v4.52Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"62 54 52 45 52 51 35 51 35 57 52 57 52 63 62 54"})})]}),Ji=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"yz_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M22.75,13l3.43,12.39c.42,1.47,.84,3.2,1.16,4.52h.11c.32-1.32,.69-3.05,1-4.47l2.9-12.44h8.01l-5.8,17.16c-2.95,8.33-5.17,12.54-8.07,15.23-2.58,2.39-5.43,3.3-7.17,3.55l-1.85-6.3c1.11-.25,2.32-.76,3.48-1.52,1.16-.71,2.32-1.88,2.95-3.05,.26-.41,.42-.76,.42-1.12,0-.31-.05-.66-.26-1.17L14.32,13h8.43Z"}),e.jsx("path",{d:"M41.62,33.46l7.59-10.16c1.27-1.57,2.37-2.95,3.58-4.27v-.15h-10.33v-5.89h19.45l-.05,4.57-7.28,9.8c-1.21,1.57-2.48,3.15-3.69,4.42v.1h11.33v5.94h-20.61v-4.37Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"12 51 12 45 2 54 12 63 12 57 29 57 29 51 12 51"})})]});var Qi="Header-module_flamegraphHeader__nIrXP",Xi="Header-module_row__P7-2L",Yi="Header-module_flamegraphTitle__sjsvB";function qi(t){const{format:n,units:a,toolbarVisible:r}=t,o={objects:"number of objects in RAM per function",goroutines:"number of goroutines",bytes:"amount of RAM per function",samples:"CPU time per function",lock_nanoseconds:"time spent waiting on locks per function",lock_samples:"number of contended locks per function",trace_samples:"aggregated span duration",exceptions:"number of exceptions thrown",unknown:""},i=r&&"single"===n?e.jsx("div",{className:`${Xi} ${Yi}`,role:"heading","aria-level":2,children:o[a]&&e.jsxs(e.Fragment,{children:["Frame width represents ",o[a]]})}):null;return i?e.jsx("div",{className:Qi,children:e.jsx("div",{children:i})}):null}var Zi="FlamegraphBreadcrumb-module_bar__v8uhn",Gi="FlamegraphBreadcrumb-module_chip__pdv1k",Ki="FlamegraphBreadcrumb-module_focusTooltip__nX30y",es="FlamegraphBreadcrumb-module_separator__Zj-rC",ts="FlamegraphBreadcrumb-module_chipSeparator__S-Gld",ns="FlamegraphBreadcrumb-module_unitLabel__bjHEA",as="FlamegraphBreadcrumb-module_focusIcon__aJBb6",rs="FlamegraphBreadcrumb-module_ofTotal__kk4dt",os="FlamegraphBreadcrumb-module_clearBtn__spimK";function is(t){const{totalValueText:n,totalSamplesText:a,samplesLabel:r,unitLabel:o,hasFocus:i,focusPercent:s,focusLabel:l,ofTotalPlacement:c="after",ofTotalLabel:u,clearFocusLabel:f,onClearFocus:d}=t,h=l&&l.trim().length>0?l:void 0;return e.jsxs("div",{className:Zi,"aria-live":"polite",children:[e.jsxs("span",{className:Gi,children:[e.jsx("span",{children:n}),e.jsx("span",{className:es,children:"|"}),e.jsxs("span",{children:[a," ",r]}),e.jsxs("span",{className:ns,children:["(",o,")"]})]}),i&&void 0!==s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:ts,children:">"}),e.jsxs("span",{className:`${Gi} ${Ki}`,"data-tooltip":h,children:[e.jsx("span",{className:as,"aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6Z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3.2"})]})}),"before"===c?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:rs,children:u}),e.jsxs("span",{children:[s.toFixed(2),"%"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:[s.toFixed(2),"%"]}),e.jsx("span",{className:rs,children:u})]}),e.jsx("button",{type:"button",className:os,"aria-label":f,onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},children:"×"})]})]})]})}var ss="styles-module_flamegraphPane__ejguD",ls="styles-module_fitModeItem__0UBwN",cs="styles-module_sandwichItem__WYvnd",us="styles-module_flamegraphFrame__9ZW-z";function fs(a){const r=t.useRef(null),o=t.useRef(null),l=t.useRef(),c=t.useRef(),u=t.useRef(null),f=t.useRef(null),d=t.useRef(null),m=t.useRef({rect:!1,text:!1}),p=Ti(),g=t.useRef({lastWidth:0,lastHeight:0}),v="undefined"!=typeof window&&"undefined"!=typeof OffscreenCanvas&&"transferControlToOffscreen"in HTMLCanvasElement.prototype,b=t.useMemo(()=>({collapsedLevelsSingular:p.collapsedLevelsSingular,collapsedLevelsPlural:p.collapsedLevelsPlural,isZh:"Location"!==p.location}),[p.collapsedLevelsSingular,p.collapsedLevelsPlural,p.location]),y=t.useCallback(e=>({name:e.name,goodColor:e.goodColor.rgb().array(),neutralColor:e.neutralColor.rgb().array(),badColor:e.badColor.rgb().array(),colors:e.colors.map(e=>e.rgb().array())}),[]),[x,w]=t.useState(n.Maybe.nothing()),{flamebearer:k,focusedNode:j,fitMode:S,updateFitMode:N,highlightQuery:C,zoom:T,toolbarVisible:_,headerVisible:M=!0,disableClick:R=!1,showSingleLevel:F=!1,showCredit:P,setActiveItem:I,selectedItem:E,updateView:L,enableSandwichView:D=!0,breadcrumb:B}=a,{onZoom:A,onReset:O,isDirty:z,onFocusOnNode:$}=a,{"data-testid":V}=a,{palette:H,setPalette:W}=a,U=t.useCallback(s(()=>{Z(),G()},50),[]);t.useEffect(()=>{if(!v)return()=>{};const e=function(){const e=new URL("undefined"==typeof document?require("url").pathToFileURL(__filename).href:h&&"SCRIPT"===h.tagName.toUpperCase()&&h.src||new URL("index.node.cjs.js",document.baseURI).href),t=e.pathname,n=t.includes("/src/");if(t.includes("/dist/"),t.includes("/node_modules/.vite/deps/")){const t=new URL("../../@kylincloud/flamegraph/dist/flamegraphRenderWorker.js",e);return new Worker(t,{type:"module"})}const a=n?new URL("./flamegraphRenderWorker.ts",e):new URL("./flamegraphRenderWorker.js",e);return new Worker(a,{type:"module"})}();return u.current=e,setTimeout(()=>{Z(),G()},0),()=>{e.terminate(),u.current=null,f.current=null,d.current=null,m.current={rect:!1,text:!1}}},[v]),i(r,()=>{if(l){if(r.current){const e=r.current.clientWidth,t=r.current.clientHeight,n=g.current;if(!(Math.abs(e-n.lastWidth)>=2))return;n.lastWidth=e,n.lastHeight=t}U()}});const J=(e,t)=>te().xyToBar(e,t).map(e=>({left:ee().offsetLeft+e.x,top:ee().offsetTop+e.y,width:e.width})),Q=t.useCallback((t,n)=>{const a=z(),r=te().xyToBar(t,n),o=r.isJust?r.value.name:"";return[e.jsxs(li,{disabled:!a,onClick:O,children:[e.jsx(Xa,{icon:Kr.faRedo}),p.resetView]},"reset"),(()=>{const t=r.mapOrElse(()=>!1,()=>!0),n=r.mapOrElse(()=>()=>{},e=>$.bind(null,e.i,e.j));return e.jsxs(li,{disabled:!t,onClick:n,children:[e.jsx(Xa,{icon:mo.faCompressAlt}),p.collapseNodesAbove]},"focus")})(),e.jsxs(li,{onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(o)},children:[e.jsx(Xa,{icon:ao.faCopy}),p.copyFunctionName]},"copy"),(()=>{const t=E.isJust&&E.value===o?p.clearHighlight:p.highlightSimilarNodes;return e.jsxs(li,{onClick:()=>{I({name:o})},children:[e.jsx(Xa,{icon:lo.faHighlighter}),t]},"highlight-similar-nodes")})(),(()=>{if(!L||!D)return null;return e.jsxs(li,{className:cs,onClick:()=>{L("sandwich"),I({name:o})},children:[e.jsx(Wi,{fill:"black"}),p.openInSandwichView]},"open-in-sandwich-view")})(),(()=>{const t=S===Sr;return e.jsxs(li,{className:ls,onClick:()=>{N(t?jr:Sr)},children:[t?e.jsx(Ji,{}):e.jsx(Ui,{}),t?p.showTextTailFirst:p.showTextHeadFirst]},"fit-mode")})()].filter(Boolean)},[l,E,S,z,O,$,I,L,p,D]),X=()=>{if(r.current){const e=new $r(k,r.current,j,S,C,T,H,b);l.current=e}if(o.current){const e=new $r(k,o.current,j,S,C,T,H,b);c.current=e}},Y=t.useCallback(()=>{if(!v||!u.current)return!1;const e=u.current;if(r.current&&!f.current)try{const t=r.current.transferControlToOffscreen();f.current=t,e.postMessage({type:"init",payload:{kind:"rect",canvas:t}},[t]),m.current.rect=!0}catch(e){}if(o.current&&!d.current)try{const t=o.current.transferControlToOffscreen();d.current=t,e.postMessage({type:"init",payload:{kind:"text",canvas:t}},[t]),m.current.text=!0}catch(e){}return!0},[v]);t.useEffect(()=>{X(),Z(),G()},[H,b]),t.useEffect(()=>{X(),Z(),G()},[r.current,k,j,S,T]),t.useEffect(()=>{X(),Z(),G()},[C]);const q=(e,t)=>{if(!v)return!1;if(!u.current)return!0;if(!Y())return!0;const n="rect"===e?r.current:o.current,a=(null==n?void 0:n.clientWidth)||(null==n?void 0:n.width)||0,i={kind:e,flamebearer:k,focusedNode:j.isJust?j.value:null,fitMode:S,highlightQuery:C,zoom:T.isJust?T.value:null,palette:y(H),messages:b,renderRects:t.renderRects,renderText:t.renderText,width:a,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1};return u.current.postMessage({type:"render",payload:i}),!0},Z=()=>{var e,t,n;q("rect",{renderText:!1})||(null===(e=null==r?void 0:r.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==l?void 0:l.current)||void 0===t||t.render({renderText:!1}),null===(n=null==r?void 0:r.current)||void 0===n||n.setAttribute("data-state","rendered"))},G=()=>{var e,t,n;q("text",{renderRects:!1})||(null===(e=null==o?void 0:o.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==c?void 0:c.current)||void 0===t||t.render({renderRects:!1}),null===(n=null==o?void 0:o.current)||void 0===n||n.setAttribute("data-state","rendered"))},K=!k||k&&k.names.length<=1,ee=()=>{if(!r.current)throw new Error("Missing canvas");return r.current},te=()=>{if(!l.current)throw new Error("Missing canvas");return l.current};return e.jsxs("div",{"data-testid":"flamegraph-view",className:Hr(ss,{"vertical-orientation":"double"===k.format}),children:[e.jsxs("div",{className:us,children:[B&&e.jsx(is,{totalValueText:B.totalValueText,totalSamplesText:B.totalSamplesText,samplesLabel:B.samplesLabel,unitLabel:B.unitLabel,hasFocus:B.hasFocus,focusPercent:B.focusPercent,focusLabel:B.focusLabel,ofTotalPlacement:B.ofTotalPlacement,ofTotalLabel:B.ofTotalLabel,clearFocusLabel:B.clearFocusLabel,onClearFocus:B.onClearFocus}),M&&e.jsx(qi,{format:k.format,units:k.units,toolbarVisible:_}),e.jsxs("div",{"data-testid":V,style:{position:"relative",opacity:K&&!F?0:1},children:[e.jsx("canvas",{height:"0","data-testid":"flamegraph-canvas","data-highlightquery":C,className:Hr("flamegraph-canvas",ui),ref:r,onClick:R?void 0:e=>{const t=te().xyToBar(e.nativeEvent.offsetX,e.nativeEvent.offsetY);t.match({Nothing:()=>{},Just:e=>{T.match({Nothing:()=>{A(t)},Just:a=>{e.i===a.i&&e.j===a.j?A(n.Maybe.nothing()):A(t)}})}})}}),e.jsx("canvas",{height:"0","data-testid":"flamegraph-text-canvas",className:Hr("flamegraph-text-canvas",fi),ref:o}),l&&r&&e.jsx(hi,{barHeight:ur,canvasRef:r,zoom:T,xyToHighlightData:J}),l&&e.jsx(gi,{barHeight:ur,node:x})]}),P?e.jsx(zi,{}):""]}),l&&e.jsx(Li,{format:k.format,canvasRef:r,xyToData:(e,t)=>te().xyToBar(e,t),numTicks:k.numTicks,sampleRate:k.sampleRate,leftTicks:"double"===k.format?k.leftTicks:0,rightTicks:"double"===k.format?k.rightTicks:0,units:k.units,palette:H}),!R&&l&&r&&e.jsx(Ai,{canvasRef:r,xyToMenuItems:Q,onClose:()=>{w(n.Maybe.nothing())},onOpen:(e,t)=>{w(J(e,t))}})]})}var ds,hs={exports:{}};
|
|
12
|
+
function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=j(e))||t){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}function g(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||j(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function j(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}var _=function(){},N={},S={},M=null,C={mark:_,measure:_};try{"undefined"!=typeof window&&(N=window),"undefined"!=typeof document&&(S=document),"undefined"!=typeof MutationObserver&&(M=MutationObserver),"undefined"!=typeof performance&&(C=performance)}catch(Pl){}var T=(N.navigator||{}).userAgent,R=void 0===T?"":T,O=N,E=S,P=M,F=C;O.document;var A,I=!!E.documentElement&&!!E.head&&"function"==typeof E.addEventListener&&"function"==typeof E.createElement,D=~R.indexOf("MSIE")||~R.indexOf("Trident/"),L={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},B=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],z="classic",$="duotone",V="sharp",H="sharp-duotone",W="chisel",U="etch",J="jelly",Q="jelly-duo",q="jelly-fill",X="notdog",Y="notdog-duo",K="slab",Z="slab-press",G="thumbprint",ee="utility",te="utility-duo",ne="utility-fill",re="whiteboard",ae=[z,$,V,H,W,U,J,Q,q,X,Y,K,Z,G,ee,te,ne,re];g(g(g(g(g(g(g(g(g(g(A={},z,"Classic"),$,"Duotone"),V,"Sharp"),H,"Sharp Duotone"),W,"Chisel"),U,"Etch"),J,"Jelly"),Q,"Jelly Duo"),q,"Jelly Fill"),X,"Notdog"),g(g(g(g(g(g(g(g(A,Y,"Notdog Duo"),K,"Slab"),Z,"Slab Press"),G,"Thumbprint"),ee,"Utility"),te,"Utility Duo"),ne,"Utility Fill"),re,"Whiteboard");var oe=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),ie=["fak","fa-kit","fakd","fa-kit-duotone"],se={fak:"kit","fa-kit":"kit"},le={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"};g(g({},"kit","Kit"),"kit-duotone","Kit Duotone");var ce,ue={kit:"fak"},fe={"kit-duotone":"fakd"},de="duotone-group",he="swap-opacity",me="primary",pe="secondary";g(g(g(g(g(g(g(g(g(g(ce={},"classic","Classic"),"duotone","Duotone"),"sharp","Sharp"),"sharp-duotone","Sharp Duotone"),"chisel","Chisel"),"etch","Etch"),"jelly","Jelly"),"jelly-duo","Jelly Duo"),"jelly-fill","Jelly Fill"),"notdog","Notdog"),g(g(g(g(g(g(g(g(ce,"notdog-duo","Notdog Duo"),"slab","Slab"),"slab-press","Slab Press"),"thumbprint","Thumbprint"),"utility","Utility"),"utility-duo","Utility Duo"),"utility-fill","Utility Fill"),"whiteboard","Whiteboard");g(g({},"kit","Kit"),"kit-duotone","Kit Duotone");var ge={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},ve=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"]),be=[1,2,3,4,5,6,7,8,9,10],ye=be.concat([11,12,13,14,15,16,17,18,19,20]),xe=[].concat(x(Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]})),["solid","regular","light","thin","duotone","brands","semibold"],["aw","fw","pull-left","pull-right"],["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",de,he,me,pe]).concat(be.map(function(e){return"".concat(e,"x")})).concat(ye.map(function(e){return"w-".concat(e)})),we="___FONT_AWESOME___",ke="svg-inline--fa",je="data-fa-i2svg",_e="data-fa-pseudo-element",Ne="data-prefix",Se="data-icon",Me="fontawesome-i2svg",Ce=["HTML","HEAD","STYLE","SCRIPT"],Te=["::before","::after",":before",":after"],Re=function(){try{return"production"===process.env.NODE_ENV}catch(e){return!1}}();function Oe(e){return new Proxy(e,{get:function(e,t){return t in e?e[t]:e[z]}})}var Ee=b({},L);Ee[z]=b(b(b(b({},{"fa-duotone":"duotone"}),L[z]),se),le);var Pe=Oe(Ee),Fe=b({},{chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}});Fe[z]=b(b(b(b({},{duotone:"fad"}),Fe[z]),ue),fe);var Ae=Oe(Fe),Ie=b({},ge);Ie[z]=b(b({},Ie[z]),{fak:"fa-kit"});var De=Oe(Ie),Le=b({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}});Le[z]=b(b({},Le[z]),{"fa-kit":"fak"}),Oe(Le);var Be=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,ze="fa-layers-text",$e=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i;Oe(b({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}}));var Ve=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],He={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},We=[].concat(x(["kit"]),x(xe)),Ue=O.FontAwesomeConfig||{};if(E&&"function"==typeof E.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=y(e,2),n=t[0],r=t[1],a=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=E.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=a&&(Ue[r]=a)})}var Je={styleDefault:"solid",familyDefault:z,cssPrefix:"fa",replacementClass:ke,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Ue.familyPrefix&&(Ue.cssPrefix=Ue.familyPrefix);var Qe=b(b({},Je),Ue);Qe.autoReplaceSvg||(Qe.observeMutations=!1);var qe={};Object.keys(Je).forEach(function(e){Object.defineProperty(qe,e,{enumerable:!0,set:function(t){Qe[e]=t,Xe.forEach(function(e){return e(qe)})},get:function(){return Qe[e]}})}),Object.defineProperty(qe,"familyPrefix",{enumerable:!0,set:function(e){Qe.cssPrefix=e,Xe.forEach(function(e){return e(qe)})},get:function(){return Qe.cssPrefix}}),O.FontAwesomeConfig=qe;var Xe=[];var Ye=16,Ke={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Ze(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function Ge(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function et(e){return e.classList?Ge(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function tt(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function nt(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function rt(e){return e.size!==Ke.size||e.x!==Ke.x||e.y!==Ke.y||e.rotate!==Ke.rotate||e.flipX||e.flipY}function at(){var e="fa",t=ke,n=qe.cssPrefix,r=qe.replacementClass,a=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";\n --fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";\n --fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";\n --fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";\n --fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";\n --fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";\n --fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";\n --fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";\n --fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";\n --fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";\n --fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";\n --fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";\n --fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";\n --fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";\n}\n\n.svg-inline--fa {\n box-sizing: content-box;\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285714em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left,\n.svg-inline--fa .fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-pull-right,\n.svg-inline--fa .fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.fa-layers .svg-inline--fa {\n inset: 0;\n margin: auto;\n position: absolute;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xs {\n font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-sm {\n font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-lg {\n font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xl {\n font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-2xl {\n font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-width-auto {\n --fa-width: auto;\n}\n\n.fa-fw,\n.fa-width-fixed {\n --fa-width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-inline-start: var(--fa-li-margin, 2.5em);\n padding-inline-start: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n/* Heads Up: Bordered Icons will not be supported in the future!\n - This feature will be deprecated in the next major release of Font Awesome (v8)!\n - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.\n*/\n/* Notes:\n* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)\n* --@{v.$css-prefix}-border-padding =\n ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it\'s vertical alignment)\n ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)\n*/\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.0625em);\n box-sizing: var(--fa-border-box-sizing, content-box);\n padding: var(--fa-border-padding, 0.1875em 0.25em);\n}\n\n.fa-pull-left,\n.fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right,\n.fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n .fa-bounce,\n .fa-fade,\n .fa-beat-fade,\n .fa-flip,\n .fa-pulse,\n .fa-shake,\n .fa-spin,\n .fa-spin-pulse {\n animation: none !important;\n transition: none !important;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.svg-inline--fa.fa-inverse {\n fill: var(--fa-inverse, #fff);\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n line-height: 2em;\n position: relative;\n vertical-align: middle;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.svg-inline--fa.fa-stack-1x {\n --fa-width: 1.25em;\n height: 1em;\n width: var(--fa-width);\n}\n.svg-inline--fa.fa-stack-2x {\n --fa-width: 2.5em;\n height: 2em;\n width: var(--fa-width);\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n inset: 0;\n margin: auto;\n position: absolute;\n z-index: var(--fa-stack-z-index, auto);\n}';if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");a=a.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(s,".".concat(r))}return a}var ot=!1;function it(){qe.autoAddCss&&!ot&&(!function(e){if(e&&I){var t=E.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=E.head.childNodes,r=null,a=n.length-1;a>-1;a--){var o=n[a],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=o)}E.head.insertBefore(t,r)}}(at()),ot=!0)}var st={mixout:function(){return{dom:{css:at,insertCss:it}}},hooks:function(){return{beforeDOMElementCreation:function(){it()},beforeI2svg:function(){it()}}}},lt=O||{};lt[we]||(lt[we]={}),lt[we].styles||(lt[we].styles={}),lt[we].hooks||(lt[we].hooks={}),lt[we].shims||(lt[we].shims=[]);var ct=lt[we],ut=[],ft=function(){E.removeEventListener("DOMContentLoaded",ft),dt=1,ut.map(function(e){return e()})},dt=!1;function ht(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,a=e.children,o=void 0===a?[]:a;return"string"==typeof e?tt(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(tt(e[n]),'" ')},"").trim()}(r),">").concat(o.map(ht).join(""),"</").concat(t,">")}function mt(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}I&&((dt=(E.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(E.readyState))||E.addEventListener("DOMContentLoaded",ft));var pt=function(e,t,n,r){var a,o,i,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(a=1,i=e[s[0]]):(a=0,i=n);a<l;a++)i=c(i,e[o=s[a]],o,e);return i};function gt(e){return 1!==x(e).length?null:e.codePointAt(0).toString(16)}function vt(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function bt(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,r=void 0!==n&&n,a=vt(t);"function"!=typeof ct.hooks.addPack||r?ct.styles[e]=b(b({},ct.styles[e]||{}),a):ct.hooks.addPack(e,vt(t)),"fas"===e&&bt("fa",t)}var yt=ct.styles,xt=ct.shims,wt=Object.keys(De),kt=wt.reduce(function(e,t){return e[t]=Object.keys(De[t]),e},{}),jt=null,_t={},Nt={},St={},Mt={},Ct={};function Tt(e,t){var n,r=t.split("-"),a=r[0],o=r.slice(1).join("-");return a!==e||""===o||(n=o,~We.indexOf(n))?null:o}var Rt,Ot=function(){var e=function(e){return pt(yt,function(t,n,r){return t[r]=pt(n,e,{}),t},{})};_t=e(function(e,t,n){(t[3]&&(e[t[3]]=n),t[2])&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n});return e}),Nt=e(function(e,t,n){(e[n]=n,t[2])&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n});return e}),Ct=e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in yt||qe.autoFetchSvg,n=pt(xt,function(e,n){var r=n[0],a=n[1],o=n[2];return"far"!==a||t||(a="fas"),"string"==typeof r&&(e.names[r]={prefix:a,iconName:o}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:a,iconName:o}),e},{names:{},unicodes:{}});St=n.names,Mt=n.unicodes,jt=It(qe.styleDefault,{family:qe.familyDefault})};function Et(e,t){return(_t[e]||{})[t]}function Pt(e,t){return(Ct[e]||{})[t]}function Ft(e){return St[e]||{prefix:null,iconName:null}}function At(){return jt}Rt=function(e){jt=It(e.styleDefault,{family:qe.familyDefault})},Xe.push(Rt),Ot();function It(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).family,n=void 0===t?z:t,r=Pe[n][e];if(n===$&&!e)return"fad";var a=Ae[n][e]||Ae[n][r],o=e in ct.styles?e:null;return a||o||null}function Dt(e){return e.sort().filter(function(e,t,n){return n.indexOf(e)===t})}var Lt=ve.concat(ie);function Bt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skipLookups,n=void 0!==t&&t,r=null,a=Dt(e.filter(function(e){return Lt.includes(e)})),o=Dt(e.filter(function(e){return!Lt.includes(e)})),i=y(a.filter(function(e){return r=e,!B.includes(e)}),1)[0],s=void 0===i?null:i,l=function(e){var t=z,n=wt.reduce(function(e,t){return e[t]="".concat(qe.cssPrefix,"-").concat(t),e},{});return ae.forEach(function(r){(e.includes(n[r])||e.some(function(e){return kt[r].includes(e)}))&&(t=r)}),t}(a),c=b(b({},function(e){var t=[],n=null;return e.forEach(function(e){var r=Tt(qe.cssPrefix,e);r?n=r:e&&t.push(e)}),{iconName:n,rest:t}}(o)),{},{prefix:It(s,{family:l})});return b(b(b({},c),function(e){var t=e.values,n=e.family,r=e.canonical,a=e.givenPrefix,o=void 0===a?"":a,i=e.styles,s=void 0===i?{}:i,l=e.config,c=void 0===l?{}:l,u=n===$,f=t.includes("fa-duotone")||t.includes("fad"),d="duotone"===c.familyDefault,h="fad"===r.prefix||"fa-duotone"===r.prefix;!u&&(f||d||h)&&(r.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab");if(!r.prefix&&zt.includes(n)){if(Object.keys(s).find(function(e){return $t.includes(e)})||c.autoFetchSvg){var m=oe.get(n).defaultShortPrefixId;r.prefix=m,r.iconName=Pt(r.prefix,r.iconName)||r.iconName}}"fa"!==r.prefix&&"fa"!==o||(r.prefix=At()||"fas");return r}({values:e,family:l,styles:yt,config:qe,canonical:c,givenPrefix:r})),function(e,t,n){var r=n.prefix,a=n.iconName;if(e||!r||!a)return{prefix:r,iconName:a};var o="fa"===t?Ft(a):{},i=Pt(r,a);a=o.iconName||i||a,"far"!==(r=o.prefix||r)||yt.far||!yt.fas||qe.autoFetchSvg||(r="fas");return{prefix:r,iconName:a}}(n,r,c))}var zt=ae.filter(function(e){return e!==z||e!==$}),$t=Object.keys(ge).filter(function(e){return e!==z}).map(function(e){return Object.keys(ge[e])}).flat();var Vt=function(){return m(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}},[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(t){e.definitions[t]=b(b({},e.definitions[t]||{}),a[t]),bt(t,a[t]);var n=De[z][t];n&&bt(n,a[t]),Ot()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map(function(t){var r=n[t],a=r.prefix,o=r.iconName,i=r.icon,s=i[2];e[a]||(e[a]={}),s.length>0&&s.forEach(function(t){"string"==typeof t&&(e[a][t]=i)}),e[a][o]=i}),e}}])}(),Ht=[],Wt={},Ut={},Jt=Object.keys(Ut);function Qt(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return(Wt[e]||[]).forEach(function(e){t=e.apply(null,[t].concat(r))}),t}function qt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(Wt[e]||[]).forEach(function(e){e.apply(null,n)})}function Xt(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Ut[e]?Ut[e].apply(null,t):void 0}function Yt(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||At();if(t)return t=Pt(n,t)||t,mt(Kt.definitions,n,t)||mt(ct.styles,n,t)}var Kt=new Vt,Zt={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I?(qt("beforeI2svg",e),Xt("pseudoElements2svg",e),Xt("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoReplaceSvgRoot;!1===qe.autoReplaceSvg&&(qe.autoReplaceSvg=!0),qe.observeMutations=!0,e=function(){en({autoReplaceSvgRoot:n}),qt("watch",t)},I&&(dt?setTimeout(e,0):ut.push(e))}},Gt={noAuto:function(){qe.autoReplaceSvg=!1,qe.observeMutations=!1,qt("noAuto")},config:qe,dom:Zt,parse:{icon:function(e){if(null===e)return null;if("object"===k(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Pt(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=It(e[0]);return{prefix:n,iconName:Pt(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(qe.cssPrefix,"-"))>-1||e.match(Be))){var r=Bt(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||At(),iconName:Pt(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var a=At();return{prefix:a,iconName:Pt(a,e)||e}}}},library:Kt,findIconDefinition:Yt,toHtml:ht},en=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,t=void 0===e?E:e;(Object.keys(ct.styles).length>0||qe.autoFetchSvg)&&I&&qe.autoReplaceSvg&&Gt.dom.i2svg({node:t})};function tn(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return ht(e)})}}),Object.defineProperty(e,"node",{get:function(){if(I){var t=E.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function nn(e){var t=e.icons,n=t.main,r=t.mask,a=e.prefix,o=e.iconName,i=e.transform,s=e.symbol,l=e.maskId,c=e.extra,u=e.watchable,f=void 0!==u&&u,d=r.found?r:n,h=d.width,m=d.height,p=[qe.replacementClass,o?"".concat(qe.cssPrefix,"-").concat(o):""].filter(function(e){return-1===c.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(c.classes).join(" "),g={children:[],attributes:b(b({},c.attributes),{},{"data-prefix":a,"data-icon":o,class:p,role:c.attributes.role||"img",viewBox:"0 0 ".concat(h," ").concat(m)})};(function(e){return["aria-label","aria-labelledby","title","role"].some(function(t){return t in e})})(c.attributes)||c.attributes["aria-hidden"]||(g.attributes["aria-hidden"]="true"),f&&(g.attributes[je]="");var v=b(b({},g),{},{prefix:a,iconName:o,main:n,mask:r,maskId:l,transform:i,symbol:s,styles:b({},c.styles)}),y=r.found&&n.found?Xt("generateAbstractMask",v)||{children:[],attributes:{}}:Xt("generateAbstractIcon",v)||{children:[],attributes:{}},x=y.children,w=y.attributes;return v.children=x,v.attributes=w,s?function(e){var t=e.prefix,n=e.iconName,r=e.children,a=e.attributes,o=e.symbol,i=!0===o?"".concat(t,"-").concat(qe.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:b(b({},a),{},{id:i}),children:r}]}]}(v):function(e){var t=e.children,n=e.main,r=e.mask,a=e.attributes,o=e.styles,i=e.transform;if(rt(i)&&n.found&&!r.found){var s={x:n.width/n.height/2,y:.5};a.style=nt(b(b({},o),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:a,children:t}]}(v)}function rn(e){var t=e.content,n=e.width,r=e.height,a=e.transform,o=e.extra,i=e.watchable,s=void 0!==i&&i,l=b(b({},o.attributes),{},{class:o.classes.join(" ")});s&&(l[je]="");var c=b({},o.styles);rt(a)&&(c.transform=function(e){var t=e.transform,n=e.width,r=void 0===n?16:n,a=e.height,o=void 0===a?16:a,i="";return i+=D?"translate(".concat(t.x/Ye-r/2,"em, ").concat(t.y/Ye-o/2,"em) "):"translate(calc(-50% + ".concat(t.x/Ye,"em), calc(-50% + ").concat(t.y/Ye,"em)) "),i+="scale(".concat(t.size/Ye*(t.flipX?-1:1),", ").concat(t.size/Ye*(t.flipY?-1:1),") "),i+"rotate(".concat(t.rotate,"deg) ")}({transform:a,width:n,height:r}),c["-webkit-transform"]=c.transform);var u=nt(c);u.length>0&&(l.style=u);var f=[];return f.push({tag:"span",attributes:l,children:[t]}),f}var an=ct.styles;function on(e){var t=e[0],n=e[1],r=y(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(qe.cssPrefix,"-").concat(He.GROUP)},children:[{tag:"path",attributes:{class:"".concat(qe.cssPrefix,"-").concat(He.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(qe.cssPrefix,"-").concat(He.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var sn={found:!1,width:512,height:512};function ln(e,t){var n=t;return"fa"===t&&null!==qe.styleDefault&&(t=At()),new Promise(function(r,a){if("fa"===n){var o=Ft(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&an[t]&&an[t][e])return r(on(an[t][e]));!function(e,t){Re||qe.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(b(b({},sn),{},{icon:qe.showMissingIcons&&e&&Xt("missingIconAbstract")||{}}))})}var cn=function(){},un=qe.measurePerformance&&F&&F.mark&&F.measure?F:{mark:cn,measure:cn},fn='FA "7.1.0"',dn=function(e){un.mark("".concat(fn," ").concat(e," ends")),un.measure("".concat(fn," ").concat(e),"".concat(fn," ").concat(e," begins"),"".concat(fn," ").concat(e," ends"))},hn=function(e){return un.mark("".concat(fn," ").concat(e," begins")),function(){return dn(e)}},mn=function(){};function pn(e){return"string"==typeof(e.getAttribute?e.getAttribute(je):null)}function gn(e){return E.createElementNS("http://www.w3.org/2000/svg",e)}function vn(e){return E.createElement(e)}function bn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).ceFn,n=void 0===t?"svg"===e.tag?gn:vn:t;if("string"==typeof e)return E.createTextNode(e);var r=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(t){r.setAttribute(t,e.attributes[t])}),(e.children||[]).forEach(function(e){r.appendChild(bn(e,{ceFn:n}))}),r}var yn={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(bn(e),t)}),null===t.getAttribute(je)&&qe.keepOriginalSource){var n=E.createComment(function(e){var t=" ".concat(e.outerHTML," ");return"".concat(t,"Font Awesome fontawesome.com ")}(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){var t=e[0],n=e[1];if(~et(t).indexOf(qe.replacementClass))return yn.replace(e);var r=new RegExp("".concat(qe.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var a=n[0].attributes.class.split(" ").reduce(function(e,t){return t===qe.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?t.removeAttribute("class"):t.setAttribute("class",a.toNode.join(" "))}var o=n.map(function(e){return ht(e)}).join("\n");t.setAttribute(je,""),t.innerHTML=o}};function xn(e){e()}function wn(e,t){var n="function"==typeof t?t:mn;if(0===e.length)n();else{var r=xn;"async"===qe.mutateApproach&&(r=O.requestAnimationFrame||xn),r(function(){var t=!0===qe.autoReplaceSvg?yn.replace:yn[qe.autoReplaceSvg]||yn.replace,r=hn("mutate");e.map(t),r(),n()})}}var kn=!1;function jn(){kn=!0}function _n(){kn=!1}var Nn=null;function Sn(e){if(P&&qe.observeMutations){var t=e.treeCallback,n=void 0===t?mn:t,r=e.nodeCallback,a=void 0===r?mn:r,o=e.pseudoElementsCallback,i=void 0===o?mn:o,s=e.observeMutationsRoot,l=void 0===s?E:s;Nn=new P(function(e){if(!kn){var t=At();Ge(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!pn(e.addedNodes[0])&&(qe.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&qe.searchPseudoElements&&i([e.target],!0),"attributes"===e.type&&pn(e.target)&&~Ve.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute(Ne):null,n=e.getAttribute?e.getAttribute(Se):null;return t&&n}(e.target)){var r=Bt(et(e.target)),o=r.prefix,s=r.iconName;e.target.setAttribute(Ne,o||t),s&&e.target.setAttribute(Se,s)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(qe.replacementClass)&&a(e.target);var l})}}),I&&Nn.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Mn(e){var t,n,r=e.getAttribute("data-prefix"),a=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",i=Bt(et(e));return i.prefix||(i.prefix=At()),r&&a&&(i.prefix=r,i.iconName=a),i.iconName&&i.prefix||(i.prefix&&o.length>0&&(i.iconName=(t=i.prefix,n=e.innerText,(Nt[t]||{})[n]||Et(i.prefix,gt(e.innerText)))),!i.iconName&&qe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=Mn(e),r=n.iconName,a=n.prefix,o=n.rest,i=function(e){return Ge(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{})}(e),s=Qt("parseNodeAttributes",{},e),l=t.styleParser?function(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(e,t){var n=t.split(":"),r=n[0],a=n.slice(1);return r&&a.length>0&&(e[r]=a.join(":").trim()),e},{})),n}(e):[];return b({iconName:r,prefix:a,transform:Ke,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:i}},s)}var Tn=ct.styles;function Rn(e){var t="nest"===qe.autoReplaceSvg?Cn(e,{styleParser:!1}):Cn(e);return~t.extra.classes.indexOf(ze)?Xt("generateLayersText",e,t):Xt("generateSvgReplacementMutation",e,t)}function On(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!I)return Promise.resolve();var n=E.documentElement.classList,r=function(e){return n.add("".concat(Me,"-").concat(e))},a=function(e){return n.remove("".concat(Me,"-").concat(e))},o=qe.autoFetchSvg?[].concat(x(ie),x(ve)):B.concat(Object.keys(Tn));o.includes("fa")||o.push("fa");var i=[".".concat(ze,":not([").concat(je,"])")].concat(o.map(function(e){return".".concat(e,":not([").concat(je,"])")})).join(", ");if(0===i.length)return Promise.resolve();var s=[];try{s=Ge(e.querySelectorAll(i))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),a("complete");var l=hn("onTree"),c=s.reduce(function(e,t){try{var n=Rn(t);n&&e.push(n)}catch(e){Re||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){wn(n,function(){r("active"),r("complete"),a("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Rn(e).then(function(e){e&&wn([e],t)})}var Pn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?Ke:n,a=t.symbol,o=void 0!==a&&a,i=t.mask,s=void 0===i?null:i,l=t.maskId,c=void 0===l?null:l,u=t.classes,f=void 0===u?[]:u,d=t.attributes,h=void 0===d?{}:d,m=t.styles,p=void 0===m?{}:m;if(e){var g=e.prefix,v=e.iconName,y=e.icon;return tn(b({type:"icon"},e),function(){return qt("beforeDOMElementCreation",{iconDefinition:e,params:t}),nn({icons:{main:on(y),mask:s?on(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:v,transform:b(b({},Ke),r),symbol:o,maskId:c,extra:{attributes:h,styles:p,classes:f}})})}},Fn={mixout:function(){return{icon:(e=Pn,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(t||{}).icon?t:Yt(t||{}),a=n.mask;return a&&(a=(a||{}).icon?a:Yt(a||{})),e(r,b(b({},n),{},{mask:a}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=On,e.nodeCallback=En,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?E:t,r=e.callback;return On(n,void 0===r?function(){}:r)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.prefix,a=t.transform,o=t.symbol,i=t.mask,s=t.maskId,l=t.extra;return new Promise(function(t,c){Promise.all([ln(n,r),i.iconName?ln(i.iconName,i.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(i){var c=y(i,2),u=c[0],f=c[1];t([e,nn({icons:{main:u,mask:f},prefix:r,iconName:n,transform:a,symbol:o,maskId:s,extra:l,watchable:!0})])}).catch(c)})},e.generateAbstractIcon=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.transform,i=nt(e.styles);return i.length>0&&(r.style=i),rt(o)&&(t=Xt("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),n.push(t||a.icon),{children:n,attributes:r}}}},An={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,r=void 0===n?[]:n;return tn({type:"layer"},function(){qt("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(qe.cssPrefix,"-layers")].concat(x(r)).join(" ")},children:n}]})}}}},In={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.title;var n=t.classes,r=void 0===n?[]:n,a=t.attributes,o=void 0===a?{}:a,i=t.styles,s=void 0===i?{}:i;return tn({type:"counter",content:e},function(){return qt("beforeDOMElementCreation",{content:e,params:t}),function(e){var t=e.content,n=e.extra,r=b(b({},n.attributes),{},{class:n.classes.join(" ")}),a=nt(n.styles);a.length>0&&(r.style=a);var o=[];return o.push({tag:"span",attributes:r,children:[t]}),o}({content:e.toString(),extra:{attributes:o,styles:s,classes:["".concat(qe.cssPrefix,"-layers-counter")].concat(x(r))}})})}}}},Dn={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?Ke:n,a=t.classes,o=void 0===a?[]:a,i=t.attributes,s=void 0===i?{}:i,l=t.styles,c=void 0===l?{}:l;return tn({type:"text",content:e},function(){return qt("beforeDOMElementCreation",{content:e,params:t}),rn({content:e,transform:b(b({},Ke),r),extra:{attributes:s,styles:c,classes:["".concat(qe.cssPrefix,"-layers-text")].concat(x(o))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.transform,r=t.extra,a=null,o=null;if(D){var i=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();a=s.width/i,o=s.height/i}return Promise.resolve([e,rn({content:e.innerHTML,width:a,height:o,transform:n,extra:r,watchable:!0})])}}},Ln=new RegExp('"',"ug"),Bn=[1105920,1112319],zn=b(b(b(b({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),$n=Object.keys(zn).reduce(function(e,t){return e[t.toLowerCase()]=zn[t],e},{}),Vn=Object.keys($n).reduce(function(e,t){var n=$n[t];return e[t]=n[900]||x(Object.entries(n))[0][1],e},{});function Hn(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(r,a){if(null!==e.getAttribute(n))return r();var o,i,s,l=Ge(e.children).filter(function(e){return e.getAttribute(_e)===t})[0],c=O.getComputedStyle(e,t),u=c.getPropertyValue("font-family"),f=u.match($e),d=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(l&&!f)return e.removeChild(l),r();if(f&&"none"!==h&&""!==h){var m=c.getPropertyValue("content"),p=function(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),a=isNaN(r)?"normal":r;return($n[n]||{})[a]||Vn[n]}(u,d),g=function(e){return gt(x(e.replace(Ln,""))[0]||"")}(m),v=f[0].startsWith("FontAwesome"),y=function(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content").replace(Ln,""),r=n.codePointAt(0),a=r>=Bn[0]&&r<=Bn[1],o=2===n.length&&n[0]===n[1];return a||o||t}(c),w=Et(p,g),k=w;if(v){var j=(i=Mt[o=g],s=Et("fas",o),i||(s?{prefix:"fas",iconName:s}:null)||{prefix:null,iconName:null});j.iconName&&j.prefix&&(w=j.iconName,p=j.prefix)}if(!w||y||l&&l.getAttribute(Ne)===p&&l.getAttribute(Se)===k)r();else{e.setAttribute(n,k),l&&e.removeChild(l);var _={iconName:null,prefix:null,transform:Ke,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},N=_.extra;N.attributes[_e]=t,ln(w,p).then(function(a){var o=nn(b(b({},_),{},{icons:{main:a,mask:{prefix:null,iconName:null,rest:[]}},prefix:p,iconName:k,extra:N,watchable:!0})),i=E.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(i,e.firstChild):e.appendChild(i),i.outerHTML=o.map(function(e){return ht(e)}).join("\n"),e.removeAttribute(n),r()}).catch(a)}}else r()})}function Wn(e){return Promise.all([Hn(e,"::before"),Hn(e,"::after")])}function Un(e){return!(e.parentNode===document.head||~Ce.indexOf(e.tagName.toUpperCase())||e.getAttribute(_e)||e.parentNode&&"svg"===e.parentNode.tagName)}var Jn=function(e){return!!e&&Te.some(function(t){return e.includes(t)})},Qn=function(e){if(!e)return[];var t=new Set,n=e.split(/,(?![^()]*\))/).map(function(e){return e.trim()});n=n.flatMap(function(e){return e.includes("(")?e:e.split(",").map(function(e){return e.trim()})});var r,a=p(n);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(Jn(o)){var i=Te.reduce(function(e,t){return e.replace(t,"")},o);""!==i&&"*"!==i&&t.add(i)}}}catch(e){a.e(e)}finally{a.f()}return t};function qn(e){if(I){var t;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])t=e;else if(qe.searchPseudoElementsFullScan)t=e.querySelectorAll("*");else{var n,r=new Set,a=p(document.styleSheets);try{for(a.s();!(n=a.n()).done;){var o=n.value;try{var i,s=p(o.cssRules);try{for(s.s();!(i=s.n()).done;){var l,c=i.value,u=p(Qn(c.selectorText));try{for(u.s();!(l=u.n()).done;){var f=l.value;r.add(f)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){s.e(e)}finally{s.f()}}catch(e){qe.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(o.href," (").concat(e.message,')\nIf it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.'))}}}catch(e){a.e(e)}finally{a.f()}if(!r.size)return;var d=Array.from(r).join(", ");try{t=e.querySelectorAll(d)}catch(e){}}return new Promise(function(e,n){var r=Ge(t).filter(Un).map(Wn),a=hn("searchPseudoElements");jn(),Promise.all(r).then(function(){a(),_n(),e()}).catch(function(){a(),_n(),n()})})}}var Xn={hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=qn,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?E:t;qe.searchPseudoElements&&qn(n)}}},Yn=!1,Kn=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(a=parseFloat(a),isNaN(a))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},Zn={mixout:function(){return{parse:{transform:function(e){return Kn(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=Kn(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.containerWidth,a=e.iconWidth,o={transform:"translate(".concat(r/2," 256)")},i="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={outer:o,inner:{transform:"".concat(i," ").concat(s," ").concat(l)},path:{transform:"translate(".concat(a/2*-1," -256)")}};return{tag:"g",attributes:b({},c.outer),children:[{tag:"g",attributes:b({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:b(b({},t.icon.attributes),c.path)}]}]}}}},Gn={x:0,y:0,width:"100%",height:"100%"};function er(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var tr={hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),r=n?Bt(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=At()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.mask,i=e.maskId,s=e.transform,l=a.width,c=a.icon,u=o.width,f=o.icon,d=function(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,a={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(32*t.x,", ").concat(32*t.y,") "),i="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:a,inner:{transform:"".concat(o," ").concat(i," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}({transform:s,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:b(b({},Gn),{},{fill:"white"})},m=c.children?{children:c.children.map(er)}:{},p={tag:"g",attributes:b({},d.inner),children:[er(b({tag:c.tag,attributes:b(b({},c.attributes),d.path)},m))]},g={tag:"g",attributes:b({},d.outer),children:[p]},v="mask-".concat(i||Ze()),y="clip-".concat(i||Ze()),x={tag:"mask",attributes:b(b({},Gn),{},{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},w={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:(t=f,"g"===t.tag?t.children:[t])},x]};return n.push(w,{tag:"rect",attributes:b({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(v,")")},Gn)}),{children:n,attributes:r}}}},nr={provides:function(e){var t=!1;O.matchMedia&&(t=O.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:b(b({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=b(b({},r),{},{attributeName:"opacity"}),o={tag:"circle",attributes:b(b({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:b(b({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:b(b({},a),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:b(b({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:b(b({},a),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:b(b({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:b(b({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};!function(e,t){var n=t.mixoutsTo;Ht=e,Wt={},Object.keys(Ut).forEach(function(e){-1===Jt.indexOf(e)&&delete Ut[e]}),Ht.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(n[e]=t[e]),"object"===k(t[e])&&Object.keys(t[e]).forEach(function(r){n[e]||(n[e]={}),n[e][r]=t[e][r]})}),e.hooks){var r=e.hooks();Object.keys(r).forEach(function(e){Wt[e]||(Wt[e]=[]),Wt[e].push(r[e])})}e.provides&&e.provides(Ut)})}([st,Fn,An,In,Dn,Xn,{mixout:function(){return{dom:{unwatch:function(){jn(),Yn=!0}}}},hooks:function(){return{bootstrap:function(){Sn(Qt("mutationObserverCallbacks",{}))},noAuto:function(){Nn&&Nn.disconnect()},watch:function(e){var t=e.observeMutationsRoot;Yn?_n():Sn(Qt("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},Zn,tr,nr,{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol"),r=null!==n&&(""===n||n);return e.symbol=r,e}}}}],{mixoutsTo:Gt});var rr=Gt.config,ar=Gt.parse,or=Gt.icon;function ir(e){return function(e){return(e-=0)==e}(e)?e:(e=e.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():"")).charAt(0).toLowerCase()+e.slice(1)}function sr(e){return e.charAt(0).toUpperCase()+e.slice(1)}var lr=new Map;function cr(e){if(lr.has(e))return lr.get(e);const t={};let n=0;const r=e.length;for(;n<r;){const a=e.indexOf(";",n),o=-1===a?r:a,i=e.slice(n,o).trim();if(i){const e=i.indexOf(":");if(e>0){const n=i.slice(0,e).trim(),r=i.slice(e+1).trim();if(n&&r){const e=ir(n);t[e.startsWith("webkit")?sr(e):e]=r}}}n=o+1}if(1e3===lr.size){const e=lr.keys().next().value;e&&lr.delete(e)}return lr.set(e,t),t}var ur=function e(t,n,r={}){if("string"==typeof n)return n;const a=(n.children||[]).map(n=>e(t,n)),o=n.attributes||{},i={};for(const[e,t]of Object.entries(o))switch(!0){case"class"===e:i.className=t;break;case"style"===e:i.style=cr(String(t));break;case e.startsWith("aria-"):case e.startsWith("data-"):i[e.toLowerCase()]=t;break;default:i[ir(e)]=t}const{style:s,role:l,"aria-label":c,...u}=r;return s&&(i.style=i.style?{...i.style,...s}:s),l&&(i.role=l),c&&(i["aria-label"]=c,i["aria-hidden"]="false"),t(n.tag,{...u,...i},...a)}.bind(null,t.createElement),fr=(e,n)=>{const r=t.useId();return e||(n?r:void 0)};"undefined"!=typeof process&&process.env.FA_VERSION;var dr="searchPseudoElementsFullScan"in rr?"7.0.0":"6.0.0",hr=Number.parseInt(dr)>=7,mr="fa",pr="fa-beat",gr="fa-fade",vr="fa-beat-fade",br="fa-bounce",yr="fa-shake",xr="fa-spin",wr="fa-spin-pulse",kr="fa-spin-reverse",jr="fa-pulse",_r={left:"fa-pull-left",right:"fa-pull-right"},Nr={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},Sr={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Mr="fa-border",Cr="fa-fw",Tr="fa-flip",Rr="fa-flip-horizontal",Or="fa-flip-vertical",Er="fa-inverse",Pr="fa-rotate-by",Fr="fa-swap-opacity",Ar="fa-width-auto";function Ir(e){const t=rr.cssPrefix||rr.familyPrefix||mr;return t===mr?e:e.replace(new RegExp(String.raw`(?<=^|\s)${mr}-`,"g"),`${t}-`)}function Dr(e){if(e)return(e=>"object"==typeof e&&"icon"in e&&!!e.icon)(e)?e:ar.icon(e)}var Lr=new class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t="undefined"!=typeof process&&"development"===process.env.NODE_ENV}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}}("FontAwesomeIcon"),Br={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},zr=new Set(Object.keys(Br)),$r=t.forwardRef((e,t)=>{const n={...Br,...e},{icon:r,mask:a,symbol:o,title:i,titleId:s,maskId:l,transform:c}=n,u=fr(l,Boolean(a)),f=fr(s,Boolean(i)),d=Dr(r);if(!d)return Lr.error("Icon lookup is undefined",r),null;const h=function(e){const{beat:t,fade:n,beatFade:r,bounce:a,shake:o,spin:i,spinPulse:s,spinReverse:l,pulse:c,fixedWidth:u,inverse:f,border:d,flip:h,size:m,rotation:p,pull:g,swapOpacity:v,rotateBy:b,widthAuto:y,className:x}=e,w=[];return x&&w.push(...x.split(" ")),t&&w.push(pr),n&&w.push(gr),r&&w.push(vr),a&&w.push(br),o&&w.push(yr),i&&w.push(xr),l&&w.push(kr),s&&w.push(wr),c&&w.push(jr),u&&w.push(Cr),f&&w.push(Er),d&&w.push(Mr),!0===h&&w.push(Tr),"horizontal"!==h&&"both"!==h||w.push(Rr),"vertical"!==h&&"both"!==h||w.push(Or),null!=m&&w.push(Sr[m]),null!=p&&0!==p&&w.push(Nr[p]),null!=g&&w.push(_r[g]),v&&w.push(Fr),hr?(b&&w.push(Pr),y&&w.push(Ar),(rr.cssPrefix||rr.familyPrefix||mr)===mr?w:w.map(Ir)):w}(n),m="string"==typeof c?ar.transform(c):c,p=Dr(a),g=or(d,{...h.length>0&&{classes:h},...m&&{transform:m},...p&&{mask:p},symbol:o,title:i,titleId:f,maskId:u});if(!g)return Lr.error("Could not find icon",d),null;const{abstract:v}=g,b={ref:t};for(const e of(y=n,Object.keys(y)))zr.has(e)||(b[e]=n[e]);var y;return ur(v[0],b)});$r.displayName="FontAwesomeIcon";var Vr={box:"Box-module_box__SQLj3",collapseBox:"Box-module_collapseBox__5A5Fc",padding:"Box-module_padding__dIJ-L",collapsedContent:"Box-module_collapsedContent__yn-0g",collapseTitle:"Box-module_collapseTitle__-R0ge",collapseIcon:"Box-module_collapseIcon__OAiTO",collapsed:"Box-module_collapsed__nf76f"};d.bind(Vr);const Hr=Symbol("BrandTag");const Wr=new class{constructor(e){this[Hr]=e}}("unit"),Ur=e=>null==e;function Jr(e,t){return void 0!==t?e(t):e}function Qr(e){if(function(e,t){return"object"==typeof e&&null!==e&&t in e}(e,"toString")&&"function"==typeof e.toString){const t=e.toString();return"string"==typeof t?t:JSON.stringify(e)}return JSON.stringify(e)}const qr="Ok",Xr="Err";class Yr{constructor(e){this.repr=e}static ok(e){return Ur(e)?new Yr(["Ok",Wr]):new Yr(["Ok",e])}static err(e){return Ur(e)?new Yr(["Err",Wr]):new Yr(["Err",e])}get variant(){return this.repr[0]}get value(){if(this.repr[0]===Xr)throw new Error("Cannot get the value of Err");return this.repr[1]}get error(){if(this.repr[0]===qr)throw new Error("Cannot get the error of Ok");return this.repr[1]}get isOk(){return this.repr[0]===qr}get isErr(){return this.repr[0]===Xr}map(e){return function(e,t){const n=t=>t.isOk?Kr(e(t.value)):t;return Jr(n,t)}(e,this)}mapOr(e,t){return function(e,t,n){function r(t,n){return n.isOk?t(n.value):e}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}(e,t,this)}mapOrElse(e,t){return Gr(e,t,this)}match(e){return function(e,t){const n=t=>Gr(e.Err,e.Ok,t);return Jr(n,t)}(e,this)}mapErr(e){return function(e,t){const n=t=>t.isOk?t:Zr(e(t.error));return Jr(n,t)}(e,this)}or(e){return function(e,t){const n=t=>t.isOk?Kr(t.value):e;return Jr(n,t)}(e,this)}orElse(e){return function(e,t){const n=t=>t.isOk?Kr(t.value):e(t.error);return Jr(n,t)}(e,this)}and(e){return function(e,t){const n=t=>t.isOk?e:Zr(t.error);return Jr(n,t)}(e,this)}andThen(e){return function(e,t){const n=t=>t.isOk?e(t.value):Zr(t.error);return Jr(n,t)}(e,this)}unwrapOr(e){return function(e,t){const n=t=>t.isOk?t.value:e;return Jr(n,t)}(e,this)}unwrapOrElse(e){return function(e,t){const n=t=>t.isOk?t.value:e(t.error);return Jr(n,t)}(e,this)}toMaybe(){return(e=this).isOk?da.just(e.value):da.nothing();var e}toString(){return ea(this)}toJSON(){return ta(this)}equals(e){return t=e,void 0!==(n=this)?n.match({Err:()=>t.isErr,Ok:e=>t.isOk&&t.value===e}):e=>e.match({Err:()=>t.isErr,Ok:e=>t.isOk&&t.value===e});var t,n}ap(e){return function(e,t){const n=t=>t.andThen(t=>e.map(e=>e(t)));return Jr(n,t)}(this,e)}}const Kr=Yr.ok,Zr=Yr.err;function Gr(e,t,n){function r(t,n){return n.isOk?t(n.value):e(n.error)}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}const ea=e=>{const t=e.match({Ok:Qr,Err:Qr});return`${e.variant.toString()}(${t})`},ta=e=>e.isOk?{variant:e.variant,value:e.value}:{variant:e.variant,error:e.error};const na=Yr,ra="Just",aa="Nothing";let oa;class ia{constructor(e){if(Ur(e))return this.repr=[aa],oa||(oa=this),oa;this.repr=[ra,e]}static of(e){return new ia(e)}static just(e){if(Ur(e))throw new Error(`attempted to call "just" with ${e}`);return new ia(e)}static nothing(e){return new ia}get variant(){return this.repr[0]}get value(){if(this.repr[0]===aa)throw new Error("Cannot get the value of `Nothing`");return this.repr[1]}get isJust(){return this.repr[0]===ra}get isNothing(){return this.repr[0]===aa}map(e){return function(e,t){const n=t=>t.isJust?sa(e(t.value)):la();return Jr(n,t)}(e,this)}mapOr(e,t){return function(e,t,n){function r(t,n){return n.isJust?t(n.value):e}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}(e,t,this)}mapOrElse(e,t){return ca(e,t,this)}match(e){return function(e,t){const n=t=>ca(e.Nothing,e.Just,t);return Jr(n,t)}(e,this)}or(e){return function(e,t){const n=t=>t.isJust?t:e;return void 0!==t?n(t):n}(e,this)}orElse(e){return function(e,t){const n=t=>t.isJust?t:e();return Jr(n,t)}(e,this)}and(e){return function(e,t){const n=t=>t.isJust?e:la();return Jr(n,t)}(e,this)}andThen(e){return ua(e,this)}unwrapOr(e){return function(e,t){const n=t=>t.isJust?t.value:e;return Jr(n,t)}(e,this)}unwrapOrElse(e){return function(e,t){const n=t=>t.isJust?t.value:e();return Jr(n,t)}(e,this)}toOkOrErr(e){return function(e,t){const n=t=>t.isJust?na.ok(t.value):na.err(e);return void 0!==t?n(t):n}(e,this)}toOkOrElseErr(e){return function(e,t){return Jr(t=>t.isJust?na.ok(t.value):na.err(e()),t)}(e,this)}toString(){return function(e){const t=e.map(e=>`(${Qr(e)})`).unwrapOr("");return`${e.variant}${t}`}(this)}toJSON(){return(e=this).isJust?{variant:e.variant,value:fa(e.value)?e.value.toJSON():e.value}:{variant:e.variant};var e}equals(e){return t=e,Jr(e=>e.match({Just:e=>t.isJust&&t.value===e,Nothing:()=>t.isNothing}),this);var t}ap(e){return function(e,t){const n=t=>t.andThen(t=>e.map(e=>e(t)));return Jr(n,t)}(this,e)}get(e){return function(e,t){return Jr(ua(function(e,t){const n=t=>da.of(t[e]);return Jr(n,t)}(e)),t)}(e,this)}}const sa=ia.just,la=ia.nothing;function ca(e,t,n){function r(t,n){return n.isJust?t(n.value):e()}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}function ua(e,t){const n=t=>t.isJust?e(t.value):la();return void 0!==t?n(t):n}function fa(e){return e instanceof da}const da=ia,ha=["dotnetspy","ebpfspy","gospy","phpspy","pyspy","rbspy","nodespy","javaspy","pyroscope-rs","scrape","tracing","unknown"],ma=n.z.preprocess(e=>e&&ha.includes(e)?e:"unknown",n.z.enum(ha).default("unknown")),pa=["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions"],ga=n.z.preprocess(e=>"string"==typeof e&&pa.includes(e)?e:"unknown",n.z.enum(["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions","unknown"])),va=n.z.object({names:n.z.array(n.z.preprocess(e=>e||"unknown",n.z.string().min(1))),levels:n.z.array(n.z.array(n.z.number())),numTicks:n.z.number(),maxSelf:n.z.number()}),ba=n.z.object({appName:n.z.string().optional(),name:n.z.string().optional(),startTime:n.z.number().optional(),endTime:n.z.number().optional(),query:n.z.string().optional(),maxNodes:n.z.number().optional(),format:n.z.enum(["single","double"]),sampleRate:n.z.number(),spyName:ma,units:ga});n.z.object({version:n.z.number().min(1).max(1).default(1),flamebearer:va,metadata:ba,leftTicks:n.z.number().optional(),rightTicks:n.z.number().optional()});const ya={format:"single",jStep:4,jName:3,getBarOffset:(e,t)=>e[t],getBarTotal:(e,t)=>e[t+1],getBarTotalDiff:(e,t)=>0,getBarSelf:(e,t)=>e[t+2],getBarSelfDiff:(e,t)=>0,getBarName:(e,t)=>e[t+3]},xa={format:"double",jStep:7,jName:6,getBarOffset:(e,t)=>e[t]+e[t+3],getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarTotalDiff:(e,t)=>e[t+4]-e[t+1],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarSelfDiff:(e,t)=>e[t+5]-e[t+2],getBarName:(e,t)=>e[t+6]};function wa(e){switch(e){case"single":return ya;case"double":return xa;default:throw new Error(`Unsupported type: '${e}'`)}}const ka=n.z.object({refType:n.z.string(),traceID:n.z.string(),spanID:n.z.string()}),ja=n.z.object({key:n.z.string(),type:n.z.string(),value:n.z.union([n.z.boolean(),n.z.number(),n.z.string()])}),_a=n.z.object({traceID:n.z.string(),spanID:n.z.string(),flags:n.z.string(),operationName:n.z.string(),references:n.z.array(ka),startTime:n.z.number(),duration:n.z.number(),tags:n.z.array(ja),logs:n.z.object({timestamp:n.z.number(),fields:n.z.array(ja)}),processID:n.z.string(),warnings:n.z.any()}),Na=n.z.object({serviceName:n.z.string(),tags:n.z.array(ja)});n.z.object({traceID:n.z.string(),spans:n.z.array(_a),processes:n.z.record(Na),warnings:n.z.any()});const Sa=n.z.object({watermark:n.z.object({}).optional(),startTime:n.z.number(),samples:n.z.array(n.z.number()),durationDelta:n.z.number()});n.z.record(n.z.string(),Sa);const Ma=22,Ca=21.5;function Ta(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Ra(e){if(null==e)return null;if("number"==typeof e)return{value:e,unit:"",hasLessThan:!1,sign:""};let t=String(e).trim().replace(/\u2212/g,"-");if(!t)return null;let n=!1;t.startsWith("<")&&(n=!0,t=t.slice(1).trim());const r=t.match(/^([+\-]?)(\d*\.?\d+)\s*(.*)$/);if(!r)return null;const a=r[1]||"",o=r[2],i=(r[3]||"").trim(),s=parseFloat(o);return Number.isFinite(s)?{value:s,unit:i,hasLessThan:n,sign:a}:null}function Oa(e,t=!1){if(!e||!t)return e;const n=Ra(e);if(!n)return e;const{unit:r}=n;let a=r;const o=r.toLowerCase();"ms"===o?a="毫秒":"μs"===o||"µs"===o||"us"===o?a="微秒":"second"===o||"seconds"===o?a="秒":"minute"===o||"minutes"===o||"min"===o||"mins"===o?a="分钟":"hour"===o||"hours"===o?a="小时":"day"===o||"days"===o?a="天":"month"===o||"months"===o?a="月":"year"!==o&&"years"!==o||(a="年");const i=String(e).match(/^([<\s]*)([+\-]?\d*\.?\d+)(.*)$/);if(!i)return e;return`${i[1]||""}${i[2]||""} ${a}`.trim()}const Ea=[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}];function Pa(e){return Math.round(1e4*e)/100}function Fa(e,t){return(t-e)/e*100}function Aa(e,t,n){switch(n){case"samples":return new Ia(e/t);case"objects":case"goroutines":case"lock_samples":case"exceptions":return new La(e);case"bytes":return new Ba(e);case"lock_nanoseconds":return new Da(e);case"trace_samples":return new Ia(e/t,"",!0);default:return console.warn(`Unsupported unit: '${n}'. Defaulting to ''`),new Ia(e/t," ")}}class Ia{constructor(e,t,n){this.divider=1,this.enableSubsecondPrecision=!1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],this.units="",n&&(this.enableSubsecondPrecision=n,this.durations=[[1e3,"ms"],[1e3,"second"],...this.durations],this.suffix="μs",e*=1e6),this.units=t||"";for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e,t,n=!0){this.enableSubsecondPrecision&&(t/=1e6);const r=e/t/this.divider;let a=r.toFixed(2);return 0===r?a="0.00":(r>=0&&r<.01||r<=0&&r>-.01)&&(a="< 0.01"),n?`${a} ${this.units||`${this.suffix}${1===r||2===this.suffix.length?"":"s"}`}`:a}formatPrecise(e,t){this.enableSubsecondPrecision&&(t/=1e6);const n=e/t/this.divider;return`${parseFloat(n.toFixed(5))} ${this.units||`${this.suffix}${1===n||2===this.suffix.length?"":"s"}`}`}}class Da{constructor(e){this.divider=1,this.multiplier=1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],e/=1e9;for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/1e9/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}${1===t?"":"s"}`}formatPrecise(e){const t=e/1e9/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}${1===t?"":"s"}`}}class La{constructor(e){this.divider=1,this.suffix="",this.objects=[[1e3,"K"],[1e3,"M"],[1e3,"G"],[1e3,"T"],[1e3,"P"]];for(let t=0;t<this.objects.length;t++){const n=this.objects[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}class Ba{constructor(e){this.divider=1,this.suffix="bytes",this.bytes=[[1024,"KB"],[1024,"MB"],[1024,"GB"],[1024,"TB"],[1024,"PB"]];for(let t=0;t<this.bytes.length;t++){const n=this.bytes[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;{this.divider*=n[0],e/=n[0];const t=n[1];t?this.suffix=t:(console.warn("Could not calculate suffix"),this.suffix="")}}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}const za="TAIL",$a="HEAD";function Va({mode:e,charSize:t,rectWidth:n,fullText:r,shortText:a}){if(e===za){if(t*r.length<=n)return{mode:e,text:r,marginLeft:3};const o=t*a.length;return o<=n?{mode:e,text:a,marginLeft:3}:{mode:e,text:a,marginLeft:-(o-n+3)}}return{mode:e,text:r,marginLeft:3}}function Ha(e){return e===za?{direction:"rtl",overflow:"hidden",textOverflow:"ellipsis"}:{overflow:"hidden",textOverflow:"ellipsis"}}const Wa={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const e in Wa)Object.freeze(Wa[e]);var Ua=Object.freeze(Wa);const Ja=Object.create(null);for(const e in Ua)Object.hasOwn(Ua,e)&&(Ja[Ua[e]]=e);const Qa={to:{},get:{}};function qa(e,t,n){return Math.min(Math.max(t,e),n)}function Xa(e){const t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}Qa.get=function(e){let t,n;switch(e.slice(0,3).toLowerCase()){case"hsl":t=Qa.get.hsl(e),n="hsl";break;case"hwb":t=Qa.get.hwb(e),n="hwb";break;default:t=Qa.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},Qa.get.rgb=function(e){if(!e)return null;let t,n,r,a=[0,0,0,1];if(t=e.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){const e=2*n;a[n]=Number.parseInt(t.slice(e,e+2),16)}r&&(a[3]=Number.parseInt(r,16)/255)}else if(t=e.match(/^#([a-f\d]{3,4})$/i)){for(t=t[1],r=t[3],n=0;n<3;n++)a[n]=Number.parseInt(t[n]+t[n],16);r&&(a[3]=Number.parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i)){for(n=0;n<3;n++)a[n]=Number.parseFloat(t[n+1]);t[4]&&(a[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i)))return(t=e.toLowerCase().match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:Object.hasOwn(Ua,t[1])?(a=Ua[t[1]].slice(),a[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*Number.parseFloat(t[n+1]));t[4]&&(a[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=qa(a[n],0,255);return a[3]=qa(a[3],0,1),a},Qa.get.hsl=function(e){if(!e)return null;const t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,qa(Number.parseFloat(t[2]),0,100),qa(Number.parseFloat(t[3]),0,100),qa(Number.isNaN(e)?1:e,0,1)]}return null},Qa.get.hwb=function(e){if(!e)return null;const t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,qa(Number.parseFloat(t[2]),0,100),qa(Number.parseFloat(t[3]),0,100),qa(Number.isNaN(e)?1:e,0,1)]}return null},Qa.to.hex=function(...e){return"#"+Xa(e[0])+Xa(e[1])+Xa(e[2])+(e[3]<1?Xa(Math.round(255*e[3])):"")},Qa.to.rgb=function(...e){return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},Qa.to.rgb.percent=function(...e){const t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},Qa.to.hsl=function(...e){return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Qa.to.hwb=function(...e){let t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Qa.to.keyword=function(...e){return Ja[e.slice(0,3)]};const Ya={};for(const e of Object.keys(Ua))Ya[Ua[e]]=e;const Ka={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},Za=(6/29)**3;function Ga(e){const t=e>.0031308?1.055*e**(1/2.4)-.055:12.92*e;return Math.min(Math.max(0,t),1)}function eo(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(const e of Object.keys(Ka)){if(!("channels"in Ka[e]))throw new Error("missing channels property: "+e);if(!("labels"in Ka[e]))throw new Error("missing channel labels property: "+e);if(Ka[e].labels.length!==Ka[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=Ka[e];delete Ka[e].channels,delete Ka[e].labels,Object.defineProperty(Ka[e],"channels",{value:t}),Object.defineProperty(Ka[e],"labels",{value:n})}function to(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function no(e){const t=function(){const e={},t=Object.keys(Ka);for(let{length:n}=t,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length>0;){const e=n.pop(),r=Object.keys(Ka[e]);for(let{length:a}=r,o=0;o<a;o++){const a=r[o],i=t[a];-1===i.distance&&(i.distance=t[e].distance+1,i.parent=e,n.unshift(a))}}return t}function ro(e,t){return function(n){return t(e(n))}}function ao(e,t){const n=[t[e].parent,e];let r=Ka[t[e].parent][e],a=t[e].parent;for(;t[a].parent;)n.unshift(t[a].parent),r=ro(Ka[t[a].parent][a],r),a=t[a].parent;return r.conversion=n,r}function oo(e){const t=no(e),n={},r=Object.keys(t);for(let{length:e}=r,a=0;a<e;a++){const e=r[a];null!==t[e].parent&&(n[e]=ao(e,t))}return n}Ka.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=o-a;let s,l;switch(o){case a:s=0;break;case t:s=(n-r)/i;break;case n:s=2+(r-t)/i;break;case r:s=4+(t-n)/i}s=Math.min(60*s,360),s<0&&(s+=360);const c=(a+o)/2;return l=o===a?0:c<=.5?i/(o+a):i/(2-o-a),[s,100*l,100*c]},Ka.rgb.hsv=function(e){let t,n,r,a,o;const i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),f=function(e){return(c-e)/6/u+.5};if(0===u)a=0,o=0;else{switch(o=u/c,t=f(i),n=f(s),r=f(l),c){case i:a=r-n;break;case s:a=1/3+t-r;break;case l:a=2/3+n-t}a<0?a+=1:a>1&&(a-=1)}return[360*a,100*o,100*c]},Ka.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const a=Ka.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[a,100*o,100*r]},Ka.rgb.oklab=function(e){const t=eo(e[0]/255),n=eo(e[1]/255),r=eo(e[2]/255),a=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),o=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),i=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r);return[100*(.2104542553*a+.793617785*o-.0040720468*i),100*(1.9779984951*a-2.428592205*o+.4505937099*i),100*(.0259040371*a+.7827717662*o-.808675766*i)]},Ka.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(1-t,1-n,1-r);return[100*((1-t-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*a]},Ka.rgb.keyword=function(e){const t=Ya[e];if(t)return t;let n,r=Number.POSITIVE_INFINITY;for(const t of Object.keys(Ua)){const a=to(e,Ua[t]);a<r&&(r=a,n=t)}return n},Ka.keyword.rgb=function(e){return[...Ua[e]]},Ka.rgb.xyz=function(e){const t=eo(e[0]/255),n=eo(e[1]/255),r=eo(e[2]/255);return[100*(.4124564*t+.3575761*n+.1804375*r),100*(.2126729*t+.7151522*n+.072175*r),100*(.0193339*t+.119192*n+.9503041*r)]},Ka.rgb.lab=function(e){const t=Ka.rgb.xyz(e);let n=t[0],r=t[1],a=t[2];n/=95.047,r/=100,a/=108.883,n=n>Za?n**(1/3):7.787*n+16/116,r=r>Za?r**(1/3):7.787*r+16/116,a=a>Za?a**(1/3):7.787*a+16/116;return[116*r-16,500*(n-r),200*(r-a)]},Ka.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let a,o;if(0===n)return o=255*r,[o,o,o];const i=r<.5?r*(1+n):r+n-r*n,s=2*r-i,l=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,l[e]=255*o;return l},Ka.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,a=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,a*=o<=1?o:2-o;return[t,100*(0===r?2*a/(o+a):2*n/(r+n)),100*((r+n)/2)]},Ka.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const a=Math.floor(t)%6,o=t-Math.floor(t),i=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,a){case 0:return[r,l,i];case 1:return[s,r,i];case 2:return[i,r,l];case 3:return[i,s,r];case 4:return[l,i,r];case 5:return[r,i,s]}},Ka.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,a=Math.max(r,.01);let o,i;i=(2-n)*r;const s=(2-n)*a;return o=n*a,o/=s<=1?s:2-s,o=o||0,i/=2,[t,100*o,100*i]},Ka.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const a=n+r;let o;a>1&&(n/=a,r/=a);const i=Math.floor(6*t),s=1-r;o=6*t-i,1&i&&(o=1-o);const l=n+o*(s-n);let c,u,f;switch(i){default:case 6:case 0:c=s,u=l,f=n;break;case 1:c=l,u=s,f=n;break;case 2:c=n,u=s,f=l;break;case 3:c=n,u=l,f=s;break;case 4:c=l,u=n,f=s;break;case 5:c=s,u=n,f=l}return[255*c,255*u,255*f]},Ka.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},Ka.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let a,o,i;return a=3.2404542*t+-1.5371385*n+-.4985314*r,o=-.969266*t+1.8760108*n+.041556*r,i=.0556434*t+-.2040259*n+1.0572252*r,a=Ga(a),o=Ga(o),i=Ga(i),[255*a,255*o,255*i]},Ka.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>Za?t**(1/3):7.787*t+16/116,n=n>Za?n**(1/3):7.787*n+16/116,r=r>Za?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},Ka.xyz.oklab=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=Math.cbrt(.8189330101*t+.3618667424*n-.1288597137*r),o=Math.cbrt(.0329845436*t+.9293118715*n+.0361456387*r),i=Math.cbrt(.0482003018*t+.2643662691*n+.633851707*r);return[100*(.2104542553*a+.793617785*o-.0040720468*i),100*(1.9779984951*a-2.428592205*o+.4505937099*i),100*(.0259040371*a+.7827717662*o-.808675766*i)]},Ka.oklab.oklch=function(e){return Ka.lab.lch(e)},Ka.oklab.xyz=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=(.999999998*t+.396337792*n+.215803758*r)**3,o=(1.000000008*t-.105561342*n-.063854175*r)**3,i=(1.000000055*t-.089484182*n-1.291485538*r)**3;return[100*(1.227013851*a-.55779998*o+.281256149*i),100*(-.040580178*a+1.11225687*o-.071676679*i),100*(-.076381285*a-.421481978*o+1.58616322*i)]},Ka.oklab.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=(t+.3963377774*n+.2158037573*r)**3,o=(t-.1055613458*n-.0638541728*r)**3,i=(t-.0894841775*n-1.291485548*r)**3;return[255*Ga(4.0767416621*a-3.3077115913*o+.2309699292*i),255*Ga(-1.2684380046*a+2.6097574011*o-.3413193965*i),255*Ga(-.0041960863*a-.7034186147*o+1.707614701*i)]},Ka.oklch.oklab=function(e){return Ka.lch.lab(e)},Ka.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const a=n**3,o=t**3,i=r**3;return n=a>Za?a:(n-16/116)/7.787,t=o>Za?o:(t-16/116)/7.787,r=i>Za?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},Ka.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let a;a=360*Math.atan2(r,n)/2/Math.PI,a<0&&(a+=360);return[t,Math.sqrt(n*n+r*r),a]},Ka.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},Ka.rgb.ansi16=function(e,t=null){const[n,r,a]=e;let o=null===t?Ka.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let i=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===o&&(i+=60),i},Ka.hsv.ansi16=function(e){return Ka.rgb.ansi16(Ka.hsv.rgb(e),e[2])},Ka.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t>>4==n>>4&&n>>4==r>>4)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},Ka.ansi16.rgb=function(e){let t=(e=e[0])%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(Math.trunc(e>50)+1);return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},Ka.ansi256.rgb=function(e){if((e=e[0])>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},Ka.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".slice(t.length)+t},Ka.hex.rgb=function(e){const t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},Ka.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),i=a-o;let s;return s=i<=0?0:a===t?(n-r)/i%6:a===n?2+(r-t)/i:4+(t-n)/i,s/=6,s%=1,[360*s,100*i,100*(i<1?o/(1-i):0)]},Ka.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let a=0;return r<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},Ka.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},Ka.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const a=[0,0,0],o=t%1*6,i=o%1,s=1-i;let l=0;switch(Math.floor(o)){case 0:a[0]=1,a[1]=i,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=i;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=i,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return l=(1-n)*r,[255*(n*a[0]+l),255*(n*a[1]+l),255*(n*a[2]+l)]},Ka.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},Ka.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},Ka.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},Ka.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},Ka.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Ka.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Ka.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Ka.gray.hsl=function(e){return[0,0,e[0]]},Ka.gray.hsv=Ka.gray.hsl,Ka.gray.hwb=function(e){return[0,100,e[0]]},Ka.gray.cmyk=function(e){return[0,0,0,e[0]]},Ka.gray.lab=function(e){return[e[0],0,0]},Ka.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n},Ka.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const io={},so=Object.keys(Ka);function lo(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function co(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let{length:e}=r,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}for(const e of so){io[e]={},Object.defineProperty(io[e],"channels",{value:Ka[e].channels}),Object.defineProperty(io[e],"labels",{value:Ka[e].labels});const t=oo(e),n=Object.keys(t);for(const r of n){const n=t[r];io[e][r]=co(n),io[e][r].raw=lo(n)}}const uo=["keyword","gray","hex"],fo={};for(const e of Object.keys(io))fo[[...io[e].labels].sort().join("")]=e;const ho={};function mo(e,t){if(!(this instanceof mo))return new mo(e,t);if(t&&t in uo&&(t=null),t&&!(t in io))throw new Error("Unknown model: "+t);let n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof mo)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=Qa.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,r=io[this.model].channels,this.color=t.value.slice(0,r),this.valpha="number"==typeof t.value[r]?t.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=io[this.model].channels;const n=Array.prototype.slice.call(e,0,r);this.color=bo(n,r),this.valpha="number"==typeof e[r]?e[r]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const r=t.sort().join("");if(!(r in fo))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=fo[r];const{labels:a}=io[this.model],o=[];for(n=0;n<a.length;n++)o.push(e[a[n]]);this.color=bo(o)}if(ho[this.model])for(r=io[this.model].channels,n=0;n<r;n++){const e=ho[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}mo.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Qa.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return Qa.to[t.model](...n)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:[...t.color,this.valpha];return Qa.to.rgb.percent(...n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=io[this.model],{labels:n}=io[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new mo([...this.color.map(po(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new mo([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:go("rgb",0,vo(255)),green:go("rgb",1,vo(255)),blue:go("rgb",2,vo(255)),hue:go(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:go("hsl",1,vo(100)),lightness:go("hsl",2,vo(100)),saturationv:go("hsv",1,vo(100)),value:go("hsv",2,vo(100)),chroma:go("hcg",1,vo(100)),gray:go("hcg",2,vo(100)),white:go("hwb",1,vo(100)),wblack:go("hwb",2,vo(100)),cyan:go("cmyk",0,vo(100)),magenta:go("cmyk",1,vo(100)),yellow:go("cmyk",2,vo(100)),black:go("cmyk",3,vo(100)),x:go("xyz",0,vo(95.047)),y:go("xyz",1,vo(100)),z:go("xyz",2,vo(108.833)),l:go("lab",0,vo(100)),a:go("lab",1),b:go("lab",2),keyword(e){return void 0!==e?new mo(e):io[this.model].keyword(this.color)},hex(e){return void 0!==e?new mo(e):Qa.to.hex(...this.rgb().round().color)},hexa(e){if(void 0!==e)return new mo(e);const t=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),Qa.to.hex(...t)+n},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return mo.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),a=void 0===t?.5:t,o=2*a-1,i=n.alpha()-r.alpha(),s=((o*i===-1?o:(o+i)/(1+o*i))+1)/2,l=1-s;return mo.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*a+r.alpha()*(1-a))}};for(const e of Object.keys(io)){if(uo.includes(e))continue;const{channels:t}=io[e];mo.prototype[e]=function(...t){return this.model===e?new mo(this):t.length>0?new mo(t,e):new mo([...(n=io[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},mo[e]=function(...n){let r=n[0];return"number"==typeof r&&(r=bo(n,t)),new mo(r,e)}}function po(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function go(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(ho[r]||=[])[t]=n;return e=e[0],function(r){let a;return void 0!==r?(n&&(r=n(r)),a=this[e](),a.color[t]=r,a):(a=this[e]().color[t],n&&(a=n(a)),a)}}function vo(e){return function(t){return Math.max(0,Math.min(e,t))}}function bo(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}function yo(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xo(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wo(e){let t,n,r;function a(e,r,a=0,o=e.length){if(a<o){if(0!==t(r,r))return o;do{const t=a+o>>>1;n(e[t],r)<0?a=t+1:o=t}while(a<o)}return a}return 2!==e.length?(t=yo,n=(t,n)=>yo(e(t),n),r=(t,n)=>e(t)-n):(t=e===yo||e===xo?e:ko,n=e,r=e),{left:a,center:function(e,t,n=0,o=e.length){const i=a(e,t,n,o-1);return i>n&&r(e[i-1],t)>-r(e[i],t)?i-1:i},right:function(e,r,a=0,o=e.length){if(a<o){if(0!==t(r,r))return o;do{const t=a+o>>>1;n(e[t],r)<=0?a=t+1:o=t}while(a<o)}return a}}}function ko(){return 0}const jo=wo(yo).right;wo(function(e){return null===e?NaN:+e}).center;const _o=Math.sqrt(50),No=Math.sqrt(10),So=Math.sqrt(2);function Mo(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),i=o>=_o?10:o>=No?5:o>=So?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/i,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*i,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Mo(e,t,2*n):[s,l,c]}function Co(e,t,n){return Mo(e=+e,t=+t,n=+n)[2]}function To(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Ro(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Oo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Eo(){}var Po=.7,Fo=1/Po,Ao="\\s*([+-]?\\d+)\\s*",Io="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Do="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lo=/^#([0-9a-f]{3,8})$/,Bo=new RegExp(`^rgb\\(${Ao},${Ao},${Ao}\\)$`),zo=new RegExp(`^rgb\\(${Do},${Do},${Do}\\)$`),$o=new RegExp(`^rgba\\(${Ao},${Ao},${Ao},${Io}\\)$`),Vo=new RegExp(`^rgba\\(${Do},${Do},${Do},${Io}\\)$`),Ho=new RegExp(`^hsl\\(${Io},${Do},${Do}\\)$`),Wo=new RegExp(`^hsla\\(${Io},${Do},${Do},${Io}\\)$`),Uo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Jo(){return this.rgb().formatHex()}function Qo(){return this.rgb().formatRgb()}function qo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Lo.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xo(t):3===n?new Zo(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Yo(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Yo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Bo.exec(e))?new Zo(t[1],t[2],t[3],1):(t=zo.exec(e))?new Zo(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$o.exec(e))?Yo(t[1],t[2],t[3],t[4]):(t=Vo.exec(e))?Yo(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ho.exec(e))?ai(t[1],t[2]/100,t[3]/100,1):(t=Wo.exec(e))?ai(t[1],t[2]/100,t[3]/100,t[4]):Uo.hasOwnProperty(e)?Xo(Uo[e]):"transparent"===e?new Zo(NaN,NaN,NaN,0):null}function Xo(e){return new Zo(e>>16&255,e>>8&255,255&e,1)}function Yo(e,t,n,r){return r<=0&&(e=t=n=NaN),new Zo(e,t,n,r)}function Ko(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Eo||(e=qo(e)),e?new Zo((e=e.rgb()).r,e.g,e.b,e.opacity):new Zo}(e):new Zo(e,t,n,null==r?1:r)}function Zo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Go(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}`}function ei(){const e=ti(this.opacity);return`${1===e?"rgb(":"rgba("}${ni(this.r)}, ${ni(this.g)}, ${ni(this.b)}${1===e?")":`, ${e})`}`}function ti(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ni(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ri(e){return((e=ni(e))<16?"0":"")+e.toString(16)}function ai(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ii(e,t,n,r)}function oi(e){if(e instanceof ii)return new ii(e.h,e.s,e.l,e.opacity);if(e instanceof Eo||(e=qo(e)),!e)return new ii;if(e instanceof ii)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,s=o-a,l=(o+a)/2;return s?(i=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+a:2-o-a,i*=60):s=l>0&&l<1?0:i,new ii(i,s,l,e.opacity)}function ii(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function si(e){return(e=(e||0)%360)<0?e+360:e}function li(e){return Math.max(0,Math.min(1,e||0))}function ci(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ro(Eo,qo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jo,formatHex:Jo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return oi(this).formatHsl()},formatRgb:Qo,toString:Qo}),Ro(Zo,Ko,Oo(Eo,{brighter(e){return e=null==e?Fo:Math.pow(Fo,e),new Zo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Po:Math.pow(Po,e),new Zo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zo(ni(this.r),ni(this.g),ni(this.b),ti(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Go,formatHex:Go,formatHex8:function(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}${ri(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ei,toString:ei})),Ro(ii,function(e,t,n,r){return 1===arguments.length?oi(e):new ii(e,t,n,null==r?1:r)},Oo(Eo,{brighter(e){return e=null==e?Fo:Math.pow(Fo,e),new ii(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Po:Math.pow(Po,e),new ii(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Zo(ci(e>=240?e-240:e+120,a,r),ci(e,a,r),ci(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new ii(si(this.h),li(this.s),li(this.l),ti(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ti(this.opacity);return`${1===e?"hsl(":"hsla("}${si(this.h)}, ${100*li(this.s)}%, ${100*li(this.l)}%${1===e?")":`, ${e})`}`}}));var ui=e=>()=>e;function fi(e){return 1===(e=+e)?di:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):ui(isNaN(t)?n:t)}}function di(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ui(isNaN(e)?t:e)}var hi=function e(t){var n=fi(t);function r(e,t){var r=n((e=Ko(e)).r,(t=Ko(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=di(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function mi(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,a=t.slice();return function(o){for(n=0;n<r;++n)a[n]=e[n]*(1-o)+t[n]*o;return a}}function pi(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;n<a;++n)o[n]=ki(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<a;++n)i[n]=o[n](e);return i}}function gi(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function vi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function bi(e,t){var n,r={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=ki(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}}var yi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xi=new RegExp(yi.source,"g");function wi(e,t){var n,r,a,o=yi.lastIndex=xi.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=yi.exec(e))&&(r=xi.exec(t));)(a=r.index)>o&&(a=t.slice(o,a),s[i]?s[i]+=a:s[++i]=a),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i:i,x:vi(n,r)})),o=xi.lastIndex;return o<t.length&&(a=t.slice(o),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function ki(e,t){var n,r=typeof t;return null==t||"boolean"===r?ui(t):("number"===r?vi:"string"===r?(n=qo(t))?(t=n,hi):wi:t instanceof qo?hi:t instanceof Date?gi:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?mi:Array.isArray(t)?pi:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?bi:vi)(e,t)}function ji(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function _i(e){return+e}var Ni=[0,1];function Si(e){return e}function Mi(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Ci(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return a<r?(r=Mi(a,r),o=n(i,o)):(r=Mi(r,a),o=n(o,i)),function(e){return o(r(e))}}function Ti(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)a[i]=Mi(e[i],e[i+1]),o[i]=n(t[i],t[i+1]);return function(t){var n=jo(e,t,1,r)-1;return o[n](a[n](t))}}function Ri(){var e,t,n,r,a,o,i=Ni,s=Ni,l=ki,c=Si;function u(){var e=Math.min(i.length,s.length);return c!==Si&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(i[0],i[e-1])),r=e>2?Ti:Ci,a=o=null,f}function f(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),s,l)))(e(c(t)))}return f.invert=function(n){return c(t((o||(o=r(s,i.map(e),vi)))(n)))},f.domain=function(e){return arguments.length?(i=Array.from(e,_i),u()):i.slice()},f.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},f.rangeRound=function(e){return s=Array.from(e),l=ji,u()},f.clamp=function(e){return arguments.length?(c=!!e||Si,u()):c!==Si},f.interpolate=function(e){return arguments.length?(l=e,u()):l},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,u()}}function Oi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ei(e){return(e=Oi(Math.abs(e)))?e[1]:NaN}var Pi,Fi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ai(e){if(!(t=Fi.exec(e)))throw new Error("invalid format: "+e);var t;return new Ii({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ii(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Di(e,t){var n=Oi(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}Ai.prototype=Ii.prototype,Ii.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Li={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Di(100*e,t),r:Di,s:function(e,t){var n=Oi(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(Pi=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Oi(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Bi(e){return e}var zi,$i,Vi,Hi=Array.prototype.map,Wi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ui(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Bi:(t=Hi.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(a-=s,a+s)),!((l+=s+1)>r));)s=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Bi:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Hi.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=Ai(e)).fill,n=e.align,f=e.sign,d=e.symbol,h=e.zero,m=e.width,p=e.comma,g=e.precision,v=e.trim,b=e.type;"n"===b?(p=!0,b="g"):Li[b]||(void 0===g&&(g=12),v=!0,b="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var y="$"===d?a:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",w=Li[b],k=/[defgprs%]/.test(b);function j(e){var a,o,l,d=y,j=x;if("c"===b)j=w(e)+j,e="";else{var _=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(!+e[r])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),_&&0===+e&&"+"!==f&&(_=!1),d=(_?"("===f?f:c:"-"===f||"("===f?"":f)+d,j=("s"===b?Wi[8+Pi/3]:"")+j+(_&&"("===f?")":""),k)for(a=-1,o=e.length;++a<o;)if(48>(l=e.charCodeAt(a))||l>57){j=(46===l?i+e.slice(a+1):e.slice(a))+j,e=e.slice(0,a);break}}p&&!h&&(e=r(e,1/0));var N=d.length+e.length+j.length,S=N<m?new Array(m-N+1).join(t):"";switch(p&&h&&(e=r(S+e,S.length?m-j.length:1/0),S=""),n){case"<":e=d+e+j+S;break;case"=":e=d+S+e+j;break;case"^":e=S.slice(0,N=S.length>>1)+d+e+j+S.slice(N);break;default:e=S+d+e+j}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),j.toString=function(){return e+""},j}return{format:f,formatPrefix:function(e,t){var n=f(((e=Ai(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ei(t)/3))),a=Math.pow(10,-r),o=Wi[8+r/3];return function(e){return n(a*e)+o}}}}function Ji(e,t,n,r){var a,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),a=r?Co(t,e,n):Co(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}(e,t,n);switch((r=Ai(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ei(t)/3)))-Ei(Math.abs(e)))}(o,i))||(r.precision=a),Vi(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ei(t)-Ei(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-Ei(Math.abs(e)))}(o))||(r.precision=a-2*("%"===r.type))}return $i(r)}function Qi(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[a,o,i]=r?Mo(t,e,n):Mo(e,t,n);if(!(o>=a))return[];const s=o-a+1,l=new Array(s);if(r)if(i<0)for(let e=0;e<s;++e)l[e]=(o-e)/-i;else for(let e=0;e<s;++e)l[e]=(o-e)*i;else if(i<0)for(let e=0;e<s;++e)l[e]=(a+e)/-i;else for(let e=0;e<s;++e)l[e]=(a+e)*i;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Ji(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a,o=t(),i=0,s=o.length-1,l=o[i],c=o[s],u=10;for(c<l&&(a=l,l=c,c=a,a=i,i=s,s=a);u-- >0;){if((a=Co(l,c,n))===r)return o[i]=l,o[s]=c,t(o);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function qi(){var e=Ri()(Si,Si);return e.copy=function(){return t=e,qi().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},To.apply(e,arguments),Qi(e)}function Xi(e,t){if(e===t)return 0;if(0===e)return 100;const n=(t-e)/e*100;return n>100?100:n<-100?-100:n}function Yi(e,t){return mo.rgb(e,e,e).alpha(t)}function Ki(e,t){if(0===t.length)return t;const n=function(e){switch(e){case"dotnetspy":return/^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/;case"ebpfspy":case"unknown":return/^(?<packageName>.+)$/;case"gospy":case"scrape":return/^(?<packageName>.*?\/.*?\.|.*?\.|.+)(?<functionName>.*)$/;case"phpspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/;case"pyspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/;case"rbspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/;case"nodespy":return/^(\.\/node_modules\/)?(?<packageName>[^/]*)(?<filename>.*\.?(jsx?|tsx?)?):(?<functionName>.*):(?<line_info>.*)$/;case"tracing":return/^(?<packageName>.+?):.*$/;case"javaspy":return/^(?<packageName>.+\/)(?<filename>.+\.)(?<functionName>.+)$/;case"pyroscope-rs":return/^(?<packageName>[^::]+)/}return/^(?<packageName>.+)$/}(e),r=t.match(n);return r&&r.groups?r.groups.packageName||"":t}function Zi(e,t){const n=function(e,t=0){let n,r,a,o,i,s,l,c;for(n=3&e.length,r=e.length-n,a=t,i=3432918353,s=461845907,c=0;c<r;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,a^=l,a=a<<13|a>>>19,o=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&o)+(((o>>>16)+58964&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:l^=255&e.charCodeAt(c);default:l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,a^=l}return a^=e.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}(t,0),r=n%e.colors.length,a=e.colors[r];return a||(console.warn("Could not calculate color. Defaulting to the first one"),e.colors[0])}function Gi(e){const{goodColor:t,neutralColor:n,badColor:r}=e,a=qi().domain([-100,0,100]).range([t.rgb().toString(),n.rgb().toString(),r.rgb().toString()]);return e=>mo(a(e).toString())}zi=Ui({thousands:",",grouping:[3],currency:["$",""]}),$i=zi.format,Vi=zi.formatPrefix,mo.rgb(148,142,142),mo.rgb(200,0,0),mo.rgb(0,170,0),mo("#48CE73");const es=new WeakMap,ts=new WeakMap,ns=new WeakMap,rs=new WeakMap;const as={collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",isZh:!1};function os(e){var t,n,r,a,o,i,s,l;const c=performance.now(),u=!1!==e.renderRects,f=!1!==e.renderText,d=null!==(t=e.renderMode)&&void 0!==t?t:"normal",h=e.timeBudgetMs,{canvas:m,fitMode:p,units:g,tickToX:v,levels:b,palette:y}=e,{numTicks:x,sampleRate:w,pxPerTick:k}=e,{rangeMin:j,rangeMax:_}=e,{focusedNode:N,zoom:S}=e,M=e.messages||as,C=e.skipCanvasResize?m.width:function(e){if("clientWidth"in e&&"number"==typeof e.clientWidth)return e.clientWidth;return e.width}(m);if(e.skipCanvasResize||(m.width=C),j>=_)throw new Error("'rangeMin' should be strictly smaller than 'rangeMax'");const{format:T}=e,R=wa(T),O=m.getContext("2d");if(!O)throw new Error("Could not get ctx");const E=S.mapOrElse(()=>0,e=>e.i),P=Aa(x,w,g),F=N.isJust,A=N.mapOrElse(()=>0,e=>e.i),I=F?Ca:0,D=!!e.highlightQuery&&e.highlightQuery.length>0,L=Ma*(b.length-A)+(F?Ca:0);e.skipCanvasResize||(m.height=L);const B="number"==typeof e.devicePixelRatio?e.devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1;!e.skipDprScale&&B>1&&(m.width*=B,m.height*=B,O.scale(B,B)),O.textBaseline="middle",O.font="400 11.5px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace";const z=O.measureText("a").width,{names:$}=e,V=function(e){const t=es.get(e);if(t)return t;const n=new Map;return es.set(e,n),n}(m),H=D?function(e,t){const n=ts.get(e);if(n){const e=n.get(t);if(e)return e}const r=t.toLowerCase(),a=new Uint8Array(e.length);for(let t=1;t<e.length;t+=1){const n=e[t];n&&n.toLowerCase().includes(r)&&(a[t]=1)}const o=null!=n?n:new Map;return o.set(t,a),ts.set(e,o),a}($,e.highlightQuery):null,W="single"===e.format?function(e,t,n){const r=`${t}|${n.name}`,a=ns.get(e);if(a){const e=a.get(r);if(e)return e}const o=new Array(e.length);for(let r=0;r<e.length;r+=1){const a=Ki(t,e[r]||"")||"";o[r]=Zi(n,a)}const i=null!=a?a:new Map;return i.set(r,o),ns.set(e,i),o}($,e.spyName,y):null,U="double"===e.format?Gi({name:y.name,goodColor:y.goodColor,neutralColor:y.neutralColor,badColor:y.badColor}):null,J=(e,t)=>{const n=e[t+R.jName];return!(!n||n<0||!H)&&1===H[n]},Q=null!==(n=e.startI)&&void 0!==n?n:0,q=null!==(r=e.startJ)&&void 0!==r?r:0;if(F&&"highlightOnly"!==d&&0===(null!==(a=e.levelStart)&&void 0!==a?a:0)&&0===Q&&0===q){const e=x*k;u&&(O.beginPath(),O.rect(0,0,x*k,Ca),O.fillStyle=Yi(200,1).rgb().string(),O.fill());const t=N.mapOrElse(()=>"total",e=>function(e,t){return 1===e?t.collapsedLevelsSingular:t.collapsedLevelsPlural.replace("{n}",String(e))}(e.i-1,M)),n=Va({mode:p,charSize:z,rectWidth:e,fullText:t,shortText:t}),r=0,a=0,o=Ca;if(f){O.beginPath(),O.rect(0,0,e,Ca),O.save(),O.clip(),O.fillStyle="black";const t=Math.round(Math.max(r,0));O.fillText(n.text,t+n.marginLeft,a+o/2+1),O.restore()}}const X=Math.max(0,null!==(o=e.levelStart)&&void 0!==o?o:0),Y=b.length-A,K=Math.min(Y,null!==(i=e.levelEnd)&&void 0!==i?i:Y),Z=Math.max(X,null!==(s=e.startI)&&void 0!==s?s:X),G=Math.max(0,null!==(l=e.startJ)&&void 0!==l?l:0),{spyName:ee}=e,te=(t,n,r,a,o)=>{const i={level:t,j:n,i:r+N.mapOrElse(()=>0,e=>e.i),names:$,collapsed:a,selectedLevel:E,highlightModeOn:D,isHighlighted:o,spyName:ee,palette:y,colorByNameIndex:W,diffColorFn:U};switch(T){case"single":return function(e){const t=ls(e);if(t)return t;const n=wa("single"),r=e.selectedLevel>e.i?.33:1;let a=e.level[e.j+n.jName];void 0===a&&(console.warn("Could nto find level",{l:e.j,jName:n.jName,level:e.level}),a=-1);if(e.colorByNameIndex&&a>=0&&e.colorByNameIndex[a])return e.colorByNameIndex[a].alpha(r);const o=e.names[a]||"",i=Ki(e.spyName,o)||"";return Zi(e.palette,i).alpha(r)}({...i});case"double":return function(e){const t=ls(e);if(t)return t;const n=e.selectedLevel>e.i?.33:1,{leftRatio:r,rightRatio:a}=function(e,t,n,r){const a=xa;return n&&r?{leftRatio:a.getBarTotalLeft(e,t)/n,rightRatio:a.getBarTotalRght(e,t)/r}:(console.error("Properties 'rightTicks' and 'leftTicks' are required. Can't calculate ratio."),{leftRatio:0,rightRatio:0})}(e.level,e.j,e.leftTicks,e.rightTicks),o=Pa(r),i=Pa(a);if(e.diffColorFn)return e.diffColorFn(Xi(o,i)).alpha(n);return function(e,t,n){const r=Xi(t,n);return Gi(e)(r)}(e.palette,o,i).alpha(n)}({...i,leftTicks:e.leftTicks,rightTicks:e.rightTicks});default:throw new Error(`Unsupported format: ${T}`)}};if("highlightOnly"===d&&D&&u){const e=function(e,t){const n=rs.get(e);if(n)return n;const r=wa(t),a=new Map;for(let t=0;t<e.length;t+=1){const n=e[t];for(let e=0;e<n.length;e+=r.jStep){const o=r.getBarName(n,e);if(void 0===o||o<0)continue;const i=a.get(o);i?i.push({i:t,j:e}):a.set(o,[{i:t,j:e}])}}return rs.set(e,a),a}(b,T),t=[];for(let e=1;e<$.length;e+=1)H&&1===H[e]&&t.push(e);for(let n=0;n<t.length;n+=1){const r=t[n],a=e.get(r);if(a)for(let e=0;e<a.length;e+=1){const t=a[e],n=t.i-A;if(t.i<A||n<X||n>=K)continue;const r=b[t.i],o=v(R.getBarOffset(r,t.j)),i=n*Ma+I,s=Ca,l=R.getBarTotal(r,t.j),c=l*k<=5,u=l*k-(c?0:.5);if(u<=0)continue;O.beginPath(),O.rect(o,i,u,s);const f=te(r,t.j,n,c,!0);O.fillStyle=f.string(),O.fill()}}return{done:!0,nextI:K,nextJ:0}}for(let e=Z;e<K;e+=1){const t=b[A+e];if(!t)throw new Error(`Could not find level: ${A+e}`);let n=e===Z?G:0;for(;n<t.length;n+=R.jStep){const r=R.getBarOffset(t,n),a=v(r),o=e*Ma+I,i=Ca,s=D&&J(t,n);let l=R.getBarTotal(t,n);const m=l*k<=5;if(m)for(;n<t.length-R.jStep&&r+l===R.getBarOffset(t,n+R.jStep)&&R.getBarTotal(t,n+R.jStep)*k<=5&&s===(D&&J(t,n+R.jStep));)n+=R.jStep,l+=R.getBarTotal(t,n);const g=l*k-(m?0:.5);if(O.beginPath(),O.rect(a,o,g,i),u){if("forceGrey"===d)O.fillStyle=Yi(200,.66).rgb().string();else{const r=te(t,n,e,m,s);O.fillStyle=r.string()}O.fill()}if(!f||m||"forceGrey"===d){if(h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep};continue}if(g<20)continue;const b=is($,n,T,t),y=Va({mode:p,charSize:z,rectWidth:g,fullText:ss(b,l,w,P,M,V),shortText:b});O.save(),O.clip(),O.fillStyle="black";const x=Math.round(Math.max(a,0));if(O.fillText(y.text,x+y.marginLeft,o+i/2+1),O.restore(),h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep}}if(h&&performance.now()-c>h)return{done:!1,nextI:e+1,nextJ:0}}return{done:!0,nextI:K,nextJ:0}}function is(e,t,n,r){let a=r[t+wa(n).jName];void 0===a&&(a=-1);const o=e[a];return o||(console.warn("Could not find function name for",{j:t,format:n,level:r,names:e}),"")}function ss(e,t,n,r,a,o){let i=null==o?void 0:o.get(t);if(!i){const e=r.format(t,n);i=Oa(e,!!a.isZh)||e,null==o||o.set(t,i)}return`${e} (${i})`}function ls({collapsed:e,highlightModeOn:t,isHighlighted:n}){return e||t&&!n?Yi(200,.66):null}class cs{constructor(e,t,n,r,a,o,i,s){if(this.flamebearer=e,this.canvas=t,this.focusedNode=n,this.fitMode=r,this.highlightQuery=a,this.zoom=o,this.palette=i,this.messages=s,this.cachedRange=null,this.cachedPxPerTick=null,this.tickToX=e=>{var t;const n=this.cachedRange?this.cachedRange.rangeMin:this.getRange().rangeMin,r=null!==(t=this.cachedPxPerTick)&&void 0!==t?t:this.pxPerTick();return(e-this.flamebearer.numTicks*n)*r},this.xyToBarPosition=e=>{const{ff:t}=this,{i:n,j:r}=this.xyToBarIndex(e.x,e.y),a=this.focusedNode.mapOrElse(()=>0,e=>e.i<0?0:e.i-1),o=this.flamebearer.levels[n];if(!o)throw new Error(`Could not find level: '${n}'`);const i=Math.max(this.tickToX(t.getBarOffset(o,r)),0);return{x:i,y:Math.max((n-a)*Ma,0),width:Math.min(this.tickToX(t.getBarOffset(o,r)+t.getBarTotal(o,r))-i,this.getCanvasWidth())}},this.xyToBarData=e=>{const{i:t,j:n}=this.xyToBarIndex(e.x,e.y),r=this.flamebearer.levels[t];if(!r)throw new Error(`Could not find level: '${t}'`);switch(this.flamebearer.format){case"single":{const e=ya;return{format:"single",name:this.flamebearer.names[e.getBarName(r,n)],self:e.getBarSelf(r,n),offset:e.getBarOffset(r,n),total:e.getBarTotal(r,n)}}case"double":{const e=xa;return{format:"double",barTotal:e.getBarTotal(r,n),totalLeft:e.getBarTotalLeft(r,n),totalRight:e.getBarTotalRght(r,n),totalDiff:e.getBarTotalDiff(r,n),name:this.flamebearer.names[e.getBarName(r,n)]}}default:throw new Error("Unsupported type")}},this.isWithinBounds=(e,t)=>{if(e<0||e>this.getCanvasWidth())return!1;try{const{i:n,j:r}=this.xyToBarIndex(e,t);if(-1===r||-1===n)return!1}catch(e){return!1}return!0},this.zoom=o,this.focusedNode=n,this.flamebearer=e,this.canvas=t,this.highlightQuery=a,this.ff=wa(e.format),this.palette=i,this.messages=s,n.isJust&&o.isJust&&o.value.i<n.value.i)throw new Error("Zoom i level should be bigger than Focus")}render(e){var t;const{rangeMin:n,rangeMax:r,pxPerTick:a}=this.updateCachedMetrics(),o=null!==(t=null==e?void 0:e.highlightQueryOverride)&&void 0!==t?t:this.highlightQuery,i={canvas:this.canvas,format:this.flamebearer.format,numTicks:this.flamebearer.numTicks,sampleRate:this.flamebearer.sampleRate,names:this.flamebearer.names,levels:this.flamebearer.levels,spyName:this.flamebearer.spyName,units:this.flamebearer.units,maxSelf:this.flamebearer.maxSelf,rangeMin:n,rangeMax:r,fitMode:this.fitMode,highlightQuery:o,zoom:this.zoom,focusedNode:this.focusedNode,pxPerTick:a,tickToX:e=>(e-this.flamebearer.numTicks*n)*a,palette:this.palette,messages:this.messages,renderRects:null==e?void 0:e.renderRects,renderText:null==e?void 0:e.renderText,renderMode:null==e?void 0:e.renderMode,levelStart:null==e?void 0:e.levelStart,levelEnd:null==e?void 0:e.levelEnd,startI:null==e?void 0:e.startI,startJ:null==e?void 0:e.startJ,timeBudgetMs:null==e?void 0:e.timeBudgetMs,skipCanvasResize:null==e?void 0:e.skipCanvasResize,skipDprScale:null==e?void 0:e.skipDprScale,devicePixelRatio:null==e?void 0:e.devicePixelRatio},{format:s}=this.flamebearer;switch(s){case"single":return os({...i,format:"single"});case"double":return os({...i,leftTicks:this.flamebearer.leftTicks,rightTicks:this.flamebearer.rightTicks});default:throw new Error(`Invalid format: '${s}'`)}}pxPerTick(){if(null!==this.cachedPxPerTick)return this.cachedPxPerTick;const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,n}updateCachedMetrics(){const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,{rangeMin:e,rangeMax:t,pxPerTick:n}}getRange(){const{ff:e}=this,t=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},n=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},{zoom:r,focusedNode:a}=this;return r.match({Just:e=>a.match({Just:r=>{const a=n(r),o=t(e);return a.rangeMax-a.rangeMin<o.rangeMax-o.rangeMin?(console.warn("Focus is smaller than range, this shouldnt happen. Verify that the zoom is always bigger than the focus."),n(r)):t(e)},Nothing:()=>t(e)}),Nothing:()=>a.match({Just:e=>n(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})}getCanvasWidth(){return"clientWidth"in this.canvas&&"number"==typeof this.canvas.clientWidth?this.canvas.clientWidth:this.canvas.width}isFocused(){return this.focusedNode.isJust}binarySearchLevel(e,t){const{ff:n}=this;let r=0,a=t.length-n.jStep;for(;r<=a;){const o=n.jStep*(r/n.jStep+a/n.jStep>>1),i=this.tickToX(n.getBarOffset(t,o)),s=this.tickToX(n.getBarOffset(t,o)+n.getBarTotal(t,o));if(i<=e&&s>=e)return s-i>5?o:-1;i>e?a=o-n.jStep:r=o+n.jStep}return-1}xyToBarIndex(e,t){if(e<0||t<0)throw new Error(`x and y must be bigger than 0. x = ${e}, y = ${t}`);if(this.isFocused()&&t<=Ca)return{i:0,j:0};const n=this.isFocused()?t-Ca:t,r=this.focusedNode.mapOrElse(()=>0,e=>e.i<=0?0:e.i),a=this.zoom.match({Just:()=>this.focusedNode.match({Just:()=>r,Nothing:()=>0}),Nothing:()=>this.focusedNode.match({Just:()=>r,Nothing:()=>0})}),o=Math.floor(n/Ma)+a;if(o>=0&&o<this.flamebearer.levels.length){const t=this.flamebearer.levels[o];if(!t)throw new Error(`Could not find level: '${o}'`);return{i:o,j:this.binarySearchLevel(e,t)}}return{i:0,j:0}}parseXY(e,t){const n={x:e,y:t};return this.isWithinBounds(e,t)?da.of(n):da.nothing()}xyToBar(e,t){return this.parseXY(e,t).map(n=>{const{i:r,j:a}=this.xyToBarIndex(e,t);return{i:r,j:a,...this.xyToBarPosition(n),...this.xyToBarData(n)}})}}function us(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=us(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fs(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=us(e))&&(r&&(r+=" "),r+=t);return r}var ds="NoData-module_noData__WuuID";function hs(){return e.jsx("div",{"data-testid":"no-data",className:ds,children:e.jsx("span",{children:"No data available"})})}var ms,ps,gs={},vs={};function bs(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-right",n=[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],r="f01e",a="M436.7 74.7L448 85.4 448 32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l47.9 0-7.6-7.2c-.2-.2-.4-.4-.6-.6-75-75-196.5-75-271.5 0s-75 196.5 0 271.5 196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c99.9-99.9 261.7-100 361.7-.3z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faArrowRotateRight=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(vs)),vs}function ys(){return ps||(ps=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=bs();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faRedo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(gs)),gs}var xs,ws=ys(),ks={};function js(){return xs||(xs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="copy",n=[],r="f0c5",a="M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z";e.definition={prefix:"fas",iconName:t,icon:[448,512,n,r,a]},e.faCopy=e.definition,e.prefix="fas",e.iconName=t,e.width=448,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(ks)),ks}var _s,Ns=js(),Ss={};function Ms(){return _s||(_s=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="highlighter",n=[],r="f591",a="M315 315L473.4 99.9 444.1 70.6 229 229 315 315zm-187 5l0 0 0-71.7c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0 457.6 0 468.5 4.5 476.6 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5 0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5l-71.7 0-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l51.7-51.7 70.6 70.6-19.7 19.7c-4.5 4.5-10.6 7-17 7L24 512c-13.3 0-24-10.7-24-24l0-4.7c0-6.4 2.5-12.5 7-17z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faHighlighter=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Ss)),Ss}var Cs,Ts,Rs=Ms(),Os={},Es={};function Ps(){return Cs||(Cs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="down-left-and-up-right-to-center",n=["compress-alt"],r="f422",a="M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faDownLeftAndUpRightToCenter=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Es)),Es}function Fs(){return Ts||(Ts=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ps();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faCompressAlt=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Os)),Os}var As=Fs();const Is=e=>!!e&&"o"===e[0],Ds=r.unstable_batchedUpdates,Ls=(e,t)=>!0===e||!(!e||!e[t]),Bs=(e,t)=>"function"==typeof e?e(t):e,zs="_szhsinMenu",$s=(e,t)=>Object.defineProperty(t,zs,{value:e}),Vs=(e,t)=>(t&&Object.keys(t).forEach(n=>{const r=e[n],a=t[n];e[n]="function"==typeof a&&r?(...e)=>{a(...e),r(...e)}:a}),e),Hs=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+r+n))return e}};function Ws(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Us(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const Js=({block:e,element:n,modifiers:r,className:a})=>t.useMemo(()=>{const t=n?`${e}__${n}`:e;let o=t;r&&Object.keys(r).forEach(e=>{const n=r[e];n&&(o+=` ${t}--${!0===n?e:`${e}-${n}`}`)});let i="function"==typeof a?a(r):a;return"string"==typeof i&&(i=i.trim(),i&&(o+=` ${i}`)),o},[e,n,r,a]),Qs="szh-menu",qs=t.createContext(),Xs=t.createContext({}),Ys=t.createContext({}),Ks=t.createContext({}),Zs=t.createContext({}),Gs=t.createContext({}),el=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),tl=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),nl=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),rl=Object.freeze({FIRST:"first",LAST:"last"}),al=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),ol="absolute",il="none",sl={preventScroll:!0},ll=$s("MenuButton",t.forwardRef(function({className:n,isOpen:r,disabled:a,children:o,...i},s){const l=t.useMemo(()=>({open:r}),[r]);return e.jsx("button",{"aria-haspopup":!0,"aria-expanded":r,"aria-disabled":a||void 0,type:"button",disabled:a,...i,ref:s,className:Js({block:"szh-menu-button",modifiers:l,className:n}),children:o})})),cl=({className:n,containerRef:r,containerProps:a,children:o,isOpen:i,theming:s,transition:l,onClose:c})=>{const u=Ls(l,"item");return e.jsx("div",{...Vs({onKeyDown:({key:e})=>{if(e===el.ESC)Bs(c,{key:e,reason:nl.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&Bs(c,{reason:nl.BLUR})}},a),className:Js({block:"szh-menu-container",modifiers:t.useMemo(()=>({theme:s,itemTransition:u}),[s,u]),className:n}),style:{position:"absolute",...a?.style},ref:r,children:o})},ul=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(n,r,a)=>{t?e||(e=setTimeout(()=>{e=0,r()},n)):a?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},fl=(e,t)=>Math.round(e)===t?e:t,dl=(e,t,n,r)=>{const a=(e=>{const t=e.getBoundingClientRect();return t.width=fl(t.width,e.offsetWidth),t.height=fl(t.height,e.offsetHeight),t})(t),o=e.getBoundingClientRect(),i=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),s=(e=>{if("string"!=typeof e)return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],r=isNaN(t[1])?n:t[1];return{top:n,right:r,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?r:t[3]}})(r),l=e=>e+o.left-i.left-s.left,c=e=>e+o.left+a.width-i.right+s.right,u=e=>e+o.top-i.top-s.top,f=e=>e+o.top+a.height-i.bottom+s.bottom;return{menuRect:a,containerRect:o,getLeftOverflow:l,getRightOverflow:c,getTopOverflow:u,getBottomOverflow:f,confineHorizontally:e=>{let t=l(e);if(t<0)e-=t;else{const n=c(e);n>0&&(t=l(e-=n),t<0&&(e-=t))}return e},confineVertically:e=>{let t=u(e);if(t<0)e-=t;else{const n=f(e);n>0&&(t=u(e-=n),t<0&&(e-=t))}return e}}},hl=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:r,placeLeftX:a,placeRightX:o,getLeftOverflow:i,getRightOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v=d,b=r;"initial"!==h&&(b=c(b),"anchor"===h&&(b=Math.min(b,e.bottom-t.top),b=Math.max(b,e.top-t.top-n.height))),"left"===v?(m=a,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="right")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(a),(p>=0||-p<g)&&(m=a,v="left")))),"auto"===h&&(m=l(m));const y=f?(({arrowRef:e,menuY:t,anchorRect:n,containerRect:r,menuRect:a})=>{let o=n.top-r.top-t+n.height/2;const i=1.25*e.current.offsetHeight;return o=Math.max(i,o),o=Math.min(o,a.height-i),o})({menuY:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowY:y,x:m,y:b,computedDirection:v}},ml=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:r,placeTopY:a,placeBottomY:o,getTopOverflow:i,getBottomOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v="top"===d?"top":"bottom",b=r;"initial"!==h&&(b=l(b),"anchor"===h&&(b=Math.min(b,e.right-t.left),b=Math.max(b,e.left-t.left-n.width))),"top"===v?(m=a,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="bottom")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(a),(p>=0||-p<g)&&(m=a,v="top")))),"auto"===h&&(m=c(m));const y=f?(({arrowRef:e,menuX:t,anchorRect:n,containerRect:r,menuRect:a})=>{let o=n.left-r.left-t+n.width/2;const i=1.25*e.current.offsetWidth;return o=Math.max(i,o),o=Math.min(o,a.width-i),o})({menuX:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowX:y,x:b,y:m,computedDirection:v}},pl="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function gl(e,t){"function"==typeof e?e(t):e.current=t}const vl=(e,n)=>t.useMemo(()=>e?n?t=>{gl(e,t),gl(n,t)}:e:n,[e,n]),bl=({ariaLabel:n,menuClassName:a,menuStyle:o,arrow:i,arrowProps:s={},anchorPoint:l,anchorRef:c,containerRef:u,containerProps:f,externalRef:d,parentScrollingRef:h,align:m="start",direction:p="bottom",position:g="auto",overflow:v="visible",setDownOverflow:b,repositionFlag:y,captureFocus:x=!0,state:w,endTransition:k,isDisabled:j,menuItemFocus:_,gap:N=0,shift:S=0,children:M,onClose:C,focusProps:T,...R})=>{const[O,E]=t.useState({x:-9999,y:-9999}),[P,F]=t.useState({}),[A,I]=t.useState(),[D,L]=t.useState(p),[B]=t.useState(ul),[z,$]=t.useReducer(e=>e+1,1),{transition:V,boundingBoxRef:H,boundingBoxPadding:W,rootMenuRef:U,rootAnchorRef:J,scrollNodesRef:Q,reposition:q,viewScroll:X,submenuCloseDelay:Y}=t.useContext(Gs),{submenuCtx:K,reposSubmenu:Z=y}=t.useContext(Ys),G=t.useRef(),ee=t.useRef(),te=t.useRef(!1),{hoverItem:ne,dispatch:re,updateItems:ae}=(e=>{const[n,r]=t.useState(),a=t.useRef({items:[],hoverIndex:-1,sorted:!1}).current,o=t.useCallback((t,n)=>{const{items:o}=a;if(t)if(n)o.push(t);else{const n=o.indexOf(t);n>-1&&(o.splice(n,1),t.contains(document.activeElement)&&(e.current.focus(sl),r()))}else a.items=[];a.hoverIndex=-1,a.sorted=!1},[a,e]),i=t.useCallback((t,n,o)=>{const{items:i,hoverIndex:s}=a,l=()=>{if(a.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");i.sort((e,n)=>Us(t,e)-Us(t,n)),a.sorted=!0};let c,u=-1;switch(t){case tl.RESET:break;case tl.SET:c=n;break;case tl.UNSET:c=e=>e===n?void 0:e;break;case tl.FIRST:l(),u=0,c=i[u];break;case tl.LAST:l(),u=i.length-1,c=i[u];break;case tl.SET_INDEX:l(),u=o,c=i[u];break;case tl.INCREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u++,u>=i.length&&(u=0),c=i[u];break;case tl.DECREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u--,u<0&&(u=i.length-1),c=i[u];break;default:if("production"!==process.env.NODE_ENV)throw new Error(`[React-Menu] Unknown hover action type: ${t}`)}c||(u=-1),r(c),a.hoverIndex=u},[e,a]);return{hoverItem:n,dispatch:i,updateItems:o}})(G),oe=Is(w),ie=Ls(V,"open"),se=Ls(V,"close"),le=Q.current,ce=t.useCallback(e=>{const t=G.current,n=u.current;if(!t||!n)return;const r=c?c.current?.getBoundingClientRect():l?{left:l.x,right:l.x,top:l.y,bottom:l.y,width:0,height:0}:null;if(!r)return void("production"!==process.env.NODE_ENV&&console.warn("[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open."));le.menu||(le.menu=(H?H.current:Hs(U.current))||window);const a=dl(n,t,le.menu,W);let{arrowX:o,arrowY:s,x:f,y:d,computedDirection:h}=(({arrow:e,align:t,direction:n,gap:r,shift:a,position:o,anchorRect:i,arrowRef:s,positionHelpers:l})=>{const{menuRect:c,containerRect:u}=l,f="left"===n||"right"===n;let d=f?r:a,h=f?a:r;if(e){const e=s.current;f?d+=e.offsetWidth:h+=e.offsetHeight}const m=i.left-u.left-c.width-d,p=i.right-u.left+d,g=i.top-u.top-c.height-h,v=i.bottom-u.top+h;let b,y;"end"===t?(b=i.right-u.left-c.width,y=i.bottom-u.top-c.height):"center"===t?(b=i.left-u.left-(c.width-i.width)/2,y=i.top-u.top-(c.height-i.height)/2):(b=i.left-u.left,y=i.top-u.top),b+=d,y+=h;const x={...l,anchorRect:i,placeLeftX:m,placeRightX:p,placeLeftorRightY:y,placeTopY:g,placeBottomY:v,placeToporBottomX:b,arrowRef:s,arrow:e,direction:n,position:o};switch(n){case"left":case"right":return hl(x);default:return ml(x)}})({arrow:i,align:m,direction:p,gap:N,shift:S,position:g,anchorRect:r,arrowRef:ee,positionHelpers:a});const{menuRect:b}=a,y=b.height;if(!e&&"visible"!==v){const{getTopOverflow:e,getBottomOverflow:t}=a;let n,r;const o=t(d);if(o>0)n=y-o,r=o;else{const t=e(d);t<0&&(n=y+t,r=0-t,n>=0&&(d-=t))}n>=0&&I({height:n,overflowAmt:r})}i&&F({x:o,y:s}),E({x:f,y:d}),L(h)},[i,m,W,p,N,S,g,v,l,c,u,H,U,le]);pl(()=>{oe&&(ce(),te.current&&$()),te.current=oe},[oe,ce,Z]),pl(()=>{A&&!b&&(G.current.scrollTop=0)},[A,b]),pl(()=>ae,[ae]),t.useEffect(()=>{let{menu:e}=le;if(!oe||!e)return;if(e=e.addEventListener?e:window,!le.anchors){le.anchors=[];let t=Hs(J&&J.current);for(;t&&t!==e;)le.anchors.push(t),t=Hs(t)}let t=X;if(le.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const n=()=>{"auto"===t?Ds(()=>ce(!0)):Bs(C,{reason:nl.SCROLL})},r=le.anchors.concat("initial"!==X?e:[]);return r.forEach(e=>e.addEventListener("scroll",n)),()=>r.forEach(e=>e.removeEventListener("scroll",n))},[J,le,oe,C,X,ce]);const ue=!!A&&A.overflowAmt>0;t.useEffect(()=>{if(ue||!oe||!h)return;const e=()=>Ds(ce),t=h.current;return t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)},[oe,ue,h,ce]),t.useEffect(()=>{if(!oe||"function"!=typeof ResizeObserver||"initial"===q)return;const e=[],t=new ResizeObserver(t=>t.forEach(({target:t})=>{e.indexOf(t)<0?e.push(t):r.flushSync(()=>{ce(),$()})})),n={box:"border-box"};t.observe(G.current,n);const a=c?.current;return a&&t.observe(a,n),()=>t.disconnect()},[oe,q,c,ce]),t.useEffect(()=>{if(!oe)return re(tl.RESET),void(se||I());const{position:e,alwaysUpdate:t}=_||{},n=()=>{e===rl.FIRST?re(tl.FIRST):e===rl.LAST?re(tl.LAST):e>=-1&&re(tl.SET_INDEX,void 0,e)};if(t)n();else if(x){const e=setTimeout(()=>{const e=G.current;e&&!e.contains(document.activeElement)&&(e.focus(sl),n())},ie?170:100);return()=>clearTimeout(e)}},[oe,ie,se,x,_,re]);const fe=t.useMemo(()=>({isParentOpen:oe,submenuCtx:B,dispatch:re,updateItems:ae}),[oe,B,re,ae]);let de,he;A&&(b?he=A.overflowAmt:de=A.height);const me=t.useMemo(()=>({reposSubmenu:z,submenuCtx:B,overflow:v,overflowAmt:he,parentMenuRef:G,parentDir:D}),[z,B,v,he,D]),pe=de>=0?{maxHeight:de,overflow:v}:void 0,ge=t.useMemo(()=>({state:w,align:m,dir:D}),[w,m,D]),ve=t.useMemo(()=>({dir:D}),[D]),be=Js({block:Qs,element:"arrow",modifiers:ve,className:s.className}),ye=e.jsxs("ul",{role:"menu","aria-label":n,...Ws(j),...Vs({onPointerEnter:K?.off,onPointerMove:e=>{e.stopPropagation(),B.on(Y,()=>{re(tl.RESET),G.current.focus(sl)})},onPointerLeave:e=>{e.target===e.currentTarget&&B.off()},onKeyDown:e=>{switch(e.key){case el.HOME:re(tl.FIRST);break;case el.END:re(tl.LAST);break;case el.UP:re(tl.DECREASE,ne);break;case el.DOWN:re(tl.INCREASE,ne);break;case el.SPACE:return void(e.target&&-1!==e.target.className.indexOf(Qs)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===w&&I(),Bs(k)}},R),ref:vl(d,G),className:Js({block:Qs,modifiers:ge,className:a}),style:{...o,...pe,margin:0,display:"closed"===w?"none":void 0,position:ol,left:O.x,top:O.y},children:[i&&e.jsx("li",{"aria-hidden":!0,...s,className:be,style:{display:"block",position:ol,left:P.x,top:P.y,...s.style},ref:ee}),e.jsx(Ys.Provider,{value:me,children:e.jsx(Xs.Provider,{value:fe,children:e.jsx(qs.Provider,{value:ne,children:Bs(M,ge)})})})]});return f?e.jsx(cl,{...f,isOpen:oe,children:ye}):ye},yl=t.forwardRef(function({"aria-label":n,className:a,containerProps:o,initialMounted:i,unmountOnClose:s,transition:l,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,reposition:d="auto",submenuOpenDelay:h=300,submenuCloseDelay:m=150,viewScroll:p="initial",portal:g,theming:v,onItemClick:b,...y},x){const w=t.useRef(null),k=t.useRef({}),{anchorRef:j,state:_,onClose:N}=y,S=t.useMemo(()=>({initialMounted:i,unmountOnClose:s,transition:l,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,rootMenuRef:w,rootAnchorRef:j,scrollNodesRef:k,reposition:d,viewScroll:p,submenuOpenDelay:h,submenuCloseDelay:m}),[i,s,l,c,j,u,f,d,p,h,m]),M=t.useMemo(()=>({handleClick(e,t){e.stopPropagation||Bs(b,e);let n=e.keepOpen;void 0===n&&(n=t&&e.key===el.SPACE),n||Bs(N,{value:e.value,key:e.key,reason:nl.CLICK})},handleClose(e){Bs(N,{key:e,reason:nl.CLICK})}}),[b,N]);if(!_)return null;const C=e.jsx(Gs.Provider,{value:S,children:e.jsx(Ks.Provider,{value:M,children:e.jsx(bl,{...y,ariaLabel:n||"Menu",externalRef:x,containerRef:w,containerProps:{className:a,containerRef:w,containerProps:o,theming:v,transition:l,onClose:N}})})});return!0===g&&"undefined"!=typeof document?r.createPortal(C,document.body):g?g.target?r.createPortal(C,g.target):g.stablePosition?null:C:C}),xl=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],wl=e=>({_s:e,status:xl[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),kl=e=>e?6:5,jl=(e,t,n,r,a)=>{clearTimeout(r.current);const o=wl(e);t(o),n.current=o,a&&a({current:o})},_l=({enter:e=!0,exit:n=!0,preEnter:r,preExit:a,timeout:o,initialEntered:i,mountOnEnter:s,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=t.useState(()=>wl(i?2:kl(s))),d=t.useRef(u),h=t.useRef(),[m,p]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(o),g=t.useCallback(()=>{const e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return kl(t)}})(d.current._s,l);e&&jl(e,f,d,h,c)},[c,l]);return[u,t.useCallback(t=>{const o=e=>{switch(jl(e,f,d,h,c),e){case 1:m>=0&&(h.current=setTimeout(g,m));break;case 4:p>=0&&(h.current=setTimeout(g,p));break;case 0:case 3:h.current=((e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0))(o,e)}},i=d.current.isEnter;"boolean"!=typeof t&&(t=!i),t?!i&&o(e?r?0:1:2):i&&o(n?a?3:4:kl(l))},[g,c,e,n,r,a,m,p,l]),g]},Nl=({initialOpen:e,initialMounted:n,unmountOnClose:r,transition:a,transitionTimeout:o=500,onMenuChange:i}={})=>{const s=Ls(a,"open"),l=Ls(a,"close"),[{status:c},u,f]=_l({initialEntered:e,mountOnEnter:!n,unmountOnExit:r,timeout:o,enter:s,exit:l,onStateChange:t.useCallback(({current:{isEnter:e,isResolved:t}})=>{!i||e&&s&&t||!e&&l&&t||i({open:e})},[i,s,l])});return[{state:al[c],endTransition:f},u]},Sl=parseInt(t.version)<19,Ml=t.forwardRef(function({"aria-label":n,captureFocus:r,initialOpen:a,menuButton:o,instanceRef:i,onMenuChange:s,...l},c){const[u,f,d]=(e=>{const[n,r]=Nl(e),[a,o]=t.useState();return[{menuItemFocus:a,...n},r,(e,t)=>{o({position:e,alwaysUpdate:t}),r(!0)}]})({...l,onMenuChange:s}),{state:h}=u,m=Is(h),p=t.useRef(null),g=((e,n)=>{if("production"!==process.env.NODE_ENV&&"function"!=typeof n)throw new Error("[React-Menu] useClick/useHover requires a function in the second parameter.");const[r]=t.useState({});return{onMouseDown:()=>{r.v=e&&"closed"!==e},onClick:e=>r.v?r.v=!1:n(!0,e)}})(h,(e,t)=>d(t.detail?void 0:rl.FIRST)),v=t.useCallback(e=>{f(!1),e.key&&p.current.focus()},[f]),b=Bs(o,{open:m});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const y={...Vs({onKeyDown:e=>{switch(e.key){case el.UP:d(rl.LAST);break;case el.DOWN:d(rl.FIRST);break;default:return}e.preventDefault()},...g},b.props),ref:vl(Sl?b.ref:b.props.ref,p)};"MenuButton"===b.type[zs]&&(y.isOpen=m);const x=t.cloneElement(b,y);return t.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),e.jsxs(t.Fragment,{children:[x,e.jsx(yl,{...l,...u,"aria-label":n||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:p,ref:c,onClose:v})]})}),Cl=(n,r)=>{const a=t.memo(r),o=t.forwardRef((n,r)=>{const o=t.useRef(null);return e.jsx(a,{...n,itemRef:o,externalRef:r,isHovering:t.useContext(qs)===o.current})});return o.displayName=`WithHovering(${n})`,o},Tl=(e,n,r,a)=>{const[o,i,s]=(e=>{const[n,r]=t.useState(!1);return t.useEffect(()=>{!e&&r(!1)},[e]),[n,()=>!n&&r(!0),()=>r(!1)]})(r),{submenuCloseDelay:l}=t.useContext(Gs),{isParentOpen:c,submenuCtx:u,dispatch:f,updateItems:d}=t.useContext(Xs),h=()=>{!r&&!a&&f(tl.SET,e.current)},m=()=>{!a&&f(tl.UNSET,e.current)};return((e,t,n)=>{pl(()=>{if("production"!==process.env.NODE_ENV&&!n)throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${t.current.outerHTML}`);if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])})(a,e,d),t.useEffect(()=>{r&&c&&n.current&&n.current.focus()},[n,r,c]),{mouseOver:o,setHover:h,onBlur:e=>{r&&!e.currentTarget.contains(e.relatedTarget)&&m()},onPointerMove:e=>{a||(e.stopPropagation(),i(),u.on(l,h,h))},onPointerLeave:(e,t)=>{s(),u.off(),!t&&m()}}},Rl=Cl("MenuItem",function({className:n,value:r,href:a,type:o,checked:i,disabled:s,children:l,onClick:c,isHovering:u,itemRef:f,externalRef:d,...h}){const m=!!s,{mouseOver:p,setHover:g,...v}=Tl(f,f,u,m),b=t.useContext(Ks),y=t.useContext(Zs),x="radio"===o,w="checkbox"===o,k=!(!a||m||x||w),j=x?y.value===r:!!w&&!!i,_=e=>{if(m)return e.stopPropagation(),void e.preventDefault();const t={value:r,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),w&&(t.checked=!j),x&&(t.name=y.name),Bs(c,t),x&&Bs(y.onRadioChange,t),b.handleClick(t,w||x)},N=t.useMemo(()=>({type:o,disabled:m,hover:p||u,checked:j,anchor:k}),[o,m,p,u,j,k]),S=Vs({...v,onPointerDown:g,onKeyDown:e=>{if(u)switch(e.key){case el.ENTER:e.preventDefault();case el.SPACE:k?f.current.click():_(e)}},onClick:_},h),M={role:x?"menuitemradio":w?"menuitemcheckbox":"menuitem","aria-checked":x||w?j:void 0,...Ws(m,u),...S,ref:vl(d,f),className:Js({block:Qs,element:"item",modifiers:N,className:n}),children:t.useMemo(()=>Bs(l,N),[l,N])};return k?e.jsx("li",{role:il,children:e.jsx("a",{href:a,...M})}):e.jsx("li",{...M})}),Ol=t.memo(t.forwardRef(function({className:t,...n},r){return e.jsx("li",{role:il,...n,ref:r,className:Js({block:Qs,element:"header",className:t})})}));var El=t["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"];function Pl(){}function Fl(e,n,r){void 0===r&&(r={});var a=Ll(r.polyfill),o=(e=>{var n=t.useRef(e);return t.useEffect(()=>{n.current=e}),n})(n);return El(()=>{function t(e,t){n||o.current(e,t)}var n=0,r=e&&"current"in e?e.current:e;return r?(a.subscribe(r,t),()=>{n=1,a.unsubscribe(r,t)}):Pl},[e,a,o]),a.observer}var Al,Il,Dl,Ll=e=>Al||(Al=function(e){var t=0,n=[],r=new Map,a=new(e||window.ResizeObserver)((e,a)=>{n=n.concat(e),t||window.requestAnimationFrame(function(){for(var e=new Set,o=function(t){if(e.has(n[t].target))return"continue";e.add(n[t].target);var o=r.get(n[t].target);null==o||o.forEach(e=>e(n[t],a))},i=0;i<n.length;i++)o(i);n=[],t=0}),t=1});return{observer:a,subscribe(e,t){var n;a.observe(e);var o=null!==(n=r.get(e))&&void 0!==n?n:[];o.push(t),r.set(e,o)},unsubscribe(e,t){var n,o=null!==(n=r.get(e))&&void 0!==n?n:[];if(1===o.length)return a.unobserve(e),void r.delete(e);var i=o.indexOf(t);-1!==i&&o.splice(i,1),r.set(e,o)}}}(e));function Bl(){if(Dl)return Il;Dl=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,a=parseInt,o="object"==typeof i&&i&&i.Object===Object&&i,s="object"==typeof self&&self&&self.Object===Object&&self,l=o||s||Function("return this")(),c=Object.prototype.toString,u=Math.max,f=Math.min,d=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(o){if("number"==typeof o)return o;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(o))return NaN;if(h(o)){var i="function"==typeof o.valueOf?o.valueOf():o;o=h(i)?i+"":i}if("string"!=typeof o)return 0===o?o:+o;o=o.replace(e,"");var s=n.test(o);return s||r.test(o)?a(o.slice(2),s?2:8):t.test(o)?NaN:+o}return Il=function(e,t,n){var r,a,o,i,s,l,c=0,p=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,o=a;return r=a=void 0,c=t,i=e.apply(o,n)}function y(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-c>=o}function x(){var e=d();if(y(e))return w(e);s=setTimeout(x,function(e){var n=t-(e-l);return g?f(n,o-(e-c)):n}(e))}function w(e){return s=void 0,v&&r?b(e):(r=a=void 0,i)}function k(){var e=d(),n=y(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(x,t),p?b(e):i}(l);if(g)return s=setTimeout(x,t),b(l)}return void 0===s&&(s=setTimeout(x,t)),i}return t=m(t)||0,h(n)&&(p=!!n.leading,o=(g="maxWait"in n)?u(m(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=a=s=void 0},k.flush=function(){return void 0===s?i:w(d())},k},Il}var zl=s(Bl()),$l="canvas-module_canvas__Iiaz4",Vl="canvas-module_textCanvas__eFxM4",Hl="Highlight-module_highlight__1VV-X";function Wl(n){const{canvasRef:r,barHeight:a,xyToHighlightData:o,zoom:i}=n,[s,l]=t.useState({height:"0px",visibility:"hidden"}),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null);t.useEffect(()=>{l({height:"0px",visibility:"hidden"})},[i]);const d=e=>{const t=c.current;if(!t)return void l(e);const n=f.current;n&&n.left===e.left&&n.top===e.top&&n.width===e.width&&n.visibility===e.visibility||(f.current=e,t.style.visibility=String(e.visibility||""),void 0!==e.left&&(t.style.left=String(e.left)),void 0!==e.top&&(t.style.top=String(e.top)),void 0!==e.width&&(t.style.width=String(e.width)),void 0!==e.height&&(t.style.height=String(e.height)))},h=e=>{u.current&&cancelAnimationFrame(u.current);const t=e.offsetX,n=e.offsetY;u.current=requestAnimationFrame(()=>{const e=o(t,n);if(e.isJust){const t=e.value;d({visibility:"visible",height:`${a}px`,...t})}else m()})},m=()=>{d({...f.current||{},visibility:"hidden"})};return t.useEffect(()=>{const e=r.current;return e?(e.addEventListener("mousemove",h),e.addEventListener("mouseout",m),()=>{e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",m),u.current&&cancelAnimationFrame(u.current)}):()=>{}},[r.current,h,m]),e.jsx("div",{ref:c,className:Hl,style:s,"data-testid":"flamegraph-highlight"})}var Ul="ContextMenuHighlight-module_highlightContextMenu__WI1nK";const Jl={height:"0px",visibility:"hidden"};function Ql(n){const{node:r,barHeight:a}=n,[o,i]=t.useState(Jl);return t.useEffect(()=>{r.match({Nothing:()=>i(Jl),Just:e=>i({visibility:"visible",height:`${a}px`,...e})})},[r]),e.jsx("div",{className:Ul,style:o,"data-testid":"flamegraph-highlight-contextmenu"})}const ql={name:"Default",goodColor:mo.rgb(0,170,0),neutralColor:mo.rgb(148,142,142),badColor:mo.rgb(200,0,0),colors:[mo.hsl(24,69,60),mo.hsl(34,65,65),mo.hsl(194,52,61),mo.hsl(163,45,55),mo.hsl(211,48,60),mo.hsl(246,40,65),mo.hsl(305,63,79),mo.hsl(47,100,73),mo.rgb(183,219,171),mo.rgb(244,213,152),mo.rgb(78,146,249),mo.rgb(249,186,143),mo.rgb(242,145,145),mo.rgb(130,181,216),mo.rgb(229,168,226),mo.rgb(174,162,224),mo.rgb(154,196,138),mo.rgb(242,201,109),mo.rgb(101,197,219),mo.rgb(249,147,78),mo.rgb(234,100,96),mo.rgb(81,149,206),mo.rgb(214,131,206),mo.rgb(128,110,183)]},Xl={...ql,name:"Color Blind",goodColor:mo.rgb(26,133,255),neutralColor:mo.rgb(148,142,142),badColor:mo.rgb(220,50,32)};function Yl(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M5,19.56c0,5.22,3.54,9.44,7.92,9.44h3.17c4.37,0,7.92-4.23,7.92-9.44v-7.56H5v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M14,1h-.82c-4.52,0-8.18,3.73-8.18,8.33v1.67H14V1Z"}),e.jsx("path",{d:"M15.82,1h-.82V11h9v-1.67c0-4.6-3.66-8.33-8.18-8.33Z"})]})}function Kl(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M24,19.56c0,5.22-3.54,9.44-7.92,9.44h-3.17c-4.37,0-7.92-4.23-7.92-9.44v-7.56H24v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M15,1h.82c4.52,0,8.18,3.73,8.18,8.33v1.67H15V1Z"}),e.jsx("path",{d:"M13.18,1h.82V11H5v-1.67c0-4.6,3.66-8.33,8.18-8.33Z"})]})}var Zl={tooltip:"Tooltip-module_tooltip__NMZ65",flamegraphDiffTooltip:"Tooltip-module_flamegraphDiffTooltip__Z983o",tooltipName:"Tooltip-module_tooltipName__y4Qs3",functionName:"Tooltip-module_functionName__z9LHO",tooltipTable:"Tooltip-module_tooltipTable__ct3pq",clickInfo:"Tooltip-module_clickInfo__Utux5"};const Gl={location:"Location",self:"Self",total:"Total",baseline:"Baseline",comparison:"Comparison",diff:"Diff",noItemsFound:"No items found",diffNew:"new",diffRemoved:"removed",tooltipSamples:"Samples:",tooltipUnitTitles:{objects:{percent:"% of objects in RAM",formattedValue:"Objects in RAM",total:"% of total RAM"},goroutines:{percent:"% of goroutines",formattedValue:"Goroutines",total:"% of total goroutines"},bytes:{percent:"% of RAM",formattedValue:"RAM",total:"% of total bytes"},samples:{percent:"Share of CPU",formattedValue:"CPU Time",total:"% of total CPU"},lock_nanoseconds:{percent:"% of Time spent",formattedValue:"Time",total:"% of total seconds"},lock_samples:{percent:"% of contended locks",formattedValue:"Contended locks",total:"% of total locks"},trace_samples:{percent:"% of time",formattedValue:"Samples",total:"% of total samples"},exceptions:{percent:"% of thrown exceptions",formattedValue:"Thrown exceptions",total:"% of total thrown exceptions"},unknown:{percent:"Percentage",formattedValue:"Units",total:"% of total units"}},resetView:"Reset View",collapseNodesAbove:"Collapse nodes above",copyFunctionName:"Copy function name",highlightSimilarNodes:"Highlight similar nodes",clearHighlight:"Clear highlight",openInSandwichView:"Open in sandwich view",showTextTailFirst:"Show text tail first",showTextHeadFirst:"Show text head first",headFirst:"Head first",tailFirst:"Tail first",clickToHighlightNode:"Click to highlight node in flamegraph",rightClickForMoreNodeOptions:"Right click for more node viewing options",viewTable:"Table",viewTableAndFlamegraph:"Table and Flamegraph",viewFlamegraph:"Flamegraph",viewSandwich:"Sandwich",viewGraphviz:"GraphViz",more:"More",diffLegendRemovedLabel:"(-) Removed",diffLegendAddedLabel:"Added (+)",diffLegendSelectPalette:"Select a palette",paletteDefaultName:"Default",paletteColorBlindName:"Color Blind",paletteDefaultDesc:"(green to red)",paletteColorBlindDesc:"(blue to red)",searchPlaceholder:"Search...",syncSearchBars:"Sync Search Bars",unsyncSearchBars:"Unsync Search Bars",focusOnThisFunction:"Focus on this function",tableDoubleClickToFocus:"Double-click to focus in flamegraph",tableRightClickForOptions:"Right-click for more options",collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",ofTotal:"of total",clearFocus:"Clear focus",sampleCountFormat:[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}]},ec={...Gl,location:"位置",self:"自身",total:"总计",baseline:"基线",comparison:"对比",diff:"差异",noItemsFound:"没有找到任何条目",diffNew:"新增",diffRemoved:"移除",tooltipSamples:"样本数:",tooltipUnitTitles:{objects:{percent:"RAM 中对象占比",formattedValue:"RAM 中对象数",total:"占总 RAM 的百分比"},goroutines:{percent:"协程占比",formattedValue:"协程数量",total:"占协程总数的百分比"},bytes:{percent:"RAM 占比",formattedValue:"RAM",total:"占总字节数的百分比"},samples:{percent:"CPU 占比",formattedValue:"CPU 时间",total:"占总 CPU 的百分比"},lock_nanoseconds:{percent:"耗时占比",formattedValue:"时间",total:"占总秒数的百分比"},lock_samples:{percent:"锁竞争事件占比",formattedValue:"锁竞争事件数",total:"占锁竞争总数的百分比"},trace_samples:{percent:"时间占比",formattedValue:"样本数",total:"占样本总数的百分比"},exceptions:{percent:"异常抛出占比",formattedValue:"异常数",total:"占异常总数的百分比"},unknown:{percent:"百分比",formattedValue:"单位",total:"占单位总量的百分比"}},resetView:"重置视图",collapseNodesAbove:"收起上方节点",copyFunctionName:"复制函数名",highlightSimilarNodes:"高亮相似节点",clearHighlight:"清除高亮",openInSandwichView:"在 sandwich 视图中查看",showTextTailFirst:"显示文本尾部优先",showTextHeadFirst:"显示文本头部优先",headFirst:"从头部开始显示",tailFirst:"从尾部开始显示",clickToHighlightNode:"点击火焰图节点高亮",rightClickForMoreNodeOptions:"右键查看更多节点选项",viewTable:"表格",viewTableAndFlamegraph:"表格 + 火焰图",viewFlamegraph:"火焰图",viewSandwich:"三明治视图",viewGraphviz:"调用图 (GraphViz)",more:"更多",diffLegendRemovedLabel:"(-) 减少",diffLegendAddedLabel:"增加 (+)",diffLegendSelectPalette:"选择颜色方案",paletteDefaultName:"默认",paletteColorBlindName:"色盲",paletteDefaultDesc:"(绿色 → 红色)",paletteColorBlindDesc:"(蓝色 → 红色)",searchPlaceholder:"搜索...",syncSearchBars:"同步搜索栏",unsyncSearchBars:"取消同步搜索栏",focusOnThisFunction:"聚焦到此函数",tableDoubleClickToFocus:"双击可聚焦到火焰图",tableRightClickForOptions:"右键查看更多选项",collapsedLevelsSingular:"总计(已折叠 1 层)",collapsedLevelsPlural:"总计(已折叠 {n} 层)",ofTotal:"占总量",clearFocus:"清除聚焦",sampleCountFormat:[{value:1e12,label:"兆"},{value:1e8,label:"亿"},{value:1e4,label:"万"},{value:1e3,label:"千"}]},tc=t.createContext(Gl),nc=tc,rc=({messages:n,children:r})=>{const a=t.useMemo(()=>{var e;return{...Gl,...n,tooltipUnitTitles:{...Gl.tooltipUnitTitles,...null!==(e=null==n?void 0:n.tooltipUnitTitles)&&void 0!==e?e:{}}}},[n]);return e.jsx(tc.Provider,{value:a,children:r})},ac=()=>t.useContext(tc);function oc(e){if(!e)return null;const t=e.replace(/,/g,"").trim();if(!t)return null;const n=Number(t);return Number.isFinite(n)?n:null}function ic(e,t){if(!e||!t)return;const n=e.trim().replace(/\u2212/g,"-");return n&&"0"!==n?n.startsWith("+")?t.badColor.rgb().string():n.startsWith("-")?t.goodColor.rgb().string():void 0:void 0}function sc(e,t,n){return n<t?t:Math.max(t,Math.min(n,e))}function lc(e,t,n,r){const a=window.innerWidth,o=window.innerHeight,i=Math.max(0,n||0),s=Math.max(0,r||0);let l=e+12,c=t+20;return l+i+8>a&&(l=e-i-12),c+s+8>o&&(c=t-s-20),l=sc(l,8,a-i-8),c=sc(c,8,o-s-8),{left:l,top:c}}function cc({shouldShowFooter:n=!0,shouldShowTitle:r=!0,dataSourceRef:a,clickInfoSide:o,setTooltipContent:i,palette:s}){const l=t.useRef(null),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null),[d,h]=t.useState({title:{text:"",diff:{text:"",color:""}},tooltipData:[]}),[m,p]=t.useState(),g=()=>{p({visibility:"hidden"}),h({title:{text:"",diff:{text:"",color:""}},tooltipData:[]})},v=t.useCallback(e=>{u.current&&cancelAnimationFrame(u.current);const t=e.clientX,n=e.clientY;u.current=requestAnimationFrame(()=>{if(!l.current)throw new Error("Missing tooltipElement");c.current={x:t,y:n},i(h,g,e);const r=l.current.clientWidth||0,a=l.current.clientHeight||0,{left:o,top:s}=lc(t,n,r,a);p({top:s,left:o,visibility:"visible"})})},[i]);return t.useEffect(()=>{const e=a.current;if(!e)return()=>{};const t=()=>{g()},n=t=>{e.contains(t.target)||g()};return e.addEventListener("mousemove",v),e.addEventListener("mouseout",g),e.addEventListener("mouseleave",t),window.addEventListener("mousemove",n,{passive:!0}),window.addEventListener("blur",t),()=>{e.removeEventListener("mousemove",v),e.removeEventListener("mouseout",g),e.removeEventListener("mouseleave",t),window.removeEventListener("mousemove",n),window.removeEventListener("blur",t),u.current&&cancelAnimationFrame(u.current)}},[a.current,v]),t.useLayoutEffect(()=>{if(!l.current)return;if(!c.current)return;if(0===d.tooltipData.length)return;const{x:e,y:t}=c.current,n=l.current.getBoundingClientRect(),r=n.width,a=n.height,o=f.current;if(o&&Math.abs(o.w-r)<1&&Math.abs(o.h-a)<1)return;f.current={w:r,h:a};const{left:i,top:s}=lc(e,t,r,a);p(e=>e&&e.left===i&&e.top===s&&"visible"===e.visibility?e:{...e||{},left:i,top:s,visibility:"visible"})},[d.tooltipData.length,d.title.text]),e.jsx("div",{"data-testid":"tooltip",className:fs(Zl.tooltip,{[Zl.flamegraphDiffTooltip]:d.tooltipData.length>1}),style:{...m,textAlign:"center"},ref:l,children:d.tooltipData.length>0&&e.jsxs(e.Fragment,{children:[r&&e.jsx("div",{className:Zl.tooltipName,"data-testid":"tooltip-title",children:d.title.text}),e.jsx("div",{className:Zl.functionName,"data-testid":"tooltip-function-name",children:d.title.text}),d.title.diff.text.length>0?e.jsx(uc,{data:d.tooltipData,diff:d.title.diff,palette:s}):e.jsx(uc,{data:d.tooltipData,palette:s}),n&&e.jsx(fc,{clickInfoSide:o})]})})}function uc({data:t,diff:n,palette:r}){const a=ac(),[o,i]=t,s="Location"!==a.location;if(!o)return null;let l;switch(o.tooltipType){case"flamegraph":l=()=>{const t=i&&function(e,t){const n=Ra(e),r=Ra(t);if(!n||!r)return"";const a=r.value-n.value;if(0===a)return"0";const o=a>0?"+":"-",i=Math.abs(a);let s;s=i>=100?i.toFixed(0):i>=10?i.toFixed(1):i.toFixed(2);const l=n.unit||r.unit;return l?`${o}${s} ${l}`:`${o}${s}`}(o.formattedValue,i.formattedValue),l=Oa(t,s),c=i&&function(e,t){const n=oc(e),r=oc(t);if(null==n||null==r)return"";const a=r-n;return 0===a?"0":`${a>0?"+":"-"}${Math.abs(a).toLocaleString()}`}(o.samples,i.samples),u=Oa(o.formattedValue,s),f=Oa(null==i?void 0:i.formattedValue,s),d=null==n?void 0:n.color,h=ic(t,r),m=ic(c,r);return e.jsxs(e.Fragment,{children:[i&&e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{}),e.jsx("th",{children:a.baseline}),e.jsx("th",{children:a.comparison}),e.jsx("th",{children:a.diff})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].percent,":"]}),e.jsx("td",{children:o.percent}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.percent}),e.jsx("td",{style:{textAlign:"center"},children:n&&e.jsx("span",{"data-testid":"tooltip-diff",style:{color:d},children:n.text})})]})]}),e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:u}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:f}),e.jsx("td",{style:{textAlign:"center"},children:l&&e.jsx("span",{"data-testid":"tooltip-time-diff",style:h?{color:h}:void 0,children:l})})]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:a.tooltipSamples}),e.jsx("td",{children:o.samples}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.samples}),e.jsx("td",{style:{textAlign:"center"},children:c&&e.jsx("span",{"data-testid":"tooltip-samples-diff",style:m?{color:m}:void 0,children:c})})]})]})]})]})};break;case"table":l=()=>e.jsxs(e.Fragment,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{}),e.jsxs("td",{children:[a.self," (",a.tooltipUnitTitles[o.units].total,")"]}),e.jsxs("td",{children:[a.total," (",a.tooltipUnitTitles[o.units].total,")"]})]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:o.self}),e.jsx("td",{children:o.total})]})})]});break;default:l=()=>null}return e.jsx("table",{"data-testid":"tooltip-table",className:fs(Zl.tooltipTable,{[Zl[`${o.tooltipType}${i?"Diff":""}`]]:o.tooltipType}),style:{textAlign:"center",margin:"0 auto"},children:l()})}function fc({clickInfoSide:t}){const n=ac();let r;switch(t){case"right":r=e.jsxs(e.Fragment,{children:[e.jsx(Yl,{}),e.jsx("span",{children:n.rightClickForMoreNodeOptions})]});break;case"left":r=e.jsxs(e.Fragment,{children:[e.jsx(Kl,{}),e.jsx("span",{children:n.clickToHighlightNode})]});break;default:r=e.jsx(e.Fragment,{})}return e.jsx("div",{"data-testid":"tooltip-footer",className:Zl.clickInfo,children:r})}function dc(n){const{format:r,canvasRef:a,xyToData:o,numTicks:i,sampleRate:s,units:l,leftTicks:c,rightTicks:u,palette:f}=n,d=ac(),h=t.useCallback((e,t,n)=>{const a=Aa(i,s,l),h=o(n.offsetX,n.offsetY);let m;var p;if(h.isJust)switch(m=h.value,m.format){case"single":{const t={percent:(p=m.total/i,`${Pa(p)}%`),samples:"trace_samples"===l?"":Ta(m.total),units:l,formattedValue:a.format(m.total,s),tooltipType:"flamegraph"};e({title:{text:m.name,diff:{text:"",color:""}},tooltipData:[t]});break}case"double":{if("single"===r)throw new Error("props format is 'single' but it has been mapped to 'double'");const t=hc({formatter:a,sampleRate:s,totalLeft:m.totalLeft,leftTicks:c,totalRight:m.totalRight,rightTicks:u,title:m.name,units:l},f,d);e({title:t.title,tooltipData:t.tooltipData});break}default:throw new Error(`Unsupported format: '${m.format}'`)}else t()},[i,s,l,c,u,f,o,r,d]);return e.jsx(cc,{dataSourceRef:a,clickInfoSide:"right",setTooltipContent:h,palette:f})}function hc({formatter:e,sampleRate:t,totalLeft:n,leftTicks:r,totalRight:a,rightTicks:o,title:i,units:s},l=ql,c){var u,f;const d=o>0?a/o:0,h=Pa(r>0?n/r:0),m=Pa(d),p={percent:`${h}%`,samples:Ta(n),units:s,formattedValue:e.format(n,t),tooltipType:"flamegraph"},g={percent:`${m}%`,samples:Ta(a),units:s,formattedValue:e.format(a,t),tooltipType:"flamegraph"};let v=Fa(h,m);Number.isFinite(v)||(v=0);let b="";v>0?b=l.badColor.rgb().string():v<0&&(b=l.goodColor.rgb().string());let y="";return 0===n&&a>0?y=null!==(u=null==c?void 0:c.diffNew)&&void 0!==u?u:"新增":0===a&&n>0?y=null!==(f=null==c?void 0:c.diffRemoved)&&void 0!==f?f:"移除":0===v?y="0%":v>0?y=`+${v.toFixed(2)}%`:v<0&&(y=`${v.toFixed(2)}%`),{title:{text:i,diff:{text:y,color:b}},tooltipData:[p,g]}}var mc="ContextMenu-module_menu__x-AtY";function pc(n){const[r,a]=Nl({transition:!0}),[o,i]=t.useState({x:0,y:0}),{canvasRef:s}=n,[l,c]=t.useState([]),{xyToMenuItems:u,onClose:f,onOpen:d}=n;return t.useEffect(()=>{a(!1);const e=s.current;if(!e)return()=>{};const t=e=>{e.preventDefault();const t=u(e.offsetX,e.offsetY);c(t);const n=e.clientX,r=e.clientY+20;i({x:n,y:r}),a(!0),d(e.offsetX,e.offsetY)};return e.addEventListener("contextmenu",t),()=>{e.removeEventListener("contextmenu",t)}},[u]),e.jsx(yl,{...r,className:mc,anchorPoint:o,onClose:()=>{a(!1),f()},children:l})}var gc="LogoLink-module_logoLink__oWRri";function vc(){return e.jsxs("a",{className:gc,href:"https://github.com/pyroscope-io/pyroscope/",target:"_blank",rel:"noreferrer",children:[e.jsxs("svg",{width:"22px",height:"22px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("defs",{children:e.jsxs("radialGradient",{cx:"49.4236252%",cy:"92.6627823%",fx:"49.4236252%",fy:"92.6627823%",r:"195.066755%",gradientTransform:"translate(0.494236,0.926628),scale(1.000000,0.735610),rotate(-90.000000),translate(-0.494236,-0.926628)",id:"radialGradient-1",children:[e.jsx("stop",{stopColor:"#FFB90C",offset:"0%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"38.390924%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"50.5405%"}),e.jsx("stop",{stopColor:"#B51424",offset:"73.98091%"}),e.jsx("stop",{stopColor:"#B51424",offset:"100%"})]})}),e.jsx("g",{id:"Artboard",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:e.jsx("g",{id:"fire-part",transform:"translate(148.516736, 0.000000)",fillRule:"nonzero",children:e.jsxs("g",{id:"whole-thing",transform:"translate(363.983264, 495.000000) scale(-1, 1) rotate(-180.000000) translate(-363.983264, -495.000000) translate(0.483264, 0.000000)",children:[e.jsx("g",{id:"g70",transform:"translate(-0.000091, 0.685815)",fill:"url(#radialGradient-1)",children:e.jsx("path",{d:"M65.3646667,571.739321 L65.4492471,571.698868 C19.5139147,505.999969 -5.32464048,424.477859 1.04305801,336.877516 L1.04305801,336.877516 C14.0321963,158.179446 159.192462,13.7596653 338.059844,1.5917266 L338.059844,1.5917266 C419.418369,-3.93888015 495.500283,17.3823334 558.456522,57.4611191 L558.456522,57.4611191 L481.301947,162.097965 C437.516468,136.521928 399.367671,129.590556 363.486536,130.155994 L363.486536,130.155994 C234.497143,130.155994 129.556988,235.032238 129.556988,363.946998 L129.556988,363.946998 C129.556988,492.865683 234.497143,597.738003 363.486536,597.738003 L363.486536,597.738003 C492.483783,597.738003 597.427864,492.865683 597.427864,363.946998 L597.427864,363.946998 C597.41276,304.634864 581.39383,255.677522 530.630465,199.668053 L607.770843,95.1329436 C680.936847,161.576603 726.932594,257.364176 726.932594,363.946998 L726.932594,363.946998 C726.932594,458.031616 691.13483,543.75602 632.416071,608.271816 L632.416071,608.271816 L632.416071,608.275741 L533.597728,748.122808 L428.601388,617.203806 L434.703262,646.563419 C459.453008,765.59222 433.664131,889.543925 363.49439,988.853335 L363.49439,988.853335 L65.3646667,571.723019 L65.3646667,571.739321 Z",id:"path84"})}),e.jsx("g",{id:"blue",transform:"translate(191.447039, 191.331780)",children:e.jsxs("g",{id:"g88",transform:"translate(-0.000063, 0.685930)",children:[e.jsx("g",{id:"g94",transform:"translate(0.177296, 0.699054)",fill:"#3EC1D3",children:e.jsx("path",{d:"M171.862466,343.697728 C77.0961324,343.697728 -0.00497405932,266.647602 -0.00497405932,171.934957 C-0.00497405932,77.2182874 77.0961324,0.168162396 171.862466,0.168162396 C266.632828,0.168162396 343.741988,77.2182874 343.741988,171.934957 C343.741988,266.647602 266.632828,343.697728 171.862466,343.697728",id:"path96"})}),e.jsx("g",{id:"g98",transform:"translate(29.362379, 172.629585)",fill:"#FFFFFF",children:e.jsx("path",{d:"M22.8397982,0 L0.671669409,0 C0.671669409,78.2496309 64.380874,141.920035 142.678189,141.920035 L142.678189,119.765407 C76.6007327,119.765407 22.8397982,66.0372141 22.8397982,0",id:"path100"})})]})})]})})})]}),e.jsx("span",{children:"Pyroscope"})]})}const bc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"})}),yc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"})}),xc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z"})}),wc=({fill:t})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:t,children:[e.jsx("g",{id:"shape_squiggle",children:e.jsx("path",{d:"M60,38.42c-4.62,0-6.97-2.64-8.86-4.75-1.81-2.03-2.86-3.08-5.13-3.08s-3.32,1.06-5.13,3.08c-1.89,2.12-4.24,4.75-8.86,4.75s-6.97-2.64-8.87-4.75c-1.81-2.03-2.86-3.08-5.14-3.08s-3.33,1.06-5.14,3.08c-1.89,2.12-4.25,4.75-8.87,4.75-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5c2.28,0,3.33-1.06,5.14-3.09,1.89-2.12,4.25-4.75,8.87-4.75s6.97,2.64,8.87,4.75c1.81,2.03,2.86,3.09,5.14,3.09s3.32-1.06,5.13-3.08c1.89-2.12,4.24-4.75,8.86-4.75s6.97,2.64,8.86,4.75c1.81,2.03,2.86,3.08,5.13,3.08,1.38,0,2.5,1.12,2.5,2.5s-1.12,2.5-2.5,2.5Z"})}),e.jsxs("g",{id:"Layer_4",children:[e.jsx("rect",{x:"2",y:"8",width:"60",height:"14",rx:"3.94",ry:"3.94"}),e.jsx("path",{d:"M58.06,41h-18.64c-1.58,0-3.14,.42-4.5,1.22l-6.88,4.02c-1.87,1.09-4.19,1.09-6.06,0l-6.88-4.02c-1.37-.8-2.92-1.22-4.5-1.22H5.94c-2.18,0-3.94,1.76-3.94,3.94v7.12c0,2.18,1.76,3.94,3.94,3.94H58.06c2.18,0,3.94-1.76,3.94-3.94v-7.12c0-2.18-1.76-3.94-3.94-3.94Z"})]})]}),kc=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"ab_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M16.71,41l-.42-2.45h-.16c-1.63,1.95-4.06,2.95-6.91,2.95-4.8,0-7.86-3.45-7.86-7.45,0-6.4,6.01-9.3,14.13-9.3v-.4c0-1.5-.84-3.2-4.38-3.2-2.48,0-4.9,.75-6.54,1.7l-1.42-4.75c1.69-.9,5.01-2.1,9.44-2.1,8.33,0,10.65,4.95,10.65,10.45v8.7c0,2.25,.11,4.4,.37,5.85h-6.91Zm-.95-11.7c-3.64,0-6.91,.9-6.91,4,0,2.1,1.37,3,3,3s3.22-1.05,3.74-2.6c.11-.35,.16-.8,.16-1.2v-3.2Z"}),e.jsx("path",{d:"M29.36,41c.11-1.79,.21-4.62,.21-7.25V6h7.7v13.46h.11c1.42-1.99,3.8-3.28,7.06-3.28,5.85,0,9.7,5.01,9.65,12.16,0,8.69-5.22,13.16-10.81,13.16-2.74,0-5.22-.99-6.91-3.72h-.11l-.37,3.23h-6.54Zm7.91-9.83c0,.55,.05,.99,.16,1.39,.58,1.94,2.16,3.18,4.01,3.18,3.11,0,4.9-2.53,4.9-7,0-3.92-1.58-6.8-4.9-6.8-1.85,0-3.53,1.39-3.95,3.28-.16,.4-.21,.94-.21,1.44v4.52Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"62 54 52 45 52 51 35 51 35 57 52 57 52 63 62 54"})})]}),jc=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"yz_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M22.75,13l3.43,12.39c.42,1.47,.84,3.2,1.16,4.52h.11c.32-1.32,.69-3.05,1-4.47l2.9-12.44h8.01l-5.8,17.16c-2.95,8.33-5.17,12.54-8.07,15.23-2.58,2.39-5.43,3.3-7.17,3.55l-1.85-6.3c1.11-.25,2.32-.76,3.48-1.52,1.16-.71,2.32-1.88,2.95-3.05,.26-.41,.42-.76,.42-1.12,0-.31-.05-.66-.26-1.17L14.32,13h8.43Z"}),e.jsx("path",{d:"M41.62,33.46l7.59-10.16c1.27-1.57,2.37-2.95,3.58-4.27v-.15h-10.33v-5.89h19.45l-.05,4.57-7.28,9.8c-1.21,1.57-2.48,3.15-3.69,4.42v.1h11.33v5.94h-20.61v-4.37Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"12 51 12 45 2 54 12 63 12 57 29 57 29 51 12 51"})})]});var _c="Header-module_flamegraphHeader__nIrXP",Nc="Header-module_row__P7-2L",Sc="Header-module_flamegraphTitle__sjsvB";function Mc(t){const{format:n,units:r,toolbarVisible:a}=t,o={objects:"number of objects in RAM per function",goroutines:"number of goroutines",bytes:"amount of RAM per function",samples:"CPU time per function",lock_nanoseconds:"time spent waiting on locks per function",lock_samples:"number of contended locks per function",trace_samples:"aggregated span duration",exceptions:"number of exceptions thrown",unknown:""},i=a&&"single"===n?e.jsx("div",{className:`${Nc} ${Sc}`,role:"heading","aria-level":2,children:o[r]&&e.jsxs(e.Fragment,{children:["Frame width represents ",o[r]]})}):null;return i?e.jsx("div",{className:_c,children:e.jsx("div",{children:i})}):null}var Cc="FlamegraphBreadcrumb-module_bar__v8uhn",Tc="FlamegraphBreadcrumb-module_chip__pdv1k",Rc="FlamegraphBreadcrumb-module_focusTooltip__nX30y",Oc="FlamegraphBreadcrumb-module_separator__Zj-rC",Ec="FlamegraphBreadcrumb-module_chipSeparator__S-Gld",Pc="FlamegraphBreadcrumb-module_unitLabel__bjHEA",Fc="FlamegraphBreadcrumb-module_focusIcon__aJBb6",Ac="FlamegraphBreadcrumb-module_ofTotal__kk4dt",Ic="FlamegraphBreadcrumb-module_clearBtn__spimK";function Dc(t){const{totalValueText:n,totalSamplesText:r,samplesLabel:a,unitLabel:o,hasFocus:i,focusPercent:s,focusLabel:l,ofTotalPlacement:c="after",ofTotalLabel:u,clearFocusLabel:f,onClearFocus:d}=t,h=l&&l.trim().length>0?l:void 0;return e.jsxs("div",{className:Cc,"aria-live":"polite",children:[e.jsxs("span",{className:Tc,children:[e.jsx("span",{children:n}),e.jsx("span",{className:Oc,children:"|"}),e.jsxs("span",{children:[r," ",a]}),e.jsxs("span",{className:Pc,children:["(",o,")"]})]}),i&&void 0!==s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Ec,children:">"}),e.jsxs("span",{className:`${Tc} ${Rc}`,"data-tooltip":h,children:[e.jsx("span",{className:Fc,"aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6Z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3.2"})]})}),"before"===c?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Ac,children:u}),e.jsxs("span",{children:[s.toFixed(2),"%"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:[s.toFixed(2),"%"]}),e.jsx("span",{className:Ac,children:u})]}),e.jsx("button",{type:"button",className:Ic,"aria-label":f,onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},children:"×"})]})]})]})}var Lc="styles-module_flamegraphPane__ejguD",Bc="styles-module_fitModeItem__0UBwN",zc="styles-module_sandwichItem__WYvnd",$c="styles-module_flamegraphFrame__9ZW-z";function Vc(n){const r=t.useRef(null),a=t.useRef(null),i=t.useRef(),s=t.useRef(),l=t.useRef(null),c=t.useRef(null),u=t.useRef(null),f=t.useRef({rect:!1,text:!1}),d=ac(),h=t.useRef({lastWidth:0,lastHeight:0}),m="undefined"!=typeof window&&"undefined"!=typeof OffscreenCanvas&&"transferControlToOffscreen"in HTMLCanvasElement.prototype,p=t.useMemo(()=>({collapsedLevelsSingular:d.collapsedLevelsSingular,collapsedLevelsPlural:d.collapsedLevelsPlural,isZh:"Location"!==d.location}),[d.collapsedLevelsSingular,d.collapsedLevelsPlural,d.location]),g=t.useCallback(e=>({name:e.name,goodColor:e.goodColor.rgb().array(),neutralColor:e.neutralColor.rgb().array(),badColor:e.badColor.rgb().array(),colors:e.colors.map(e=>e.rgb().array())}),[]),[v,b]=t.useState(da.nothing()),{flamebearer:y,focusedNode:x,fitMode:w,updateFitMode:k,highlightQuery:j,zoom:_,toolbarVisible:N,headerVisible:S=!0,disableClick:M=!1,showSingleLevel:C=!1,showCredit:T,setActiveItem:R,selectedItem:O,updateView:E,enableSandwichView:P=!0,breadcrumb:F}=n,{onZoom:A,onReset:I,isDirty:D,onFocusOnNode:L}=n,{"data-testid":B}=n,{palette:z,setPalette:$}=n,V=t.useCallback(zl(()=>{q(),X()},50),[]);t.useEffect(()=>{if(!m)return()=>{};const e=function(){const e=new URL("undefined"==typeof document?require("url").pathToFileURL(__filename).href:o&&"SCRIPT"===o.tagName.toUpperCase()&&o.src||new URL("index.node.cjs.js",document.baseURI).href),t=e.pathname,n=t.includes("/src/");if(t.includes("/dist/"),t.includes("/node_modules/.vite/deps/")){const t=new URL("../../@kylincloud/flamegraph/dist/flamegraphRenderWorker.js",e);return new Worker(t,{type:"module"})}const r=n?new URL("./flamegraphRenderWorker.ts",e):new URL("./flamegraphRenderWorker.js",e);return new Worker(r,{type:"module"})}();return l.current=e,setTimeout(()=>{q(),X()},0),()=>{e.terminate(),l.current=null,c.current=null,u.current=null,f.current={rect:!1,text:!1}}},[m]),Fl(r,()=>{if(i){if(r.current){const e=r.current.clientWidth,t=r.current.clientHeight,n=h.current;if(!(Math.abs(e-n.lastWidth)>=2))return;n.lastWidth=e,n.lastHeight=t}V()}});const H=(e,t)=>Z().xyToBar(e,t).map(e=>({left:K().offsetLeft+e.x,top:K().offsetTop+e.y,width:e.width})),W=t.useCallback((t,n)=>{const r=D(),a=Z().xyToBar(t,n),o=a.isJust?a.value.name:"";return[e.jsxs(Rl,{disabled:!r,onClick:I,children:[e.jsx($r,{icon:ws.faRedo}),d.resetView]},"reset"),(()=>{const t=a.mapOrElse(()=>!1,()=>!0),n=a.mapOrElse(()=>()=>{},e=>L.bind(null,e.i,e.j));return e.jsxs(Rl,{disabled:!t,onClick:n,children:[e.jsx($r,{icon:As.faCompressAlt}),d.collapseNodesAbove]},"focus")})(),e.jsxs(Rl,{onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(o)},children:[e.jsx($r,{icon:Ns.faCopy}),d.copyFunctionName]},"copy"),(()=>{const t=O.isJust&&O.value===o?d.clearHighlight:d.highlightSimilarNodes;return e.jsxs(Rl,{onClick:()=>{R({name:o})},children:[e.jsx($r,{icon:Rs.faHighlighter}),t]},"highlight-similar-nodes")})(),(()=>{if(!E||!P)return null;return e.jsxs(Rl,{className:zc,onClick:()=>{E("sandwich"),R({name:o})},children:[e.jsx(wc,{fill:"black"}),d.openInSandwichView]},"open-in-sandwich-view")})(),(()=>{const t=w===$a;return e.jsxs(Rl,{className:Bc,onClick:()=>{k(t?za:$a)},children:[t?e.jsx(jc,{}):e.jsx(kc,{}),t?d.showTextTailFirst:d.showTextHeadFirst]},"fit-mode")})()].filter(Boolean)},[i,O,w,D,I,L,R,E,d,P]),U=()=>{if(r.current){const e=new cs(y,r.current,x,w,j,_,z,p);i.current=e}if(a.current){const e=new cs(y,a.current,x,w,j,_,z,p);s.current=e}},J=t.useCallback(()=>{if(!m||!l.current)return!1;const e=l.current;if(r.current&&!c.current)try{const t=r.current.transferControlToOffscreen();c.current=t,e.postMessage({type:"init",payload:{kind:"rect",canvas:t}},[t]),f.current.rect=!0}catch(e){}if(a.current&&!u.current)try{const t=a.current.transferControlToOffscreen();u.current=t,e.postMessage({type:"init",payload:{kind:"text",canvas:t}},[t]),f.current.text=!0}catch(e){}return!0},[m]);t.useEffect(()=>{U(),q(),X()},[z,p]),t.useEffect(()=>{U(),q(),X()},[r.current,y,x,w,_]),t.useEffect(()=>{U(),q(),X()},[j]);const Q=(e,t)=>{if(!m)return!1;if(!l.current)return!0;if(!J())return!0;const n="rect"===e?r.current:a.current,o=(null==n?void 0:n.clientWidth)||(null==n?void 0:n.width)||0,i={kind:e,flamebearer:y,focusedNode:x.isJust?x.value:null,fitMode:w,highlightQuery:j,zoom:_.isJust?_.value:null,palette:g(z),messages:p,renderRects:t.renderRects,renderText:t.renderText,width:o,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1};return l.current.postMessage({type:"render",payload:i}),!0},q=()=>{var e,t,n;Q("rect",{renderText:!1})||(null===(e=null==r?void 0:r.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==i?void 0:i.current)||void 0===t||t.render({renderText:!1}),null===(n=null==r?void 0:r.current)||void 0===n||n.setAttribute("data-state","rendered"))},X=()=>{var e,t,n;Q("text",{renderRects:!1})||(null===(e=null==a?void 0:a.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==s?void 0:s.current)||void 0===t||t.render({renderRects:!1}),null===(n=null==a?void 0:a.current)||void 0===n||n.setAttribute("data-state","rendered"))},Y=!y||y&&y.names.length<=1,K=()=>{if(!r.current)throw new Error("Missing canvas");return r.current},Z=()=>{if(!i.current)throw new Error("Missing canvas");return i.current};return e.jsxs("div",{"data-testid":"flamegraph-view",className:fs(Lc,{"vertical-orientation":"double"===y.format}),children:[e.jsxs("div",{className:$c,children:[F&&e.jsx(Dc,{totalValueText:F.totalValueText,totalSamplesText:F.totalSamplesText,samplesLabel:F.samplesLabel,unitLabel:F.unitLabel,hasFocus:F.hasFocus,focusPercent:F.focusPercent,focusLabel:F.focusLabel,ofTotalPlacement:F.ofTotalPlacement,ofTotalLabel:F.ofTotalLabel,clearFocusLabel:F.clearFocusLabel,onClearFocus:F.onClearFocus}),S&&e.jsx(Mc,{format:y.format,units:y.units,toolbarVisible:N}),e.jsxs("div",{"data-testid":B,style:{position:"relative",opacity:Y&&!C?0:1},children:[e.jsx("canvas",{height:"0","data-testid":"flamegraph-canvas","data-highlightquery":j,className:fs("flamegraph-canvas",$l),ref:r,onClick:M?void 0:e=>{const t=Z().xyToBar(e.nativeEvent.offsetX,e.nativeEvent.offsetY);t.match({Nothing:()=>{},Just:e=>{_.match({Nothing:()=>{A(t)},Just:n=>{e.i===n.i&&e.j===n.j?A(da.nothing()):A(t)}})}})}}),e.jsx("canvas",{height:"0","data-testid":"flamegraph-text-canvas",className:fs("flamegraph-text-canvas",Vl),ref:a}),i&&r&&e.jsx(Wl,{barHeight:Ma,canvasRef:r,zoom:_,xyToHighlightData:H}),i&&e.jsx(Ql,{barHeight:Ma,node:v})]}),T?e.jsx(vc,{}):""]}),i&&e.jsx(dc,{format:y.format,canvasRef:r,xyToData:(e,t)=>Z().xyToBar(e,t),numTicks:y.numTicks,sampleRate:y.sampleRate,leftTicks:"double"===y.format?y.leftTicks:0,rightTicks:"double"===y.format?y.rightTicks:0,units:y.units,palette:z}),!M&&i&&r&&e.jsx(pc,{canvasRef:r,xyToMenuItems:W,onClose:()=>{b(da.nothing())},onOpen:(e,t)=>{b(H(e,t))}})]})}var Hc,Wc={exports:{}};
|
|
13
13
|
/*!
|
|
14
14
|
Copyright (c) 2018 Jed Watson.
|
|
15
15
|
Licensed under the MIT License (MIT), see
|
|
16
16
|
http://jedwatson.github.io/classnames
|
|
17
|
-
*/var ms,ps=(ds||(ds=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=r(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var a="";for(var o in e)t.call(e,o)&&e[o]&&(a=r(a,o));return a}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(hs)),hs.exports),gs=m(ps),vs={};function bs(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="crosshairs",n=[],a="f05b",r="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM131.2 288c12.7 62.7 62.1 112.1 124.8 124.8l0-12.8c0-17.7 14.3-32 32-32s32 14.3 32 32l0 12.8c62.7-12.7 112.1-62.1 124.8-124.8L432 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l12.8 0C432.1 161.3 382.7 111.9 320 99.2l0 12.8c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-12.8C193.3 111.9 143.9 161.3 131.2 224l12.8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-12.8 0zM288 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,a,r]},e.faCrosshairs=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(vs)),vs}var ys,xs=bs(),ws={};function ks(){return ys||(ys=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-left",n=[9001],a="f053",r="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,a,r]},e.faChevronLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(ws)),ws}var js,Ss=ks(),Ns={};function Cs(){return js||(js=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-right",n=[9002],a="f054",r="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,a,r]},e.faChevronRight=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Ns)),Ns}var Ts=Cs(),_s="Table-module_table__6A8SM",Ms="Table-module_sortable__J6kyp",Rs="Table-module_sortArrow__Nrncn",Fs="Table-module_sortArrowUp__WmbEG",Ps="Table-module_sortArrowDown__Gyue1",Is="Table-module_asc__tJDI9",Es="Table-module_desc__fjVRY",Ls="Table-module_isRowSelected__UhIAJ",Ds="Table-module_isRowDisabled__sz3NJ",Bs="Table-module_virtualSpacer__C1hxH",As="Table-module_active__EShS8",Os="Table-module_loadingSpinner__SSjMK",zs="Table-module_pagination__VXgcO",$s="Button-module_button__Ed1ge",Vs="Button-module_noIcon__Uzjvv",Hs="Button-module_noBox__mLreC",Ws="Button-module_customIcon__-slpC",Us="Button-module_iconWithText__DQRkr",Js="Button-module_default__HhXlQ",Qs="Button-module_outline__Flf4r",Xs="Button-module_float__4marx",Ys="Button-module_primary__xByv0",qs="Button-module_secondary__D0K-F",Zs="Button-module_danger__5-vIq",Gs="Button-module_grouped__j8KwB";const Ks=t.forwardRef(function({disabled:t=!1,kind:n="default",type:a="button",icon:r,iconNode:o,children:i,grouped:s,onClick:l,id:c,className:u,form:f,noBox:d,autoFocus:h,...m},p){return e.jsxs("button",{...m,id:c,ref:p,type:a,"data-testid":m["data-testid"],disabled:t,onClick:l,form:f,autoFocus:h,"aria-label":m["aria-label"],className:gs($s,s?Gs:"",el(n),u,d&&Hs,o&&Ws,!r&&!o&&Vs),children:[r?e.jsx(Xa,{icon:r,className:i?Us:""}):null,o,i]})});function el(e){switch(e){case"default":return Js;case"primary":return Ys;case"secondary":return qs;case"danger":return Zs;case"outline":return Qs;case"float":return Xs;default:throw Error(`Unsupported kind ${e}`)}}function tl({row:n}){const{cells:a,isRowSelected:r,isRowDisabled:o,className:i,onClick:s,onDoubleClick:l,onContextMenu:c,...u}=n,f=t.useRef(Math.random()).current;return e.jsx("tr",{...u,onClick:s,onDoubleClick:l,onContextMenu:c,className:Hr(i,{[Ls]:r,[Ds]:o}),children:a&&a.map(({style:t,value:n,...a},r)=>e.jsx("td",{style:t,...a,children:n},f+r))})}function nl({sortByDirection:n,sortBy:a,updateSortParams:r,table:o,tableBodyRef:i,className:s,isLoading:l,itemsPerPage:c,virtualize:u,virtualizeRowHeight:f,virtualizeOverscan:d=6,scrollRef:h,disableSort:m}){const p=!m&&n&&a&&r,[g,v]=t.useState(0),[b,y]=t.useState(0),[x,w]=t.useState(null),[k,j]=t.useState(null),S=t.useRef(null),N=t.useRef(null);t.useLayoutEffect(()=>{(null==h?void 0:h.current)&&h.current!==k&&j(h.current)},[null==h?void 0:h.current,k]),t.useEffect(()=>{if(!k||!u)return()=>{};const e=()=>{S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{y(k.scrollTop||0)})};return k.addEventListener("scroll",e,{passive:!0}),()=>{k.removeEventListener("scroll",e),S.current&&cancelAnimationFrame(S.current)}},[k,u]),t.useEffect(()=>{if(!u||x||!(null==i?void 0:i.current))return;const e=i.current.querySelectorAll("tr[data-row]");if(!e.length)return;const t=e[0].getBoundingClientRect();t.height&&w(t.height)},[u,x,null==i?void 0:i.current,o]);const C="filled"===o.type?al(o.bodyRows,g,c):null,T="virtual"===o.type?o.rowCount:C?C.length:0,_=f||x||26,M=!!u&&!!k&&("filled"===o.type||"virtual"===o.type)&&_>0,R=M?(()=>{const e=k.clientHeight||0,t=Math.max(0,Math.floor(b/_)-d),n=Math.min(T,Math.ceil((b+e)/_)+d),a=t*_,r=Math.max(0,(T-n)*_),i="filled"===o.type&&C?C.slice(t,n):[];return{viewportHeight:e,totalRows:T,startIndex:t,endIndex:n,topSpacer:a,bottomSpacer:r,visibleRows:i}})():null,F=!!u&&!M&&"filled"===o.type,P=F?(C||[]).slice(0,Math.max(24,4*d)):null;t.useEffect(()=>{var e;"virtual"===o.type&&R&&(null===(e=o.onRangeChange)||void 0===e||e.call(o,R.startIndex,R.endIndex))},[o,null==R?void 0:R.startIndex,null==R?void 0:R.endIndex]);const I="virtual"===o.type&&R?Math.max(0,R.endIndex-R.startIndex):0,E="virtual"===o.type&&I>0?Array.from({length:I},()=>({cells:Array.from({length:o.headRow.length},()=>({value:" "}))})):[],L="virtual"===o.type&&R&&o.range&&o.range.start===R.startIndex&&o.range.end===R.endIndex;"virtual"===o.type&&L&&(N.current=o.rows);const D="virtual"===o.type?L?o.rows:N.current||E:E;return l?e.jsx("div",{className:Os}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:Hr(_s,{[s||""]:s}),"data-testid":"table-ui",children:[e.jsx("thead",{children:e.jsx("tr",{children:o.headRow.map(({sortable:i,label:s,name:l,...c},u)=>i&&"not-filled"!==o.type&&p?t.createElement("th",{...c,key:u,className:Ms,onClick:()=>r(l)},s,e.jsxs("span",{className:Hr(Rs,{[As]:a===l,[Is]:a===l&&"asc"===n,[Es]:a===l&&"desc"===n}),children:[e.jsx("span",{className:Fs}),e.jsx("span",{className:Ps})]})):e.jsx("th",{...c,children:s},u))})}),e.jsx("tbody",{ref:i,children:"not-filled"===o.type?e.jsx("tr",{className:null==o?void 0:o.bodyClassName,children:e.jsx("td",{colSpan:o.headRow.length,children:o.value})}):R?e.jsxs(e.Fragment,{children:[R.topSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:Bs,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.topSpacer,padding:0,border:0}})}),("virtual"===o.type?D:R.visibleRows).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${R.startIndex+n}`)}),R.bottomSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:Bs,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.bottomSpacer,padding:0,border:0}})})]}):F?(P||[]).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${n}`)}):(C||[]).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${n}`)})})]}),e.jsx(rl,{bodyRows:"filled"===o.type?o.bodyRows:void 0,itemsPerPage:c,currPage:g,setCurrPage:v})]})}function al(e,t,n){return n?e.slice(t*n,n*(t+1)):e}function rl({itemsPerPage:t,currPage:n,setCurrPage:a,bodyRows:r}){if(!t)return null;const o=!!r&&al(r,n+1,t).length>0,i=!!r&&al(r,n-1,t).length>0;return e.jsxs("nav",{className:zs,children:[e.jsx(Ks,{"aria-label":"Previous Page",disabled:!i,kind:"float",icon:Ss.faChevronLeft,onClick:()=>a(n-1)}),e.jsx(Ks,{disabled:!o,"aria-label":"Next Page",kind:"float",icon:Ts.faChevronRight,onClick:()=>a(n+1)})]})}function ol({numTicks:n,sampleRate:a,units:r,tableBodyRef:o,palette:i}){const s=br(n,a,r),l=s.format(n,a),c=Ti(),u=t.useCallback((e,t,n)=>{var o;const u=null===(o=n.target.closest("tr"))||void 0===o?void 0:o.dataset.row;if(!u)return void t();const[f,d,...h]=u.split(";");switch(f){case"single":{const[t,n]=h,o=s.format(parseInt(t,10),a),i=s.format(parseInt(n,10),a),c=l.split(" "),u="<"===c[0]?c[1]:c[0],f=o.split(" "),m="<"===f[0]?f[1]:f[0],p=i.split(" "),g="<"===p[0]?p[1]:p[0];e({title:{text:d,diff:{text:"",color:""}},tooltipData:[{units:r,self:`${o}(${(parseFloat(m)/parseFloat(u)*100).toFixed(2)}%)`,total:`${i}(${(parseFloat(g)/parseFloat(u)*100).toFixed(2)}%)`,tooltipType:"table"}]});break}case"double":{const[t,n,o,l]=h,u=Di({formatter:s,sampleRate:a,totalLeft:parseInt(t,10),leftTicks:parseInt(n,10),totalRight:parseInt(o,10),rightTicks:parseInt(l,10),title:d,units:r},i,c);e({title:u.title,tooltipData:u.tooltipData});break}}},[s,a,r,l,i,c]);return e.jsx(Pi,{dataSourceRef:o,shouldShowTitle:!1,clickInfoSide:"left",setTooltipContent:u,palette:i})}function il(){const e=new Blob([`(${(()=>{const e=e=>e||0,t={format:"single",jStep:4,jName:3,getBarTotal:(e,t)=>e[t+1],getBarSelf:(e,t)=>e[t+2],getBarName:(e,t)=>e[t+3]},n={format:"double",jStep:7,jName:6,getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarName:(e,t)=>e[t+6]},a=e=>Math.round(1e4*e)/100,r=(e,t)=>(t-e)/e*100,o={baseRows:[],rows:[],bestNodeByName:new Map,sortBy:"total",sortByDirection:"desc",highlightQuery:"",format:"single",leftTicks:0,rightTicks:0},i=()=>{const e=o.highlightQuery.trim().toLowerCase(),t=e?o.baseRows.filter(t=>t.name.toLowerCase().includes(e)):o.baseRows.slice(),n="asc"===o.sortByDirection?1:-1;t.sort((e,t)=>{if("name"===o.sortBy)return n*e.name.localeCompare(t.name);switch(o.sortBy){case"total":case"self":{const a=e[o.sortBy]||0,r=t[o.sortBy]||0;return n*(a-r)}case"baseline":{const a=e.leftTicks>0?e.totalLeft/e.leftTicks:0,r=t.leftTicks>0?t.totalLeft/t.leftTicks:0;return n*(a-r)}case"comparison":{const a=e.rightTicks>0?e.totalRght/e.rightTicks:0,r=t.rightTicks>0?t.totalRght/t.rightTicks:0;return n*(a-r)}case"diff":{const o=e.leftTicks>0?e.totalLeft/e.leftTicks:0,i=e.rightTicks>0?e.totalRght/e.rightTicks:0,s=t.leftTicks>0?t.totalLeft/t.leftTicks:0,l=t.rightTicks>0?t.totalRght/t.rightTicks:0,c=r(a(o),a(i)),u=r(a(s),a(l));return n*(c-u)}default:return 0}}),o.rows=t},s=a=>{const{rows:r,bestNodeByName:s,format:l,leftTicks:c,rightTicks:u}=(a=>{const{names:r,levels:o,format:i}=a,s=new Map,l=new Map,c=a.leftTicks||0,u=a.rightTicks||0;if("double"===i){const t=n;for(let n=0;n<o.length;n+=1){const a=o[n];for(let o=0;o<a.length;o+=t.jStep){const i=r[t.getBarName(a,o)]||"<empty>";s.has(i)||s.set(i,{type:"double",name:i,totalLeft:0,totalRght:0,leftTicks:c,rightTicks:u});const f=s.get(i);if(!f)continue;f.totalLeft=e(f.totalLeft)+t.getBarTotalLeft(a,o),f.totalRght=e(f.totalRght)+t.getBarTotalRght(a,o);const d=t.getBarTotal(a,o),h=l.get(i);(!h||d>h.total)&&l.set(i,{i:n,j:o,total:d})}}}else{const n=t;for(let t=0;t<o.length;t+=1){const a=o[t];for(let o=0;o<a.length;o+=n.jStep){const i=r[n.getBarName(a,o)]||"<empty>";s.has(i)||s.set(i,{type:"single",name:i,self:0,total:0});const c=s.get(i);if(!c)continue;c.self=e(c.self)+n.getBarSelf(a,o),c.total=e(c.total)+n.getBarTotal(a,o);const u=n.getBarTotal(a,o),f=l.get(i);(!f||u>f.total)&&l.set(i,{i:t,j:o,total:u})}}}return{rows:Array.from(s.values()),bestNodeByName:l,format:i,leftTicks:c,rightTicks:u}})(a.flamebearer);o.baseRows=r,o.bestNodeByName=s,o.format=l,o.leftTicks=c,o.rightTicks=u,o.sortBy=a.sortBy,o.sortByDirection=a.sortByDirection,o.highlightQuery=a.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}})};self.onmessage=e=>{const t=e.data;var n;if(t&&t.type)switch(t.type){case"init":s(t.payload);break;case"update":n=t.payload,o.sortBy=n.sortBy,o.sortByDirection=n.sortByDirection,o.highlightQuery=n.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}});break;case"range":(e=>{const{start:t,end:n,requestId:a}=e,r=Math.max(0,t),i=Math.min(o.rows.length,n),s=o.rows.slice(r,i);self.postMessage({type:"range",payload:{rows:s,start:r,end:i,requestId:a}})})(t.payload);break;case"findNode":(e=>{const{name:t,requestId:n}=e,a=o.bestNodeByName.get(t);self.postMessage({type:"findNode",payload:{node:a?{i:a.i,j:a.j}:null,requestId:n}})})(t.payload)}}}).toString()})()`],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}var sl="ProfilerTable-module_tableContextMenu__7Svm8",ll="ProfilerTable-module_sandwichItem__b9Ipy";const cl=e=>e||0,ul="undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL;function fl(e,t,n,a){const r=t;return r.type="single",r.self=cl(r.self)+e.getBarSelf(n,a),r.total=cl(r.total)+e.getBarTotal(n,a),r}function dl(e,t,n,a,r,o){const i=t;return i.type="double",i.self=cl(i.self)+e.getBarSelf(n,a),i.total=cl(i.total)+e.getBarTotal(n,a),i.selfLeft=cl(i.selfLeft)+e.getBarSelfLeft(n,a),i.selfRght=cl(i.selfRght)+e.getBarSelfRght(n,a),i.selfDiff=cl(i.selfDiff)+e.getBarSelfDiff(n,a),i.totalLeft=cl(i.totalLeft)+e.getBarTotalLeft(n,a),i.totalRght=cl(i.totalRght)+e.getBarTotalRght(n,a),i.totalDiff=cl(i.totalDiff)+e.getBarTotalDiff(n,a),i.leftTicks=r,i.rightTicks=o,i}const hl=new WeakMap;function ml(e){const t=hl.get(e);if(t)return t;const n=function(e){if(!e)return[];const{names:t,levels:n,format:a}=e,r="double"!==a?nr:ar,o=new Map;for(let i=0;i<n.length;i++){const s=n[i];for(let n=0;n<s.length;n+=r.jStep){const i=t[r.getBarName(s,n)];o.has(i)||o.set(i,{name:i||"<empty>",self:0,total:0});const l=o.get(i);if(!l)break;"single"===a?fl(nr,l,s,n):dl(ar,l,s,n,e.leftTicks,e.rightTicks)}}return Array.from(o.values())}(e);return hl.set(e,n),n}function pl(e,t,n){const a=148-e/t*148,r=n.alpha(1);return{backgroundImage:`linear-gradient(${r}, ${r})`,backgroundPosition:`-${a}px 0px`,backgroundRepeat:"no-repeat"}}const gl=({flamebearer:t,sortBy:n,sortByDirection:a,fitMode:r,handleTableItemClick:o,highlightQuery:i,palette:s,selectedItem:l,messages:c,onRowContextMenu:u,onRowDoubleClick:f})=>{const{numTicks:d,maxSelf:h,sampleRate:m,spyName:p,units:g}=t,v=[...ml(t)].sort((e,t)=>t.total-e.total),b="asc"===a?1:-1;let y;if("name"===n)y=v.sort((e,t)=>b*e[n].localeCompare(t[n]));else switch(n){case"total":case"self":y=v.sort((e,t)=>b*(e[n]-t[n]));break;case"baseline":y=v.sort((e,t)=>b*(e.totalLeft/e.leftTicks-t.totalLeft/t.leftTicks));break;case"comparison":y=v.sort((e,t)=>b*(e.totalRght/e.rightTicks-t.totalRght/t.rightTicks));break;case"diff":y=v.sort((e,t)=>{const n=vr(gr(e.totalLeft/e.leftTicks),gr(e.totalRght/e.rightTicks)),a=vr(gr(t.totalLeft/t.leftTicks),gr(t.totalRght/t.rightTicks));return b*(n-a)});break;default:y=v}const x=br(d,m,g),w=e=>!!l.isJust&&e===l.value,k=t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:Cr(r),children:e.jsx("bdi",{dir:"ltr",children:t.name})})}),j=y.filter(e=>{return!i||(t=i,e.name.toLowerCase().includes(t.toLowerCase()));var t}).map(e=>{if("double"===e.type)return(e=>{const t=gr(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=gr(e.rightTicks>0?e.totalRght/e.rightTicks:0);let a=vr(t,n);Number.isFinite(a)||(a=0);let r="";a>0?r=s.badColor.rgb().string():a<0&&(r=s.goodColor.rgb().string());let i="";return 0===e.totalLeft&&e.totalRght>0?i=c.diffNew:0===e.totalRght&&e.totalLeft>0?i=c.diffRemoved:0===a?i="0%":a>0?i=`+${a.toFixed(2)}%`:a<0&&(i=`${a.toFixed(2)}%`),{"data-row":`${e.type};${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:w(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:`${t} %`},{value:`${n} %`},{value:i,style:{color:r}}]}})(e);const t=Mr(p,e.name);return((e,t)=>({"data-row":`${e.type};${e.name};${e.self};${e.total}`,isRowSelected:w(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:x.format(e.self,m),style:pl(e.self,h,t)},{value:x.format(e.total,m),style:pl(e.total,d,t)}]}))(e,Rr(s,t))});return j.length>0?{bodyRows:j,type:"filled"}:{value:e.jsx("div",{className:"unsupported-format",children:c.noItemsFound}),type:"not-filled"}};function vl({tableBodyRef:n,flamebearer:a,isDoubles:r,fitMode:o,handleTableItemClick:i,highlightQuery:s,selectedItem:l,palette:c,onFocusOnNode:u,updateView:f,enableSandwichView:d=!0,virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g,menuPortalTarget:v}){const b=Ti(),[y,x]=ri({transition:!0}),[w,k]=t.useState({x:0,y:0}),[j,S]=t.useState(null),N=ul,C=t.useRef(null),T=t.useRef(null),_=t.useRef(0),M=t.useRef(0),R=t.useRef(new Map),[F,P]=t.useState(!1),[I,E]=t.useState(0),[L,D]=t.useState([]),[B,A]=t.useState({start:0,end:0}),[O,z]=t.useState(null),[$,V]=t.useState(0),[H,W]=t.useState(0);t.useEffect(()=>{if(!N)return()=>{};const e=il();C.current=e,W(e=>e+1);const t=e=>{const t=e.data;if(t&&t.type)switch(t.type){case"ready":E(t.payload.rowCount),P(!0),V(e=>e+1);break;case"range":if(t.payload.requestId!==_.current)return;D(t.payload.rows),A({start:t.payload.start,end:t.payload.end});break;case"findNode":{const e=R.current.get(t.payload.requestId);e&&(R.current.delete(t.payload.requestId),e(t.payload.node));break}}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t),e.terminate(),C.current=null,R.current.clear()}},[N]);const U=t.useCallback(e=>{if(!N||!C.current)return Promise.resolve(function(e,t){if(!e||!e.levels)return null;const{names:n,levels:a,format:r}=e,o=rr(r);let i=null;for(let e=0;e<a.length;e++){const r=a[e];for(let a=0;a<r.length;a+=o.jStep)if(n[o.getBarName(r,a)]===t){const t=o.getBarTotal(r,a);(!i||t>i.total)&&(i={i:e,j:a,total:t})}}return i?{i:i.i,j:i.j}:null}(a,e));const t=++M.current;return new Promise(n=>{var a;R.current.set(t,n),null===(a=C.current)||void 0===a||a.postMessage({type:"findNode",payload:{name:e,requestId:t}})})},[a,N]),J=t.useCallback(e=>{u&&U(e).then(e=>{e&&u(e.i,e.j)})},[u,U]),Q=t.useCallback(e=>{l.isJust&&l.value===e||i({name:e}),J(e)},[J,l,i]),X=t.useCallback((e,t)=>{e.preventDefault(),k({x:e.clientX,y:e.clientY}),S(t),x(!0)},[x]),Y=t.useCallback(()=>{x(!1),S(null)},[x]),q=t.useCallback(()=>{j&&(J(j),Y())},[j,J,Y]),Z=t.useCallback(()=>{j&&navigator.clipboard&&(navigator.clipboard.writeText(j),Y())},[j,Y]),G=t.useCallback(()=>{j&&(i({name:j}),Y())},[j,i,Y]),K=t.useCallback(()=>{j&&f&&(f("sandwich"),i({name:j}),Y())},[j,f,i,Y]),ee=t.useMemo(()=>r?[{sortable:1,name:"name",label:b.location},{sortable:1,name:"baseline",label:b.baseline,default:!0},{sortable:1,name:"comparison",label:b.comparison},{sortable:1,name:"diff",label:b.diff}]:[{sortable:1,name:"name",label:b.location},{sortable:1,name:"self",label:b.self,default:!0},{sortable:1,name:"total",label:b.total}],[b,r]),te=(e=>{const n=e.filter(e=>null==e?void 0:e.default)[0]||e[0],[a,r]=t.useState(n.name),[o,i]=t.useState("desc");return{sortBy:a,sortByDirection:o,updateSortParams:e=>{let t=o;t=a===e?"asc"===t?"desc":"asc":"desc",r(e),i(t)}}})(ee);t.useEffect(()=>{if(!N||!C.current)return;const e=C.current,t={sortBy:te.sortBy,sortByDirection:te.sortByDirection,highlightQuery:s};T.current!==a?(T.current=a,P(!1),E(0),D([]),e.postMessage({type:"init",payload:{flamebearer:a,...t}})):(P(!1),D([]),e.postMessage({type:"update",payload:t}))},[a,s,te.sortBy,te.sortByDirection,N,H]);const ne=t.useCallback((e,t)=>{z(n=>n&&n.start===e&&n.end===t?n:{start:e,end:t})},[]);t.useEffect(()=>{if(!N||!C.current||!O)return;const e=++_.current;C.current.postMessage({type:"range",payload:{start:O.start,end:O.end,requestId:e}})},[O,$,N]);const{numTicks:ae,maxSelf:re,sampleRate:oe,spyName:ie,units:se}=a,le=t.useMemo(()=>br(ae,oe,se),[ae,oe,se]),ce=t.useMemo(()=>Cr(o),[o]),ue=t.useCallback(e=>l.isJust&&l.value===e,[l]),fe=t.useCallback(t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:ce,children:e.jsx("bdi",{dir:"ltr",children:t})})}),[ce]),de=t.useCallback(e=>{const t=Mr(ie,e.name),n=Rr(c,t);return{"data-row":`single;${e.name};${e.self};${e.total}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>X(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:le.format(e.self,oe),style:pl(e.self,re,n)},{value:le.format(e.total,oe),style:pl(e.total,ae,n)}]}},[le,X,Q,i,ue,re,fe,ae,c,oe,ie]),he=t.useCallback(e=>{const t=gr(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=gr(e.rightTicks>0?e.totalRght/e.rightTicks:0);let a=vr(t,n);Number.isFinite(a)||(a=0);let r="";a>0?r=c.badColor.rgb().string():a<0&&(r=c.goodColor.rgb().string());let o="";return 0===e.totalLeft&&e.totalRght>0?o=b.diffNew:0===e.totalRght&&e.totalLeft>0?o=b.diffRemoved:0===a?o="0%":a>0?o=`+${a.toFixed(2)}%`:a<0&&(o=`${a.toFixed(2)}%`),{"data-row":`double;${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>X(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:`${t} %`},{value:`${n} %`},{value:o,style:{color:r}}]}},[X,Q,i,b,ue,fe,c]),me=t.useMemo(()=>N?L.map(e=>"double"===e.type?he(e):de(e)):[],[he,de,N,L]),pe=t.useMemo(()=>N?F&&0===I?{headRow:ee,type:"not-filled",value:e.jsx("div",{className:"unsupported-format",children:b.noItemsFound})}:{headRow:ee,type:"virtual",rowCount:I,rows:me,range:B,onRangeChange:ne}:{headRow:ee,...gl({flamebearer:a,sortBy:te.sortBy,sortByDirection:te.sortByDirection,fitMode:o,handleTableItemClick:i,highlightQuery:s,palette:c,selectedItem:l,messages:b,onRowContextMenu:X,onRowDoubleClick:Q})},[he,de,d,o,a,X,Q,ne,i,s,b,u,c,I,l,ee,te.sortBy,te.sortByDirection,f,N,me,B,F]),ge=l.isJust&&l.value===j;return e.jsxs(e.Fragment,{children:[e.jsx(nl,{...te,tableBodyRef:n,table:pe,isLoading:N&&!F,className:gs("flamegraph-table",{"flamegraph-table-doubles":r}),virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g}),e.jsxs(Go,{...y,anchorPoint:w,onClose:Y,className:sl,portal:!v||{target:v},children:[u&&e.jsxs(li,{onClick:q,children:[e.jsx(Xa,{icon:xs.faCrosshairs}),b.focusOnThisFunction]}),e.jsxs(li,{onClick:Z,children:[e.jsx(Xa,{icon:ao.faCopy}),b.copyFunctionName]}),e.jsxs(li,{onClick:G,children:[e.jsx(Xa,{icon:lo.faHighlighter}),ge?b.clearHighlight:b.highlightSimilarNodes]}),f&&d&&e.jsxs(li,{onClick:K,className:ll,children:[e.jsx(Wi,{fill:"currentColor"}),b.openInSandwichView]})]})]})}const bl=t.memo(function({flamebearer:n,fitMode:a,handleTableItemClick:r,highlightQuery:o,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u}){const f=t.useRef(null),d=t.useRef(null),h=t.useRef(null),[m,p]=t.useState(0),[g,v]=t.useState(null),b="double"===n.format;return t.useEffect(()=>{const e=f.current;if(!e)return;const t=e.offsetWidth-e.clientWidth;Number.isFinite(t)&&t!==m&&p(t)},[f.current,b,m]),t.useEffect(()=>{const e=d.current;if(!e||"undefined"==typeof document)return;const t=e.closest("[data-theme], [data-flamegraph-color-mode]")||e,n=document.createElement("div");return n.className="flamegraph-menu-portal",t.appendChild(n),v(n),()=>{n.parentElement&&n.parentElement.removeChild(n)}},[]),e.jsxs("div",{"data-testid":"table-view",ref:d,style:{"--kylin-flamegraph-scrollbar-size":`${m}px`},className:b?"flamegraph-table-wrapper flamegraph-table-wrapper--double":"flamegraph-table-wrapper",children:[e.jsx("div",{className:"flamegraph-table-scroll",ref:h,children:e.jsx(vl,{tableBodyRef:f,flamebearer:n,isDoubles:b,fitMode:a,highlightQuery:o,handleTableItemClick:r,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u,virtualize:!0,virtualizeOverscan:8,scrollRef:h,menuPortalTarget:g})}),e.jsx(ol,{tableBodyRef:f,numTicks:n.numTicks,sampleRate:n.sampleRate,units:n.units,palette:i})]})});var yl,xl,wl={},kl={};function jl(){return yl||(yl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-left",n=[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],a="f0e2",r="M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,a,r]},e.faArrowRotateLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(kl)),kl}function Sl(){return xl||(xl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jl();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faUndo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(wl)),wl}var Nl,Cl,Tl=Sl(),_l={},Ml={};function Rl(){return Nl||(Nl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="diagram-project",n=["project-diagram"],a="f542",r="M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 128 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-16-128 0 0 16c0 7.3-1.7 14.3-4.6 20.5l68.6 91.5 80 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-7.3 1.7-14.3 4.6-20.5L128 224 48 224c-26.5 0-48-21.5-48-48L0 80z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,a,r]},e.faDiagramProject=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Ml)),Ml}function Fl(){return Cl||(Cl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Rl();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faProjectDiagram=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(_l)),_l}var Pl,Il,El=Fl(),Ll={},Dl={};function Bl(){return Pl||(Pl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="ellipsis-vertical",n=["ellipsis-v"],a="f142",r="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z";e.definition={prefix:"fas",iconName:t,icon:[128,512,n,a,r]},e.faEllipsisVertical=e.definition,e.prefix="fas",e.iconName=t,e.width=128,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Dl)),Dl}function Al(){return Il||(Il=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Bl();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faEllipsisV=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Ll)),Ll}var Ol=Al(),zl="Tooltip-module_tooltipWrapper__leDK-",$l="Tooltip-module_tooltipBubble__8vweF",Vl="Tooltip-module_tooltipArrow__7wGyN";function Hl(e){if(null!=e&&!1!==e){if("string"==typeof e||"number"==typeof e)return String(e);if(Array.isArray(e)){const t=e.map(e=>Hl(e)).filter(e=>!!e);return t.length?t.join(" "):void 0}return t.isValidElement(e)?Hl(e.props.children):void 0}}const Wl=({placement:n,title:a,content:r,children:o})=>{const i=Hl(null!=a?a:r),s=t.useRef(null),[l,c]=t.useState(!1);return t.useEffect(()=>{const e=s.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");c(!!t)},[]),i?e.jsxs("span",{ref:s,className:zl,"data-placement":n||"top","data-tooltip":l?i:void 0,title:l?void 0:i,children:[o,l?e.jsxs("span",{className:$l,role:"tooltip",children:[i,e.jsx("span",{className:Vl})]}):null]}):e.jsx(e.Fragment,{children:o})};var Ul,Jl={};function Ql(){return Ul||(Ul=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="link",n=[128279,"chain"],a="f0c1",r="M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,a,r]},e.faLink=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Jl)),Jl}var Xl,Yl,ql=Ql(),Zl={},Gl={};function Kl(){return Xl||(Xl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="magnifying-glass",n=[128269,"search"],a="f002",r="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,a,r]},e.faMagnifyingGlass=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Gl)),Gl}function ec(){return Yl||(Yl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Kl();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faSearch=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Zl)),Zl}var tc=ec(),nc="Input-module_input__ulQdV";const ac=t.forwardRef(({testId:t,className:n,type:a,name:r,placeholder:o,minLength:i=0,debounceTimeout:s=100,onChange:l,value:u,htmlId:f},d)=>e.jsx(c.DebounceInput,{inputRef:d,"data-testid":t,className:`${nc} ${n||""}`,type:a,name:r,placeholder:o,minLength:i,debounceTimeout:s,onChange:l,value:u,id:f}));var rc="SharedQueryInput-module_wrapper__XRxrd",oc="SharedQueryInput-module_search__XlzRv",ic="SharedQueryInput-module_search-synced__J4T4b",sc="SharedQueryInput-module_searchWithSync__ryuQa",lc="SharedQueryInput-module_icon__Aq0Hv",cc="SharedQueryInput-module_checked__oRvod",uc="SharedQueryInput-module_sync__0IO2N",fc="SharedQueryInput-module_syncSelected__hstBI",dc="SharedQueryInput-module_searchIcon__kfJxO";const hc=({onHighlightChange:n,highlightQuery:a,sharedQuery:r,width:o})=>{const i=Ti(),s=(e=>{const n=t.useRef();return t.useEffect(()=>{n.current=e},[e]),n.current})(null==r?void 0:r.syncEnabled),l=t.useRef(null),[c,u]=t.useState(!1);t.useEffect(()=>{"string"==typeof(null==r?void 0:r.searchQuery)&&(r.syncEnabled&&n(r.searchQuery),!r.syncEnabled&&s&&s!==(null==r?void 0:r.id)&&n(""))},[null==r?void 0:r.searchQuery,null==r?void 0:r.syncEnabled]),t.useEffect(()=>{const e=l.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");u(!!t)},[]);const f=t.useMemo(()=>r&&r.syncEnabled?r.searchQuery||"":a,[r,a]),d=t.useMemo(()=>`${r?sc:oc} ${(null==r?void 0:r.syncEnabled)?ic:""}`,[r]),h=(null==r?void 0:r.syncEnabled)?i.unsyncSearchBars:i.syncSearchBars;return e.jsxs("div",{ref:l,className:rc,style:{width:o},children:[e.jsx("span",{className:dc,children:e.jsx(Xa,{icon:tc.faSearch})}),e.jsx(ac,{testId:"flamegraph-search",className:d,type:"search",name:"flamegraph-search",placeholder:c?"搜索函数 / 过滤":i.searchPlaceholder,minLength:1,debounceTimeout:100,onChange:e=>{n(e.target.value),r&&r.syncEnabled&&r.onQueryChange(e.target.value)},value:f}),r?e.jsx(Wl,{placement:"top",title:h,children:e.jsx("button",{className:r.syncEnabled?fc:uc,onClick:()=>{const e=!(null==r?void 0:r.syncEnabled)&&(null==r?void 0:r.id);null==r||r.toggleSync(e),e?null==r||r.onQueryChange(a):(n(a),null==r||r.onQueryChange(""))},children:e.jsx(Xa,{className:`${r.syncEnabled?cc:lc}`,icon:ql.faLink})})}):null]})};var mc="DiffLegend-module_flamegraph-legend__Cywr1",pc="DiffLegend-module_flamegraph-legend-list__swdXj",gc="DiffLegend-module_flamegraph-legend-item__0P-6g";function vc(t){const{palette:n,showMode:a}=t,r=function(e){switch(e){case"large":return[-100,-80,-60,-40,-20,-10,0,10,20,40,60,80,100];case"small":return[-100,-50,0,50,100];default:throw new Error(`Unsupported ${e}`)}}(a),o=Fr(n),i="small"===a?{"--legend-item-width":"32px","--legend-item-padding":"2px 2px","--legend-font-size":"10px","--legend-line-height":"1.1","--legend-item-height":"16px"}:void 0;return e.jsx("div",{"data-testid":"flamegraph-legend",className:`${mc} ${pc}`,style:i,children:r.map(t=>e.jsxs("div",{className:gc,style:{backgroundColor:o(t).rgb().toString()},children:[t>0?"+":"",t,"%"]},t))})}var bc="Dropdown-module_dropdownMenu__tbN8r",yc="Dropdown-module_dropdownMenuButton__Xy8M4";function xc({id:t,children:n,className:a,disabled:r,value:o,label:i,onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButtonClassName:m="",ariaLabel:p,portal:g,...v}){const b=v.menuButton||e.jsx(kc,{"aria-label":p,className:`${yc} ${m}`,disabled:r,type:"button",children:o||i});return e.jsxs(ii,{id:t,"aria-label":p,className:gs(a,bc),"data-testid":v["data-testid"],onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButton:b,portal:g,children:[e.jsx(ci,{children:i}),n]})}const wc=li,kc=$o;var jc="DiffLegendPaletteDropdown-module_container__h8Tts",Sc="DiffLegendPaletteDropdown-module_triggerButton__oezA6",Nc="DiffLegendPaletteDropdown-module_dropdownArrow__-Lu0w",Cc="DiffLegendPaletteDropdown-module_menuItem__5iWry",Tc="DiffLegendPaletteDropdown-module_menuItemText__a-tt0",_c="DiffLegendPaletteDropdown-module_dropdownMenu__G0NkR",Mc="DiffLegendPaletteDropdown-module_menuItemWrapper__vAw-Q",Rc="DiffLegendPaletteDropdown-module_menuItemSelected__1gu9m";const Fc=[vi,bi],Pc=t=>{const{palette:n=vi,onChange:a}=t,r=Ti(),o=e=>"Default"===e.name?r.paletteDefaultName:"Color Blind"===e.name?r.paletteColorBlindName:e.name,i=e=>"Default"===e.name?r.paletteDefaultDesc:"Color Blind"===e.name?r.paletteColorBlindDesc:"";return e.jsx("div",{className:jc,children:e.jsx(xc,{label:r.diffLegendSelectPalette,align:"end",className:_c,menuButton:e.jsxs(kc,{className:gs(yc,Sc),children:[e.jsx(vc,{palette:n,showMode:"small"}),e.jsx("span",{className:Nc})]}),onItemClick:e=>{e.value&&a(e.value)},children:Fc.map(t=>e.jsx(wc,{value:t,className:gs(Mc,t.name===n.name&&Rc),children:e.jsx("div",{className:Cc,children:e.jsxs("span",{className:Tc,children:[o(t)," ",i(t)]})})},t.name))})})};var Ic={navbar:"Toolbar-module_navbar__XN6xZ",searchWrapper:"Toolbar-module_searchWrapper__k--ua",rightSection:"Toolbar-module_rightSection__if7LO",viewType:"Toolbar-module_viewType__AKARg",toggleViewButton:"Toolbar-module_toggleViewButton__OQ9-U",fitModeButton:"Toolbar-module_fitModeButton__jOxve",selected:"Toolbar-module_selected__vwBQt",collapseNodeButton:"Toolbar-module_collapseNodeButton__bLdiw",resetViewButton:"Toolbar-module_resetViewButton__y2ebV",divider:"Toolbar-module_divider__dG6pE",itemsContainer:"Toolbar-module_itemsContainer__gSTMF",item:"Toolbar-module_item__o-hKc",moreButton:"Toolbar-module_moreButton__rhOdT",active:"Toolbar-module_active__36Kt-",navbarCollapsedItems:"Toolbar-module_navbarCollapsedItems__vojhw"};const Ec=y.bind(Ic),Lc=(e,t,n)=>{const a=0===t?e-360-5:e-360-16-5;let r=0,o=0;return n.reverse().forEach(e=>{o+=e,a<=o&&(r+=1)}),r},Dc=()=>e.jsx("div",{className:Ic.divider}),Bc=t.memo(({view:n,handleSearchChange:a,highlightQuery:r,isFlamegraphDirty:o,reset:s,updateFitMode:l,fitMode:c,updateView:u,selectedNode:f,onFocusOnSubtree:d,flamegraphType:h,enableChangingDisplay:m=!0,sharedQuery:p,ExportData:g,palette:v,setPalette:b})=>{const y=t.useRef(null),[x,w]=t.useState(!1),k=Ti();t.useEffect(()=>{const e=y.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");w(!!t)},[]);const j=x?32:44,S=x?220:360,N="double"===h&&v&&b,C=[{el:e.jsxs(e.Fragment,{children:[e.jsx(zc,{fitMode:c,updateFitMode:l}),e.jsx(Dc,{})]}),width:2*j+5},{el:e.jsx(Oc,{isFlamegraphDirty:o,reset:s}),width:j},{el:e.jsxs(e.Fragment,{children:[e.jsx(Ac,{selectedNode:f,onFocusOnSubtree:d}),e.jsx(Dc,{})]}),width:j+5},m?{el:e.jsx(Vc,{flamegraphType:h,view:n,updateView:u}),width:j*("single"===h?5:3)}:null,t.isValidElement(g)?{el:e.jsxs(e.Fragment,{children:[e.jsx(Dc,{}),g]}),width:j+5}:null].filter(e=>null!==e),T=C.reduce((e,t)=>[...e,t.width],[]),{isCollapsed:_,collapsedItemsNumber:M,handleMoreClick:R}=((e,n)=>{const[a,r]=t.useState(!0),[o,s]=t.useState(0);return t.useLayoutEffect(()=>{if(e.current){const{width:t}=e.current.getBoundingClientRect(),a=Lc(t,o,n);s(a)}},[e.current,n]),i(e,e=>{const{width:t}=e.target.getBoundingClientRect(),a=Lc(t,o,n);s(a),r(!0)}),{isCollapsed:a,handleMoreClick:()=>{r(e=>!e)},collapsedItemsNumber:o}})(y,T),F=C.reduce((e,t,n)=>(n<M?e.hidden.push(t):e.visible.push(t),e),{visible:[],hidden:[]});return e.jsx("div",{role:"toolbar",ref:y,children:e.jsxs("div",{className:Ic.navbar,children:[e.jsx("div",{className:Ic.searchWrapper,children:e.jsx(hc,{width:S,onHighlightChange:a,highlightQuery:r,sharedQuery:p})}),e.jsxs("div",{className:Ic.rightSection,children:[N&&e.jsxs(e.Fragment,{children:[e.jsx(Pc,{palette:v,onChange:b}),e.jsx(Dc,{})]}),e.jsxs("div",{className:Ic.itemsContainer,children:[F.visible.map((t,n)=>e.jsx("div",{className:Ic.item,style:{width:t.width},children:t.el},n)),0!==M&&e.jsx(Wl,{placement:"top",title:k.more,children:e.jsx("button",{onClick:R,className:Ec({[Ic.moreButton]:!0,[Ic.active]:!_}),children:e.jsx(Xa,{icon:Ol.faEllipsisV})})})]})]}),!_&&e.jsx("div",{className:Ic.navbarCollapsedItems,children:F.hidden.map((t,n)=>e.jsx("div",{className:Ic.item,style:{width:t.width},children:t.el},n))})]})})});function Ac({onFocusOnSubtree:t,selectedNode:n}){const a=Ti(),r=n.mapOr(()=>{},e=>()=>t(e.i,e.j));return e.jsx(Wl,{placement:"top",title:a.collapseNodesAbove,children:e.jsx("div",{children:e.jsx(Ks,{disabled:!n.isJust,onClick:r,className:Ic.collapseNodeButton,"aria-label":a.collapseNodesAbove,children:e.jsx(Xa,{icon:mo.faCompressAlt})})})})}function Oc({isFlamegraphDirty:t,reset:n}){const a=Ti();return e.jsx(Wl,{placement:"top",title:a.resetView,children:e.jsx("span",{children:e.jsx(Ks,{id:"reset",disabled:!t,onClick:n,className:Ic.resetViewButton,"aria-label":a.resetView,children:e.jsx(Xa,{icon:Tl.faUndo})})})})}function zc({fitMode:t,updateFitMode:n}){const a=Ti(),r=e=>t===e;return e.jsxs(e.Fragment,{children:[e.jsx(Wl,{placement:"top",title:a.headFirst,children:e.jsx(Ks,{onClick:()=>n("HEAD"),className:Ec({[Ic.fitModeButton]:!0,[Ic.selected]:r("HEAD")}),children:e.jsx(Ui,{})})}),e.jsx(Wl,{placement:"top",title:a.tailFirst,children:e.jsx(Ks,{onClick:()=>n("TAIL"),className:Ec({[Ic.fitModeButton]:!0,[Ic.selected]:r("TAIL")}),children:e.jsx(Ji,{})})})]})}const $c=(t,n)=>"single"===t?[{label:n.viewFlamegraph,value:"flamegraph",Icon:Hi},{label:n.viewTable,value:"table",Icon:$i},{label:n.viewTableAndFlamegraph,value:"both",Icon:Vi},{label:n.viewSandwich,value:"sandwich",Icon:Wi},{label:n.viewGraphviz,value:"graphviz",Icon:()=>e.jsx(Xa,{icon:El.faProjectDiagram})}]:[{label:n.viewFlamegraph,value:"flamegraph",Icon:Hi},{label:n.viewTable,value:"table",Icon:$i},{label:n.viewTableAndFlamegraph,value:"both",Icon:Vi}];function Vc({view:t,updateView:n,flamegraphType:a}){const r=Ti(),o=$c(a,r);return e.jsx("div",{className:Ic.viewType,children:o.map(({label:a,value:r,Icon:o})=>e.jsx(Wl,{placement:"top",title:a,children:e.jsx(Ks,{"data-testid":r,onClick:()=>n(r),className:Ec({[Ic.toggleViewButton]:!0,selected:t===r}),children:e.jsx(o,{})})},r))})}function Hc(e,t){const n={},a={};let r={name:"total",children:[],self:[],total:[],key:"/total"};return(t?[e,t]:[e]).forEach((e,t)=>{var o,i;for(let s=0;s<e.levels.length;s+=1)for(let l=0;l<e.levels[s].length;l+=4){const c=[t,s,l].join("/"),u=e.names[e.levels[s][l+3]],f=e.levels[s][l+0],d=e.levels[s][l+1],h=e.levels[s][l+2];let m="";if(0!==s){const n=s-1,r=e.levels[n];for(let e=0;e<r.length;e+=4){const o=r[e+0],i=r[e+1];if(f>=o&&f<o+i){const r=[t,n,e].join("/");m=a[r].key;break}}}const p=[m||"",u].join("/"),g=!n[p];n[p]||(n[p]={name:u,children:[],self:[],total:[],key:p});const v=n[p];(o=v.total)[t]||(o[t]=0),v.total[t]+=d,(i=v.self)[t]||(i[t]=0),v.self[t]+=h,a[c]=v,m&&g&&n[m].children.push(v),0===s&&(r=v)}}),r}const Wc=e=>{const t={maxSelf:100,names:[],levels:[]},n=(e,a,r)=>{var o;const{name:i,children:s,self:l,total:c,offset:u}=e;t.names.push(i),(o=t.levels)[a]||(o[a]=[]),t.maxSelf=Math.max(t.maxSelf,l[0]||0),t.levels[a]=t.levels[a].concat([r,c[0]||0,l[0]||0,t.names.length-1]);for(let e=0;e<s.length;e+=1){r+=n(s[e],a+1,r)}return u||c[0]||0};return n(e,0,0),t};function Uc(e){const t=new Map;for(let n=0;n<e.children.length;n+=1)t.has(e.children[n].name)||t.set(e.children[n].name,e.children[n]);for(let n=0;n<e.children.length;n+=1){const a=e.children[n],r=t.get(e.children[n].name);r&&r!==a&&(r.total[0]+=a.total[0],r.self[0]+=a.self[0],r.children=r.children.concat(a.children))}e.children=Array.from(t.values());for(let t=0;t<e.children.length;t+=1)Uc(e.children[t])}function Jc(e,t){const n=function(e,t){const n=Hc(e),a={format:"single",numTicks:0,maxSelf:100,sampleRate:100,names:[],levels:[],units:e.units,spyName:e.spyName},r={name:t,total:[],self:[0],children:[]},o=e=>{e.name===t&&(a.numTicks+=e.total[0],r.total=[a.numTicks],r.children=r.children.concat(e.children));for(let t=0;t<e.children.length;t+=1)o(e.children[t])};return o(n),Uc(r),{...a,...Wc(r)}}(JSON.parse(JSON.stringify(e)),t);return n}function Qc(e,t){const n=function(e,t){const n=Hc(e),a={format:"single",maxSelf:100,sampleRate:100,numTicks:0,names:[],levels:[],units:e.units,spyName:e.spyName},r=[],o=[],i={name:t,total:[0],self:[0],children:[]},s=(e,n=[])=>{const i=n.concat([{...e,children:[]}]);e.name===t&&(o.push(i),r.push(e.total[0]),a.numTicks+=e.total[0]);for(let t=0;t<e.children.length;t+=1)s(e.children[t],i)};s(n),o.forEach((e,t)=>{i.children.push(((e,t)=>{const n={};let a=n;return e.forEach(({name:e,...n})=>{const r={name:e,...n,total:[t]};a.children=[r],a=r}),n.children[0]})(e.reverse(),r[t]))}),Uc(i);const l=Wc(i);return l.levels=l.levels.reverse().slice(0,-1),{...a,...l}}(JSON.parse(JSON.stringify(e)),t);return n}var Xc={flamegraphContainer:"FlamegraphRenderer-module_flamegraphContainer__-7FRV",createdBy:"FlamegraphRenderer-module_createdBy__rHAOT",horizontal:"FlamegraphRenderer-module_horizontal__zs7--",vertical:"FlamegraphRenderer-module_vertical__fRcHg",panesWrapper:"FlamegraphRenderer-module_panesWrapper__L-mlA",tablePane:"FlamegraphRenderer-module_tablePane__Gin7Y",sandwichPane:"FlamegraphRenderer-module_sandwichPane__IEOyR",sandwichPaneInfo:"FlamegraphRenderer-module_sandwichPaneInfo__5hT4a",arrow:"FlamegraphRenderer-module_arrow__dPzpE",sandwichTop:"FlamegraphRenderer-module_sandwichTop__7N0ZY",sandwichBottom:"FlamegraphRenderer-module_sandwichBottom__Dc64g",name:"FlamegraphRenderer-module_name__XRbN9"};function Yc(e){const t=[];return Object.keys(e).forEach(n=>{var a;t.push(`${n}="${a=String(e[n]||""),a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`)}),`[${t.join(" ")}]`}function qc(e,t){return`${(100*e/t).toFixed(2)}%`}function Zc(e,t){let n,a,r,o;t?(n=.1,a=.93):(n=1,a=.7),e=Math.max(-1,Math.min(1,e)),Math.abs(e)<.2&&(n*=Math.abs(e)/.2),e>0&&(e**=1-.7),e<0&&(e=-((-e)**(1-.7))),e<0?(o=a,r=a*(1+n*e)):(r=a,o=a*(1-n*e));const i=a*(1-n);return`#${Math.floor(255*r).toString(16).padStart(2,"0")}${Math.floor(255*o).toString(16).padStart(2,"0")}${Math.floor(255*i).toString(16).padStart(2,"0")}`}function Gc(e,t,n,a){const{self:r}=t,{total:o}=t,i=t.name.replace(/"/g,'\\"'),s=e(r),l=8+Math.ceil(16*Math.sqrt(r/n)),c=Zc(o/a,!1),u=Zc(o/a,!0),f=function(e,t,n,a,r){let o="";o=`${function(e){return e.replace(/.*\//,"")}(t)}\n`;const i=e(n);0!==n?o=`${o+i} (${qc(n,r)})`:o+="0";let s=i;a!==n&&(o+=0!==n?"\n":" ",s=e(a),o=`${o}of ${s} (${qc(a,r)})`);return o}(e,i,r,o,a),d={label:f,id:`node${t.index}`,fontsize:l,shape:"box",tooltip:`${i} (${s})`,color:c,fontcolor:"#000000",style:"filled",fontname:"",fillcolor:u};return`N${t.index} ${Yc(d)}`}function Kc(e){if("double"===e.metadata.format)return"diff flamegraphs are not supported";const t=Hc(e.flamebearer),n=[],a=[];const[r,o,,i]=function e(t,n,a,r,o){return t.children.forEach(t=>{const[i,s]=e(t,n,a,r,o);n=Math.max(n,i),a=Math.max(a,s)}),n=Math.max(n,t.self[0]),a=Math.max(a,t.total[0]),r+=t.self[0],o+=t.total[0],[n,a,r,o]}(t,0,0,0,0),{sampleRate:s,units:l}=e.metadata,c=br(o,s,l),u=e=>c.format(e,s,!0);let f={};const d={};let h=0;function m(e,t){return-1===t.indexOf(e.name)&&(f[e.name]?(f[e.name].self+=e.self[0],f[e.name].total+=e.total[0]):(h+=1,f[e.name]={index:h,name:e.name,self:e.self[0],total:e.total[0],parents:[],children:[]})),e.children.forEach(n=>{const a=m(n,t.concat([e.name])),r=`${e.name}/${n.name}`;n.name!==e.name&&(d[r]?d[r].weight+=n.total[0]:d[r]={from:f[e.name],to:a,weight:n.total[0],residual:!1},a.parents.push(d[r]),f[e.name].children.push(d[r]))}),f[e.name]}t.children.forEach(e=>{m(e,[])});const p=.005*i,g=.001*i;function v(e,t){let n=0,a=t;if(e.forEach(e=>{e.weight>0&&(a+=Math.abs(e.weight))}),0!==a&&(e.forEach(e=>{const t=Math.abs(e.weight)/a;n+=-t*Math.log2(t)}),t>0)){const e=Math.abs(t)/a;n+=-e*Math.log2(e)}return n}Object.keys(f).forEach(e=>{f[e].total<p&&delete f[e]});const b={};Object.keys(f).forEach(e=>{b[f[e].name]=function(e){let t=0;return 0===e.parents.length?t+=1:t+=v(e.parents,0),0===e.children.length?t+=1:t+=v(e.children,e.self),t*e.total+e.self}(f[e])});const y=Object.values(f).sort((e,t)=>{const n=b[e.name],a=b[t.name];return n!==a?a-n:e.name!==t.name?e.name<t.name?-1:1:e.self!==t.self?a-n:e.name<t.name?-1:1}),x={};function w(e){const[t,n]=[e.from,e.to],a={},r=[n];for(;r.length>0;){const n=r.shift();for(let o=0;o<n.parents.length;o+=1){const i=n.parents[o];if(e!==i&&!a[i.from.name]){if(i.from===t)return!0;a[i.from.name]=!0,r.push(i.from)}}}return!1}return y.forEach(e=>{x[e.name]=e}),y.slice(80).forEach(e=>{delete x[e.name]}),function e(t,n){const a=!x[t.name];t.children.forEach(r=>{const o=!x[r.name];if(e(r,a?n:t),!o&&n&&a){const e=`${n.name}/${r.name}`;d[e]||(d[e]={from:f[n.name],to:f[r.name],weight:0,residual:!0}),d[e].weight+=r.total[0],d[e].residual=!0}})}(t,null),f=x,y.reverse().forEach(e=>{const t=e.parents.sort((e,t)=>t.weight-e.weight),n=[];for(let e=0;e<t.length;e+=1){const a=t[e];if(!a.residual)break;w(a)&&(n.push(a),delete d[`${a.from.name}/${a.to.name}`])}n.forEach(e=>{e.from.children=e.from.children.filter(t=>t.to!==e.to),e.to.parents=e.to.parents.filter(t=>t.from!==e.from)})}),Object.keys(d).forEach(e=>{const t=d[e];f[t.from.name]||delete d[e],f[t.to.name]||delete d[e],t.weight<g&&delete d[e]}),Object.keys(f).forEach(e=>{n.push(Gc(u,f[e],r,o))}),Object.keys(d).forEach(e=>{a.push(function(e,t,n){const a=t.from.name.replace(/"/g,'\\"'),r=t.to.name.replace(/"/g,'\\"'),o=t.weight,i=e(t.weight),s=`${a} -> ${r} (${i})`,l={label:i,weight:1+100*o/n,penwidth:1+5*o/n,tooltip:s,labeltooltip:s,fontname:"",color:Zc(o/n,!1),style:t.residual?"dotted":""};return`N${t.from.index} -> N${t.to.index} ${Yc(l)}`}(u,d[e],o))}),`digraph "unnamed" {\n fontname= ""\n ${n.join("\n")}\n ${a.join("\n")}\n }`}var eu="GraphVizPanel-module_graphVizPane__B18cQ";const tu=()=>null;function nu({flamebearer:n}){var a,r;const o=n,i=(null===(a=o.metadata)||void 0===a?void 0:a.format)&&(null===(r=o.flamebearer)||void 0===r?void 0:r.levels),s=`graphviz-pane-${(null==o?void 0:o.appName)||String((new Date).valueOf())}`,l=t.useMemo(()=>Kc(o),[JSON.stringify(o)]);return e.jsx("div",{className:eu,children:i?e.jsx(tu,{options:{zoom:!0,width:"150%",height:"100%",scale:1,useWorker:!1},dot:l}):e.jsx("div",{children:"NO DATA"})},s)}function au(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const a=[0,Math.floor(n/2),n-1];for(let n=0;n<a.length;n+=1){const r=e[a[n]];if(!r||0===r.length)continue;const o=Math.min(8,r.length);for(let e=0;e<o;e+=1)t^=0|r[e],t=Math.imul(t,16777619);for(let e=Math.max(0,r.length-o);e<r.length;e+=1)t^=0|r[e],t=Math.imul(t,16777619)}return t>>>0}function ru(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const a=Math.min(32,n),r=[...Array.from({length:a},(e,t)=>t),...Array.from({length:a},(e,t)=>n-a+t)];for(let n=0;n<r.length;n+=1){const a=e[r[n]]||"";for(let e=0;e<a.length;e+=1)t^=a.charCodeAt(e),t=Math.imul(t,16777619)}return t>>>0}function ou(e){var t,n,a,r,o,i;const s=e.__kylinSignature;if(s)return s;const l=e,c=[e.format,e.numTicks,e.sampleRate,e.units,e.maxSelf,null!==(n=null===(t=e.names)||void 0===t?void 0:t.length)&&void 0!==n?n:0,null!==(r=null===(a=e.levels)||void 0===a?void 0:a.length)&&void 0!==r?r:0,null!==(o=l.leftTicks)&&void 0!==o?o:"na",null!==(i=l.rightTicks)&&void 0!==i?i:"na",au(e.levels),ru(e.names||[])].join("|");return e.__kylinSignature=c,c}function iu(e,t){const n=[...t];function a(e,t,n){for(const a of e){let e=0;for(let r=t;r<a.length;r+=n)a[r]-=e,e+=a[r]+a[r+1]}}return"double"===e?(a(n,0,7),a(n,3,7)):a(n,0,4),n}function su(e,t){const n=[...t];function a(e,t,n){for(const a of e){let e=0;for(let r=t;r<a.length;r+=n)a[r]+=e,e=a[r]+a[r+1]}}return"double"===e?(a(n,0,7),a(n,3,7)):a(n,0,4),n}function lu(e){if(e.profile&&e.flamebearer&&console.warn("'profile' and 'flamebearer' properties are mutually exclusive. Please use profile if possible."),e.profile){const n=e.profile,a={...n,flamebearer:{...n.flamebearer}};n.__kylinDecoded||((t=a).flamebearer.levels=su(t.metadata.format,t.flamebearer.levels),n.__kylinDecoded=!0,a.__kylinDecoded=!0);const r={...a,...a.metadata,...a.flamebearer,flamebearer:void 0,metadata:void 0};return delete r.flamebearer,delete r.metadata,r}var t;if(e.flamebearer)return e.flamebearer;return{format:"single",names:[],units:"unknown",levels:[[]],spyName:"unknown",numTicks:0,sampleRate:0,maxSelf:0}}class cu extends t.Component{constructor(t){super(t),this.resetFlamegraphState={focusedNode:n.Maybe.nothing(),zoom:n.Maybe.nothing()},this.initialFlamegraphState=this.resetFlamegraphState,this.calcNewConfigs=(e,t)=>{const n=this.state.flamegraphConfigs,a=(e,t,n)=>{const a=(e,t,n)=>e.names[rr(e.format).getBarName(e.levels[t],n)];if(n.isNothing)return!0;try{const r=n,o=a(e,r.value.i,r.value.j);return o===a(t,r.value.i,r.value.j)}catch{return!1}};a(e,t,this.state.flamegraphConfigs.zoom)||(n.zoom=this.resetFlamegraphState.zoom);return a(e,t,this.state.flamegraphConfigs.focusedNode)||(n.focusedNode=this.resetFlamegraphState.focusedNode),n},this.onSearchChange=e=>{this.setState({searchQuery:e})},this.isSameFlamebearer=(e,t)=>function(e,t){return ou(e)===ou(t)}(e,t),this.onReset=()=>{this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,...this.initialFlamegraphState},selectedItem:n.Maybe.nothing()})},this.onFlamegraphZoom=e=>{e.isJust&&0===e.value.i&&0===e.value.j?this.onReset():this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,zoom:e}})},this.onFocusOnNode=(e,t)=>{if(0===e&&0===t)return void this.onReset();let a={...this.state.flamegraphConfigs};const{zoom:r}=this.state.flamegraphConfigs;r.isJust&&r.value.i<=e&&(a={...a,zoom:this.initialFlamegraphState.zoom}),this.setState({...this.state,flamegraphConfigs:{...a,focusedNode:n.Maybe.just({i:e,j:t})}})},this.isNameInFocusedSubtree=e=>{const{focusedNode:t}=this.state.flamegraphConfigs;if(t.isNothing)return!0;const{flamebearer:n}=this.state;if(!n||!n.levels)return!0;const{names:a,levels:r,format:o}=n,i=rr(o),s=t.value.i,l=t.value.j,c=r[s];if(!c)return!0;const u=i.getBarOffset(c,l),f=u+i.getBarTotal(c,l);for(let t=s;t<r.length;t++){const n=r[t];for(let t=0;t<n.length;t+=i.jStep){const r=i.getBarOffset(n,t),o=i.getBarTotal(n,t);if(r>=u&&r+o<=f){if(a[i.getBarName(n,t)]===e)return!0}}}return!1},this.setActiveItem=e=>{const{name:t}=e;if(this.state.selectedItem.isJust&&t===this.state.selectedItem.value)return void this.setState({selectedItem:n.Maybe.nothing()});this.isNameInFocusedSubtree(t)?this.setState({selectedItem:n.Maybe.just(t)}):this.setState({selectedItem:n.Maybe.just(t),flamegraphConfigs:{...this.state.flamegraphConfigs,focusedNode:this.resetFlamegraphState.focusedNode}})},this.getHighlightQuery=()=>this.state.selectedItem.isJust?this.state.selectedItem.value:this.state.searchQuery,this.updateView=e=>{"sandwich"===e&&this.setState({searchQuery:"",flamegraphConfigs:this.resetFlamegraphState}),this.setState({view:e})},this.updateFlamegraphDirtiness=()=>{const e=this.isDirty();this.setState({isFlamegraphDirty:e})},this.updateFitMode=e=>{this.setState({fitMode:e})},this.clearFocus=()=>{this.setState(e=>({...e,flamegraphConfigs:{...e.flamegraphConfigs,...this.resetFlamegraphState}}))},this.getActiveRange=()=>{const{flamebearer:e}=this.state,{zoom:t,focusedNode:n}=this.state.flamegraphConfigs,a=e.numTicks;if(!a)return{rangeMin:0,rangeMax:1};const r=rr(e.format),o=t=>{const n=e.levels[t.i];if(!n)return{rangeMin:0,rangeMax:1};const o=r.getBarOffset(n,t.j),i=r.getBarTotal(n,t.j);return{rangeMin:o/a,rangeMax:(o+i)/a}};return t.match({Just:e=>n.match({Just:t=>{const n=o(t),a=o(e);return n.rangeMax-n.rangeMin<a.rangeMax-a.rangeMin?n:a},Nothing:()=>o(e)}),Nothing:()=>n.match({Just:e=>o(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})},this.isDirty=()=>this.state.selectedItem.isJust||JSON.stringify(this.initialFlamegraphState)!==JSON.stringify(this.state.flamegraphConfigs),this.handleSetPalette=e=>{this.setState({palette:e})},this.render=()=>{var t;const n=e.jsx("div",{className:Hr(Xc.tablePane,"vertical"===this.state.panesOrientation?Xc.vertical:Xc.horizontal),children:e.jsx(bl,{"data-testid":"table-view",flamebearer:this.state.flamebearer,fitMode:this.state.fitMode,highlightQuery:this.state.searchQuery,selectedItem:this.state.selectedItem,handleTableItemClick:this.setActiveItem,palette:this.state.palette,onFocusOnNode:this.onFocusOnNode,updateView:this.props.onlyDisplay?void 0:this.updateView,enableSandwichView:this.props.enableSandwichView})},"table-pane"),a=this.shouldShowToolbar(),r=!this.state.flamebearer||this.state.flamebearer.names.length<=1,o=this.context,i="Location"!==o.location,s=this.state.flamebearer.numTicks,l=br(s,this.state.flamebearer.sampleRate,this.state.flamebearer.units).format(s,this.state.flamebearer.sampleRate),c=mr(l,i)||l,f=function(e,t=pr){const n=Math.abs(e);for(const{value:a,label:r}of t)if(n>=a)return`${(e/a).toFixed(2).replace(/\.?0+$/,"")} ${r}`;return dr(e)}(s,o.sampleCountFormat),d=o.tooltipSamples.replace(/[::]\s*$/,""),h=(null===(t=o.tooltipUnitTitles[this.state.flamebearer.units])||void 0===t?void 0:t.formattedValue)||o.tooltipUnitTitles.unknown.formattedValue,m=this.getActiveRange(),p=m.rangeMin>0||m.rangeMax<1,g=Math.max(0,Math.min(s,(m.rangeMax-m.rangeMin)*s)),v=s>0?g/s*100:0,b=(()=>{const e=rr(this.state.flamebearer.format),t=this.state.flamegraphConfigs.focusedNode.mapOrElse(()=>this.state.flamegraphConfigs.zoom.mapOrElse(()=>null,e=>e),e=>e);if(!t)return"";const n=this.state.flamebearer.levels[t.i];if(!n)return"";const a=e.getBarName(n,t.j);return this.state.flamebearer.names[a]||""})(),y=e.jsx(fs,{showCredit:this.props.showCredit,flamebearer:this.state.flamebearer,highlightQuery:this.getHighlightQuery(),setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,updateView:this.props.onlyDisplay?void 0:this.updateView,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:a,setPalette:this.handleSetPalette,enableSandwichView:this.props.enableSandwichView,breadcrumb:r?void 0:{totalValueText:c,totalSamplesText:f,samplesLabel:d,unitLabel:h,hasFocus:p,focusPercent:v,focusLabel:b,ofTotalPlacement:i?"before":"after",ofTotalLabel:o.ofTotal,clearFocusLabel:o.clearFocus,onClearFocus:this.clearFocus}},"flamegraph-pane"),x=(()=>{if("sandwich"!==this.state.view)return e.jsx("div",{className:Xc.sandwichPane},"sandwich-pane");if(this.state.selectedItem.isNothing)return e.jsx("div",{className:Xc.sandwichPane,children:e.jsxs("div",{className:Hr(Xc.sandwichPaneInfo,"vertical"===this.state.panesOrientation?Xc.vertical:Xc.horizontal),children:[e.jsx("div",{className:Xc.arrow}),"Select a function to view callers/callees sandwich view"]})},"sandwich-pane");const t=Qc(this.state.flamebearer,this.state.selectedItem.value),n=Jc(this.state.flamebearer,this.state.selectedItem.value),r=t=>e.jsx(fs,{disableClick:!0,showCredit:this.props.showCredit,highlightQuery:"",setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:a,setPalette:this.handleSetPalette,...t});return e.jsxs("div",{className:Xc.sandwichPane,children:[e.jsxs("div",{className:Xc.sandwichTop,children:[e.jsx("span",{className:Xc.name,children:"Callers"}),r({flamebearer:t})]}),e.jsxs("div",{className:Xc.sandwichBottom,children:[e.jsx("span",{className:Xc.name,children:"Callees"}),r({flamebearer:n,headerVisible:!1,showSingleLevel:!0})]})]},"sandwich-pane")})(),w=function(e,t,n,a,r){switch(e){case"table":return[n];case"flamegraph":return[t];case"sandwich":return[n,a];case"both":return[n,t];case"graphviz":return[r];default:throw new Error(`Invalid view '${e}'`)}}(this.state.view,y,n,x,e.jsx(nu,{flamebearer:this.state.flamebearer}));return e.jsxs("div",{children:[e.jsxs("div",{children:[a&&e.jsx(Bc,{sharedQuery:this.props.sharedQuery,enableChangingDisplay:!this.props.onlyDisplay,flamegraphType:this.state.flamebearer.format,view:this.state.view,handleSearchChange:this.onSearchChange,reset:this.onReset,updateView:this.updateView,updateFitMode:this.updateFitMode,fitMode:this.state.fitMode,isFlamegraphDirty:this.isDirty(),selectedNode:this.state.flamegraphConfigs.zoom,highlightQuery:this.state.searchQuery,onFocusOnSubtree:this.onFocusOnNode,ExportData:this.props.ExportData,palette:this.state.palette,setPalette:this.handleSetPalette}),this.props.children,e.jsx("div",{className:`${Xc.flamegraphContainer} ${Hr("vertical"===this.state.panesOrientation?Xc.vertical:Xc.horizontal,Xc[this.state.panesOrientation],Xc.panesWrapper)}`,children:r?e.jsx(Ur,{}):w.map(e=>e)})]}),this.props.showPyroscopeLogo&&e.jsxs("div",{className:Xc.createdBy,children:["Created by",e.jsxs("a",{href:"https://twitter.com/PyroscopeIO",rel:"noreferrer",target:"_blank",children:[e.jsx(u,{width:"30",height:"30"}),"@PyroscopeIO"]})]})]})},this.state={isFlamegraphDirty:!1,view:this.props.onlyDisplay?this.props.onlyDisplay:"both",fitMode:"HEAD",flamebearer:lu(t),panesOrientation:t.panesOrientation?t.panesOrientation:"horizontal",searchQuery:"",selectedItem:n.Maybe.nothing(),flamegraphConfigs:this.initialFlamegraphState,palette:vi}}componentDidUpdate(e,t){if(e.profile!==this.props.profile||e.flamebearer!==this.props.flamebearer){const e=t.flamebearer,a=lu(this.props);if(!this.isSameFlamebearer(e,a)){const t=this.calcNewConfigs(e,a);return void this.setState({flamebearer:a,flamegraphConfigs:{...this.state.flamegraphConfigs,...t},selectedItem:n.Maybe.nothing()})}}t.flamegraphConfigs!==this.state.flamegraphConfigs&&this.updateFlamegraphDirtiness()}shouldShowToolbar(){return void 0===this.props.showToolbar||this.props.showToolbar}}cu.contextType=Ni,cu.defaultProps={showCredit:!1};const uu={showPyroscopeLogo:!1},fu=(e,t)=>{if(t)return t;const n=null!=e?e:"auto";return"zh-CN"===("auto"===n?"undefined"!=typeof navigator&&navigator.language&&navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en":n)?ji:ki};exports.Box=function(t){const{children:n,noPadding:a,className:r="",theme:o="dark"}=t,i=a?"":Ya.padding;return e.jsx("div",{className:`${Ya.box} ${i} ${r}`,"data-theme":o,children:n})},exports.DefaultPalette=vi,exports.Flamegraph=$r,exports.FlamegraphI18nProvider=Ci,exports.FlamegraphRenderer=n=>{const{i18n:a,locale:r,colorMode:o="light",sandwich:i=!0,...s}=n,l=t.useMemo(()=>fu(r,a),[r,a]),c=t.useMemo(()=>(e=>{switch(e){case"dark":return"ps-theme-dark";case"kylin":return"ps-theme-kylin";default:return"ps-theme-light"}})(o),[o]);return e.jsx("pyro-flamegraph",{className:c,children:e.jsx(Ci,{messages:l,children:e.jsx(cu,{...uu,enableSandwichView:i,...s})})})},exports.convertJaegerTraceToProfile=function(e){const t={numTicks:0,maxSelf:0,names:[],levels:[]},n={},a={children:[]};return e.spans.forEach(e=>{e.children=[],n[e.spanID]=e}),e.spans.forEach(e=>{let t=a;e.references&&e.references.length>0&&(t=n[e.references[0].spanID]||a),t.children.push(e)}),function e(t,n){(t.children||[]).forEach(t=>e(t));let a=0;const r=f(t.children||[],e=>e.operationName);t.children=d(r,e=>{const t=e[0];for(let n=1;n<e.length;n+=1)t.duration+=e[n].duration;return a+=t.duration,t}),t.total=t.duration||a,t.self=Math.max(0,t.total-a)}(a),function n(a,r,o){var i;return t.numTicks||(t.numTicks=a.total),(i=t.levels)[r]||(i[r]=[]),t.levels[r].push(o),t.levels[r].push(a.total),t.levels[r].push(a.self),t.names.push((a.processID?`${e.processes[a.processID].serviceName}: `:"")+(a.operationName||"total")),t.levels[r].push(t.names.length-1),(a.children||[]).forEach(e=>{o+=n(e,r+1,o)}),a.total}(a,0,0),t.levels=iu("single",t.levels),{version:1,flamebearer:t,metadata:{format:"single",units:"trace_samples",spyName:"tracing",sampleRate:1e6}}},exports.diffTwoProfiles=function(e,t){e.flamebearer.levels=su("single",e.flamebearer.levels),t.flamebearer.levels=su("single",t.flamebearer.levels);const n=function(e,t){const n={format:"double",numTicks:e.numTicks+t.numTicks,leftTicks:e.numTicks,rightTicks:t.numTicks,maxSelf:100,sampleRate:e.sampleRate,names:[],levels:[],units:e.units,spyName:e.spyName},a=Hc(e,t),r=(e,t,a,o)=>{var i;const{name:s,children:l,self:c,total:u}=e;n.names.push(s),(i=n.levels)[t]||(i[t]=[]),n.maxSelf=Math.max(n.maxSelf,c[0]||0,c[1]||0),n.levels[t]=n.levels[t].concat([a,u[0]||0,c[0]||0,o,u[1]||0,c[1]||0,n.names.length-1]);for(let e=0;e<l.length;e+=1){const[n,i]=r(l[e],t+1,a,o);a+=n,o+=i}return[u[0]||0,u[1]||0]};return r(a,0,0,0),n}(e.flamebearer,t.flamebearer);n.levels=iu("double",n.levels);const a={...e.metadata};return a.format="double",{version:1,flamebearer:n,metadata:a,leftTicks:e.flamebearer.numTicks,rightTicks:t.flamebearer.numTicks}},exports.flamegraphDefaultMessages=ki,exports.flamegraphZhCNMessages=ji;
|
|
17
|
+
*/var Uc,Jc=(Hc||(Hc=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=a(r,o));return r}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Wc)),Wc.exports),Qc=s(Jc),qc={};function Xc(){return Uc||(Uc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="crosshairs",n=[],r="f05b",a="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM131.2 288c12.7 62.7 62.1 112.1 124.8 124.8l0-12.8c0-17.7 14.3-32 32-32s32 14.3 32 32l0 12.8c62.7-12.7 112.1-62.1 124.8-124.8L432 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l12.8 0C432.1 161.3 382.7 111.9 320 99.2l0 12.8c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-12.8C193.3 111.9 143.9 161.3 131.2 224l12.8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-12.8 0zM288 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faCrosshairs=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(qc)),qc}var Yc,Kc=Xc(),Zc={};function Gc(){return Yc||(Yc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-left",n=[9001],r="f053",a="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,r,a]},e.faChevronLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Zc)),Zc}var eu,tu=Gc(),nu={};function ru(){return eu||(eu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-right",n=[9002],r="f054",a="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,r,a]},e.faChevronRight=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(nu)),nu}var au=ru(),ou="Table-module_table__6A8SM",iu="Table-module_sortable__J6kyp",su="Table-module_sortArrow__Nrncn",lu="Table-module_sortArrowUp__WmbEG",cu="Table-module_sortArrowDown__Gyue1",uu="Table-module_asc__tJDI9",fu="Table-module_desc__fjVRY",du="Table-module_isRowSelected__UhIAJ",hu="Table-module_isRowDisabled__sz3NJ",mu="Table-module_virtualSpacer__C1hxH",pu="Table-module_active__EShS8",gu="Table-module_loadingSpinner__SSjMK",vu="Table-module_pagination__VXgcO",bu="Button-module_button__Ed1ge",yu="Button-module_noIcon__Uzjvv",xu="Button-module_noBox__mLreC",wu="Button-module_customIcon__-slpC",ku="Button-module_iconWithText__DQRkr",ju="Button-module_default__HhXlQ",_u="Button-module_outline__Flf4r",Nu="Button-module_float__4marx",Su="Button-module_primary__xByv0",Mu="Button-module_secondary__D0K-F",Cu="Button-module_danger__5-vIq",Tu="Button-module_grouped__j8KwB";const Ru=t.forwardRef(function({disabled:t=!1,kind:n="default",type:r="button",icon:a,iconNode:o,children:i,grouped:s,onClick:l,id:c,className:u,form:f,noBox:d,autoFocus:h,...m},p){return e.jsxs("button",{...m,id:c,ref:p,type:r,"data-testid":m["data-testid"],disabled:t,onClick:l,form:f,autoFocus:h,"aria-label":m["aria-label"],className:Qc(bu,s?Tu:"",Ou(n),u,d&&xu,o&&wu,!a&&!o&&yu),children:[a?e.jsx($r,{icon:a,className:i?ku:""}):null,o,i]})});function Ou(e){switch(e){case"default":return ju;case"primary":return Su;case"secondary":return Mu;case"danger":return Cu;case"outline":return _u;case"float":return Nu;default:throw Error(`Unsupported kind ${e}`)}}function Eu({row:n}){const{cells:r,isRowSelected:a,isRowDisabled:o,className:i,onClick:s,onDoubleClick:l,onContextMenu:c,...u}=n,f=t.useRef(Math.random()).current;return e.jsx("tr",{...u,onClick:s,onDoubleClick:l,onContextMenu:c,className:fs(i,{[du]:a,[hu]:o}),children:r&&r.map(({style:t,value:n,...r},a)=>e.jsx("td",{style:t,...r,children:n},f+a))})}function Pu({sortByDirection:n,sortBy:r,updateSortParams:a,table:o,tableBodyRef:i,className:s,isLoading:l,itemsPerPage:c,virtualize:u,virtualizeRowHeight:f,virtualizeOverscan:d=6,scrollRef:h,disableSort:m}){const p=!m&&n&&r&&a,[g,v]=t.useState(0),[b,y]=t.useState(0),[x,w]=t.useState(null),[k,j]=t.useState(null),_=t.useRef(null),N=t.useRef(null);t.useLayoutEffect(()=>{(null==h?void 0:h.current)&&h.current!==k&&j(h.current)},[null==h?void 0:h.current,k]),t.useEffect(()=>{if(!k||!u)return()=>{};const e=()=>{_.current&&cancelAnimationFrame(_.current),_.current=requestAnimationFrame(()=>{y(k.scrollTop||0)})};return k.addEventListener("scroll",e,{passive:!0}),()=>{k.removeEventListener("scroll",e),_.current&&cancelAnimationFrame(_.current)}},[k,u]),t.useEffect(()=>{if(!u||x||!(null==i?void 0:i.current))return;const e=i.current.querySelectorAll("tr[data-row]");if(!e.length)return;const t=e[0].getBoundingClientRect();t.height&&w(t.height)},[u,x,null==i?void 0:i.current,o]);const S="filled"===o.type?Fu(o.bodyRows,g,c):null,M="virtual"===o.type?o.rowCount:S?S.length:0,C=f||x||26,T=!!u&&!!k&&("filled"===o.type||"virtual"===o.type)&&C>0,R=T?(()=>{const e=k.clientHeight||0,t=Math.max(0,Math.floor(b/C)-d),n=Math.min(M,Math.ceil((b+e)/C)+d),r=t*C,a=Math.max(0,(M-n)*C),i="filled"===o.type&&S?S.slice(t,n):[];return{viewportHeight:e,totalRows:M,startIndex:t,endIndex:n,topSpacer:r,bottomSpacer:a,visibleRows:i}})():null,O=!!u&&!T&&"filled"===o.type,E=O?(S||[]).slice(0,Math.max(24,4*d)):null;t.useEffect(()=>{var e;"virtual"===o.type&&R&&(null===(e=o.onRangeChange)||void 0===e||e.call(o,R.startIndex,R.endIndex))},[o,null==R?void 0:R.startIndex,null==R?void 0:R.endIndex]);const P="virtual"===o.type&&R?Math.max(0,R.endIndex-R.startIndex):0,F="virtual"===o.type&&P>0?Array.from({length:P},()=>({cells:Array.from({length:o.headRow.length},()=>({value:" "}))})):[],A="virtual"===o.type&&R&&o.range&&o.range.start===R.startIndex&&o.range.end===R.endIndex;"virtual"===o.type&&A&&(N.current=o.rows);const I="virtual"===o.type?A?o.rows:N.current||F:F;return l?e.jsx("div",{className:gu}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:fs(ou,{[s||""]:s}),"data-testid":"table-ui",children:[e.jsx("thead",{children:e.jsx("tr",{children:o.headRow.map(({sortable:i,label:s,name:l,...c},u)=>i&&"not-filled"!==o.type&&p?t.createElement("th",{...c,key:u,className:iu,onClick:()=>a(l)},s,e.jsxs("span",{className:fs(su,{[pu]:r===l,[uu]:r===l&&"asc"===n,[fu]:r===l&&"desc"===n}),children:[e.jsx("span",{className:lu}),e.jsx("span",{className:cu})]})):e.jsx("th",{...c,children:s},u))})}),e.jsx("tbody",{ref:i,children:"not-filled"===o.type?e.jsx("tr",{className:null==o?void 0:o.bodyClassName,children:e.jsx("td",{colSpan:o.headRow.length,children:o.value})}):R?e.jsxs(e.Fragment,{children:[R.topSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:mu,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.topSpacer,padding:0,border:0}})}),("virtual"===o.type?I:R.visibleRows).map((t,n)=>{var r;return e.jsx(Eu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${R.startIndex+n}`)}),R.bottomSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:mu,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.bottomSpacer,padding:0,border:0}})})]}):O?(E||[]).map((t,n)=>{var r;return e.jsx(Eu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${n}`)}):(S||[]).map((t,n)=>{var r;return e.jsx(Eu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${n}`)})})]}),e.jsx(Au,{bodyRows:"filled"===o.type?o.bodyRows:void 0,itemsPerPage:c,currPage:g,setCurrPage:v})]})}function Fu(e,t,n){return n?e.slice(t*n,n*(t+1)):e}function Au({itemsPerPage:t,currPage:n,setCurrPage:r,bodyRows:a}){if(!t)return null;const o=!!a&&Fu(a,n+1,t).length>0,i=!!a&&Fu(a,n-1,t).length>0;return e.jsxs("nav",{className:vu,children:[e.jsx(Ru,{"aria-label":"Previous Page",disabled:!i,kind:"float",icon:tu.faChevronLeft,onClick:()=>r(n-1)}),e.jsx(Ru,{disabled:!o,"aria-label":"Next Page",kind:"float",icon:au.faChevronRight,onClick:()=>r(n+1)})]})}function Iu({numTicks:n,sampleRate:r,units:a,tableBodyRef:o,palette:i}){const s=Aa(n,r,a),l=s.format(n,r),c=ac(),u=t.useCallback((e,t,n)=>{var o;const u=null===(o=n.target.closest("tr"))||void 0===o?void 0:o.dataset.row;if(!u)return void t();const[f,d,...h]=u.split(";");switch(f){case"single":{const[t,n]=h,o=s.format(parseInt(t,10),r),i=s.format(parseInt(n,10),r),c=l.split(" "),u="<"===c[0]?c[1]:c[0],f=o.split(" "),m="<"===f[0]?f[1]:f[0],p=i.split(" "),g="<"===p[0]?p[1]:p[0];e({title:{text:d,diff:{text:"",color:""}},tooltipData:[{units:a,self:`${o}(${(parseFloat(m)/parseFloat(u)*100).toFixed(2)}%)`,total:`${i}(${(parseFloat(g)/parseFloat(u)*100).toFixed(2)}%)`,tooltipType:"table"}]});break}case"double":{const[t,n,o,l]=h,u=hc({formatter:s,sampleRate:r,totalLeft:parseInt(t,10),leftTicks:parseInt(n,10),totalRight:parseInt(o,10),rightTicks:parseInt(l,10),title:d,units:a},i,c);e({title:u.title,tooltipData:u.tooltipData});break}}},[s,r,a,l,i,c]);return e.jsx(cc,{dataSourceRef:o,shouldShowTitle:!1,clickInfoSide:"left",setTooltipContent:u,palette:i})}function Du(){const e=new Blob([`(${(()=>{const e=e=>e||0,t={format:"single",jStep:4,jName:3,getBarTotal:(e,t)=>e[t+1],getBarSelf:(e,t)=>e[t+2],getBarName:(e,t)=>e[t+3]},n={format:"double",jStep:7,jName:6,getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarName:(e,t)=>e[t+6]},r=e=>Math.round(1e4*e)/100,a=(e,t)=>(t-e)/e*100,o={baseRows:[],rows:[],bestNodeByName:new Map,sortBy:"total",sortByDirection:"desc",highlightQuery:"",format:"single",leftTicks:0,rightTicks:0},i=()=>{const e=o.highlightQuery.trim().toLowerCase(),t=e?o.baseRows.filter(t=>t.name.toLowerCase().includes(e)):o.baseRows.slice(),n="asc"===o.sortByDirection?1:-1;t.sort((e,t)=>{if("name"===o.sortBy)return n*e.name.localeCompare(t.name);switch(o.sortBy){case"total":case"self":{const r=e[o.sortBy]||0,a=t[o.sortBy]||0;return n*(r-a)}case"baseline":{const r=e.leftTicks>0?e.totalLeft/e.leftTicks:0,a=t.leftTicks>0?t.totalLeft/t.leftTicks:0;return n*(r-a)}case"comparison":{const r=e.rightTicks>0?e.totalRght/e.rightTicks:0,a=t.rightTicks>0?t.totalRght/t.rightTicks:0;return n*(r-a)}case"diff":{const o=e.leftTicks>0?e.totalLeft/e.leftTicks:0,i=e.rightTicks>0?e.totalRght/e.rightTicks:0,s=t.leftTicks>0?t.totalLeft/t.leftTicks:0,l=t.rightTicks>0?t.totalRght/t.rightTicks:0,c=a(r(o),r(i)),u=a(r(s),r(l));return n*(c-u)}default:return 0}}),o.rows=t},s=r=>{const{rows:a,bestNodeByName:s,format:l,leftTicks:c,rightTicks:u}=(r=>{const{names:a,levels:o,format:i}=r,s=new Map,l=new Map,c=r.leftTicks||0,u=r.rightTicks||0;if("double"===i){const t=n;for(let n=0;n<o.length;n+=1){const r=o[n];for(let o=0;o<r.length;o+=t.jStep){const i=a[t.getBarName(r,o)]||"<empty>";s.has(i)||s.set(i,{type:"double",name:i,totalLeft:0,totalRght:0,leftTicks:c,rightTicks:u});const f=s.get(i);if(!f)continue;f.totalLeft=e(f.totalLeft)+t.getBarTotalLeft(r,o),f.totalRght=e(f.totalRght)+t.getBarTotalRght(r,o);const d=t.getBarTotal(r,o),h=l.get(i);(!h||d>h.total)&&l.set(i,{i:n,j:o,total:d})}}}else{const n=t;for(let t=0;t<o.length;t+=1){const r=o[t];for(let o=0;o<r.length;o+=n.jStep){const i=a[n.getBarName(r,o)]||"<empty>";s.has(i)||s.set(i,{type:"single",name:i,self:0,total:0});const c=s.get(i);if(!c)continue;c.self=e(c.self)+n.getBarSelf(r,o),c.total=e(c.total)+n.getBarTotal(r,o);const u=n.getBarTotal(r,o),f=l.get(i);(!f||u>f.total)&&l.set(i,{i:t,j:o,total:u})}}}return{rows:Array.from(s.values()),bestNodeByName:l,format:i,leftTicks:c,rightTicks:u}})(r.flamebearer);o.baseRows=a,o.bestNodeByName=s,o.format=l,o.leftTicks=c,o.rightTicks=u,o.sortBy=r.sortBy,o.sortByDirection=r.sortByDirection,o.highlightQuery=r.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}})};self.onmessage=e=>{const t=e.data;var n;if(t&&t.type)switch(t.type){case"init":s(t.payload);break;case"update":n=t.payload,o.sortBy=n.sortBy,o.sortByDirection=n.sortByDirection,o.highlightQuery=n.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}});break;case"range":(e=>{const{start:t,end:n,requestId:r}=e,a=Math.max(0,t),i=Math.min(o.rows.length,n),s=o.rows.slice(a,i);self.postMessage({type:"range",payload:{rows:s,start:a,end:i,requestId:r}})})(t.payload);break;case"findNode":(e=>{const{name:t,requestId:n}=e,r=o.bestNodeByName.get(t);self.postMessage({type:"findNode",payload:{node:r?{i:r.i,j:r.j}:null,requestId:n}})})(t.payload)}}}).toString()})()`],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}var Lu="ProfilerTable-module_tableContextMenu__7Svm8",Bu="ProfilerTable-module_sandwichItem__b9Ipy";const zu=e=>e||0,$u="undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL;function Vu(e,t,n,r){const a=t;return a.type="single",a.self=zu(a.self)+e.getBarSelf(n,r),a.total=zu(a.total)+e.getBarTotal(n,r),a}function Hu(e,t,n,r,a,o){const i=t;return i.type="double",i.self=zu(i.self)+e.getBarSelf(n,r),i.total=zu(i.total)+e.getBarTotal(n,r),i.selfLeft=zu(i.selfLeft)+e.getBarSelfLeft(n,r),i.selfRght=zu(i.selfRght)+e.getBarSelfRght(n,r),i.selfDiff=zu(i.selfDiff)+e.getBarSelfDiff(n,r),i.totalLeft=zu(i.totalLeft)+e.getBarTotalLeft(n,r),i.totalRght=zu(i.totalRght)+e.getBarTotalRght(n,r),i.totalDiff=zu(i.totalDiff)+e.getBarTotalDiff(n,r),i.leftTicks=a,i.rightTicks=o,i}const Wu=new WeakMap;function Uu(e){const t=Wu.get(e);if(t)return t;const n=function(e){if(!e)return[];const{names:t,levels:n,format:r}=e,a="double"!==r?ya:xa,o=new Map;for(let i=0;i<n.length;i++){const s=n[i];for(let n=0;n<s.length;n+=a.jStep){const i=t[a.getBarName(s,n)];o.has(i)||o.set(i,{name:i||"<empty>",self:0,total:0});const l=o.get(i);if(!l)break;"single"===r?Vu(ya,l,s,n):Hu(xa,l,s,n,e.leftTicks,e.rightTicks)}}return Array.from(o.values())}(e);return Wu.set(e,n),n}function Ju(e,t,n){const r=148-e/t*148,a=n.alpha(1);return{backgroundImage:`linear-gradient(${a}, ${a})`,backgroundPosition:`-${r}px 0px`,backgroundRepeat:"no-repeat"}}const Qu=({flamebearer:t,sortBy:n,sortByDirection:r,fitMode:a,handleTableItemClick:o,highlightQuery:i,palette:s,selectedItem:l,messages:c,onRowContextMenu:u,onRowDoubleClick:f})=>{const{numTicks:d,maxSelf:h,sampleRate:m,spyName:p,units:g}=t,v=[...Uu(t)].sort((e,t)=>t.total-e.total),b="asc"===r?1:-1;let y;if("name"===n)y=v.sort((e,t)=>b*e[n].localeCompare(t[n]));else switch(n){case"total":case"self":y=v.sort((e,t)=>b*(e[n]-t[n]));break;case"baseline":y=v.sort((e,t)=>b*(e.totalLeft/e.leftTicks-t.totalLeft/t.leftTicks));break;case"comparison":y=v.sort((e,t)=>b*(e.totalRght/e.rightTicks-t.totalRght/t.rightTicks));break;case"diff":y=v.sort((e,t)=>{const n=Fa(Pa(e.totalLeft/e.leftTicks),Pa(e.totalRght/e.rightTicks)),r=Fa(Pa(t.totalLeft/t.leftTicks),Pa(t.totalRght/t.rightTicks));return b*(n-r)});break;default:y=v}const x=Aa(d,m,g),w=e=>!!l.isJust&&e===l.value,k=t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:Ha(a),children:e.jsx("bdi",{dir:"ltr",children:t.name})})}),j=y.filter(e=>{return!i||(t=i,e.name.toLowerCase().includes(t.toLowerCase()));var t}).map(e=>{if("double"===e.type)return(e=>{const t=Pa(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=Pa(e.rightTicks>0?e.totalRght/e.rightTicks:0);let r=Fa(t,n);Number.isFinite(r)||(r=0);let a="";r>0?a=s.badColor.rgb().string():r<0&&(a=s.goodColor.rgb().string());let i="";return 0===e.totalLeft&&e.totalRght>0?i=c.diffNew:0===e.totalRght&&e.totalLeft>0?i=c.diffRemoved:0===r?i="0%":r>0?i=`+${r.toFixed(2)}%`:r<0&&(i=`${r.toFixed(2)}%`),{"data-row":`${e.type};${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:w(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:`${t} %`},{value:`${n} %`},{value:i,style:{color:a}}]}})(e);const t=Ki(p,e.name);return((e,t)=>({"data-row":`${e.type};${e.name};${e.self};${e.total}`,isRowSelected:w(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:x.format(e.self,m),style:Ju(e.self,h,t)},{value:x.format(e.total,m),style:Ju(e.total,d,t)}]}))(e,Zi(s,t))});return j.length>0?{bodyRows:j,type:"filled"}:{value:e.jsx("div",{className:"unsupported-format",children:c.noItemsFound}),type:"not-filled"}};function qu({tableBodyRef:n,flamebearer:r,isDoubles:a,fitMode:o,handleTableItemClick:i,highlightQuery:s,selectedItem:l,palette:c,onFocusOnNode:u,updateView:f,enableSandwichView:d=!0,virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g,menuPortalTarget:v}){const b=ac(),[y,x]=Nl({transition:!0}),[w,k]=t.useState({x:0,y:0}),[j,_]=t.useState(null),N=$u,S=t.useRef(null),M=t.useRef(null),C=t.useRef(0),T=t.useRef(0),R=t.useRef(new Map),[O,E]=t.useState(!1),[P,F]=t.useState(0),[A,I]=t.useState([]),[D,L]=t.useState({start:0,end:0}),[B,z]=t.useState(null),[$,V]=t.useState(0),[H,W]=t.useState(0);t.useEffect(()=>{if(!N)return()=>{};const e=Du();S.current=e,W(e=>e+1);const t=e=>{const t=e.data;if(t&&t.type)switch(t.type){case"ready":F(t.payload.rowCount),E(!0),V(e=>e+1);break;case"range":if(t.payload.requestId!==C.current)return;I(t.payload.rows),L({start:t.payload.start,end:t.payload.end});break;case"findNode":{const e=R.current.get(t.payload.requestId);e&&(R.current.delete(t.payload.requestId),e(t.payload.node));break}}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t),e.terminate(),S.current=null,R.current.clear()}},[N]);const U=t.useCallback(e=>{if(!N||!S.current)return Promise.resolve(function(e,t){if(!e||!e.levels)return null;const{names:n,levels:r,format:a}=e,o=wa(a);let i=null;for(let e=0;e<r.length;e++){const a=r[e];for(let r=0;r<a.length;r+=o.jStep)if(n[o.getBarName(a,r)]===t){const t=o.getBarTotal(a,r);(!i||t>i.total)&&(i={i:e,j:r,total:t})}}return i?{i:i.i,j:i.j}:null}(r,e));const t=++T.current;return new Promise(n=>{var r;R.current.set(t,n),null===(r=S.current)||void 0===r||r.postMessage({type:"findNode",payload:{name:e,requestId:t}})})},[r,N]),J=t.useCallback(e=>{u&&U(e).then(e=>{e&&u(e.i,e.j)})},[u,U]),Q=t.useCallback(e=>{l.isJust&&l.value===e||i({name:e}),J(e)},[J,l,i]),q=t.useCallback((e,t)=>{e.preventDefault(),k({x:e.clientX,y:e.clientY}),_(t),x(!0)},[x]),X=t.useCallback(()=>{x(!1),_(null)},[x]),Y=t.useCallback(()=>{j&&(J(j),X())},[j,J,X]),K=t.useCallback(()=>{j&&navigator.clipboard&&(navigator.clipboard.writeText(j),X())},[j,X]),Z=t.useCallback(()=>{j&&(i({name:j}),X())},[j,i,X]),G=t.useCallback(()=>{j&&f&&(f("sandwich"),i({name:j}),X())},[j,f,i,X]),ee=t.useMemo(()=>a?[{sortable:1,name:"name",label:b.location},{sortable:1,name:"baseline",label:b.baseline,default:!0},{sortable:1,name:"comparison",label:b.comparison},{sortable:1,name:"diff",label:b.diff}]:[{sortable:1,name:"name",label:b.location},{sortable:1,name:"self",label:b.self,default:!0},{sortable:1,name:"total",label:b.total}],[b,a]),te=(e=>{const n=e.filter(e=>null==e?void 0:e.default)[0]||e[0],[r,a]=t.useState(n.name),[o,i]=t.useState("desc");return{sortBy:r,sortByDirection:o,updateSortParams:e=>{let t=o;t=r===e?"asc"===t?"desc":"asc":"desc",a(e),i(t)}}})(ee);t.useEffect(()=>{if(!N||!S.current)return;const e=S.current,t={sortBy:te.sortBy,sortByDirection:te.sortByDirection,highlightQuery:s};M.current!==r?(M.current=r,E(!1),F(0),I([]),e.postMessage({type:"init",payload:{flamebearer:r,...t}})):e.postMessage({type:"update",payload:t})},[r,s,te.sortBy,te.sortByDirection,N,H]);const ne=t.useCallback((e,t)=>{z(n=>n&&n.start===e&&n.end===t?n:{start:e,end:t})},[]);t.useEffect(()=>{if(!N||!S.current||!B)return;const e=++C.current;S.current.postMessage({type:"range",payload:{start:B.start,end:B.end,requestId:e}})},[B,$,N]);const{numTicks:re,maxSelf:ae,sampleRate:oe,spyName:ie,units:se}=r,le=t.useMemo(()=>Aa(re,oe,se),[re,oe,se]),ce=t.useMemo(()=>Ha(o),[o]),ue=t.useCallback(e=>l.isJust&&l.value===e,[l]),fe=t.useCallback(t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:ce,children:e.jsx("bdi",{dir:"ltr",children:t})})}),[ce]),de=t.useCallback(e=>{const t=Ki(ie,e.name),n=Zi(c,t);return{"data-row":`single;${e.name};${e.self};${e.total}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>q(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:le.format(e.self,oe),style:Ju(e.self,ae,n)},{value:le.format(e.total,oe),style:Ju(e.total,re,n)}]}},[le,q,Q,i,ue,ae,fe,re,c,oe,ie]),he=t.useCallback(e=>{const t=Pa(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=Pa(e.rightTicks>0?e.totalRght/e.rightTicks:0);let r=Fa(t,n);Number.isFinite(r)||(r=0);let a="";r>0?a=c.badColor.rgb().string():r<0&&(a=c.goodColor.rgb().string());let o="";return 0===e.totalLeft&&e.totalRght>0?o=b.diffNew:0===e.totalRght&&e.totalLeft>0?o=b.diffRemoved:0===r?o="0%":r>0?o=`+${r.toFixed(2)}%`:r<0&&(o=`${r.toFixed(2)}%`),{"data-row":`double;${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>q(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:`${t} %`},{value:`${n} %`},{value:o,style:{color:a}}]}},[q,Q,i,b,ue,fe,c]),me=t.useMemo(()=>N?A.map(e=>"double"===e.type?he(e):de(e)):[],[he,de,N,A]),pe=t.useMemo(()=>N?O&&0===P?{headRow:ee,type:"not-filled",value:e.jsx("div",{className:"unsupported-format",children:b.noItemsFound})}:{headRow:ee,type:"virtual",rowCount:P,rows:me,range:D,onRangeChange:ne}:{headRow:ee,...Qu({flamebearer:r,sortBy:te.sortBy,sortByDirection:te.sortByDirection,fitMode:o,handleTableItemClick:i,highlightQuery:s,palette:c,selectedItem:l,messages:b,onRowContextMenu:q,onRowDoubleClick:Q})},[he,de,d,o,r,q,Q,ne,i,s,b,u,c,P,l,ee,te.sortBy,te.sortByDirection,f,N,me,D,O]),ge=l.isJust&&l.value===j;return e.jsxs(e.Fragment,{children:[e.jsx(Pu,{...te,tableBodyRef:n,table:pe,isLoading:N&&!O,className:Qc("flamegraph-table",{"flamegraph-table-doubles":a}),virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g}),e.jsxs(yl,{...y,anchorPoint:w,onClose:X,className:Lu,portal:!v||{target:v},children:[u&&e.jsxs(Rl,{onClick:Y,children:[e.jsx($r,{icon:Kc.faCrosshairs}),b.focusOnThisFunction]}),e.jsxs(Rl,{onClick:K,children:[e.jsx($r,{icon:Ns.faCopy}),b.copyFunctionName]}),e.jsxs(Rl,{onClick:Z,children:[e.jsx($r,{icon:Rs.faHighlighter}),ge?b.clearHighlight:b.highlightSimilarNodes]}),f&&d&&e.jsxs(Rl,{onClick:G,className:Bu,children:[e.jsx(wc,{fill:"currentColor"}),b.openInSandwichView]})]})]})}const Xu=t.memo(function({flamebearer:n,fitMode:r,handleTableItemClick:a,highlightQuery:o,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u}){const f=t.useRef(null),d=t.useRef(null),h=t.useRef(null),[m,p]=t.useState(0),[g,v]=t.useState(null),b="double"===n.format;return t.useEffect(()=>{const e=f.current;if(!e)return;const t=e.offsetWidth-e.clientWidth;Number.isFinite(t)&&t!==m&&p(t)},[f.current,b,m]),t.useEffect(()=>{const e=d.current;if(!e||"undefined"==typeof document)return;const t=e.closest("[data-theme], [data-flamegraph-color-mode]")||e,n=document.createElement("div");return n.className="flamegraph-menu-portal",t.appendChild(n),v(n),()=>{n.parentElement&&n.parentElement.removeChild(n)}},[]),e.jsxs("div",{"data-testid":"table-view",ref:d,style:{"--kylin-flamegraph-scrollbar-size":`${m}px`},className:b?"flamegraph-table-wrapper flamegraph-table-wrapper--double":"flamegraph-table-wrapper",children:[e.jsx("div",{className:"flamegraph-table-scroll",ref:h,children:e.jsx(qu,{tableBodyRef:f,flamebearer:n,isDoubles:b,fitMode:r,highlightQuery:o,handleTableItemClick:a,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u,virtualize:!0,virtualizeOverscan:8,scrollRef:h,menuPortalTarget:g})}),e.jsx(Iu,{tableBodyRef:f,numTicks:n.numTicks,sampleRate:n.sampleRate,units:n.units,palette:i})]})});var Yu,Ku,Zu={},Gu={};function ef(){return Yu||(Yu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-left",n=[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],r="f0e2",a="M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faArrowRotateLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Gu)),Gu}function tf(){return Ku||(Ku=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ef();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faUndo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Zu)),Zu}var nf,rf,af=tf(),of={},sf={};function lf(){return nf||(nf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="diagram-project",n=["project-diagram"],r="f542",a="M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 128 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-16-128 0 0 16c0 7.3-1.7 14.3-4.6 20.5l68.6 91.5 80 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-7.3 1.7-14.3 4.6-20.5L128 224 48 224c-26.5 0-48-21.5-48-48L0 80z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faDiagramProject=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(sf)),sf}function cf(){return rf||(rf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=lf();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faProjectDiagram=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(of)),of}var uf,ff,df=cf(),hf={},mf={};function pf(){return uf||(uf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="ellipsis-vertical",n=["ellipsis-v"],r="f142",a="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z";e.definition={prefix:"fas",iconName:t,icon:[128,512,n,r,a]},e.faEllipsisVertical=e.definition,e.prefix="fas",e.iconName=t,e.width=128,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(mf)),mf}function gf(){return ff||(ff=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=pf();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faEllipsisV=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(hf)),hf}var vf=gf(),bf="Tooltip-module_tooltipWrapper__leDK-",yf="Tooltip-module_tooltipBubble__8vweF",xf="Tooltip-module_tooltipArrow__7wGyN";function wf(e){if(null!=e&&!1!==e){if("string"==typeof e||"number"==typeof e)return String(e);if(Array.isArray(e)){const t=e.map(e=>wf(e)).filter(e=>!!e);return t.length?t.join(" "):void 0}return t.isValidElement(e)?wf(e.props.children):void 0}}const kf=({placement:n,title:r,content:a,children:o})=>{const i=wf(null!=r?r:a),s=t.useRef(null),[l,c]=t.useState(!1);return t.useEffect(()=>{const e=s.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");c(!!t)},[]),i?e.jsxs("span",{ref:s,className:bf,"data-placement":n||"top","data-tooltip":l?i:void 0,title:l?void 0:i,children:[o,l?e.jsxs("span",{className:yf,role:"tooltip",children:[i,e.jsx("span",{className:xf})]}):null]}):e.jsx(e.Fragment,{children:o})};var jf,_f={};function Nf(){return jf||(jf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="link",n=[128279,"chain"],r="f0c1",a="M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faLink=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(_f)),_f}var Sf,Mf,Cf=Nf(),Tf={},Rf={};function Of(){return Sf||(Sf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="magnifying-glass",n=[128269,"search"],r="f002",a="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faMagnifyingGlass=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Rf)),Rf}function Ef(){return Mf||(Mf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Of();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faSearch=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Tf)),Tf}var Pf,Ff,Af,If=Ef(),Df={};function Lf(){if(Pf)return Df;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}Pf=1,Object.defineProperty(Df,"__esModule",{value:!0}),Df.DebounceInput=void 0;var n=o(t),r=o(Bl()),a=["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"];function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function f(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=h(t);if(n){var o=h(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}(this,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(o,e);var t=f(o);function o(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),m(d(n=t.call(this,e)),"onChange",function(e){e.persist();var t=n.state.value,r=n.props.minLength;n.setState({value:e.target.value},function(){var a=n.state.value;a.length>=r?n.notify(e):t.length>a.length&&n.notify(l(l({},e),{},{target:l(l({},e.target),{},{value:""})}))})}),m(d(n),"onKeyDown",function(e){"Enter"===e.key&&n.forceNotify(e);var t=n.props.onKeyDown;t&&(e.persist(),t(e))}),m(d(n),"onBlur",function(e){n.forceNotify(e);var t=n.props.onBlur;t&&(e.persist(),t(e))}),m(d(n),"createNotifier",function(e){if(e<0)n.notify=function(){return null};else if(0===e)n.notify=n.doNotify;else{var t=(0,r.default)(function(e){n.isDebouncing=!1,n.doNotify(e)},e);n.notify=function(e){n.isDebouncing=!0,t(e)},n.flush=function(){return t.flush()},n.cancel=function(){n.isDebouncing=!1,t.cancel()}}}),m(d(n),"doNotify",function(){n.props.onChange.apply(void 0,arguments)}),m(d(n),"forceNotify",function(e){var t=n.props.debounceTimeout;if(n.isDebouncing||!(t>0)){n.cancel&&n.cancel();var r=n.state.value,a=n.props.minLength;r.length>=a?n.doNotify(e):n.doNotify(l(l({},e),{},{target:l(l({},e.target),{},{value:r})}))}}),n.isDebouncing=!1,n.state={value:void 0===e.value||null===e.value?"":e.value};var a=n.props.debounceTimeout;return n.createNotifier(a),n}return c(o,[{key:"componentDidUpdate",value:function(e){if(!this.isDebouncing){var t=this.props,n=t.value,r=t.debounceTimeout,a=e.debounceTimeout,o=e.value,i=this.state.value;void 0!==n&&o!==n&&i!==n&&this.setState({value:n}),r!==a&&this.createNotifier(r)}}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e=this.props,t=e.element;e.onChange,e.value,e.minLength,e.debounceTimeout;var r,o,s=e.forceNotifyByEnter,c=e.forceNotifyOnBlur,u=e.onKeyDown,f=e.onBlur,d=e.inputRef,h=i(e,a),m=this.state.value;r=s?{onKeyDown:this.onKeyDown}:u?{onKeyDown:u}:{},o=c?{onBlur:this.onBlur}:f?{onBlur:f}:{};var p=d?{ref:d}:{};return n.default.createElement(t,l(l(l(l({},h),{},{onChange:this.onChange,value:m},r),o),p))}}]),o}(n.default.PureComponent);return Df.DebounceInput=p,m(p,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0}),Df}var Bf=function(){if(Af)return Ff;Af=1;var e=Lf().DebounceInput;return e.DebounceInput=e,Ff=e}(),zf="Input-module_input__ulQdV";const $f=t.forwardRef(({testId:t,className:n,type:r,name:a,placeholder:o,minLength:i=0,debounceTimeout:s=100,onChange:l,value:c,htmlId:u},f)=>e.jsx(Bf.DebounceInput,{inputRef:f,"data-testid":t,className:`${zf} ${n||""}`,type:r,name:a,placeholder:o,minLength:i,debounceTimeout:s,onChange:l,value:c,id:u}));var Vf="SharedQueryInput-module_wrapper__XRxrd",Hf="SharedQueryInput-module_search__XlzRv",Wf="SharedQueryInput-module_search-synced__J4T4b",Uf="SharedQueryInput-module_searchWithSync__ryuQa",Jf="SharedQueryInput-module_icon__Aq0Hv",Qf="SharedQueryInput-module_checked__oRvod",qf="SharedQueryInput-module_sync__0IO2N",Xf="SharedQueryInput-module_syncSelected__hstBI",Yf="SharedQueryInput-module_searchIcon__kfJxO";const Kf=({onHighlightChange:n,highlightQuery:r,sharedQuery:a,width:o})=>{const i=ac(),s=(e=>{const n=t.useRef();return t.useEffect(()=>{n.current=e},[e]),n.current})(null==a?void 0:a.syncEnabled),l=t.useRef(null),[c,u]=t.useState(!1);t.useEffect(()=>{"string"==typeof(null==a?void 0:a.searchQuery)&&(a.syncEnabled&&n(a.searchQuery),!a.syncEnabled&&s&&s!==(null==a?void 0:a.id)&&n(""))},[null==a?void 0:a.searchQuery,null==a?void 0:a.syncEnabled]),t.useEffect(()=>{const e=l.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");u(!!t)},[]);const f=t.useMemo(()=>a&&a.syncEnabled?a.searchQuery||"":r,[a,r]),d=t.useMemo(()=>`${a?Uf:Hf} ${(null==a?void 0:a.syncEnabled)?Wf:""}`,[a]),h=(null==a?void 0:a.syncEnabled)?i.unsyncSearchBars:i.syncSearchBars;return e.jsxs("div",{ref:l,className:Vf,style:{width:o},children:[e.jsx("span",{className:Yf,children:e.jsx($r,{icon:If.faSearch})}),e.jsx($f,{testId:"flamegraph-search",className:d,type:"search",name:"flamegraph-search",placeholder:c?"搜索函数 / 过滤":i.searchPlaceholder,minLength:1,debounceTimeout:100,onChange:e=>{n(e.target.value),a&&a.syncEnabled&&a.onQueryChange(e.target.value)},value:f}),a?e.jsx(kf,{placement:"top",title:h,children:e.jsx("button",{className:a.syncEnabled?Xf:qf,onClick:()=>{const e=!(null==a?void 0:a.syncEnabled)&&(null==a?void 0:a.id);null==a||a.toggleSync(e),e?null==a||a.onQueryChange(r):(n(r),null==a||a.onQueryChange(""))},children:e.jsx($r,{className:`${a.syncEnabled?Qf:Jf}`,icon:Cf.faLink})})}):null]})};var Zf="DiffLegend-module_flamegraph-legend__Cywr1",Gf="DiffLegend-module_flamegraph-legend-list__swdXj",ed="DiffLegend-module_flamegraph-legend-item__0P-6g";function td(t){const{palette:n,showMode:r}=t,a=function(e){switch(e){case"large":return[-100,-80,-60,-40,-20,-10,0,10,20,40,60,80,100];case"small":return[-100,-50,0,50,100];default:throw new Error(`Unsupported ${e}`)}}(r),o=Gi(n),i="small"===r?{"--legend-item-width":"32px","--legend-item-padding":"2px 2px","--legend-font-size":"10px","--legend-line-height":"1.1","--legend-item-height":"16px"}:void 0;return e.jsx("div",{"data-testid":"flamegraph-legend",className:`${Zf} ${Gf}`,style:i,children:a.map(t=>e.jsxs("div",{className:ed,style:{backgroundColor:o(t).rgb().toString()},children:[t>0?"+":"",t,"%"]},t))})}var nd="Dropdown-module_dropdownMenu__tbN8r",rd="Dropdown-module_dropdownMenuButton__Xy8M4";function ad({id:t,children:n,className:r,disabled:a,value:o,label:i,onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButtonClassName:m="",ariaLabel:p,portal:g,...v}){const b=v.menuButton||e.jsx(id,{"aria-label":p,className:`${rd} ${m}`,disabled:a,type:"button",children:o||i});return e.jsxs(Ml,{id:t,"aria-label":p,className:Qc(r,nd),"data-testid":v["data-testid"],onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButton:b,portal:g,children:[e.jsx(Ol,{children:i}),n]})}const od=Rl,id=ll;var sd="DiffLegendPaletteDropdown-module_container__h8Tts",ld="DiffLegendPaletteDropdown-module_triggerButton__oezA6",cd="DiffLegendPaletteDropdown-module_dropdownArrow__-Lu0w",ud="DiffLegendPaletteDropdown-module_menuItem__5iWry",fd="DiffLegendPaletteDropdown-module_menuItemText__a-tt0",dd="DiffLegendPaletteDropdown-module_dropdownMenu__G0NkR",hd="DiffLegendPaletteDropdown-module_menuItemWrapper__vAw-Q",md="DiffLegendPaletteDropdown-module_menuItemSelected__1gu9m";const pd=[ql,Xl],gd=t=>{const{palette:n=ql,onChange:r}=t,a=ac(),o=e=>"Default"===e.name?a.paletteDefaultName:"Color Blind"===e.name?a.paletteColorBlindName:e.name,i=e=>"Default"===e.name?a.paletteDefaultDesc:"Color Blind"===e.name?a.paletteColorBlindDesc:"";return e.jsx("div",{className:sd,children:e.jsx(ad,{label:a.diffLegendSelectPalette,align:"end",className:dd,menuButton:e.jsxs(id,{className:Qc(rd,ld),children:[e.jsx(td,{palette:n,showMode:"small"}),e.jsx("span",{className:cd})]}),onItemClick:e=>{e.value&&r(e.value)},children:pd.map(t=>e.jsx(od,{value:t,className:Qc(hd,t.name===n.name&&md),children:e.jsx("div",{className:ud,children:e.jsxs("span",{className:fd,children:[o(t)," ",i(t)]})})},t.name))})})};var vd={navbar:"Toolbar-module_navbar__XN6xZ",searchWrapper:"Toolbar-module_searchWrapper__k--ua",rightSection:"Toolbar-module_rightSection__if7LO",viewType:"Toolbar-module_viewType__AKARg",toggleViewButton:"Toolbar-module_toggleViewButton__OQ9-U",fitModeButton:"Toolbar-module_fitModeButton__jOxve",selected:"Toolbar-module_selected__vwBQt",collapseNodeButton:"Toolbar-module_collapseNodeButton__bLdiw",resetViewButton:"Toolbar-module_resetViewButton__y2ebV",divider:"Toolbar-module_divider__dG6pE",itemsContainer:"Toolbar-module_itemsContainer__gSTMF",item:"Toolbar-module_item__o-hKc",moreButton:"Toolbar-module_moreButton__rhOdT",active:"Toolbar-module_active__36Kt-",navbarCollapsedItems:"Toolbar-module_navbarCollapsedItems__vojhw"};const bd=d.bind(vd),yd=(e,t,n)=>{const r=0===t?e-360-5:e-360-16-5;let a=0,o=0;return n.reverse().forEach(e=>{o+=e,r<=o&&(a+=1)}),a},xd=()=>e.jsx("div",{className:vd.divider}),wd=t.memo(({view:n,handleSearchChange:r,highlightQuery:a,isFlamegraphDirty:o,reset:i,updateFitMode:s,fitMode:l,updateView:c,selectedNode:u,onFocusOnSubtree:f,flamegraphType:d,enableChangingDisplay:h=!0,sharedQuery:m,ExportData:p,palette:g,setPalette:v})=>{const b=t.useRef(null),[y,x]=t.useState(!1),w=ac();t.useEffect(()=>{const e=b.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");x(!!t)},[]);const k=y?32:44,j=y?220:360,_="double"===d&&g&&v,N=[{el:e.jsxs(e.Fragment,{children:[e.jsx(_d,{fitMode:l,updateFitMode:s}),e.jsx(xd,{})]}),width:2*k+5},{el:e.jsx(jd,{isFlamegraphDirty:o,reset:i}),width:k},{el:e.jsxs(e.Fragment,{children:[e.jsx(kd,{selectedNode:u,onFocusOnSubtree:f}),e.jsx(xd,{})]}),width:k+5},h?{el:e.jsx(Sd,{flamegraphType:d,view:n,updateView:c}),width:k*("single"===d?5:3)}:null,t.isValidElement(p)?{el:e.jsxs(e.Fragment,{children:[e.jsx(xd,{}),p]}),width:k+5}:null].filter(e=>null!==e),S=N.reduce((e,t)=>[...e,t.width],[]),{isCollapsed:M,collapsedItemsNumber:C,handleMoreClick:T}=((e,n)=>{const[r,a]=t.useState(!0),[o,i]=t.useState(0);return t.useLayoutEffect(()=>{if(e.current){const{width:t}=e.current.getBoundingClientRect(),r=yd(t,o,n);i(r)}},[e.current,n]),Fl(e,e=>{const{width:t}=e.target.getBoundingClientRect(),r=yd(t,o,n);i(r),a(!0)}),{isCollapsed:r,handleMoreClick:()=>{a(e=>!e)},collapsedItemsNumber:o}})(b,S),R=N.reduce((e,t,n)=>(n<C?e.hidden.push(t):e.visible.push(t),e),{visible:[],hidden:[]});return e.jsx("div",{role:"toolbar",ref:b,children:e.jsxs("div",{className:vd.navbar,children:[e.jsx("div",{className:vd.searchWrapper,children:e.jsx(Kf,{width:j,onHighlightChange:r,highlightQuery:a,sharedQuery:m})}),e.jsxs("div",{className:vd.rightSection,children:[_&&e.jsxs(e.Fragment,{children:[e.jsx(gd,{palette:g,onChange:v}),e.jsx(xd,{})]}),e.jsxs("div",{className:vd.itemsContainer,children:[R.visible.map((t,n)=>e.jsx("div",{className:vd.item,style:{width:t.width},children:t.el},n)),0!==C&&e.jsx(kf,{placement:"top",title:w.more,children:e.jsx("button",{onClick:T,className:bd({[vd.moreButton]:!0,[vd.active]:!M}),children:e.jsx($r,{icon:vf.faEllipsisV})})})]})]}),!M&&e.jsx("div",{className:vd.navbarCollapsedItems,children:R.hidden.map((t,n)=>e.jsx("div",{className:vd.item,style:{width:t.width},children:t.el},n))})]})})});function kd({onFocusOnSubtree:t,selectedNode:n}){const r=ac(),a=n.mapOr(()=>{},e=>()=>t(e.i,e.j));return e.jsx(kf,{placement:"top",title:r.collapseNodesAbove,children:e.jsx("div",{children:e.jsx(Ru,{disabled:!n.isJust,onClick:a,className:vd.collapseNodeButton,"aria-label":r.collapseNodesAbove,children:e.jsx($r,{icon:As.faCompressAlt})})})})}function jd({isFlamegraphDirty:t,reset:n}){const r=ac();return e.jsx(kf,{placement:"top",title:r.resetView,children:e.jsx("span",{children:e.jsx(Ru,{id:"reset",disabled:!t,onClick:n,className:vd.resetViewButton,"aria-label":r.resetView,children:e.jsx($r,{icon:af.faUndo})})})})}function _d({fitMode:t,updateFitMode:n}){const r=ac(),a=e=>t===e;return e.jsxs(e.Fragment,{children:[e.jsx(kf,{placement:"top",title:r.headFirst,children:e.jsx(Ru,{onClick:()=>n("HEAD"),className:bd({[vd.fitModeButton]:!0,[vd.selected]:a("HEAD")}),children:e.jsx(kc,{})})}),e.jsx(kf,{placement:"top",title:r.tailFirst,children:e.jsx(Ru,{onClick:()=>n("TAIL"),className:bd({[vd.fitModeButton]:!0,[vd.selected]:a("TAIL")}),children:e.jsx(jc,{})})})]})}const Nd=(t,n)=>"single"===t?[{label:n.viewFlamegraph,value:"flamegraph",Icon:xc},{label:n.viewTable,value:"table",Icon:bc},{label:n.viewTableAndFlamegraph,value:"both",Icon:yc},{label:n.viewSandwich,value:"sandwich",Icon:wc},{label:n.viewGraphviz,value:"graphviz",Icon:()=>e.jsx($r,{icon:df.faProjectDiagram})}]:[{label:n.viewFlamegraph,value:"flamegraph",Icon:xc},{label:n.viewTable,value:"table",Icon:bc},{label:n.viewTableAndFlamegraph,value:"both",Icon:yc}];function Sd({view:t,updateView:n,flamegraphType:r}){const a=ac(),o=Nd(r,a);return e.jsx("div",{className:vd.viewType,children:o.map(({label:r,value:a,Icon:o})=>e.jsx(kf,{placement:"top",title:r,children:e.jsx(Ru,{"data-testid":a,onClick:()=>n(a),className:bd({[vd.toggleViewButton]:!0,selected:t===a}),children:e.jsx(o,{})})},a))})}function Md(e,t){const n={},r={};let a={name:"total",children:[],self:[],total:[],key:"/total"};return(t?[e,t]:[e]).forEach((e,t)=>{var o,i;for(let s=0;s<e.levels.length;s+=1)for(let l=0;l<e.levels[s].length;l+=4){const c=[t,s,l].join("/"),u=e.names[e.levels[s][l+3]],f=e.levels[s][l+0],d=e.levels[s][l+1],h=e.levels[s][l+2];let m="";if(0!==s){const n=s-1,a=e.levels[n];for(let e=0;e<a.length;e+=4){const o=a[e+0],i=a[e+1];if(f>=o&&f<o+i){const a=[t,n,e].join("/");m=r[a].key;break}}}const p=[m||"",u].join("/"),g=!n[p];n[p]||(n[p]={name:u,children:[],self:[],total:[],key:p});const v=n[p];(o=v.total)[t]||(o[t]=0),v.total[t]+=d,(i=v.self)[t]||(i[t]=0),v.self[t]+=h,r[c]=v,m&&g&&n[m].children.push(v),0===s&&(a=v)}}),a}const Cd=e=>{const t={maxSelf:100,names:[],levels:[]},n=(e,r,a)=>{var o;const{name:i,children:s,self:l,total:c,offset:u}=e;t.names.push(i),(o=t.levels)[r]||(o[r]=[]),t.maxSelf=Math.max(t.maxSelf,l[0]||0),t.levels[r]=t.levels[r].concat([a,c[0]||0,l[0]||0,t.names.length-1]);for(let e=0;e<s.length;e+=1){a+=n(s[e],r+1,a)}return u||c[0]||0};return n(e,0,0),t};function Td(e){const t=new Map;for(let n=0;n<e.children.length;n+=1)t.has(e.children[n].name)||t.set(e.children[n].name,e.children[n]);for(let n=0;n<e.children.length;n+=1){const r=e.children[n],a=t.get(e.children[n].name);a&&a!==r&&(a.total[0]+=r.total[0],a.self[0]+=r.self[0],a.children=a.children.concat(r.children))}e.children=Array.from(t.values());for(let t=0;t<e.children.length;t+=1)Td(e.children[t])}function Rd(e,t){const n=function(e,t){const n=Md(e),r={format:"single",numTicks:0,maxSelf:100,sampleRate:100,names:[],levels:[],units:e.units,spyName:e.spyName},a={name:t,total:[],self:[0],children:[]},o=e=>{e.name===t&&(r.numTicks+=e.total[0],a.total=[r.numTicks],a.children=a.children.concat(e.children));for(let t=0;t<e.children.length;t+=1)o(e.children[t])};return o(n),Td(a),{...r,...Cd(a)}}(JSON.parse(JSON.stringify(e)),t);return n}function Od(e,t){const n=function(e,t){const n=Md(e),r={format:"single",maxSelf:100,sampleRate:100,numTicks:0,names:[],levels:[],units:e.units,spyName:e.spyName},a=[],o=[],i={name:t,total:[0],self:[0],children:[]},s=(e,n=[])=>{const i=n.concat([{...e,children:[]}]);e.name===t&&(o.push(i),a.push(e.total[0]),r.numTicks+=e.total[0]);for(let t=0;t<e.children.length;t+=1)s(e.children[t],i)};s(n),o.forEach((e,t)=>{i.children.push(((e,t)=>{const n={};let r=n;return e.forEach(({name:e,...n})=>{const a={name:e,...n,total:[t]};r.children=[a],r=a}),n.children[0]})(e.reverse(),a[t]))}),Td(i);const l=Cd(i);return l.levels=l.levels.reverse().slice(0,-1),{...r,...l}}(JSON.parse(JSON.stringify(e)),t);return n}var Ed={flamegraphContainer:"FlamegraphRenderer-module_flamegraphContainer__-7FRV",createdBy:"FlamegraphRenderer-module_createdBy__rHAOT",horizontal:"FlamegraphRenderer-module_horizontal__zs7--",vertical:"FlamegraphRenderer-module_vertical__fRcHg",panesWrapper:"FlamegraphRenderer-module_panesWrapper__L-mlA",tablePane:"FlamegraphRenderer-module_tablePane__Gin7Y",sandwichPane:"FlamegraphRenderer-module_sandwichPane__IEOyR",sandwichPaneInfo:"FlamegraphRenderer-module_sandwichPaneInfo__5hT4a",arrow:"FlamegraphRenderer-module_arrow__dPzpE",sandwichTop:"FlamegraphRenderer-module_sandwichTop__7N0ZY",sandwichBottom:"FlamegraphRenderer-module_sandwichBottom__Dc64g",name:"FlamegraphRenderer-module_name__XRbN9"};function Pd(e){const t=[];return Object.keys(e).forEach(n=>{var r;t.push(`${n}="${r=String(e[n]||""),r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`)}),`[${t.join(" ")}]`}function Fd(e,t){return`${(100*e/t).toFixed(2)}%`}function Ad(e,t){let n,r,a,o;t?(n=.1,r=.93):(n=1,r=.7),e=Math.max(-1,Math.min(1,e)),Math.abs(e)<.2&&(n*=Math.abs(e)/.2),e>0&&(e**=1-.7),e<0&&(e=-((-e)**(1-.7))),e<0?(o=r,a=r*(1+n*e)):(a=r,o=r*(1-n*e));const i=r*(1-n);return`#${Math.floor(255*a).toString(16).padStart(2,"0")}${Math.floor(255*o).toString(16).padStart(2,"0")}${Math.floor(255*i).toString(16).padStart(2,"0")}`}function Id(e,t,n,r){const{self:a}=t,{total:o}=t,i=t.name.replace(/"/g,'\\"'),s=e(a),l=8+Math.ceil(16*Math.sqrt(a/n)),c=Ad(o/r,!1),u=Ad(o/r,!0),f=function(e,t,n,r,a){let o="";o=`${function(e){return e.replace(/.*\//,"")}(t)}\n`;const i=e(n);0!==n?o=`${o+i} (${Fd(n,a)})`:o+="0";let s=i;r!==n&&(o+=0!==n?"\n":" ",s=e(r),o=`${o}of ${s} (${Fd(r,a)})`);return o}(e,i,a,o,r),d={label:f,id:`node${t.index}`,fontsize:l,shape:"box",tooltip:`${i} (${s})`,color:c,fontcolor:"#000000",style:"filled",fontname:"",fillcolor:u};return`N${t.index} ${Pd(d)}`}function Dd(e){if("double"===e.metadata.format)return"diff flamegraphs are not supported";const t=Md(e.flamebearer),n=[],r=[];const[a,o,,i]=function e(t,n,r,a,o){return t.children.forEach(t=>{const[i,s]=e(t,n,r,a,o);n=Math.max(n,i),r=Math.max(r,s)}),n=Math.max(n,t.self[0]),r=Math.max(r,t.total[0]),a+=t.self[0],o+=t.total[0],[n,r,a,o]}(t,0,0,0,0),{sampleRate:s,units:l}=e.metadata,c=Aa(o,s,l),u=e=>c.format(e,s,!0);let f={};const d={};let h=0;function m(e,t){return-1===t.indexOf(e.name)&&(f[e.name]?(f[e.name].self+=e.self[0],f[e.name].total+=e.total[0]):(h+=1,f[e.name]={index:h,name:e.name,self:e.self[0],total:e.total[0],parents:[],children:[]})),e.children.forEach(n=>{const r=m(n,t.concat([e.name])),a=`${e.name}/${n.name}`;n.name!==e.name&&(d[a]?d[a].weight+=n.total[0]:d[a]={from:f[e.name],to:r,weight:n.total[0],residual:!1},r.parents.push(d[a]),f[e.name].children.push(d[a]))}),f[e.name]}t.children.forEach(e=>{m(e,[])});const p=.005*i,g=.001*i;function v(e,t){let n=0,r=t;if(e.forEach(e=>{e.weight>0&&(r+=Math.abs(e.weight))}),0!==r&&(e.forEach(e=>{const t=Math.abs(e.weight)/r;n+=-t*Math.log2(t)}),t>0)){const e=Math.abs(t)/r;n+=-e*Math.log2(e)}return n}Object.keys(f).forEach(e=>{f[e].total<p&&delete f[e]});const b={};Object.keys(f).forEach(e=>{b[f[e].name]=function(e){let t=0;return 0===e.parents.length?t+=1:t+=v(e.parents,0),0===e.children.length?t+=1:t+=v(e.children,e.self),t*e.total+e.self}(f[e])});const y=Object.values(f).sort((e,t)=>{const n=b[e.name],r=b[t.name];return n!==r?r-n:e.name!==t.name?e.name<t.name?-1:1:e.self!==t.self?r-n:e.name<t.name?-1:1}),x={};function w(e){const[t,n]=[e.from,e.to],r={},a=[n];for(;a.length>0;){const n=a.shift();for(let o=0;o<n.parents.length;o+=1){const i=n.parents[o];if(e!==i&&!r[i.from.name]){if(i.from===t)return!0;r[i.from.name]=!0,a.push(i.from)}}}return!1}return y.forEach(e=>{x[e.name]=e}),y.slice(80).forEach(e=>{delete x[e.name]}),function e(t,n){const r=!x[t.name];t.children.forEach(a=>{const o=!x[a.name];if(e(a,r?n:t),!o&&n&&r){const e=`${n.name}/${a.name}`;d[e]||(d[e]={from:f[n.name],to:f[a.name],weight:0,residual:!0}),d[e].weight+=a.total[0],d[e].residual=!0}})}(t,null),f=x,y.reverse().forEach(e=>{const t=e.parents.sort((e,t)=>t.weight-e.weight),n=[];for(let e=0;e<t.length;e+=1){const r=t[e];if(!r.residual)break;w(r)&&(n.push(r),delete d[`${r.from.name}/${r.to.name}`])}n.forEach(e=>{e.from.children=e.from.children.filter(t=>t.to!==e.to),e.to.parents=e.to.parents.filter(t=>t.from!==e.from)})}),Object.keys(d).forEach(e=>{const t=d[e];f[t.from.name]||delete d[e],f[t.to.name]||delete d[e],t.weight<g&&delete d[e]}),Object.keys(f).forEach(e=>{n.push(Id(u,f[e],a,o))}),Object.keys(d).forEach(e=>{r.push(function(e,t,n){const r=t.from.name.replace(/"/g,'\\"'),a=t.to.name.replace(/"/g,'\\"'),o=t.weight,i=e(t.weight),s=`${r} -> ${a} (${i})`,l={label:i,weight:1+100*o/n,penwidth:1+5*o/n,tooltip:s,labeltooltip:s,fontname:"",color:Ad(o/n,!1),style:t.residual?"dotted":""};return`N${t.from.index} -> N${t.to.index} ${Pd(l)}`}(u,d[e],o))}),`digraph "unnamed" {\n fontname= ""\n ${n.join("\n")}\n ${r.join("\n")}\n }`}var Ld="GraphVizPanel-module_graphVizPane__B18cQ";const Bd=()=>null;function zd({flamebearer:n}){var r,a;const o=n,i=(null===(r=o.metadata)||void 0===r?void 0:r.format)&&(null===(a=o.flamebearer)||void 0===a?void 0:a.levels),s=`graphviz-pane-${(null==o?void 0:o.appName)||String((new Date).valueOf())}`,l=t.useMemo(()=>Dd(o),[JSON.stringify(o)]);return e.jsx("div",{className:Ld,children:i?e.jsx(Bd,{options:{zoom:!0,width:"150%",height:"100%",scale:1,useWorker:!1},dot:l}):e.jsx("div",{children:"NO DATA"})},s)}function $d(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const r=[0,Math.floor(n/2),n-1];for(let n=0;n<r.length;n+=1){const a=e[r[n]];if(!a||0===a.length)continue;const o=Math.min(8,a.length);for(let e=0;e<o;e+=1)t^=0|a[e],t=Math.imul(t,16777619);for(let e=Math.max(0,a.length-o);e<a.length;e+=1)t^=0|a[e],t=Math.imul(t,16777619)}return t>>>0}function Vd(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const r=Math.min(32,n),a=[...Array.from({length:r},(e,t)=>t),...Array.from({length:r},(e,t)=>n-r+t)];for(let n=0;n<a.length;n+=1){const r=e[a[n]]||"";for(let e=0;e<r.length;e+=1)t^=r.charCodeAt(e),t=Math.imul(t,16777619)}return t>>>0}function Hd(e){var t,n,r,a,o,i;const s=e.__kylinSignature;if(s)return s;const l=e,c=[e.format,e.numTicks,e.sampleRate,e.units,e.maxSelf,null!==(n=null===(t=e.names)||void 0===t?void 0:t.length)&&void 0!==n?n:0,null!==(a=null===(r=e.levels)||void 0===r?void 0:r.length)&&void 0!==a?a:0,null!==(o=l.leftTicks)&&void 0!==o?o:"na",null!==(i=l.rightTicks)&&void 0!==i?i:"na",$d(e.levels),Vd(e.names||[])].join("|");return e.__kylinSignature=c,c}function Wd(e,t){const n=[...t];function r(e,t,n){for(const r of e){let e=0;for(let a=t;a<r.length;a+=n)r[a]-=e,e+=r[a]+r[a+1]}}return"double"===e?(r(n,0,7),r(n,3,7)):r(n,0,4),n}function Ud(e,t){const n=[...t];function r(e,t,n){for(const r of e){let e=0;for(let a=t;a<r.length;a+=n)r[a]+=e,e=r[a]+r[a+1]}}return"double"===e?(r(n,0,7),r(n,3,7)):r(n,0,4),n}function Jd(e){if(e.profile&&e.flamebearer&&console.warn("'profile' and 'flamebearer' properties are mutually exclusive. Please use profile if possible."),e.profile){const n=e.profile,r={...n,flamebearer:{...n.flamebearer}};n.__kylinDecoded||((t=r).flamebearer.levels=Ud(t.metadata.format,t.flamebearer.levels),n.__kylinDecoded=!0,r.__kylinDecoded=!0);const a={...r,...r.metadata,...r.flamebearer,flamebearer:void 0,metadata:void 0};return delete a.flamebearer,delete a.metadata,a}var t;if(e.flamebearer)return e.flamebearer;return{format:"single",names:[],units:"unknown",levels:[[]],spyName:"unknown",numTicks:0,sampleRate:0,maxSelf:0}}class Qd extends t.Component{constructor(t){super(t),this.resetFlamegraphState={focusedNode:da.nothing(),zoom:da.nothing()},this.initialFlamegraphState=this.resetFlamegraphState,this.calcNewConfigs=(e,t)=>{const n=this.state.flamegraphConfigs,r=(e,t,n)=>{const r=(e,t,n)=>e.names[wa(e.format).getBarName(e.levels[t],n)];if(n.isNothing)return!0;try{const a=n,o=r(e,a.value.i,a.value.j);return o===r(t,a.value.i,a.value.j)}catch{return!1}};r(e,t,this.state.flamegraphConfigs.zoom)||(n.zoom=this.resetFlamegraphState.zoom);return r(e,t,this.state.flamegraphConfigs.focusedNode)||(n.focusedNode=this.resetFlamegraphState.focusedNode),n},this.onSearchChange=e=>{this.setState({searchQuery:e})},this.isSameFlamebearer=(e,t)=>function(e,t){return Hd(e)===Hd(t)}(e,t),this.onReset=()=>{this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,...this.initialFlamegraphState},selectedItem:da.nothing()})},this.onFlamegraphZoom=e=>{e.isJust&&0===e.value.i&&0===e.value.j?this.onReset():this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,zoom:e}})},this.onFocusOnNode=(e,t)=>{if(0===e&&0===t)return void this.onReset();let n={...this.state.flamegraphConfigs};const{zoom:r}=this.state.flamegraphConfigs;r.isJust&&r.value.i<=e&&(n={...n,zoom:this.initialFlamegraphState.zoom}),this.setState({...this.state,flamegraphConfigs:{...n,focusedNode:da.just({i:e,j:t})}})},this.isNameInFocusedSubtree=e=>{const{focusedNode:t}=this.state.flamegraphConfigs;if(t.isNothing)return!0;const{flamebearer:n}=this.state;if(!n||!n.levels)return!0;const{names:r,levels:a,format:o}=n,i=wa(o),s=t.value.i,l=t.value.j,c=a[s];if(!c)return!0;const u=i.getBarOffset(c,l),f=u+i.getBarTotal(c,l);for(let t=s;t<a.length;t++){const n=a[t];for(let t=0;t<n.length;t+=i.jStep){const a=i.getBarOffset(n,t),o=i.getBarTotal(n,t);if(a>=u&&a+o<=f){if(r[i.getBarName(n,t)]===e)return!0}}}return!1},this.setActiveItem=e=>{const{name:t}=e;if(this.state.selectedItem.isJust&&t===this.state.selectedItem.value)return void this.setState({selectedItem:da.nothing()});this.isNameInFocusedSubtree(t)?this.setState({selectedItem:da.just(t)}):this.setState({selectedItem:da.just(t),flamegraphConfigs:{...this.state.flamegraphConfigs,focusedNode:this.resetFlamegraphState.focusedNode}})},this.getHighlightQuery=()=>this.state.selectedItem.isJust?this.state.selectedItem.value:this.state.searchQuery,this.updateView=e=>{"sandwich"===e&&this.setState({searchQuery:"",flamegraphConfigs:this.resetFlamegraphState}),this.setState({view:e})},this.updateFlamegraphDirtiness=()=>{const e=this.isDirty();this.setState({isFlamegraphDirty:e})},this.updateFitMode=e=>{this.setState({fitMode:e})},this.clearFocus=()=>{this.setState(e=>({...e,flamegraphConfigs:{...e.flamegraphConfigs,...this.resetFlamegraphState}}))},this.getActiveRange=()=>{const{flamebearer:e}=this.state,{zoom:t,focusedNode:n}=this.state.flamegraphConfigs,r=e.numTicks;if(!r)return{rangeMin:0,rangeMax:1};const a=wa(e.format),o=t=>{const n=e.levels[t.i];if(!n)return{rangeMin:0,rangeMax:1};const o=a.getBarOffset(n,t.j),i=a.getBarTotal(n,t.j);return{rangeMin:o/r,rangeMax:(o+i)/r}};return t.match({Just:e=>n.match({Just:t=>{const n=o(t),r=o(e);return n.rangeMax-n.rangeMin<r.rangeMax-r.rangeMin?n:r},Nothing:()=>o(e)}),Nothing:()=>n.match({Just:e=>o(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})},this.isDirty=()=>this.state.selectedItem.isJust||JSON.stringify(this.initialFlamegraphState)!==JSON.stringify(this.state.flamegraphConfigs),this.handleSetPalette=e=>{this.setState({palette:e})},this.render=()=>{var t;const n=e.jsx("div",{className:fs(Ed.tablePane,"vertical"===this.state.panesOrientation?Ed.vertical:Ed.horizontal),children:e.jsx(Xu,{"data-testid":"table-view",flamebearer:this.state.flamebearer,fitMode:this.state.fitMode,highlightQuery:this.state.searchQuery,selectedItem:this.state.selectedItem,handleTableItemClick:this.setActiveItem,palette:this.state.palette,onFocusOnNode:this.onFocusOnNode,updateView:this.props.onlyDisplay?void 0:this.updateView,enableSandwichView:this.props.enableSandwichView})},"table-pane"),r=this.shouldShowToolbar(),o=!this.state.flamebearer||this.state.flamebearer.names.length<=1,i=this.context,s="Location"!==i.location,l=this.state.flamebearer.numTicks,c=Aa(l,this.state.flamebearer.sampleRate,this.state.flamebearer.units).format(l,this.state.flamebearer.sampleRate),u=Oa(c,s)||c,f=function(e,t=Ea){const n=Math.abs(e);for(const{value:r,label:a}of t)if(n>=r)return`${(e/r).toFixed(2).replace(/\.?0+$/,"")} ${a}`;return Ta(e)}(l,i.sampleCountFormat),d=i.tooltipSamples.replace(/[::]\s*$/,""),h=(null===(t=i.tooltipUnitTitles[this.state.flamebearer.units])||void 0===t?void 0:t.formattedValue)||i.tooltipUnitTitles.unknown.formattedValue,m=this.getActiveRange(),p=m.rangeMin>0||m.rangeMax<1,g=Math.max(0,Math.min(l,(m.rangeMax-m.rangeMin)*l)),v=l>0?g/l*100:0,b=(()=>{const e=wa(this.state.flamebearer.format),t=this.state.flamegraphConfigs.focusedNode.mapOrElse(()=>this.state.flamegraphConfigs.zoom.mapOrElse(()=>null,e=>e),e=>e);if(!t)return"";const n=this.state.flamebearer.levels[t.i];if(!n)return"";const r=e.getBarName(n,t.j);return this.state.flamebearer.names[r]||""})(),y=e.jsx(Vc,{showCredit:this.props.showCredit,flamebearer:this.state.flamebearer,highlightQuery:this.getHighlightQuery(),setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,updateView:this.props.onlyDisplay?void 0:this.updateView,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:r,setPalette:this.handleSetPalette,enableSandwichView:this.props.enableSandwichView,breadcrumb:o?void 0:{totalValueText:u,totalSamplesText:f,samplesLabel:d,unitLabel:h,hasFocus:p,focusPercent:v,focusLabel:b,ofTotalPlacement:s?"before":"after",ofTotalLabel:i.ofTotal,clearFocusLabel:i.clearFocus,onClearFocus:this.clearFocus}},"flamegraph-pane"),x=(()=>{if("sandwich"!==this.state.view)return e.jsx("div",{className:Ed.sandwichPane},"sandwich-pane");if(this.state.selectedItem.isNothing)return e.jsx("div",{className:Ed.sandwichPane,children:e.jsxs("div",{className:fs(Ed.sandwichPaneInfo,"vertical"===this.state.panesOrientation?Ed.vertical:Ed.horizontal),children:[e.jsx("div",{className:Ed.arrow}),"Select a function to view callers/callees sandwich view"]})},"sandwich-pane");const t=Od(this.state.flamebearer,this.state.selectedItem.value),n=Rd(this.state.flamebearer,this.state.selectedItem.value),a=t=>e.jsx(Vc,{disableClick:!0,showCredit:this.props.showCredit,highlightQuery:"",setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:r,setPalette:this.handleSetPalette,...t});return e.jsxs("div",{className:Ed.sandwichPane,children:[e.jsxs("div",{className:Ed.sandwichTop,children:[e.jsx("span",{className:Ed.name,children:"Callers"}),a({flamebearer:t})]}),e.jsxs("div",{className:Ed.sandwichBottom,children:[e.jsx("span",{className:Ed.name,children:"Callees"}),a({flamebearer:n,headerVisible:!1,showSingleLevel:!0})]})]},"sandwich-pane")})(),w=function(e,t,n,r,a){switch(e){case"table":return[n];case"flamegraph":return[t];case"sandwich":return[n,r];case"both":return[n,t];case"graphviz":return[a];default:throw new Error(`Invalid view '${e}'`)}}(this.state.view,y,n,x,e.jsx(zd,{flamebearer:this.state.flamebearer}));return e.jsxs("div",{children:[e.jsxs("div",{children:[r&&e.jsx(wd,{sharedQuery:this.props.sharedQuery,enableChangingDisplay:!this.props.onlyDisplay,flamegraphType:this.state.flamebearer.format,view:this.state.view,handleSearchChange:this.onSearchChange,reset:this.onReset,updateView:this.updateView,updateFitMode:this.updateFitMode,fitMode:this.state.fitMode,isFlamegraphDirty:this.isDirty(),selectedNode:this.state.flamegraphConfigs.zoom,highlightQuery:this.state.searchQuery,onFocusOnSubtree:this.onFocusOnNode,ExportData:this.props.ExportData,palette:this.state.palette,setPalette:this.handleSetPalette}),this.props.children,e.jsx("div",{className:`${Ed.flamegraphContainer} ${fs("vertical"===this.state.panesOrientation?Ed.vertical:Ed.horizontal,Ed[this.state.panesOrientation],Ed.panesWrapper)}`,children:o?e.jsx(hs,{}):w.map(e=>e)})]}),this.props.showPyroscopeLogo&&e.jsxs("div",{className:Ed.createdBy,children:["Created by",e.jsxs("a",{href:"https://twitter.com/PyroscopeIO",rel:"noreferrer",target:"_blank",children:[e.jsx(a,{width:"30",height:"30"}),"@PyroscopeIO"]})]})]})},this.state={isFlamegraphDirty:!1,view:this.props.onlyDisplay?this.props.onlyDisplay:"both",fitMode:"HEAD",flamebearer:Jd(t),panesOrientation:t.panesOrientation?t.panesOrientation:"horizontal",searchQuery:"",selectedItem:da.nothing(),flamegraphConfigs:this.initialFlamegraphState,palette:ql}}componentDidUpdate(e,t){if(e.profile!==this.props.profile||e.flamebearer!==this.props.flamebearer){const e=t.flamebearer,n=Jd(this.props);if(!this.isSameFlamebearer(e,n)){const t=this.calcNewConfigs(e,n);return void this.setState({flamebearer:n,flamegraphConfigs:{...this.state.flamegraphConfigs,...t},selectedItem:da.nothing()})}}t.flamegraphConfigs!==this.state.flamegraphConfigs&&this.updateFlamegraphDirtiness()}shouldShowToolbar(){return void 0===this.props.showToolbar||this.props.showToolbar}}Qd.contextType=nc,Qd.defaultProps={showCredit:!1};const qd={showPyroscopeLogo:!1},Xd=(e,t)=>{if(t)return t;const n=null!=e?e:"auto";return"zh-CN"===("auto"===n?"undefined"!=typeof navigator&&navigator.language&&navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en":n)?ec:Gl};var Yd,Kd={exports:{}};var Zd,Gd=(Yd||(Yd=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object Promise]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",x="[object ArrayBuffer]",w="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,_=/^\./,N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[o]=T[x]=T[s]=T[w]=T[l]=T[c]=T[u]=T[f]=T[d]=T[h]=T[p]=T[g]=T[v]=T[y]=!1;var R="object"==typeof i&&i&&i.Object===Object&&i,O="object"==typeof self&&self&&self.Object===Object&&self,E=R||O||Function("return this")(),P=t&&!t.nodeType&&t,F=P&&e&&!e.nodeType&&e,A=F&&F.exports===P&&R.process,I=function(){try{return A&&A.binding("util")}catch(e){}}(),D=I&&I.isTypedArray;function L(e,t,n,r){for(var a=-1,o=e?e.length:0;++a<o;){var i=e[a];t(r,i,n(i),e)}return r}function B(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var H,W,U,J=Array.prototype,Q=Function.prototype,q=Object.prototype,X=E["__core-js_shared__"],Y=(H=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",K=Q.toString,Z=q.hasOwnProperty,G=q.toString,ee=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=E.Symbol,ne=E.Uint8Array,re=q.propertyIsEnumerable,ae=J.splice,oe=(W=Object.keys,U=Object,function(e){return W(U(e))}),ie=ze(E,"DataView"),se=ze(E,"Map"),le=ze(E,"Promise"),ce=ze(E,"Set"),ue=ze(E,"WeakMap"),fe=ze(Object,"create"),de=qe(ie),he=qe(se),me=qe(le),pe=qe(ce),ge=qe(ue),ve=te?te.prototype:void 0,be=ve?ve.valueOf:void 0,ye=ve?ve.toString:void 0;function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function we(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new ke;++t<n;)this.add(e[t])}function _e(e){this.__data__=new we(e)}function Ne(e,t){var n=et(e)||Ge(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,a=!!r;for(var o in e)!Z.call(e,o)||a&&("length"==o||Ve(o,r))||n.push(o);return n}function Se(e,t){for(var n=e.length;n--;)if(Ze(e[n][0],t))return n;return-1}function Me(e,t,n,r){return Te(e,function(e,a,o){t(r,e,n(e),o)}),r}xe.prototype.clear=function(){this.__data__=fe?fe(null):{}},xe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},xe.prototype.get=function(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)},xe.prototype.set=function(e,t){return this.__data__[e]=fe&&void 0===t?n:t,this},we.prototype.clear=function(){this.__data__=[]},we.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),0))},we.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},we.prototype.has=function(e){return Se(this.__data__,e)>-1},we.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new xe,map:new(se||we),string:new xe}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,n),this},je.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new we},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof we){var r=n.__data__;if(!se||r.length<199)return r.push([e,t]),this;n=this.__data__=new ke(r)}return n.set(e,t),this};var Ce,Te=(Ce=function(e,t){return e&&Re(e,t,lt)},function(e,t){if(null==e)return e;if(!tt(e))return Ce(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),Re=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};function Oe(e,t){for(var n=0,r=(t=He(t,e)?[t]:De(t)).length;null!=e&&n<r;)e=e[Qe(t[n++])];return n&&n==r?e:void 0}function Ee(e,t){return null!=e&&t in Object(e)}function Pe(e,t,n,r,i){return e===t||(null==e||null==t||!at(e)&&!ot(t)?e!=e&&t!=t:function(e,t,n,r,i,u){var m=et(e),y=et(t),k=o,j=o;m||(k=(k=$e(e))==a?h:k),y||(j=(j=$e(t))==a?h:j);var _=k==h&&!z(e),N=j==h&&!z(t),S=k==j;if(S&&!_)return u||(u=new _e),m||st(e)?Le(e,t,n,r,i,u):function(e,t,n,r,a,o,i){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!r(new ne(e),new ne(t)));case s:case l:case d:return Ze(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case v:return e==t+"";case f:var u=$;case g:var h=2&o;if(u||(u=V),e.size!=t.size&&!h)return!1;var m=i.get(e);if(m)return m==t;o|=1,i.set(e,t);var y=Le(u(e),u(t),r,a,o,i);return i.delete(e),y;case b:if(be)return be.call(e)==be.call(t)}return!1}(e,t,k,n,r,i,u);if(!(2&i)){var M=_&&Z.call(e,"__wrapped__"),C=N&&Z.call(t,"__wrapped__");if(M||C){var T=M?e.value():e,R=C?t.value():t;return u||(u=new _e),n(T,R,r,i,u)}}return!!S&&(u||(u=new _e),function(e,t,n,r,a,o){var i=2&a,s=lt(e),l=s.length,c=lt(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:Z.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);for(var p=i;++f<l;){var g=e[d=s[f]],v=t[d];if(r)var b=i?r(v,g,d,t,e,o):r(g,v,d,e,t,o);if(!(void 0===b?g===v||n(g,v,r,a,o):b)){m=!1;break}p||(p="constructor"==d)}if(m&&!p){var y=e.constructor,x=t.constructor;y==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,u))}(e,t,Pe,n,r,i))}function Fe(e){return!(!at(e)||function(e){return!!Y&&Y in e}(e))&&(nt(e)||z(e)?ee:M).test(qe(e))}function Ae(e){return"function"==typeof e?e:null==e?ct:"object"==typeof e?et(e)?function(e,t){return He(e)&&We(t)?Ue(Qe(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Oe(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){t=He(t,e)?[t]:De(t);for(var r,a=-1,o=t.length;++a<o;){var i=Qe(t[a]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(o=e?e.length:0)&&rt(o)&&Ve(i,o)&&(et(e)||Ge(e))}(e,t,Ee)}(n,e):Pe(t,r,void 0,3)}}(e[0],e[1]):(n=function(e){for(var t=lt(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,We(a)]}return t}(t=e),1==n.length&&n[0][2]?Ue(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var s=(i=n[a])[0],l=e[s],c=i[1];if(i[2]){if(void 0===l&&!(s in e))return!1}else if(!Pe(c,l,r,3,new _e))return!1}return!0}(e,0,n)}):He(r=e)?(a=Qe(r),function(e){return null==e?void 0:e[a]}):function(e){return function(t){return Oe(t,e)}}(r);var t,n,r,a}function Ie(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return oe(e);var t,n,r,a=[];for(var o in Object(e))Z.call(e,o)&&"constructor"!=o&&a.push(o);return a}function De(e){return et(e)?e:Je(e)}function Le(e,t,n,r,a,o){var i=2&a,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,f=!0,d=1&a?new je:void 0;for(o.set(e,t),o.set(t,e);++u<s;){var h=e[u],m=t[u];if(r)var p=i?r(m,h,u,t,e,o):r(h,m,u,e,t,o);if(void 0!==p){if(p)continue;f=!1;break}if(d){if(!B(t,function(e,t){if(!d.has(t)&&(h===e||n(h,e,r,a,o)))return d.add(t)})){f=!1;break}}else if(h!==m&&!n(h,m,r,a,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Be(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ze(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Fe(n)?n:void 0}var $e=function(e){return G.call(e)};function Ve(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t){if(et(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!it(e))||j.test(e)||!k.test(e)||null!=t&&e in Object(t)}function We(e){return e==e&&!at(e)}function Ue(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ie&&$e(new ie(new ArrayBuffer(1)))!=w||se&&$e(new se)!=f||le&&$e(le.resolve())!=m||ce&&$e(new ce)!=g||ue&&$e(new ue)!=y)&&($e=function(e){var t=G.call(e),n=t==h?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case de:return w;case he:return f;case me:return m;case pe:return g;case ge:return y}return t});var Je=Ke(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(it(e))return ye?ye.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return _.test(e)&&n.push(""),e.replace(N,function(e,t,r,a){n.push(r?a.replace(S,"$1"):t||e)}),n});function Qe(e){if("string"==typeof e||it(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Xe,Ye=(Xe=function(e,t,n){Z.call(e,n)?e[n].push(t):e[n]=[t]},function(e,t){return(et(e)?L:Me)(e,Xe,Ae(t),{})});function Ke(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(Ke.Cache||ke),n}function Ze(e,t){return e===t||e!=e&&t!=t}function Ge(e){return function(e){return ot(e)&&tt(e)}(e)&&Z.call(e,"callee")&&(!re.call(e,"callee")||G.call(e)==a)}Ke.Cache=ke;var et=Array.isArray;function tt(e){return null!=e&&rt(e.length)&&!nt(e)}function nt(e){var t=at(e)?G.call(e):"";return t==u||"[object GeneratorFunction]"==t}function rt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ot(e){return!!e&&"object"==typeof e}function it(e){return"symbol"==typeof e||ot(e)&&G.call(e)==b}var st=D?function(e){return function(t){return e(t)}}(D):function(e){return ot(e)&&rt(e.length)&&!!T[G.call(e)]};function lt(e){return tt(e)?Ne(e):Ie(e)}function ct(e){return e}e.exports=Ye}(Kd,Kd.exports)),Kd.exports),eh=s(Gd),th={exports:{}};var nh=(Zd||(Zd=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object Promise]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",x="[object ArrayBuffer]",w="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,_=/^\./,N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[o]=T[x]=T[s]=T[w]=T[l]=T[c]=T[u]=T[f]=T[d]=T[h]=T[p]=T[g]=T[v]=T[y]=!1;var R="object"==typeof i&&i&&i.Object===Object&&i,O="object"==typeof self&&self&&self.Object===Object&&self,E=R||O||Function("return this")(),P=t&&!t.nodeType&&t,F=P&&e&&!e.nodeType&&e,A=F&&F.exports===P&&R.process,I=function(){try{return A&&A.binding("util")}catch(e){}}(),D=I&&I.isTypedArray;function L(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}function B(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var H,W,U,J=Array.prototype,Q=Function.prototype,q=Object.prototype,X=E["__core-js_shared__"],Y=(H=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",K=Q.toString,Z=q.hasOwnProperty,G=q.toString,ee=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=E.Symbol,ne=E.Uint8Array,re=q.propertyIsEnumerable,ae=J.splice,oe=(W=Object.keys,U=Object,function(e){return W(U(e))}),ie=ze(E,"DataView"),se=ze(E,"Map"),le=ze(E,"Promise"),ce=ze(E,"Set"),ue=ze(E,"WeakMap"),fe=ze(Object,"create"),de=qe(ie),he=qe(se),me=qe(le),pe=qe(ce),ge=qe(ue),ve=te?te.prototype:void 0,be=ve?ve.valueOf:void 0,ye=ve?ve.toString:void 0;function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function we(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new ke;++t<n;)this.add(e[t])}function _e(e){this.__data__=new we(e)}function Ne(e,t){var n=Ze(e)||Ke(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,a=!!r;for(var o in e)!Z.call(e,o)||a&&("length"==o||Ve(o,r))||n.push(o);return n}function Se(e,t){for(var n=e.length;n--;)if(Ye(e[n][0],t))return n;return-1}xe.prototype.clear=function(){this.__data__=fe?fe(null):{}},xe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},xe.prototype.get=function(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)},xe.prototype.set=function(e,t){return this.__data__[e]=fe&&void 0===t?n:t,this},we.prototype.clear=function(){this.__data__=[]},we.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),0))},we.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},we.prototype.has=function(e){return Se(this.__data__,e)>-1},we.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new xe,map:new(se||we),string:new xe}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,n),this},je.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new we},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof we){var r=n.__data__;if(!se||r.length<199)return r.push([e,t]),this;n=this.__data__=new ke(r)}return n.set(e,t),this};var Me,Ce=(Me=function(e,t){return e&&Te(e,t,it)},function(e,t){if(null==e)return e;if(!Ge(e))return Me(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),Te=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};function Re(e,t){for(var n=0,r=(t=He(t,e)?[t]:De(t)).length;null!=e&&n<r;)e=e[Qe(t[n++])];return n&&n==r?e:void 0}function Oe(e,t){return null!=e&&t in Object(e)}function Ee(e,t,n,r,i){return e===t||(null==e||null==t||!nt(e)&&!rt(t)?e!=e&&t!=t:function(e,t,n,r,i,u){var m=Ze(e),y=Ze(t),k=o,j=o;m||(k=(k=$e(e))==a?h:k),y||(j=(j=$e(t))==a?h:j);var _=k==h&&!z(e),N=j==h&&!z(t),S=k==j;if(S&&!_)return u||(u=new _e),m||ot(e)?Le(e,t,n,r,i,u):function(e,t,n,r,a,o,i){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!r(new ne(e),new ne(t)));case s:case l:case d:return Ye(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case v:return e==t+"";case f:var u=$;case g:var h=2&o;if(u||(u=V),e.size!=t.size&&!h)return!1;var m=i.get(e);if(m)return m==t;o|=1,i.set(e,t);var y=Le(u(e),u(t),r,a,o,i);return i.delete(e),y;case b:if(be)return be.call(e)==be.call(t)}return!1}(e,t,k,n,r,i,u);if(!(2&i)){var M=_&&Z.call(e,"__wrapped__"),C=N&&Z.call(t,"__wrapped__");if(M||C){var T=M?e.value():e,R=C?t.value():t;return u||(u=new _e),n(T,R,r,i,u)}}return!!S&&(u||(u=new _e),function(e,t,n,r,a,o){var i=2&a,s=it(e),l=s.length,c=it(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:Z.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);for(var p=i;++f<l;){var g=e[d=s[f]],v=t[d];if(r)var b=i?r(v,g,d,t,e,o):r(g,v,d,e,t,o);if(!(void 0===b?g===v||n(g,v,r,a,o):b)){m=!1;break}p||(p="constructor"==d)}if(m&&!p){var y=e.constructor,x=t.constructor;y==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,u))}(e,t,Ee,n,r,i))}function Pe(e){return!(!nt(e)||function(e){return!!Y&&Y in e}(e))&&(et(e)||z(e)?ee:M).test(qe(e))}function Fe(e){return"function"==typeof e?e:null==e?st:"object"==typeof e?Ze(e)?function(e,t){return He(e)&&We(t)?Ue(Qe(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Re(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){t=He(t,e)?[t]:De(t);for(var r,a=-1,o=t.length;++a<o;){var i=Qe(t[a]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(o=e?e.length:0)&&tt(o)&&Ve(i,o)&&(Ze(e)||Ke(e))}(e,t,Oe)}(n,e):Ee(t,r,void 0,3)}}(e[0],e[1]):(n=function(e){for(var t=it(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,We(a)]}return t}(t=e),1==n.length&&n[0][2]?Ue(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var s=(i=n[a])[0],l=e[s],c=i[1];if(i[2]){if(void 0===l&&!(s in e))return!1}else if(!Ee(c,l,r,3,new _e))return!1}return!0}(e,0,n)}):He(r=e)?(a=Qe(r),function(e){return null==e?void 0:e[a]}):function(e){return function(t){return Re(t,e)}}(r);var t,n,r,a}function Ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return oe(e);var t,n,r,a=[];for(var o in Object(e))Z.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Ie(e,t){var n=-1,r=Ge(e)?Array(e.length):[];return Ce(e,function(e,a,o){r[++n]=t(e,a,o)}),r}function De(e){return Ze(e)?e:Je(e)}function Le(e,t,n,r,a,o){var i=2&a,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,f=!0,d=1&a?new je:void 0;for(o.set(e,t),o.set(t,e);++u<s;){var h=e[u],m=t[u];if(r)var p=i?r(m,h,u,t,e,o):r(h,m,u,e,t,o);if(void 0!==p){if(p)continue;f=!1;break}if(d){if(!B(t,function(e,t){if(!d.has(t)&&(h===e||n(h,e,r,a,o)))return d.add(t)})){f=!1;break}}else if(h!==m&&!n(h,m,r,a,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Be(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ze(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0}var $e=function(e){return G.call(e)};function Ve(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t){if(Ze(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!at(e))||j.test(e)||!k.test(e)||null!=t&&e in Object(t)}function We(e){return e==e&&!nt(e)}function Ue(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ie&&$e(new ie(new ArrayBuffer(1)))!=w||se&&$e(new se)!=f||le&&$e(le.resolve())!=m||ce&&$e(new ce)!=g||ue&&$e(new ue)!=y)&&($e=function(e){var t=G.call(e),n=t==h?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case de:return w;case he:return f;case me:return m;case pe:return g;case ge:return y}return t});var Je=Xe(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(at(e))return ye?ye.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return _.test(e)&&n.push(""),e.replace(N,function(e,t,r,a){n.push(r?a.replace(S,"$1"):t||e)}),n});function Qe(e){if("string"==typeof e||at(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Xe(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(Xe.Cache||ke),n}function Ye(e,t){return e===t||e!=e&&t!=t}function Ke(e){return function(e){return rt(e)&&Ge(e)}(e)&&Z.call(e,"callee")&&(!re.call(e,"callee")||G.call(e)==a)}Xe.Cache=ke;var Ze=Array.isArray;function Ge(e){return null!=e&&tt(e.length)&&!et(e)}function et(e){var t=nt(e)?G.call(e):"";return t==u||"[object GeneratorFunction]"==t}function tt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function nt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function rt(e){return!!e&&"object"==typeof e}function at(e){return"symbol"==typeof e||rt(e)&&G.call(e)==b}var ot=D?function(e){return function(t){return e(t)}}(D):function(e){return rt(e)&&tt(e.length)&&!!T[G.call(e)]};function it(e){return Ge(e)?Ne(e):Ae(e)}function st(e){return e}e.exports=function(e,t){return(Ze(e)?L:Ie)(e,Fe(t))}}(th,th.exports)),th.exports),rh=s(nh);exports.Box=function(t){const{children:n,noPadding:r,className:a="",theme:o="dark"}=t,i=r?"":Vr.padding;return e.jsx("div",{className:`${Vr.box} ${i} ${a}`,"data-theme":o,children:n})},exports.DefaultPalette=ql,exports.Flamegraph=cs,exports.FlamegraphI18nProvider=rc,exports.FlamegraphRenderer=n=>{const{i18n:r,locale:a,colorMode:o="light",sandwich:i=!0,...s}=n,l=t.useMemo(()=>Xd(a,r),[a,r]),c=t.useMemo(()=>(e=>{switch(e){case"dark":return"ps-theme-dark";case"kylin":return"ps-theme-kylin";default:return"ps-theme-light"}})(o),[o]);return e.jsx("pyro-flamegraph",{className:c,children:e.jsx(rc,{messages:l,children:e.jsx(Qd,{...qd,enableSandwichView:i,...s})})})},exports.convertJaegerTraceToProfile=function(e){const t={numTicks:0,maxSelf:0,names:[],levels:[]},n={},r={children:[]};return e.spans.forEach(e=>{e.children=[],n[e.spanID]=e}),e.spans.forEach(e=>{let t=r;e.references&&e.references.length>0&&(t=n[e.references[0].spanID]||r),t.children.push(e)}),function e(t,n){(t.children||[]).forEach(t=>e(t));let r=0;const a=eh(t.children||[],e=>e.operationName);t.children=rh(a,e=>{const t=e[0];for(let n=1;n<e.length;n+=1)t.duration+=e[n].duration;return r+=t.duration,t}),t.total=t.duration||r,t.self=Math.max(0,t.total-r)}(r),function n(r,a,o){var i;return t.numTicks||(t.numTicks=r.total),(i=t.levels)[a]||(i[a]=[]),t.levels[a].push(o),t.levels[a].push(r.total),t.levels[a].push(r.self),t.names.push((r.processID?`${e.processes[r.processID].serviceName}: `:"")+(r.operationName||"total")),t.levels[a].push(t.names.length-1),(r.children||[]).forEach(e=>{o+=n(e,a+1,o)}),r.total}(r,0,0),t.levels=Wd("single",t.levels),{version:1,flamebearer:t,metadata:{format:"single",units:"trace_samples",spyName:"tracing",sampleRate:1e6}}},exports.diffTwoProfiles=function(e,t){e.flamebearer.levels=Ud("single",e.flamebearer.levels),t.flamebearer.levels=Ud("single",t.flamebearer.levels);const n=function(e,t){const n={format:"double",numTicks:e.numTicks+t.numTicks,leftTicks:e.numTicks,rightTicks:t.numTicks,maxSelf:100,sampleRate:e.sampleRate,names:[],levels:[],units:e.units,spyName:e.spyName},r=Md(e,t),a=(e,t,r,o)=>{var i;const{name:s,children:l,self:c,total:u}=e;n.names.push(s),(i=n.levels)[t]||(i[t]=[]),n.maxSelf=Math.max(n.maxSelf,c[0]||0,c[1]||0),n.levels[t]=n.levels[t].concat([r,u[0]||0,c[0]||0,o,u[1]||0,c[1]||0,n.names.length-1]);for(let e=0;e<l.length;e+=1){const[n,i]=a(l[e],t+1,r,o);r+=n,o+=i}return[u[0]||0,u[1]||0]};return a(r,0,0,0),n}(e.flamebearer,t.flamebearer);n.levels=Wd("double",n.levels);const r={...e.metadata};return r.format="double",{version:1,flamebearer:n,metadata:r,leftTicks:e.flamebearer.numTicks,rightTicks:t.flamebearer.numTicks}},exports.flamegraphDefaultMessages=Gl,exports.flamegraphZhCNMessages=ec;
|
|
18
18
|
//# sourceMappingURL=index.node.cjs.js.map
|