diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 00000000..7f8900b7 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,51 @@ +// .eslintrc.mjs +module.exports = { + root: true, + extends: [ + 'plugin:@wordpress/eslint-plugin/recommended-with-formatting', + 'plugin:storybook/recommended', + 'plugin:@typescript-eslint/recommended', + ], + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + alias: { + map: [ + ['@/icons', './src/ui/icons.js'], + ['@/components', './src/components'], + ['@/utilities', './src/utilities'], + ['@', './src'], + ], + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + }, + }, + parserOptions: { + requireConfigFile: false, + babelOptions: { + presets: ['@wordpress/babel-preset-default'], + }, + }, + overrides: [ + { + files: ['./src/utilities/withTW.js'], + rules: { + '@typescript-eslint/no-var-requires': 'off', + }, + }, + ], + rules: { + 'jsx-a11y/click-events-have-key-events': 'off', + 'react-hooks/exhaustive-deps': 'off', + 'jsx-a11y/label-has-associated-control': 'off', + 'jsx-a11y/no-noninteractive-element-interactions': 'off', + 'jsx-a11y/anchor-is-valid': 'off', + + 'no-mixed-spaces-and-tabs': 'off', + }, + globals: { + localStorage: 'readonly', + }, +}; diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 00000000..b1be3553 --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,16 @@ +// Import the default config file and expose it in the project root. +// Useful for editor integrations. + +import config from '@wordpress/prettier-config'; + +config.overrides = [ + { + files: ['*.scss', '*.css'], + options: { + printWidth: 500, + singleQuote: false, + }, + }, +]; + +export default config; diff --git a/.stylelintrc.mjs b/.stylelintrc.mjs new file mode 100644 index 00000000..2d2b181f --- /dev/null +++ b/.stylelintrc.mjs @@ -0,0 +1,51 @@ +export default { + extends: ['@wordpress/stylelint-config'], + rules: { + 'font-family-name-quotes': 'always-where-recommended', + 'function-url-quotes': 'always', + 'declaration-property-unit-allowed-list': { + '/^line-height/': ['em', 'rem', 'px'], + }, + 'comment-empty-line-before': null, + 'selector-class-pattern': null, + 'selector-id-pattern': null, + 'no-descending-specificity': null, + 'no-duplicate-selectors': null, + 'at-rule-no-unknown': null, + 'at-rule-empty-line-before': null, + 'at-rule-empty-line-before': [ + 'always', + { + except: ['blockless-after-same-name-blockless', 'first-nested'], + ignore: ['after-comment'], + }, + ], + 'block-no-empty': true, + 'no-empty-source': true, + 'declaration-empty-line-before': [ + 'always', + { + except: ['after-declaration', 'first-nested'], + ignore: ['after-comment', 'inside-single-line-block'], + }, + ], + 'rule-empty-line-before': [ + 'always-multi-line', + { + except: ['first-nested'], + ignore: ['after-comment'], + }, + ], + }, + overrides: [ + { + files: ['*.scss', '**/*.scss'], + extends: '@wordpress/stylelint-config/scss-stylistic', + }, + { + files: ['*.css', '**/*.css'], + extends: '@wordpress/stylelint-config/stylistic', + }, + ], + customSyntax: 'postcss-scss', +}; diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 00000000..f17e1d15 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,46 @@ +Version 1.1.0 - 11th November, 2024 +- New - Area Chart +- New - Bar Chart +- New - Line Chart +- New - Pie Chart +- New - Accordion +- New - Search +- New - Pagination +- New - Breadcrumb +- Improvement - Used vite instead of webpack for better build performance +- Improvement - Used typescript for better storybook development and easy documentation +- Fixes - Button component used in dropdown component +- Fixed - Fixed multiple issues suggested in developer UAT. + +Version 1.0.0 - 17th October, 2024 +- New - Alert +- New - Avatar +- New - Badge +- New - Button +- New - Buttom Group +- New - Cards +- New - Container +- New - Checkbox +- New - Datepicker +- New - Dialog +- New - Drawer +- New - Dropdown Menu +- New - Editor Input +- New - Input +- New - Label +- New - Loader +- New - Menu Item +- New - Progress Bar +- New - Progress Steps +- New - Radio Button Group +- New - Search +- New - Select +- New - Sidebar +- New - Skeleton +- New - Switch +- New - Tabs +- New - Text Area +- New - Title +- New - Toaster +- New - Tooltip +- New - Topbar diff --git a/dist/_commonjsHelpers-DKOUU3wS.cjs b/dist/_commonjsHelpers-DKOUU3wS.cjs new file mode 100644 index 00000000..13791b1e --- /dev/null +++ b/dist/_commonjsHelpers-DKOUU3wS.cjs @@ -0,0 +1 @@ +"use strict";var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=l; diff --git a/dist/_commonjsHelpers-DaMA6jEr.js b/dist/_commonjsHelpers-DaMA6jEr.js new file mode 100644 index 00000000..19cdb549 --- /dev/null +++ b/dist/_commonjsHelpers-DaMA6jEr.js @@ -0,0 +1,8 @@ +var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function l(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; +} +export { + o as c, + l as g +}; diff --git a/dist/force-ui.cjs b/dist/force-ui.cjs new file mode 100644 index 00000000..5e270385 --- /dev/null +++ b/dist/force-ui.cjs @@ -0,0 +1,277 @@ +"use strict";var c8=Object.defineProperty;var IC=e=>{throw TypeError(e)};var f8=(e,t,n)=>t in e?c8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Yo=(e,t,n)=>f8(e,typeof t!="symbol"?t+"":t,n),RC=(e,t,n)=>t.has(e)||IC("Cannot "+n);var wr=(e,t,n)=>(RC(e,t,"read from private field"),n?n.call(e):t.get(e)),bv=(e,t,n)=>t.has(e)?IC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Wa=(e,t,n,r)=>(RC(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),O=require("react"),Tl=require("react-dom"),Qe=require("./_commonjsHelpers-DKOUU3wS.cjs");function lN(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ee=lN(O),uN=lN(Tl),ww="-",d8=e=>{const t=p8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(ww);return s[0]===""&&s.length!==1&&s.shift(),cN(s,t)||h8(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},cN=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?cN(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(ww);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},LC=/^\[(.+)\]$/,h8=e=>{if(LC.test(e)){const t=LC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},p8=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return g8(Object.entries(e.classGroups),n).forEach(([o,a])=>{Fb(a,r,o,t)}),r},Fb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:BC(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(m8(i)){Fb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{Fb(a,BC(t,o),n,r)})})},BC=(e,t)=>{let n=e;return t.split(ww).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},m8=e=>e.isThemeGetter,g8=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,y8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},fN="!",v8=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const l=[];let u=0,f=0,d;for(let y=0;yf?d-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},b8=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},x8=e=>({cache:y8(e.cacheSize),parseClassName:v8(e),...d8(e)}),w8=/\s+/,_8=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(w8);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:f,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}=n(u);let g=!!m,v=r(g?p.substring(0,m):p);if(!v){if(!g){s=u+(s.length>0?" "+s:s);continue}if(v=r(p),!v){s=u+(s.length>0?" "+s:s);continue}g=!1}const y=b8(f).join(":"),x=d?y+fN:y,w=x+v;if(o.includes(w))continue;o.push(w);const S=i(v,g);for(let A=0;A0?" "+s:s)}return s};function S8(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(f),e());return n=x8(u),r=n.cache.get,i=n.cache.set,o=s,s(l)}function s(l){const u=r(l);if(u)return u;const f=_8(l,n);return i(l,f),f}return function(){return o(S8.apply(null,arguments))}}const kt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},hN=/^\[(?:([a-z-]+):)?(.+)\]$/i,C8=/^\d+\/\d+$/,A8=new Set(["px","full","screen"]),P8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,E8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,k8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,M8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,no=e=>xl(e)||A8.has(e)||C8.test(e),qo=e=>fu(e,"length",B8),xl=e=>!!e&&!Number.isNaN(Number(e)),xv=e=>fu(e,"number",xl),Qu=e=>!!e&&Number.isInteger(Number(e)),j8=e=>e.endsWith("%")&&xl(e.slice(0,-1)),He=e=>hN.test(e),Xo=e=>P8.test(e),N8=new Set(["length","size","percentage"]),$8=e=>fu(e,N8,pN),D8=e=>fu(e,"position",pN),I8=new Set(["image","url"]),R8=e=>fu(e,I8,W8),L8=e=>fu(e,"",F8),ec=()=>!0,fu=(e,t,n)=>{const r=hN.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},B8=e=>T8.test(e)&&!E8.test(e),pN=()=>!1,F8=e=>k8.test(e),W8=e=>M8.test(e),z8=()=>{const e=kt("colors"),t=kt("spacing"),n=kt("blur"),r=kt("brightness"),i=kt("borderColor"),o=kt("borderRadius"),a=kt("borderSpacing"),s=kt("borderWidth"),l=kt("contrast"),u=kt("grayscale"),f=kt("hueRotate"),d=kt("invert"),p=kt("gap"),m=kt("gradientColorStops"),g=kt("gradientColorStopPositions"),v=kt("inset"),y=kt("margin"),x=kt("opacity"),w=kt("padding"),S=kt("saturate"),A=kt("scale"),_=kt("sepia"),C=kt("skew"),E=kt("space"),k=kt("translate"),M=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",He,t],N=()=>[He,t],F=()=>["",no,qo],L=()=>["auto",xl,He],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",He],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[xl,He];return{cacheSize:500,separator:":",theme:{colors:[ec],spacing:[no,qo],blur:["none","",Xo,He],brightness:Y(),borderColor:[e],borderRadius:["none","","full",Xo,He],borderSpacing:N(),borderWidth:F(),contrast:Y(),grayscale:U(),hueRotate:Y(),invert:U(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[j8,qo],inset:$(),margin:$(),opacity:Y(),padding:N(),saturate:Y(),scale:Y(),sepia:U(),skew:Y(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[Xo]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),He]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qu,He]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",Qu,He]}],"grid-cols":[{"grid-cols":[ec]}],"col-start-end":[{col:["auto",{span:["full",Qu,He]},He]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[ec]}],"row-start-end":[{row:["auto",{span:[Qu,He]},He]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",He,t]}],"min-w":[{"min-w":[He,t,"min","max","fit"]}],"max-w":[{"max-w":[He,t,"none","full","min","max","fit","prose",{screen:[Xo]},Xo]}],h:[{h:[He,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[He,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xo,qo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xv]}],"font-family":[{font:[ec]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",He]}],"line-clamp":[{"line-clamp":["none",xl,xv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",no,He]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",no,qo]}],"underline-offset":[{"underline-offset":["auto",no,He]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),D8]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$8]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},R8]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:B()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[no,He]}],"outline-w":[{outline:[no,qo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[no,qo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xo,L8]}],"shadow-color":[{shadow:[ec]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Xo,He]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Qu,He]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[no,qo,xv]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},V8=O8(z8);function mN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;tV8(Ue(...e)),Wc=(...e)=>(...t)=>e.forEach(n=>n==null?void 0:n(...t)),Mm=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},U8={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},K8=()=>{var i,o;const e=((o=(i=window.navigator)==null?void 0:i.userAgentData)==null?void 0:o.platform)||window.navigator.platform,t=["macOS","Macintosh","MacIntel","MacPPC","Mac68K"],n=["Win32","Win64","Windows","WinCE"];let r="null";return t.includes(e)?r="Mac OS":n.includes(e)&&(r="Windows"),r},zn=O.forwardRef((e,t)=>{const{variant:n="primary",size:r="md",type:i="button",tag:o="button",className:a,children:s,disabled:l=!1,destructive:u=!1,icon:f=null,iconPosition:d="left",loading:p=!1,...m}=e,g="outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",v=p?"opacity-50 disabled:cursor-not-allowed":"",y={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],x=u&&!l?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",w={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[r];let S,A=null,_="";f&&(_="flex items-center justify-center",d==="left"?S=f:A=f);const C=o;return T.jsxs(C,{ref:t,type:i,className:G(_,g,w,y,x,v,{"cursor-default":l},a),disabled:l,...m,children:[S,s?T.jsx("span",{className:"px-1",children:s}):null,A]})}),H8="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let _a=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=H8[n[e]&63];return t};const G8=({label:e,switchId:t,disabled:n=!1,children:r,size:i})=>{const o={sm:"text-sm leading-4 font-medium",md:"text-base leading-5 font-medium",lg:"text-lg leading-6 font-medium"};if(O.isValidElement(e))return T.jsxs("div",{className:G("inline-flex items-center gap-3","items-start"),children:[r,e]});const s=()=>{const{heading:f="",description:d=""}=e||{};return T.jsxs("div",{className:"space-y-1.5",children:[f&&T.jsx("p",{className:G("text-text-primary m-0",o[i],n&&"text-text-disabled"),children:f}),d&&T.jsx("p",{className:G("text-text-secondary text-sm font-normal leading-5 m-0",n&&"text-text-disabled"),children:d})]})},l=!(e!=null&&e.heading)&&!(e!=null&&e.description),u=!(e!=null&&e.heading)||!(e!=null&&e.description)?"items-center":"items-start";return l?r:T.jsxs("div",{className:G("inline-flex",u,"gap-3"),children:[r,T.jsx("label",{htmlFor:t,className:G(!n&&"cursor-pointer"),children:s()})]})},Y8=({id:e,onChange:t,value:n,defaultValue:r=!1,size:i="lg",disabled:o=!1,label:a={heading:"",description:""},name:s,className:l,...u},f)=>{const d=O.useMemo(()=>typeof n<"u",[n]),p=O.useMemo(()=>e||`switch-${_a()}`,[]),[m,g]=O.useState(r),v="primary",y=O.useCallback(()=>d?n:m,[d,n,m]),x=_=>{if(o)return;const C=_.target.checked;d||g(C),typeof t=="function"&&t(C)},w={primary:{input:"bg-toggle-off hover:bg-toggle-off-hover checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-4 checked:hover:bg-toggle-on border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},S={lg:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},md:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},sm:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.5"}},A={input:"bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled",toggleDial:"peer-disabled:cursor-not-allowed"};return T.jsx(G8,{label:a,switchId:p,disabled:o,size:i,children:T.jsxs("div",{className:G("relative inline-block cursor-pointer rounded-full shrink-0",S[i].container,l),children:[T.jsx("input",{ref:f,id:p,type:"checkbox",className:G("peer appearance-none absolute bg-blue-gray-100 rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",w[v].input,o&&A.input),checked:y(),onChange:x,disabled:o,name:s,...u}),T.jsx("label",{htmlFor:p,className:G("bg-white border border-blue-gray-100 rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 left-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 before:left-2/4 before:-translate-y-2/4 before:-translate-x-2/4",S[i].toggleDial,w[v].toggleDial,o&&A.toggleDial)})]})})},_w=O.forwardRef(Y8);_w.displayName="Switch";/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gN=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var X8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z8=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>O.createElement("svg",{ref:l,...X8,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gN("lucide",i),...s},[...a.map(([u,f])=>O.createElement(u,f)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wn=(e,t)=>{const n=O.forwardRef(({className:r,...i},o)=>O.createElement(Z8,{ref:o,iconNode:t,className:gN(`lucide-${q8(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bf=wn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sw=wn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yN=wn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ow=wn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J8=wn("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q8=wn("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wb=wn("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eK=wn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vN=wn("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tK=wn("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nK=wn("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bN=wn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xN=wn("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rK=wn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iK=wn("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FC=wn("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oK=wn("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const da=wn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),aK=({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:i,indeterminate:o,disabled:a,size:s="md",className:l,...u},f)=>{var C,E;const d=O.useMemo(()=>e||`checkbox-${_a()}`,[e]),p=O.useMemo(()=>typeof r<"u",[r]),[m,g]=O.useState(n||!1),v="primary",y={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-xs",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},x={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus",icon:"text-white"}},w={checkbox:"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",icon:"cursor-not-allowed peer-disabled:text-border-disabled"},S=O.useCallback(()=>p?r:m,[p,r,m]),A=k=>{if(a)return;const M=k.target.checked;p||g(M),typeof i=="function"&&i(M)},_=O.useCallback(()=>O.isValidElement(t)?t:!(t!=null&&t.heading)&&!(t!=null&&t.description)?null:T.jsxs("div",{className:y[s].gap,children:[(t==null?void 0:t.heading)&&T.jsx("p",{className:G("text-text-primary font-medium leading-4 m-0",y[s].text,y[s].gap,a&&"text-text-disabled"),children:t==null?void 0:t.heading}),(t==null?void 0:t.description)&&T.jsx("p",{className:G("text-text-secondary font-normal leading-5 m-0",y[s].description,a&&"text-text-disabled"),children:t==null?void 0:t.description})]}),[t,s,a]);return T.jsxs("div",{className:G("inline-flex items-center gap-2",!!t&&"items-start",a&&"cursor-not-allowed"),children:[T.jsxs("label",{className:G("relative flex items-center rounded-full p-0.5",!a&&"cursor-pointer"),htmlFor:d,children:[T.jsx("input",{ref:f,id:d,type:"checkbox",className:G("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",x[v].checkbox,y[s].checkbox,a&&w.checkbox,l),checked:S(),onChange:A,disabled:a,...u}),T.jsx("span",{className:G("pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",x[v].icon,a&&w.icon),children:o?T.jsx(vN,{className:G((C=y[s])==null?void 0:C.icon)}):T.jsx(Bf,{className:G((E=y[s])==null?void 0:E.icon)})})]}),!!t&&T.jsx("label",{className:G("cursor-pointer",a&&"cursor-not-allowed"),htmlFor:d,children:_()})]})},wN=O.forwardRef(aK);wN.displayName="Checkbox";const WC={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus",icon:"text-white"}},zC={checkbox:"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed",icon:"peer-disabled:text-border-disabled cursor-not-allowed"},sK={sm:"text-sm leading-5",md:"text-base leading-6"},wv={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},VC={sm:{switch:"mt-1",radio:"mt-0.5"},md:{switch:"mt-0.5",radio:"mt-px"}},lK={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"},uK="border-0 border-r border-border-subtle border-solid",cK="bg-background-primary text-primary cursor-pointer flex items-center justify-center",fK="hover:bg-button-tertiary-hover",dK="focus:outline-none";function jm(){return typeof window<"u"}function Sa(e){return _N(e)?(e.nodeName||"").toLowerCase():"#document"}function fr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fi(e){var t;return(t=(_N(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _N(e){return jm()?e instanceof Node||e instanceof fr(e).Node:!1}function vt(e){return jm()?e instanceof Element||e instanceof fr(e).Element:!1}function Qt(e){return jm()?e instanceof HTMLElement||e instanceof fr(e).HTMLElement:!1}function zb(e){return!jm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fr(e).ShadowRoot}function Ff(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function hK(e){return["table","td","th"].includes(Sa(e))}function Nm(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Cw(e){const t=$m(),n=vt(e)?Mr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function pK(e){let t=So(e);for(;Qt(t)&&!ha(t);){if(Cw(t))return t;if(Nm(t))return null;t=So(t)}return null}function $m(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ha(e){return["html","body","#document"].includes(Sa(e))}function Mr(e){return fr(e).getComputedStyle(e)}function Dm(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function So(e){if(Sa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zb(e)&&e.host||Fi(e);return zb(t)?t.host:t}function SN(e){const t=So(e);return ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&Ff(t)?t:SN(t)}function ua(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=SN(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=fr(i);if(o){const s=Vb(a);return t.concat(a,a.visualViewport||[],Ff(i)?i:[],s&&n?ua(s):[])}return t.concat(i,ua(i,[],n))}function Vb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ci(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Jt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&zb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ON(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function CN(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function AN(e){return e.mozInputSource===0&&e.isTrusted?!0:Ub()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Aw(e){return mK()?!1:!Ub()&&e.width===0&&e.height===0||Ub()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Pw(){return/apple/i.test(navigator.vendor)}function Ub(){const e=/android/i;return e.test(ON())||e.test(CN())}function PN(){return ON().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function mK(){return CN().includes("jsdom/")}function zc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function gK(e){return"nativeEvent"in e}function yK(e){return e.matches("html,body")}function Mn(e){return(e==null?void 0:e.ownerDocument)||document}function _v(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function so(e){return"composedPath"in e?e.composedPath()[0]:e.target}const vK="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Tw(e){return Qt(e)&&e.matches(vK)}function kn(e){e.preventDefault(),e.stopPropagation()}function Kb(e){return e?e.getAttribute("role")==="combobox"&&Tw(e):!1}const pa=Math.min,Ar=Math.max,Hh=Math.round,ll=Math.floor,Ei=e=>({x:e,y:e}),bK={left:"right",right:"left",bottom:"top",top:"bottom"},xK={start:"end",end:"start"};function Hb(e,t,n){return Ar(e,pa(t,n))}function du(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function hu(e){return e.split("-")[1]}function TN(e){return e==="x"?"y":"x"}function Ew(e){return e==="y"?"height":"width"}function ms(e){return["top","bottom"].includes(ma(e))?"y":"x"}function kw(e){return TN(ms(e))}function wK(e,t,n){n===void 0&&(n=!1);const r=hu(e),i=kw(e),o=Ew(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Gh(a)),[a,Gh(a)]}function _K(e){const t=Gh(e);return[Gb(e),t,Gb(t)]}function Gb(e){return e.replace(/start|end/g,t=>xK[t])}function SK(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function OK(e,t,n,r){const i=hu(e);let o=SK(ma(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Gb)))),o}function Gh(e){return e.replace(/left|right|bottom|top/g,t=>bK[t])}function CK(e){return{top:0,right:0,bottom:0,left:0,...e}}function EN(e){return typeof e!="number"?CK(e):{top:e,right:e,bottom:e,left:e}}function Yh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var AK=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],qh=AK.join(","),kN=typeof Element>"u",El=kN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xh=!kN&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Zh=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},PK=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},TK=function(t,n,r){if(Zh(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(qh));return n&&El.call(t,qh)&&i.unshift(t),i=i.filter(r),i},EK=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Zh(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var f=El.call(a,qh);f&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Zh(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var m=e(d===!0?a.children:d.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:a,candidates:m})}else o.unshift.apply(o,a.children)}}return i},MN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},jN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||PK(t))&&!MN(t)?0:t.tabIndex},kK=function(t,n){var r=jN(t);return r<0&&n&&!MN(t)?0:r},MK=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},NN=function(t){return t.tagName==="INPUT"},jK=function(t){return NN(t)&&t.type==="hidden"},NK=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$K=function(t,n){for(var r=0;rsummary:first-of-type"),a=o?t.parentElement:t;if(El.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=Xh(t);if(l&&!l.shadowRoot&&i(l)===!0)return UC(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(LK(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return UC(t);return!1},FK=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},VK=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=kK(s,a),u=a?e(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(MK).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Im=function(t,n){n=n||{};var r;return n.getShadowRoot?r=EK([t],n.includeContainer,{filter:Yb.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:zK}):r=TK(t,n.includeContainer,Yb.bind(null,n)),VK(r)},UK=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return El.call(t,qh)===!1?!1:Yb(n,t)};function KC(e,t,n){let{reference:r,floating:i}=e;const o=ms(t),a=kw(t),s=Ew(a),l=ma(t),u=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let m;switch(l){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(hu(t)){case"start":m[a]-=p*(n&&u?-1:1);break;case"end":m[a]+=p*(n&&u?-1:1);break}return m}const KK=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=KC(u,r,l),p=r,m={},g=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=du(e,t)||{};if(u==null)return{};const d=EN(f),p={x:n,y:r},m=kw(i),g=Ew(m),v=await a.getDimensions(u),y=m==="y",x=y?"top":"left",w=y?"bottom":"right",S=y?"clientHeight":"clientWidth",A=o.reference[g]+o.reference[m]-p[m]-o.floating[g],_=p[m]-o.reference[m],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=C?C[S]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[S]||o.floating[g]);const k=A/2-_/2,M=E/2-v[g]/2-1,D=pa(d[x],M),$=pa(d[w],M),N=D,F=E-v[g]-$,L=E/2-v[g]/2+k,W=Hb(N,L,F),B=!l.arrow&&hu(i)!=null&&L!==W&&o.reference[g]/2-(LL<=0)){var $,N;const L=((($=o.flip)==null?void 0:$.index)||0)+1,W=E[L];if(W)return{data:{index:L,overflows:D},reset:{placement:W}};let B=(N=D.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:N.placement;if(!B)switch(m){case"bestFit":{var F;const z=(F=D.filter(H=>{if(C){const U=ms(H.placement);return U===w||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,K)=>U+K,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:F[0];z&&(B=z);break}case"initialPlacement":B=s;break}if(i!==B)return{reset:{placement:B}}}return{}}}};async function YK(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ma(n),s=hu(n),l=ms(n)==="y",u=["left","top"].includes(a)?-1:1,f=o&&l?-1:1,d=du(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(m=s==="end"?g*-1:g),l?{x:m*f,y:p*u}:{x:p*u,y:m*f}}const qK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await YK(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},XK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...l}=du(e,t),u={x:n,y:r},f=await Mw(t,l),d=ms(ma(i)),p=TN(d);let m=u[p],g=u[d];if(o){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=m+f[y],S=m-f[x];m=Hb(w,m,S)}if(a){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=g+f[y],S=g-f[x];g=Hb(w,g,S)}const v=s.fn({...t,[p]:m,[d]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:o,[d]:a}}}}}},ZK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=du(e,t),f=await Mw(t,u),d=ma(i),p=hu(i),m=ms(i)==="y",{width:g,height:v}=o.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(x=d,y=p==="end"?"top":"bottom");const w=v-f.top-f.bottom,S=g-f.left-f.right,A=pa(v-f[y],w),_=pa(g-f[x],S),C=!t.middlewareData.shift;let E=A,k=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),C&&!p){const D=Ar(f.left,0),$=Ar(f.right,0),N=Ar(f.top,0),F=Ar(f.bottom,0);m?k=g-2*(D!==0||$!==0?D+$:Ar(f.left,f.right)):E=v-2*(N!==0||F!==0?N+F:Ar(f.top,f.bottom))}await l({...t,availableWidth:k,availableHeight:E});const M=await a.getDimensions(s.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function $N(e){const t=Mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Qt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Hh(n)!==o||Hh(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function jw(e){return vt(e)?e:e.contextElement}function wl(e){const t=jw(e);if(!Qt(t))return Ei(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=$N(t);let a=(o?Hh(n.width):n.width)/r,s=(o?Hh(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const JK=Ei(0);function DN(e){const t=fr(e);return!$m()||!t.visualViewport?JK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function QK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fr(e)?!1:t}function gs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=jw(e);let a=Ei(1);t&&(r?vt(r)&&(a=wl(r)):a=wl(e));const s=QK(o,n,r)?DN(o):Ei(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(o){const p=fr(o),m=r&&vt(r)?fr(r):r;let g=p,v=Vb(g);for(;v&&r&&m!==g;){const y=wl(v),x=v.getBoundingClientRect(),w=Mr(v),S=x.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,A=x.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,f*=y.x,d*=y.y,l+=S,u+=A,g=fr(v),v=Vb(g)}}return Yh({width:f,height:d,x:l,y:u})}function Nw(e,t){const n=Dm(e).scrollLeft;return t?t.left+n:gs(Fi(e)).left+n}function IN(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Nw(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function eH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Fi(r),s=t?Nm(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Ei(1);const f=Ei(0),d=Qt(r);if((d||!d&&!o)&&((Sa(r)!=="body"||Ff(a))&&(l=Dm(r)),Qt(r))){const m=gs(r);u=wl(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=a&&!d&&!o?IN(a,l,!0):Ei(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}}function tH(e){return Array.from(e.getClientRects())}function nH(e){const t=Fi(e),n=Dm(e),r=e.ownerDocument.body,i=Ar(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ar(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Nw(e);const s=-n.scrollTop;return Mr(r).direction==="rtl"&&(a+=Ar(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function rH(e,t){const n=fr(e),r=Fi(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=$m();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function iH(e,t){const n=gs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Qt(e)?wl(e):Ei(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function HC(e,t,n){let r;if(t==="viewport")r=rH(e,n);else if(t==="document")r=nH(Fi(e));else if(vt(t))r=iH(t,n);else{const i=DN(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Yh(r)}function RN(e,t){const n=So(e);return n===t||!vt(n)||ha(n)?!1:Mr(n).position==="fixed"||RN(n,t)}function oH(e,t){const n=t.get(e);if(n)return n;let r=ua(e,[],!1).filter(s=>vt(s)&&Sa(s)!=="body"),i=null;const o=Mr(e).position==="fixed";let a=o?So(e):e;for(;vt(a)&&!ha(a);){const s=Mr(a),l=Cw(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ff(a)&&!l&&RN(e,a))?r=r.filter(f=>f!==a):i=s,a=So(a)}return t.set(e,r),r}function aH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Nm(t)?[]:oH(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,f)=>{const d=HC(t,f,i);return u.top=Ar(d.top,u.top),u.right=pa(d.right,u.right),u.bottom=pa(d.bottom,u.bottom),u.left=Ar(d.left,u.left),u},HC(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sH(e){const{width:t,height:n}=$N(e);return{width:t,height:n}}function lH(e,t,n){const r=Qt(t),i=Fi(t),o=n==="fixed",a=gs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ei(0);if(r||!r&&!o)if((Sa(t)!=="body"||Ff(i))&&(s=Dm(t)),r){const p=gs(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=Nw(i));const u=i&&!r&&!o?IN(i,s):Ei(0),f=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:f,y:d,width:a.width,height:a.height}}function Sv(e){return Mr(e).position==="static"}function GC(e,t){if(!Qt(e)||Mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fi(e)===n&&(n=n.ownerDocument.body),n}function LN(e,t){const n=fr(e);if(Nm(e))return n;if(!Qt(e)){let i=So(e);for(;i&&!ha(i);){if(vt(i)&&!Sv(i))return i;i=So(i)}return n}let r=GC(e,t);for(;r&&hK(r)&&Sv(r);)r=GC(r,t);return r&&ha(r)&&Sv(r)&&!Cw(r)?n:r||pK(e)||n}const uH=async function(e){const t=this.getOffsetParent||LN,n=this.getDimensions,r=await n(e.floating);return{reference:lH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cH(e){return Mr(e).direction==="rtl"}const fH={convertOffsetParentRelativeRectToViewportRelativeRect:eH,getDocumentElement:Fi,getClippingRect:aH,getOffsetParent:LN,getElementRects:uH,getClientRects:tH,getDimensions:sH,getScale:wl,isElement:vt,isRTL:cH};function dH(e,t){let n=null,r;const i=Fi(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:f,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const m=ll(f),g=ll(i.clientWidth-(u+d)),v=ll(i.clientHeight-(f+p)),y=ll(u),w={rootMargin:-m+"px "+-g+"px "+-v+"px "+-y+"px",threshold:Ar(0,pa(1,l))||1};let S=!0;function A(_){const C=_[0].intersectionRatio;if(C!==l){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(A,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,w)}n.observe(e)}return a(!0),o}function Rm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=jw(e),f=i||o?[...u?ua(u):[],...ua(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=u&&s?dH(u,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let g,v=l?gs(e):null;l&&y();function y(){const x=gs(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,g=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const hH=qK,pH=XK,mH=GK,gH=ZK,YC=HK,yH=(e,t,n)=>{const r=new Map,i={platform:fH,...n},o={...i.platform,_c:r};return KK(e,t,{...i,platform:o})};var Rh=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Jh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Jh(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function BN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qC(e,t){const n=BN(e);return Math.round(t*n)/n}function Ov(e){const t=ee.useRef(e);return Rh(()=>{t.current=e}),t}function vH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=ee.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=ee.useState(r);Jh(p,r)||m(r);const[g,v]=ee.useState(null),[y,x]=ee.useState(null),w=ee.useCallback(H=>{H!==C.current&&(C.current=H,v(H))},[]),S=ee.useCallback(H=>{H!==E.current&&(E.current=H,x(H))},[]),A=o||g,_=a||y,C=ee.useRef(null),E=ee.useRef(null),k=ee.useRef(f),M=l!=null,D=Ov(l),$=Ov(i),N=Ov(u),F=ee.useCallback(()=>{if(!C.current||!E.current)return;const H={placement:t,strategy:n,middleware:p};$.current&&(H.platform=$.current),yH(C.current,E.current,H).then(U=>{const K={...U,isPositioned:N.current!==!1};L.current&&!Jh(k.current,K)&&(k.current=K,uN.flushSync(()=>{d(K)}))})},[p,t,n,$,N]);Rh(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[u]);const L=ee.useRef(!1);Rh(()=>(L.current=!0,()=>{L.current=!1}),[]),Rh(()=>{if(A&&(C.current=A),_&&(E.current=_),A&&_){if(D.current)return D.current(A,_,F);F()}},[A,_,F,D,M]);const W=ee.useMemo(()=>({reference:C,floating:E,setReference:w,setFloating:S}),[w,S]),B=ee.useMemo(()=>({reference:A,floating:_}),[A,_]),z=ee.useMemo(()=>{const H={position:n,left:0,top:0};if(!B.floating)return H;const U=qC(B.floating,f.x),K=qC(B.floating,f.y);return s?{...H,transform:"translate("+U+"px, "+K+"px)",...BN(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:K}},[n,s,B.floating,f.x,f.y]);return ee.useMemo(()=>({...f,update:F,refs:W,elements:B,floatingStyles:z}),[f,F,W,B,z])}const bH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?YC({element:r.current,padding:i}).fn(n):{}:r?YC({element:r,padding:i}).fn(n):{}}}},Lm=(e,t)=>({...hH(e),options:[e,t]}),FN=(e,t)=>({...pH(e),options:[e,t]}),Bm=(e,t)=>({...mH(e),options:[e,t]}),WN=(e,t)=>({...gH(e),options:[e,t]}),xH=(e,t)=>({...bH(e),options:[e,t]}),zN={...ee},wH=zN.useInsertionEffect,_H=wH||(e=>e());function Nn(e){const t=ee.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return _H(()=>{t.current=e}),ee.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=e.current.length}function Cv(e,t){return Bn(e,{disabledIndices:t})}function XC(e,t){return Bn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-o:o;while(s>=0&&s<=a.length-1&&Lh(a,s,i));return s}function SH(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:f=!1}=t,d=u;if(n.key===$w){if(f&&kn(n),u===-1)d=l;else if(d=Bn(e,{startingIndex:d,amount:o,decrement:!0,disabledIndices:a}),i&&(u-op?g:g-o}Sc(e,d)&&(d=u)}if(n.key===Wf&&(f&&kn(n),u===-1?d=s:(d=Bn(e,{startingIndex:u,amount:o,disabledIndices:a}),i&&u+o>l&&(d=Bn(e,{startingIndex:u%o-o,amount:o,disabledIndices:a}))),Sc(e,d)&&(d=u)),r==="both"){const p=ll(u/o);n.key===pu&&(f&&kn(n),u%o!==o-1?(d=Bn(e,{startingIndex:u,disabledIndices:a}),i&&ah(d,o,p)&&(d=Bn(e,{startingIndex:u-u%o-1,disabledIndices:a}))):i&&(d=Bn(e,{startingIndex:u-u%o-1,disabledIndices:a})),ah(d,o,p)&&(d=u)),n.key===kl&&(f&&kn(n),u%o!==0?(d=Bn(e,{startingIndex:u,decrement:!0,disabledIndices:a}),i&&ah(d,o,p)&&(d=Bn(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a}))):i&&(d=Bn(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a})),ah(d,o,p)&&(d=u));const m=ll(l/o)===p;Sc(e,d)&&(i&&m?d=n.key===kl?l:Bn(e,{startingIndex:u-u%o-1,disabledIndices:a}):d=u)}return d}function OH(e,t,n){const r=[];let i=0;return e.forEach((o,a)=>{let{width:s,height:l}=o;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let u=!1;for(n&&(i=0);!u;){const f=[];for(let d=0;dr[d]==null)?(f.forEach(d=>{r[d]=a}),u=!0):i++}}),[...r]}function CH(e,t,n,r,i){if(e===-1)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e)}}function AH(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Lh(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let ZC=0;function ta(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ZC);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():ZC=requestAnimationFrame(o)}var wt=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+Math.random().toString(36).slice(2,6)+PH++;function TH(){const[e,t]=ee.useState(()=>JC?QC():void 0);return wt(()=>{e==null&&t(QC())},[]),ee.useEffect(()=>{JC=!0},[]),e}const EH=zN.useId,Fm=EH||TH;let Uc;process.env.NODE_ENV!=="production"&&(Uc=new Set);function Bh(){for(var e,t=arguments.length,n=new Array(t),r=0;r{if(!i)return;Mr(i).direction==="rtl"&&S(!0)},[i]),!i)return null;const[A,_]=r.split("-"),C=A==="top"||A==="bottom";let E=d;(C&&a!=null&&a.x||!C&&a!=null&&a.y)&&(E=null);const k=f*2,M=k/2,D=s/2*(u/-8+1),$=l/2*u/4,N=!!m,F=E&&_==="end"?"bottom":"top";let L=E&&_==="end"?"right":"left";E&&w&&(L=_==="end"?"left":"right");const W=(o==null?void 0:o.x)!=null?E||o.x:"",B=(o==null?void 0:o.y)!=null?E||o.y:"",z=m||"M0,0"+(" H"+s)+(" L"+(s-D)+","+(l-$))+(" Q"+s/2+","+l+" "+D+","+(l-$))+" Z",H={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[A];return ee.createElement("svg",Vc({},y,{"aria-hidden":!0,ref:n,width:N?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[L]:W,[F]:B,[A]:C||N?"100%":"calc(100% - "+k/2+"px)",transform:[H,g].filter(U=>!!U).join(" "),...v}}),k>0&&ee.createElement("path",{clipPath:"url(#"+x+")",fill:"none",stroke:p,strokeWidth:k+(m?0:1),d:z}),ee.createElement("path",{stroke:k&&!m?y.fill:"none",d:z}),ee.createElement("clipPath",{id:x},ee.createElement("rect",{x:-M,y:M*(N?-1:1),width:s+k,height:s})))});function jH(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const NH=ee.createContext(null),$H=ee.createContext(null),Wm=()=>{var e;return((e=ee.useContext(NH))==null?void 0:e.id)||null},zf=()=>ee.useContext($H);function ys(e){return"data-floating-ui-"+e}function $n(e){const t=O.useRef(e);return wt(()=>{t.current=e}),t}const eA=ys("safe-polygon");function Av(e,t,n){return n&&!zc(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function DH(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:u=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=t,m=zf(),g=Wm(),v=$n(u),y=$n(l),x=$n(n),w=ee.useRef(),S=ee.useRef(-1),A=ee.useRef(),_=ee.useRef(-1),C=ee.useRef(!0),E=ee.useRef(!1),k=ee.useRef(()=>{}),M=ee.useRef(!1),D=ee.useCallback(()=>{var B;const z=(B=i.current.openEvent)==null?void 0:B.type;return(z==null?void 0:z.includes("mouse"))&&z!=="mousedown"},[i]);ee.useEffect(()=>{if(!s)return;function B(z){let{open:H}=z;H||(clearTimeout(S.current),clearTimeout(_.current),C.current=!0,M.current=!1)}return o.on("openchange",B),()=>{o.off("openchange",B)}},[s,o]),ee.useEffect(()=>{if(!s||!v.current||!n)return;function B(H){D()&&r(!1,H,"hover")}const z=Mn(a.floating).documentElement;return z.addEventListener("mouseleave",B),()=>{z.removeEventListener("mouseleave",B)}},[a.floating,n,r,s,v,D]);const $=ee.useCallback(function(B,z,H){z===void 0&&(z=!0),H===void 0&&(H="hover");const U=Av(y.current,"close",w.current);U&&!A.current?(clearTimeout(S.current),S.current=window.setTimeout(()=>r(!1,B,H),U)):z&&(clearTimeout(S.current),r(!1,B,H))},[y,r]),N=Nn(()=>{k.current(),A.current=void 0}),F=Nn(()=>{if(E.current){const B=Mn(a.floating).body;B.style.pointerEvents="",B.removeAttribute(eA),E.current=!1}});ee.useEffect(()=>{if(!s)return;function B(){return i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1}function z(Y){if(clearTimeout(S.current),C.current=!1,f&&!zc(w.current)||d>0&&!Av(y.current,"open"))return;const te=Av(y.current,"open",w.current);te?S.current=window.setTimeout(()=>{x.current||r(!0,Y,"hover")},te):r(!0,Y,"hover")}function H(Y){if(B())return;k.current();const te=Mn(a.floating);if(clearTimeout(_.current),M.current=!1,v.current&&i.current.floatingContext){n||clearTimeout(S.current),A.current=v.current({...i.current.floatingContext,tree:m,x:Y.clientX,y:Y.clientY,onClose(){F(),N(),$(Y,!0,"safe-polygon")}});const ie=A.current;te.addEventListener("mousemove",ie),k.current=()=>{te.removeEventListener("mousemove",ie)};return}(w.current==="touch"?!Jt(a.floating,Y.relatedTarget):!0)&&$(Y)}function U(Y){B()||i.current.floatingContext&&(v.current==null||v.current({...i.current.floatingContext,tree:m,x:Y.clientX,y:Y.clientY,onClose(){F(),N(),$(Y)}})(Y))}if(vt(a.domReference)){var K;const Y=a.domReference;return n&&Y.addEventListener("mouseleave",U),(K=a.floating)==null||K.addEventListener("mouseleave",U),p&&Y.addEventListener("mousemove",z,{once:!0}),Y.addEventListener("mouseenter",z),Y.addEventListener("mouseleave",H),()=>{var te;n&&Y.removeEventListener("mouseleave",U),(te=a.floating)==null||te.removeEventListener("mouseleave",U),p&&Y.removeEventListener("mousemove",z),Y.removeEventListener("mouseenter",z),Y.removeEventListener("mouseleave",H)}}},[a,s,e,f,d,p,$,N,F,r,n,x,m,y,v,i]),wt(()=>{var B;if(s&&n&&(B=v.current)!=null&&B.__options.blockPointerEvents&&D()){E.current=!0;const H=a.floating;if(vt(a.domReference)&&H){var z;const U=Mn(a.floating).body;U.setAttribute(eA,"");const K=a.domReference,Y=m==null||(z=m.nodesRef.current.find(te=>te.id===g))==null||(z=z.context)==null?void 0:z.elements.floating;return Y&&(Y.style.pointerEvents=""),U.style.pointerEvents="none",K.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{U.style.pointerEvents="",K.style.pointerEvents="",H.style.pointerEvents=""}}}},[s,n,g,a,m,v,D]),wt(()=>{n||(w.current=void 0,M.current=!1,N(),F())},[n,N,F]),ee.useEffect(()=>()=>{N(),clearTimeout(S.current),clearTimeout(_.current),F()},[s,a.domReference,N,F]);const L=ee.useMemo(()=>{function B(z){w.current=z.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(z){const{nativeEvent:H}=z;function U(){!C.current&&!x.current&&r(!0,H,"hover")}f&&!zc(w.current)||n||d===0||M.current&&z.movementX**2+z.movementY**2<2||(clearTimeout(_.current),w.current==="touch"?U():(M.current=!0,_.current=window.setTimeout(U,d)))}}},[f,r,n,x,d]),W=ee.useMemo(()=>({onMouseEnter(){clearTimeout(S.current)},onMouseLeave(B){$(B.nativeEvent,!1)}}),[$]);return ee.useMemo(()=>s?{reference:L,floating:W}:{},[s,L,W])}function IH(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function ls(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function RH(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ls(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let Js=new WeakMap,sh=new WeakSet,lh={},Pv=0;const LH=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,VN=e=>e&&(e.host||VN(e.parentNode)),BH=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=VN(n);return e.contains(r)?r:null}).filter(n=>n!=null);function FH(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=BH(t,e),s=new Set,l=new Set(a),u=[];lh[i]||(lh[i]=new WeakMap);const f=lh[i];a.forEach(d),p(t),s.clear();function d(m){!m||s.has(m)||(s.add(m),m.parentNode&&d(m.parentNode))}function p(m){!m||l.has(m)||[].forEach.call(m.children,g=>{if(Sa(g)!=="script")if(s.has(g))p(g);else{const v=o?g.getAttribute(o):null,y=v!==null&&v!=="false",x=(Js.get(g)||0)+1,w=(f.get(g)||0)+1;Js.set(g,x),f.set(g,w),u.push(g),x===1&&y&&sh.add(g),w===1&&g.setAttribute(i,""),!y&&o&&g.setAttribute(o,"true")}})}return Pv++,()=>{u.forEach(m=>{const g=(Js.get(m)||0)-1,v=(f.get(m)||0)-1;Js.set(m,g),f.set(m,v),g||(!sh.has(m)&&o&&m.removeAttribute(o),sh.delete(m)),v||m.removeAttribute(i)}),Pv--,Pv||(Js=new WeakMap,Js=new WeakMap,sh=new WeakSet,lh={})}}function tA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mn(e[0]).body;return FH(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Kc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function UN(e,t){const n=Im(e,Kc());t==="prev"&&n.reverse();const r=n.indexOf(ci(Mn(e)));return n.slice(r+1)[0]}function KN(){return UN(document.body,"next")}function HN(){return UN(document.body,"prev")}function Oc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Jt(n,r)}function WH(e){Im(e,Kc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function nA(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const zm={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let zH;function rA(e){e.key==="Tab"&&(e.target,clearTimeout(zH))}const Qh=ee.forwardRef(function(t,n){const[r,i]=ee.useState();wt(()=>(Pw()&&i("button"),document.addEventListener("keydown",rA),()=>{document.removeEventListener("keydown",rA)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ys("focus-guard")]:"",style:zm};return ee.createElement("span",Vc({},t,o))}),GN=ee.createContext(null),iA=ys("portal");function VH(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Fm(),i=YN(),[o,a]=ee.useState(null),s=ee.useRef(null);return wt(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),wt(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=r,u.setAttribute(iA,""),l.appendChild(u),s.current=u,a(u)},[t,r]),wt(()=>{if(n===null||!r||s.current)return;let l=n||(i==null?void 0:i.portalNode);l&&!vt(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const f=document.createElement("div");f.id=r,f.setAttribute(iA,""),l=u||l,l.appendChild(f),s.current=f,a(f)},[t,n,r,i]),o}function Vm(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,o=VH({id:n,root:r}),[a,s]=ee.useState(null),l=ee.useRef(null),u=ee.useRef(null),f=ee.useRef(null),d=ee.useRef(null),p=a==null?void 0:a.modal,m=a==null?void 0:a.open,g=!!a&&!a.modal&&a.open&&i&&!!(r||o);return ee.useEffect(()=>{if(!o||!i||p)return;function v(y){o&&Oc(y)&&(y.type==="focusin"?nA:WH)(o)}return o.addEventListener("focusin",v,!0),o.addEventListener("focusout",v,!0),()=>{o.removeEventListener("focusin",v,!0),o.removeEventListener("focusout",v,!0)}},[o,i,p]),ee.useEffect(()=>{o&&(m||nA(o))},[m,o]),ee.createElement(GN.Provider,{value:ee.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:d,portalNode:o,setFocusManagerState:s}),[i,o])},g&&o&&ee.createElement(Qh,{"data-type":"outside",ref:l,onFocus:v=>{if(Oc(v,o)){var y;(y=f.current)==null||y.focus()}else{const x=HN()||(a==null?void 0:a.refs.domReference.current);x==null||x.focus()}}}),g&&o&&ee.createElement("span",{"aria-owns":o.id,style:zm}),o&&uN.createPortal(t,o),g&&o&&ee.createElement(Qh,{"data-type":"outside",ref:u,onFocus:v=>{if(Oc(v,o)){var y;(y=d.current)==null||y.focus()}else{const x=KN()||(a==null?void 0:a.refs.domReference.current);x==null||x.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,v.nativeEvent,"focus-out"))}}}))}const YN=()=>ee.useContext(GN),qb="data-floating-ui-focusable";function qN(e){return e?e.hasAttribute(qb)?e:e.querySelector("["+qb+"]")||e:null}const oA=20;let Ga=[];function Tv(e){Ga=Ga.filter(n=>n.isConnected);let t=e;if(!(!t||Sa(t)==="body")){if(!UK(t,Kc())){const n=Im(t,Kc())[0];n&&(t=n)}Ga.push(t),Ga.length>oA&&(Ga=Ga.slice(-oA))}}function aA(){return Ga.slice().reverse().find(e=>e.isConnected)}const UH=ee.forwardRef(function(t,n){return ee.createElement("button",Vc({},t,{type:"button",ref:n,tabIndex:-1,style:zm}))});function KH(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:m,nodeId:g,onOpenChange:v,events:y,dataRef:x,floatingId:w,elements:{domReference:S,floating:A}}=t,_=typeof a=="number"&&a<0,C=Kb(S)&&_,E=LH()?o:!0,k=$n(i),M=$n(a),D=$n(s),$=zf(),N=YN(),F=ee.useRef(null),L=ee.useRef(null),W=ee.useRef(!1),B=ee.useRef(!1),z=ee.useRef(-1),H=N!=null,U=qN(A),K=Nn(function(ie){return ie===void 0&&(ie=U),ie?Im(ie,Kc()):[]}),Y=Nn(ie=>{const ce=K(ie);return k.current.map(ae=>S&&ae==="reference"?S:U&&ae==="floating"?U:ce).filter(Boolean).flat()});ee.useEffect(()=>{W.current=!1},[r]),ee.useEffect(()=>{if(r||!u)return;function ie(ae){if(ae.key==="Tab"){Jt(U,ci(Mn(U)))&&K().length===0&&!C&&kn(ae);const le=Y(),re=so(ae);k.current[0]==="reference"&&re===S&&(kn(ae),ae.shiftKey?ta(le[le.length-1]):ta(le[1])),k.current[1]==="floating"&&re===U&&ae.shiftKey&&(kn(ae),ta(le[0]))}}const ce=Mn(U);return ce.addEventListener("keydown",ie),()=>{ce.removeEventListener("keydown",ie)}},[r,S,U,u,k,C,K,Y]),ee.useEffect(()=>{if(r||!A)return;function ie(ce){const ae=so(ce),re=K().indexOf(ae);re!==-1&&(z.current=re)}return A.addEventListener("focusin",ie),()=>{A.removeEventListener("focusin",ie)}},[r,A,K]),ee.useEffect(()=>{if(r||!d)return;function ie(){B.current=!0,setTimeout(()=>{B.current=!1})}function ce(ae){const le=ae.relatedTarget;queueMicrotask(()=>{const re=!(Jt(S,le)||Jt(A,le)||Jt(le,A)||Jt(N==null?void 0:N.portalNode,le)||le!=null&&le.hasAttribute(ys("focus-guard"))||$&&(ls($.nodesRef.current,g).find(Q=>{var fe,ye;return Jt((fe=Q.context)==null?void 0:fe.elements.floating,le)||Jt((ye=Q.context)==null?void 0:ye.elements.domReference,le)})||IH($.nodesRef.current,g).find(Q=>{var fe,ye;return((fe=Q.context)==null?void 0:fe.elements.floating)===le||((ye=Q.context)==null?void 0:ye.elements.domReference)===le})));if(l&&re&&ci(Mn(U))===Mn(U).body){Qt(U)&&U.focus();const Q=z.current,fe=K(),ye=fe[Q]||fe[fe.length-1]||U;Qt(ye)&&ye.focus()}(C||!u)&&le&&re&&!B.current&&le!==aA()&&(W.current=!0,v(!1,ae,"focus-out"))})}if(A&&Qt(S))return S.addEventListener("focusout",ce),S.addEventListener("pointerdown",ie),A.addEventListener("focusout",ce),()=>{S.removeEventListener("focusout",ce),S.removeEventListener("pointerdown",ie),A.removeEventListener("focusout",ce)}},[r,S,A,U,u,g,$,N,v,d,l,K,C]),ee.useEffect(()=>{var ie;if(r)return;const ce=Array.from((N==null||(ie=N.portalNode)==null?void 0:ie.querySelectorAll("["+ys("portal")+"]"))||[]);if(A){const ae=[A,...ce,F.current,L.current,k.current.includes("reference")||C?S:null].filter(re=>re!=null),le=u||C?tA(ae,E,!E):tA(ae);return()=>{le()}}},[r,S,A,u,k,N,C,E]),wt(()=>{if(r||!Qt(U))return;const ie=Mn(U),ce=ci(ie);queueMicrotask(()=>{const ae=Y(U),le=M.current,re=(typeof le=="number"?ae[le]:le.current)||U,Q=Jt(U,ce);!_&&!Q&&p&&ta(re,{preventScroll:re===U})})},[r,p,U,_,Y,M]),wt(()=>{if(r||!U)return;let ie=!1;const ce=Mn(U),ae=ci(ce);let re=x.current.openEvent;Tv(ae);function Q(X){let{open:Re,reason:pe,event:Ie,nested:Ze}=X;Re&&(re=Ie),pe==="escape-key"&&m.domReference.current&&Tv(m.domReference.current),pe==="hover"&&Ie.type==="mouseleave"&&(W.current=!0),pe==="outside-press"&&(Ze?(W.current=!1,ie=!0):W.current=!(AN(Ie)||Aw(Ie)))}y.on("openchange",Q);const fe=ce.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,zm),H&&S&&S.insertAdjacentElement("afterend",fe);function ye(){return typeof D.current=="boolean"?aA()||fe:D.current.current||fe}return()=>{y.off("openchange",Q);const X=ci(ce),Re=Jt(A,X)||$&&ls($.nodesRef.current,g).some(Ze=>{var tt;return Jt((tt=Ze.context)==null?void 0:tt.elements.floating,X)});(Re||re&&["click","mousedown"].includes(re.type))&&m.domReference.current&&Tv(m.domReference.current);const Ie=ye();queueMicrotask(()=>{D.current&&!W.current&&Qt(Ie)&&(!(Ie!==X&&X!==ce.body)||Re)&&Ie.focus({preventScroll:ie}),fe.remove()})}},[r,A,U,D,x,m,y,$,g,H,S]),wt(()=>{if(!r&&N)return N.setFocusManagerState({modal:u,closeOnFocusOut:d,open:p,onOpenChange:v,refs:m}),()=>{N.setFocusManagerState(null)}},[r,N,u,p,v,m,d]),wt(()=>{if(r||!U||typeof MutationObserver!="function"||_)return;const ie=()=>{const ae=U.getAttribute("tabindex"),le=K(),re=ci(Mn(A)),Q=le.indexOf(re);Q!==-1&&(z.current=Q),k.current.includes("floating")||re!==m.domReference.current&&le.length===0?ae!=="0"&&U.setAttribute("tabindex","0"):ae!=="-1"&&U.setAttribute("tabindex","-1")};ie();const ce=new MutationObserver(ie);return ce.observe(U,{childList:!0,subtree:!0,attributes:!0}),()=>{ce.disconnect()}},[r,A,U,m,k,K,_]);function te(ie){return r||!f||!u?null:ee.createElement(UH,{ref:ie==="start"?F:L,onClick:ce=>v(!1,ce.nativeEvent)},typeof f=="string"?f:"Dismiss")}const ne=!r&&E&&(u?!C:!0)&&(H||u);return ee.createElement(ee.Fragment,null,ne&&ee.createElement(Qh,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:ie=>{if(u){const ae=Y();ta(i[0]==="reference"?ae[0]:ae[ae.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(W.current=!1,Oc(ie,N.portalNode)){const ae=KN()||S;ae==null||ae.focus()}else{var ce;(ce=N.beforeOutsideRef.current)==null||ce.focus()}}}),!C&&te("start"),n,te("end"),ne&&ee.createElement(Qh,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:ie=>{if(u)ta(Y()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(W.current=!0),Oc(ie,N.portalNode)){const ae=HN()||S;ae==null||ae.focus()}else{var ce;(ce=N.afterOutsideRef.current)==null||ce.focus()}}}))}function sA(e){return Qt(e.target)&&e.target.tagName==="BUTTON"}function lA(e){return Tw(e)}function Dw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:f=!0}=t,d=ee.useRef(),p=ee.useRef(!1),m=ee.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const v=d.current;g.button===0&&s!=="click"&&(zc(v,!0)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){const v=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}zc(v,!0)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!f||sA(g))&&(g.key===" "&&!lA(o)&&(g.preventDefault(),p.current=!0),g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!f||sA(g)||lA(o)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[i,o,s,u,f,r,n,l]);return ee.useMemo(()=>a?{reference:m}:{},[a,m])}const HH={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},GH={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},uA=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Um(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:g}=t,v=zf(),y=Nn(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,w=ee.useRef(!1),S=ee.useRef(!1),{escapeKey:A,outsidePress:_}=uA(m),{escapeKey:C,outsidePress:E}=uA(g),k=ee.useRef(!1),M=Nn(W=>{var B;if(!n||!a||!s||W.key!=="Escape"||k.current)return;const z=(B=o.current.floatingContext)==null?void 0:B.nodeId,H=v?ls(v.nodesRef.current,z):[];if(!A&&(W.stopPropagation(),H.length>0)){let U=!0;if(H.forEach(K=>{var Y;if((Y=K.context)!=null&&Y.open&&!K.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,gK(W)?W.nativeEvent:W,"escape-key")}),D=Nn(W=>{var B;const z=()=>{var H;M(W),(H=so(W))==null||H.removeEventListener("keydown",z)};(B=so(W))==null||B.addEventListener("keydown",z)}),$=Nn(W=>{var B;const z=w.current;w.current=!1;const H=S.current;if(S.current=!1,u==="click"&&H||z||typeof x=="function"&&!x(W))return;const U=so(W),K="["+ys("inert")+"]",Y=Mn(i.floating).querySelectorAll(K);let te=vt(U)?U:null;for(;te&&!ha(te);){const ae=So(te);if(ha(ae)||!vt(ae))break;te=ae}if(Y.length&&vt(U)&&!yK(U)&&!Jt(U,i.floating)&&Array.from(Y).every(ae=>!Jt(te,ae)))return;if(Qt(U)&&L){const ae=U.clientWidth>0&&U.scrollWidth>U.clientWidth,le=U.clientHeight>0&&U.scrollHeight>U.clientHeight;let re=le&&W.offsetX>U.clientWidth;if(le&&Mr(U).direction==="rtl"&&(re=W.offsetX<=U.offsetWidth-U.clientWidth),re||ae&&W.offsetY>U.clientHeight)return}const ne=(B=o.current.floatingContext)==null?void 0:B.nodeId,ie=v&&ls(v.nodesRef.current,ne).some(ae=>{var le;return _v(W,(le=ae.context)==null?void 0:le.elements.floating)});if(_v(W,i.floating)||_v(W,i.domReference)||ie)return;const ce=v?ls(v.nodesRef.current,ne):[];if(ce.length>0){let ae=!0;if(ce.forEach(le=>{var re;if((re=le.context)!=null&&re.open&&!le.context.dataRef.current.__outsidePressBubbles){ae=!1;return}}),!ae)return}r(!1,W,"outside-press")}),N=Nn(W=>{var B;const z=()=>{var H;$(W),(H=so(W))==null||H.removeEventListener(u,z)};(B=so(W))==null||B.addEventListener(u,z)});ee.useEffect(()=>{if(!n||!a)return;o.current.__escapeKeyBubbles=A,o.current.__outsidePressBubbles=_;let W=-1;function B(Y){r(!1,Y,"ancestor-scroll")}function z(){window.clearTimeout(W),k.current=!0}function H(){W=window.setTimeout(()=>{k.current=!1},$m()?5:0)}const U=Mn(i.floating);s&&(U.addEventListener("keydown",C?D:M,C),U.addEventListener("compositionstart",z),U.addEventListener("compositionend",H)),x&&U.addEventListener(u,E?N:$,E);let K=[];return p&&(vt(i.domReference)&&(K=ua(i.domReference)),vt(i.floating)&&(K=K.concat(ua(i.floating))),!vt(i.reference)&&i.reference&&i.reference.contextElement&&(K=K.concat(ua(i.reference.contextElement)))),K=K.filter(Y=>{var te;return Y!==((te=U.defaultView)==null?void 0:te.visualViewport)}),K.forEach(Y=>{Y.addEventListener("scroll",B,{passive:!0})}),()=>{s&&(U.removeEventListener("keydown",C?D:M,C),U.removeEventListener("compositionstart",z),U.removeEventListener("compositionend",H)),x&&U.removeEventListener(u,E?N:$,E),K.forEach(Y=>{Y.removeEventListener("scroll",B)}),window.clearTimeout(W)}},[o,i,s,x,u,n,r,p,a,A,_,M,C,D,$,E,N]),ee.useEffect(()=>{w.current=!1},[x,u]);const F=ee.useMemo(()=>({onKeyDown:M,[HH[d]]:W=>{f&&r(!1,W.nativeEvent,"reference-press")}}),[M,r,f,d]),L=ee.useMemo(()=>({onKeyDown:M,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[GH[u]]:()=>{w.current=!0}}),[M,u]);return ee.useMemo(()=>a?{reference:F,floating:L}:{},[a,F,L])}function YH(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Fm(),o=ee.useRef({}),[a]=ee.useState(()=>jH()),s=Wm()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!vt(m)&&kH("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=ee.useState(r.reference),f=Nn((m,g,v)=>{o.current.openEvent=m?g:void 0,a.emit("openchange",{open:m,event:g,reason:v,nested:s}),n==null||n(m,g,v)}),d=ee.useMemo(()=>({setPositionReference:u}),[]),p=ee.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return ee.useMemo(()=>({dataRef:o,open:t,onOpenChange:f,elements:p,events:a,floatingId:i,refs:d}),[t,f,p,a,i,d])}function Km(e){e===void 0&&(e={});const{nodeId:t}=e,n=YH({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=ee.useState(null),[s,l]=ee.useState(null),f=(i==null?void 0:i.domReference)||o,d=ee.useRef(null),p=zf();wt(()=>{f&&(d.current=f)},[f]);const m=vH({...e,elements:{...i,...s&&{reference:s}}}),g=ee.useCallback(S=>{const A=vt(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;l(A),m.refs.setReference(A)},[m.refs]),v=ee.useCallback(S=>{(vt(S)||S===null)&&(d.current=S,a(S)),(vt(m.refs.reference.current)||m.refs.reference.current===null||S!==null&&!vt(S))&&m.refs.setReference(S)},[m.refs]),y=ee.useMemo(()=>({...m.refs,setReference:v,setPositionReference:g,domReference:d}),[m.refs,v,g]),x=ee.useMemo(()=>({...m.elements,domReference:f}),[m.elements,f]),w=ee.useMemo(()=>({...m,...r,refs:y,elements:x,nodeId:t}),[m,y,x,t,r]);return wt(()=>{r.dataRef.current.floatingContext=w;const S=p==null?void 0:p.nodesRef.current.find(A=>A.id===t);S&&(S.context=w)}),ee.useMemo(()=>({...m,context:w,refs:y,elements:x}),[m,y,x,w])}function qH(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,dataRef:o,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,u=ee.useRef(!1),f=ee.useRef(),d=ee.useRef(!0);ee.useEffect(()=>{if(!s)return;const m=fr(a.domReference);function g(){!n&&Qt(a.domReference)&&a.domReference===ci(Mn(a.domReference))&&(u.current=!0)}function v(){d.current=!0}return m.addEventListener("blur",g),m.addEventListener("keydown",v,!0),()=>{m.removeEventListener("blur",g),m.removeEventListener("keydown",v,!0)}},[a.domReference,n,s]),ee.useEffect(()=>{if(!s)return;function m(g){let{reason:v}=g;(v==="reference-press"||v==="escape-key")&&(u.current=!0)}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,s]),ee.useEffect(()=>()=>{clearTimeout(f.current)},[]);const p=ee.useMemo(()=>({onPointerDown(m){Aw(m.nativeEvent)||(d.current=!1)},onMouseLeave(){u.current=!1},onFocus(m){if(u.current)return;const g=so(m.nativeEvent);if(l&&vt(g))try{if(Pw()&&PN())throw Error();if(!g.matches(":focus-visible"))return}catch{if(!d.current&&!Tw(g))return}r(!0,m.nativeEvent,"focus")},onBlur(m){u.current=!1;const g=m.relatedTarget,v=m.nativeEvent,y=vt(g)&&g.hasAttribute(ys("focus-guard"))&&g.getAttribute("data-type")==="outside";f.current=window.setTimeout(()=>{var x;const w=ci(a.domReference?a.domReference.ownerDocument:document);!g&&w===a.domReference||Jt((x=o.current.floatingContext)==null?void 0:x.refs.floating.current,w)||Jt(a.domReference,w)||y||r(!1,v,"focus")})}}),[o,a.domReference,r,l]);return ee.useMemo(()=>s?{reference:p}:{},[s,p])}const cA="active",fA="selected";function Ev(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[cA]:a,[fA]:s,...l}=e;o=l}return{...n==="floating"&&{tabIndex:-1,[qb]:""},...o,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[u,f]=l;if(!(i&&[cA,fA].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var d;(d=r.get(u))==null||d.push(f),a[u]=function(){for(var p,m=arguments.length,g=new Array(m),v=0;vy(...g)).find(y=>y!==void 0)}}}else a[u]=f}),a),{})}}function Hm(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),i=ee.useCallback(s=>Ev(s,e,"reference"),t),o=ee.useCallback(s=>Ev(s,e,"floating"),n),a=ee.useCallback(s=>Ev(s,e,"item"),r);return ee.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}let dA=!1;function Gm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function hA(e,t){return Gm(t,e===$w||e===Wf,e===kl||e===pu)}function kv(e,t,n){return Gm(t,e===Wf,n?e===kl:e===pu)||e==="Enter"||e===" "||e===""}function XH(e,t,n){return Gm(t,n?e===kl:e===pu,e===Wf)}function pA(e,t,n){return Gm(t,n?e===pu:e===kl,e===$w)}function ZH(e,t){const{open:n,onOpenChange:r,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:f=!1,loop:d=!1,nested:p=!1,rtl:m=!1,virtual:g=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:w=void 0,orientation:S="vertical",cols:A=1,scrollItemIntoView:_=!0,virtualItemRef:C,itemSizes:E,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(f&&(d||Bh("`useListNavigation` looping must be enabled to allow escaping."),g||Bh("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&A>1&&Bh("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const M=qN(i.floating),D=$n(M),$=Wm(),N=zf(),F=Nn(s),L=Kb(i.domReference),W=ee.useRef(v),B=ee.useRef(u??-1),z=ee.useRef(null),H=ee.useRef(!0),U=ee.useRef(F),K=ee.useRef(!!i.floating),Y=ee.useRef(n),te=ee.useRef(!1),ne=ee.useRef(!1),ie=$n(w),ce=$n(n),ae=$n(_),le=$n(u),[re,Q]=ee.useState(),[fe,ye]=ee.useState(),X=Nn(function(Me,nt,Se){Se===void 0&&(Se=!1);function ze(at){g?(Q(at.id),N==null||N.events.emit("virtualfocus",at),C&&(C.current=at)):ta(at,{preventScroll:!0,sync:PN()&&Pw()?dA||te.current:!1})}const Lt=Me.current[nt.current];Lt&&ze(Lt),requestAnimationFrame(()=>{const at=Me.current[nt.current]||Lt;if(!at)return;Lt||ze(at);const Wt=ae.current;Wt&&pe&&(Se||!H.current)&&(at.scrollIntoView==null||at.scrollIntoView(typeof Wt=="boolean"?{block:"nearest",inline:"nearest"}:Wt))})});wt(()=>{document.createElement("div").focus({get preventScroll(){return dA=!0,!1}})},[]),wt(()=>{l&&(n&&i.floating?W.current&&u!=null&&(ne.current=!0,B.current=u,F(u)):K.current&&(B.current=-1,U.current(null)))},[l,n,i.floating,u,F]),wt(()=>{if(l&&n&&i.floating)if(a==null){if(te.current=!1,le.current!=null)return;if(K.current&&(B.current=-1,X(o,B)),(!Y.current||!K.current)&&W.current&&(z.current!=null||W.current===!0&&z.current==null)){let Me=0;const nt=()=>{o.current[0]==null?(Me<2&&(Me?requestAnimationFrame:queueMicrotask)(nt),Me++):(B.current=z.current==null||kv(z.current,S,m)||p?Cv(o,ie.current):XC(o,ie.current),z.current=null,F(B.current))};nt()}}else Sc(o,a)||(B.current=a,X(o,B,ne.current),ne.current=!1)},[l,n,i.floating,a,le,p,o,S,m,F,X,ie]),wt(()=>{var Me;if(!l||i.floating||!N||g||!K.current)return;const nt=N.nodesRef.current,Se=(Me=nt.find(at=>at.id===$))==null||(Me=Me.context)==null?void 0:Me.elements.floating,ze=ci(Mn(i.floating)),Lt=nt.some(at=>at.context&&Jt(at.context.elements.floating,ze));Se&&!Lt&&H.current&&Se.focus({preventScroll:!0})},[l,i.floating,N,$,g]),wt(()=>{if(!l||!N||!g||$)return;function Me(nt){ye(nt.id),C&&(C.current=nt)}return N.events.on("virtualfocus",Me),()=>{N.events.off("virtualfocus",Me)}},[l,N,g,$,C]),wt(()=>{U.current=F,K.current=!!i.floating}),wt(()=>{n||(z.current=null)},[n]),wt(()=>{Y.current=n},[n]);const Re=a!=null,pe=ee.useMemo(()=>{function Me(Se){if(!n)return;const ze=o.current.indexOf(Se);ze!==-1&&F(ze)}return{onFocus(Se){let{currentTarget:ze}=Se;Me(ze)},onClick:Se=>{let{currentTarget:ze}=Se;return ze.focus({preventScroll:!0})},...y&&{onMouseMove(Se){let{currentTarget:ze}=Se;Me(ze)},onPointerLeave(Se){let{pointerType:ze}=Se;!H.current||ze==="touch"||(B.current=-1,X(o,B),F(null),g||ta(D.current,{preventScroll:!0}))}}}},[n,D,X,y,o,F,g]),Ie=Nn(Me=>{if(H.current=!1,te.current=!0,Me.which===229||!ce.current&&Me.currentTarget===D.current)return;if(p&&pA(Me.key,S,m)){kn(Me),r(!1,Me.nativeEvent,"list-navigation"),Qt(i.domReference)&&(g?N==null||N.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}const nt=B.current,Se=Cv(o,w),ze=XC(o,w);if(L||(Me.key==="Home"&&(kn(Me),B.current=Se,F(B.current)),Me.key==="End"&&(kn(Me),B.current=ze,F(B.current))),A>1){const Lt=E||Array.from({length:o.current.length},()=>({width:1,height:1})),at=OH(Lt,A,k),Wt=at.findIndex(nn=>nn!=null&&!Lh(o.current,nn,w)),$r=at.reduce((nn,nr,qe)=>nr!=null&&!Lh(o.current,nr,w)?qe:nn,-1),pn=at[SH({current:at.map(nn=>nn!=null?o.current[nn]:null)},{event:Me,orientation:S,loop:d,cols:A,disabledIndices:AH([...w||o.current.map((nn,nr)=>Lh(o.current,nr)?nr:void 0),void 0],at),minIndex:Wt,maxIndex:$r,prevIndex:CH(B.current>ze?Se:B.current,Lt,at,A,Me.key===Wf?"bl":Me.key===pu?"tr":"tl"),stopEvent:!0})];if(pn!=null&&(B.current=pn,F(B.current)),S==="both")return}if(hA(Me.key,S)){if(kn(Me),n&&!g&&ci(Me.currentTarget.ownerDocument)===Me.currentTarget){B.current=kv(Me.key,S,m)?Se:ze,F(B.current);return}kv(Me.key,S,m)?d?B.current=nt>=ze?f&&nt!==o.current.length?-1:Se:Bn(o,{startingIndex:nt,disabledIndices:w}):B.current=Math.min(ze,Bn(o,{startingIndex:nt,disabledIndices:w})):d?B.current=nt<=Se?f&&nt!==-1?o.current.length:ze:Bn(o,{startingIndex:nt,decrement:!0,disabledIndices:w}):B.current=Math.max(Se,Bn(o,{startingIndex:nt,decrement:!0,disabledIndices:w})),Sc(o,B.current)?F(null):F(B.current)}}),Ze=ee.useMemo(()=>g&&n&&Re&&{"aria-activedescendant":fe||re},[g,n,Re,fe,re]),tt=ee.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...!Kb(i.domReference)&&Ze,onKeyDown:Ie,onPointerMove(){H.current=!0}}),[Ze,Ie,i.domReference,S]),In=ee.useMemo(()=>{function Me(Se){v==="auto"&&AN(Se.nativeEvent)&&(W.current=!0)}function nt(Se){W.current=v,v==="auto"&&Aw(Se.nativeEvent)&&(W.current=!0)}return{...Ze,onKeyDown(Se){H.current=!1;const ze=Se.key.startsWith("Arrow"),Lt=["Home","End"].includes(Se.key),at=ze||Lt,Wt=XH(Se.key,S,m),$r=pA(Se.key,S,m),pn=hA(Se.key,S),nn=(p?Wt:pn)||Se.key==="Enter"||Se.key.trim()==="";if(g&&n){const pt=N==null?void 0:N.nodesRef.current.find(Dr=>Dr.parentId==null),Sn=N&&pt?RH(N.nodesRef.current,pt.id):null;if(at&&Sn&&C){const Dr=new KeyboardEvent("keydown",{key:Se.key,bubbles:!0});if(Wt||$r){var nr,qe;const Hi=((nr=Sn.context)==null?void 0:nr.elements.domReference)===Se.currentTarget,qt=$r&&!Hi?(qe=Sn.context)==null?void 0:qe.elements.domReference:Wt?o.current.find(pr=>(pr==null?void 0:pr.id)===re):null;qt&&(kn(Se),qt.dispatchEvent(Dr),ye(void 0))}if((pn||Lt)&&Sn.context&&Sn.context.open&&Sn.parentId&&Se.currentTarget!==Sn.context.elements.domReference){var $t;kn(Se),($t=Sn.context.elements.domReference)==null||$t.dispatchEvent(Dr);return}}return Ie(Se)}if(!(!n&&!x&&ze)){if(nn&&(z.current=p&&pn?null:Se.key),p){Wt&&(kn(Se),n?(B.current=Cv(o,ie.current),F(B.current)):r(!0,Se.nativeEvent,"list-navigation"));return}pn&&(u!=null&&(B.current=u),kn(Se),!n&&x?r(!0,Se.nativeEvent,"list-navigation"):Ie(Se),n&&F(B.current))}},onFocus(){n&&!g&&F(null)},onPointerDown:nt,onMouseDown:Me,onClick:Me}},[re,Ze,Ie,ie,v,o,p,F,r,n,x,S,m,u,N,g,C]);return ee.useMemo(()=>l?{reference:In,floating:tt,item:pe}:{},[l,In,tt,pe])}const JH=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Iw(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,s=(n=JH.get(a))!=null?n:a,l=Fm(),f=Wm()!=null,d=ee.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?i:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?i:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&f&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,i,f,r,l,a]),p=ee.useMemo(()=>{const g={id:i,...s&&{role:s}};return s==="tooltip"||a==="label"?g:{...g,...s==="menu"&&{"aria-labelledby":l}}},[s,i,l,a]),m=ee.useCallback(g=>{let{active:v,selected:y}=g;const x={role:"option",...v&&{id:i+"-option"}};switch(a){case"select":return{...x,"aria-selected":v&&y};case"combobox":return{...x,...v&&{"aria-selected":!0}}}return{}},[i,a]);return ee.useMemo(()=>o?{reference:d,floating:p,item:m}:{},[o,d,p,m])}const mA=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Qs(e,t){return typeof e=="function"?e(t):e}function QH(e,t){const[n,r]=ee.useState(e);return e&&!n&&r(!0),ee.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function eG(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=(typeof i=="number"?i:i.close)||0,[s,l]=ee.useState("unmounted"),u=QH(n,a);return!u&&s==="close"&&l("unmounted"),wt(()=>{if(r){if(n){l("initial");const f=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(f)}}l("close")}},[n,r]),{isMounted:u,status:s}}function XN(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:o,duration:a=250}=t,s=e.placement,l=s.split("-")[0],u=ee.useMemo(()=>({side:l,placement:s}),[l,s]),f=typeof a=="number",d=(f?a:a.open)||0,p=(f?a:a.close)||0,[m,g]=ee.useState(()=>({...Qs(o,u),...Qs(n,u)})),{isMounted:v,status:y}=eG(e,{duration:a}),x=$n(n),w=$n(r),S=$n(i),A=$n(o);return wt(()=>{const _=Qs(x.current,u),C=Qs(S.current,u),E=Qs(A.current,u),k=Qs(w.current,u)||Object.keys(_).reduce((M,D)=>(M[D]="",M),{});if(y==="initial"&&g(M=>({transitionProperty:M.transitionProperty,...E,..._})),y==="open"&&g({transitionProperty:Object.keys(k).map(mA).join(","),transitionDuration:d+"ms",...E,...k}),y==="close"){const M=C||_;g({transitionProperty:Object.keys(M).map(mA).join(","),transitionDuration:p+"ms",...E,...M})}},[p,S,x,w,A,d,y,u]),{isMounted:v,styles:m}}function tG(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:f=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:m=null}=t,g=ee.useRef(),v=ee.useRef(""),y=ee.useRef((n=m??a)!=null?n:-1),x=ee.useRef(null),w=Nn(s),S=Nn(l),A=$n(f),_=$n(p);wt(()=>{r&&(clearTimeout(g.current),x.current=null,v.current="")},[r]),wt(()=>{if(r&&v.current===""){var D;y.current=(D=m??a)!=null?D:-1}},[r,m,a]);const C=Nn(D=>{D?i.current.typing||(i.current.typing=D,S(D)):i.current.typing&&(i.current.typing=D,S(D))}),E=Nn(D=>{function $(B,z,H){const U=A.current?A.current(z,H):z.find(K=>(K==null?void 0:K.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?B.indexOf(U):-1}const N=o.current;if(v.current.length>0&&v.current[0]!==" "&&($(N,N,v.current)===-1?C(!1):D.key===" "&&kn(D)),N==null||_.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(kn(D),C(!0)),N.every(B=>{var z,H;return B?((z=B[0])==null?void 0:z.toLocaleLowerCase())!==((H=B[1])==null?void 0:H.toLocaleLowerCase()):!0})&&v.current===D.key&&(v.current="",y.current=x.current),v.current+=D.key,clearTimeout(g.current),g.current=setTimeout(()=>{v.current="",y.current=x.current,C(!1)},d);const L=y.current,W=$(N,[...N.slice((L||0)+1),...N.slice(0,(L||0)+1)],v.current);W!==-1?(w(W),x.current=W):D.key!==" "&&(v.current="",C(!1))}),k=ee.useMemo(()=>({onKeyDown:E}),[E]),M=ee.useMemo(()=>({onKeyDown:E,onKeyUp(D){D.key===" "&&C(!1)}}),[E,C]);return ee.useMemo(()=>u?{reference:k,floating:M}:{},[u,k,M])}function gA(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,s=o-1;a=r!=d>=r&&n<=(f-l)*(r-u)/(d-u)+l&&(i=!i)}return i}function nG(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function rG(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let i,o=!1,a=null,s=null,l=performance.now();function u(d,p){const m=performance.now(),g=m-l;if(a===null||s===null||g===0)return a=d,s=p,l=m,null;const v=d-a,y=p-s,w=Math.sqrt(v*v+y*y)/g;return a=d,s=p,l=m,w}const f=d=>{let{x:p,y:m,placement:g,elements:v,onClose:y,nodeId:x,tree:w}=d;return function(A){function _(){clearTimeout(i),y()}if(clearTimeout(i),!v.domReference||!v.floating||g==null||p==null||m==null)return;const{clientX:C,clientY:E}=A,k=[C,E],M=so(A),D=A.type==="mouseleave",$=Jt(v.floating,M),N=Jt(v.domReference,M),F=v.domReference.getBoundingClientRect(),L=v.floating.getBoundingClientRect(),W=g.split("-")[0],B=p>L.right-L.width/2,z=m>L.bottom-L.height/2,H=nG(k,F),U=L.width>F.width,K=L.height>F.height,Y=(U?F:L).left,te=(U?F:L).right,ne=(K?F:L).top,ie=(K?F:L).bottom;if($&&(o=!0,!D))return;if(N&&(o=!1),N&&!D){o=!0;return}if(D&&vt(A.relatedTarget)&&Jt(v.floating,A.relatedTarget)||w&&ls(w.nodesRef.current,x).some(le=>{let{context:re}=le;return re==null?void 0:re.open}))return;if(W==="top"&&m>=F.bottom-1||W==="bottom"&&m<=F.top+1||W==="left"&&p>=F.right-1||W==="right"&&p<=F.left+1)return _();let ce=[];switch(W){case"top":ce=[[Y,F.top+1],[Y,L.bottom-1],[te,L.bottom-1],[te,F.top+1]];break;case"bottom":ce=[[Y,L.top+1],[Y,F.bottom-1],[te,F.bottom-1],[te,L.top+1]];break;case"left":ce=[[L.right-1,ie],[L.right-1,ne],[F.left+1,ne],[F.left+1,ie]];break;case"right":ce=[[F.right-1,ie],[F.right-1,ne],[L.left+1,ne],[L.left+1,ie]];break}function ae(le){let[re,Q]=le;switch(W){case"top":{const fe=[U?re+t/2:B?re+t*4:re-t*4,Q+t+1],ye=[U?re-t/2:B?re+t*4:re-t*4,Q+t+1],X=[[L.left,B||U?L.bottom-t:L.top],[L.right,B?U?L.bottom-t:L.top:L.bottom-t]];return[fe,ye,...X]}case"bottom":{const fe=[U?re+t/2:B?re+t*4:re-t*4,Q-t],ye=[U?re-t/2:B?re+t*4:re-t*4,Q-t],X=[[L.left,B||U?L.top+t:L.bottom],[L.right,B?U?L.top+t:L.bottom:L.top+t]];return[fe,ye,...X]}case"left":{const fe=[re+t+1,K?Q+t/2:z?Q+t*4:Q-t*4],ye=[re+t+1,K?Q-t/2:z?Q+t*4:Q-t*4];return[...[[z||K?L.right-t:L.left,L.top],[z?K?L.right-t:L.left:L.right-t,L.bottom]],fe,ye]}case"right":{const fe=[re-t,K?Q+t/2:z?Q+t*4:Q-t*4],ye=[re-t,K?Q-t/2:z?Q+t*4:Q-t*4],X=[[z||K?L.left+t:L.right,L.top],[z?K?L.left+t:L.right:L.left+t,L.bottom]];return[fe,ye,...X]}}}if(!gA([C,E],ce)){if(o&&!H)return _();if(!D&&r){const le=u(A.clientX,A.clientY);if(le!==null&&le<.1)return _()}gA([C,E],ae([p,m]))?!o&&r&&(i=window.setTimeout(_,40)):_()}}};return f.__options={blockPointerEvents:n},f}const Vf="light",ZN="neutral",iG="button",oG=({theme:e=Vf,variant:t=ZN})=>{let n=e==="light"?"text-icon-secondary":"text-icon-inverse";return n={info:e==="light"?"text-support-info":"text-support-info-inverse",success:e==="light"?"text-support-success":"text-support-success-inverse",warning:e==="light"?"text-support-warning":"text-support-warning-inverse",error:e==="light"?"text-support-error":"text-support-error-inverse"}[t]||n,n},ep=({icon:e,theme:t=Vf,variant:n=ZN})=>{var a;const r="[&>svg]:h-5 [&>svg]:w-5",i=oG({theme:t,variant:n});if(e&&O.isValidElement(e))return O.cloneElement(e,{className:G(r,i,((a=e==null?void 0:e.props)==null?void 0:a.className)??"")});const o={neutral:T.jsx(Wb,{className:G(r,i)}),info:T.jsx(Wb,{className:G(r,i)}),success:T.jsx(Bf,{className:G(r,i)}),warning:T.jsx(iK,{className:G(r,i)}),error:T.jsx(rK,{className:G(r,i)})};return o[n]||o.neutral},Xb=({actionType:e=iG,onAction:t=()=>{},actionLabel:n="",theme:r=Vf})=>{const i="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let o="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch(r==="dark"&&(o="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return T.jsx(zn,{variant:"outline",size:"xs",onClick:t,className:G("rounded",i,o,r==="dark"?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return T.jsx(zn,{variant:"link",size:"xs",onClick:t,className:G(i,o),children:n});default:return null}},tp=({theme:e=Vf,title:t="",inline:n=!1})=>{if(!t)return null;const r={light:"text-text-primary",dark:"text-text-inverse"};return T.jsx("span",{className:G("block",r[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t})},np=({theme:e=Vf,content:t="",inline:n=!1})=>{if(!t)return null;const r={light:"text-text-primary",dark:"text-text-inverse"};return T.jsx("span",{className:G(r[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal",n?"inline":"block"),children:t})},aG=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},Rw=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:i=!1,open:o,setOpen:a,children:s,className:l,tooltipPortalRoot:u=null,tooltipPortalId:f="",boundary:d="clippingAncestors",strategy:p="fixed",offset:m=8,triggers:g=["hover","focus"],interactive:v=!1})=>{const y=O.useMemo(()=>typeof o=="boolean"&&typeof a=="function",[o,a]),[x,w]=O.useState(!1),S=O.useRef(null),{refs:A,floatingStyles:_,context:C}=Km({open:y?o:x,onOpenChange:y?a:w,placement:t,strategy:p,middleware:[Lm(m),Bm({boundary:d}),FN({boundary:d}),xH({element:S})],whileElementsMounted:Rm}),E=Dw(C,{enabled:!y&&g.includes("click")}),k=DH(C,{move:!1,enabled:!y&&g.includes("hover"),...v&&{handleClose:rG()}}),M=qH(C,{enabled:!y&&g.includes("focus")}),D=Um(C),$=Iw(C,{role:"tooltip"}),{getReferenceProps:N,getFloatingProps:F}=Hm([E,k,M,D,$]),{isMounted:L,styles:W}=XN(C,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),B="absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",z={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],H=e==="dark"?"text-tooltip-background-dark":"text-tooltip-background-light";return T.jsxs(T.Fragment,{children:[O.isValidElement(s)&&O.cloneElement(s,{...s.props,ref:aG(s.ref,A.setReference),className:G(s.props.className),...N()}),T.jsx(Vm,{id:f,root:u,children:L&&T.jsxs("div",{className:G(B,z,"max-w-80 w-fit",l),ref:A.setFloating,style:{..._,...W},...F(),children:[T.jsxs("div",{children:[!!n&&T.jsx("span",{className:"font-semibold",children:n}),!!r&&T.jsx("div",{className:"font-normal",children:r})]}),i&&T.jsx(MH,{ref:S,context:C,className:G("fill-current",H)})]})})]})},JN=O.createContext({}),QN=()=>O.useContext(JN),e$=({children:e,name:t,style:n="simple",size:r="md",value:i,defaultValue:o,by:a="id",as:s="div",onChange:l,className:u,disableGroup:f=!1,vertical:d=!1,columns:p=4,multiSelection:m=!1,gapClassName:g="gap-2"})=>{const v=O.useMemo(()=>typeof i<"u",[i]),y=O.useMemo(()=>t||`radio-button-group-${_a()}`,[t]);let x;v?x=i:m?x=o??[]:x=o;const[w,S]=O.useState(x),A=O.useCallback(E=>{if(m)S(k=>{const M=Array.isArray(k)&&typeof E=="string"&&k.includes(E);let D;return M?D=k.filter($=>$!==E):D=[...Array.isArray(k)?k:[],...typeof E=="string"?[E]:[]],typeof l=="function"&&l(D),D});else{if(v||S(E),typeof l!="function")return;l(E)}},[l]);u=G("grid grid-cols-4",U8[p],g,n==="tile"&&"gap-0",d&&"grid-cols-1",u);const _=G(n==="tile"?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",u),C=()=>T.jsx(JN.Provider,{value:{name:y,value:v?i:w,by:a,onChange:A,isControlled:v,disableAll:f,style:n,columns:p,multiSelection:m,size:r},children:O.Children.map(e,E=>O.isValidElement(E)?E:null)});return T.jsx(T.Fragment,{children:n==="tile"?T.jsx("div",{className:_,children:C()}):T.jsx(s,{...s===O.Fragment?{}:{className:u},children:C()})})};e$.displayName="RadioButton.Group";const sG=({id:e,label:t,value:n,children:r,disabled:i,icon:o=null,inlineIcon:a=!1,hideSelection:s=!1,reversePosition:l=!1,borderOn:u=!1,borderOnActive:f=!0,badgeItem:d=null,useSwitch:p=!1,info:m=void 0,minWidth:g=!0,...v},y)=>{var z,H;const{buttonWrapperClasses:x}=v,w=QN(),{name:S,value:A,by:_,onChange:C,disableAll:E,checked:k,multiSelection:M,size:D="md"}=w,$="primary",N=O.useMemo(()=>e||`radio-button-${_a()}`,[e]),F=O.useMemo(()=>E||i,[E,i]),L=O.useMemo(()=>M?Array.isArray(A)&&A.includes(n):typeof k<"u"?k:typeof A!=typeof n?!1:typeof A=="string"?A===n:Array.isArray(A)?A.includes(n):A[_]===n[_],[A,n,k]),W=O.useCallback(()=>O.isValidElement(t)?t:t!=null&&t.heading?T.jsxs("div",{className:G(!a&&"space-y-1.5 mt-[2px]",l&&(p?"ml-10":"ml-4"),a&&"flex gap-2",a&&!t.description&&"items-center"),children:[o&&T.jsx(T.Fragment,{children:o}),T.jsxs("div",{className:G("space-y-1.5"),children:[T.jsx("p",{className:G("text-text-primary font-medium m-0",sK[D],i&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&T.jsx("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if(w.style==="tile")return T.jsx(lG,{id:e,label:t,value:n,disabled:i,size:D,children:r});const B=()=>{F||(M?p&&C(n,!L):C(n))};return T.jsxs("label",{className:G("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",g&&"min-w-[180px]",u&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",f&&u&&L&&"ring-2 ring-border-interactive",D==="sm"?"px-3 py-3":"px-4 py-4","pr-12",F&&"cursor-not-allowed opacity-40",x),htmlFor:N,onClick:B,children:[!!t&&T.jsx("label",{className:G("cursor-pointer",F&&"cursor-not-allowed"),htmlFor:N,children:W()}),!!m&&T.jsx("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:T.jsx(Rw,{title:m==null?void 0:m.heading,content:m==null?void 0:m.description,children:T.jsx(Wb,{className:G("text-text-primary",(z=wv[D])==null?void 0:z.info)})})}),T.jsxs("label",{className:G("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",l&&"left-0",F&&"cursor-not-allowed",a&&"mr-3",p?VC[D].switch:VC[D].radio),onClick:B,children:[!!d&&d,!s&&(p?T.jsx(_w,{defaultValue:!1,size:D==="md"?"lg":"sm",onChange:()=>{M?C(n,!L):C(n)},checked:L,...v}):T.jsxs("span",{className:"relative p-0.5",children:[T.jsx("input",{ref:y,id:N,type:M?"checkbox":"radio",className:G("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",!M&&"rounded-full",WC[$].checkbox,wv[D].checkbox,F&&zC.checkbox),name:S,value:n,onChange:U=>C(U.target.value),checked:L,disabled:F,...v}),T.jsx("span",{className:G("inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",WC[$].icon,F&&zC.icon),children:M?T.jsx(Bf,{className:D==="sm"?"size-3":"size-4"}):T.jsx("div",{className:G("rounded-full bg-current",D==="sm"&&"mt-[0.5px]",(H=wv[D])==null?void 0:H.icon)})})]}))]})]})},Zb=O.forwardRef(sG);Zb.displayName="RadioButton.Button";const lG=({id:e,children:t,value:n,disabled:r,size:i="md",...o})=>{const a=QN(),{name:s,value:l,by:u,onChange:f,disableAll:d,checked:p}=a||{},m=O.useMemo(()=>e||`radio-button-${_a()}`,[e]),g=O.useMemo(()=>d||r,[d,r]),v=O.useMemo(()=>typeof p<"u"?p:typeof l!=typeof n?!1:typeof l=="string"?l===n:Array.isArray(l)?l.includes(n):l&&u?l[u]===n[u]:!1,[l,n,p,u]),y=()=>{f&&f(n)},w=G(cK,fK,dK,g?"text-text-disabled cursor-not-allowed":"",lK[i],uK);return T.jsx(T.Fragment,{children:T.jsxs("button",{type:"button",id:m,className:G(w,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",v&&"bg-button-disabled"),onClick:y,disabled:g,...o,children:[T.jsx("input",{type:"hidden",value:n,name:s,checked:v,onChange:S=>f==null?void 0:f(S.target.value)}),t]})})},uG=Object.assign(Zb,{Group:e$,Button:Zb}),Uf=O.forwardRef(({label:e="",size:t="sm",className:n="",type:r="pill",variant:i="neutral",icon:o=null,disabled:a=!1,onClose:s=()=>{},closable:l=!1,onMouseDown:u=()=>{}},f)=>{const d="font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full",p={xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"},m={pill:"rounded-full",rounded:"rounded"},g={neutral:"bg-badge-background-gray hover:bg-badge-hover-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red hover:bg-badge-hover-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow hover:bg-badge-hover-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green hover:bg-badge-hover-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky hover:bg-badge-hover-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse hover:bg-badge-hover-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled hover:bg-badge-hover-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let v="",y="group relative justify-center flex items-center cursor-pointer";const x={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(v=g.disabled,y+=" cursor-not-allowed disabled"):v=g[i],e?T.jsxs("span",{className:G(d,p[t],m[r],"gap-0.5",v,n),ref:f,children:[o?T.jsx("span",{className:G("justify-center flex items-center",x[t]),children:o}):null,T.jsx("span",{className:"px-1 truncate",children:e}),l&&T.jsxs("span",{className:G(y,x[t]),onMouseDown:u,role:"button",tabIndex:0,...!a&&{onClick:s},children:[T.jsx("span",{className:"sr-only",children:`Remove ${e}`}),T.jsx(da,{}),T.jsx("span",{className:"absolute -inset-1"})]})]}):null});Uf.displayName="Badge";const cG=({id:e,defaultValue:t="",value:n,size:r="sm",className:i="",disabled:o=!1,onChange:a=()=>{},error:s=!1,onError:l=()=>{},...u},f)=>{const d=O.useMemo(()=>e||`input-textarea-${_a()}`,[e]),p=O.useMemo(()=>typeof n<"u",[n]),[m,g]=O.useState(t),v=O.useCallback(()=>p?n:m,[p,n,m]),y=E=>{if(o)return;const k=E.target.value;p||g(k),typeof a=="function"&&a(k)},x="py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none",w={sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"},S=o?"hover:border-border-disabled":"hover:border-border-strong",A="focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",_=s?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"",C=o?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"";return T.jsx("textarea",{ref:f,id:d,className:G(x,C,w[r],A,S,_,i),disabled:o,onChange:y,onInvalid:l,value:v(),...u})},t$=O.forwardRef(cG);t$.displayName="TextArea";const fG=O.forwardRef(({variant:e="primary",size:t="md",border:n="subtle",src:r,alt:i,children:o,className:a},s)=>{const[l,u]=O.useState(!1),f=r&&n==="none"?"subtle":n,d="rounded-full overflow-hidden flex items-center justify-center",p={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand","primary-light":"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"}[e],m={xxs:"size-5 [&>svg]:size-3 text-xs",xs:"size-6 [&>svg]:size-4 text-sm",sm:"size-8 [&>svg]:size-5 text-base",md:"size-10 [&>svg]:size-6 text-lg",lg:"size-12 [&>svg]:size-12 text-lg"}[t],g={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[f],v=r?"object-cover object-center":"",y=()=>{var A,_,C;if(r&&l){if(i&&typeof i=="string")return(A=i==null?void 0:i[0])==null?void 0:A.toUpperCase();if(o&&typeof o=="string")return(_=o==null?void 0:o[0])==null?void 0:_.toUpperCase();if(!o&&!i)return T.jsx(oK,{})}return o?typeof o=="string"?(C=o==null?void 0:o[0])==null?void 0:C.toUpperCase():o:null},x=()=>{u(!0)},w=!r||l,S=w?"div":"img";return O.useEffect(()=>{u(!1)},[r]),T.jsx(S,{ref:s,className:G(d,w&&p,m,g,v,a),...w?{children:y()}:{src:r,alt:i,onError:x}})}),dG=({id:e,type:t="text",defaultValue:n="",value:r,size:i="sm",className:o="",disabled:a=!1,onChange:s=()=>{},error:l=!1,onError:u=()=>{},prefix:f=null,suffix:d=null,label:p="",...m},g)=>{const v=O.useRef(null),y=O.useMemo(()=>e||`input-${t}-${_a()}`,[e]),x=O.useMemo(()=>typeof r<"u",[r]),[w,S]=O.useState(n),[A,_]=O.useState(null),C=O.useCallback(()=>x?r:w,[x,r,w]),E=re=>{if(a)return;let Q;t==="file"?(Q=re.target.files,Q&&Q.length>0?_(Q[0].name):_(null)):Q=re.target.value,!x&&t!=="file"&&S(Q),typeof s=="function"&&s(Q)},k=()=>{_(null),v.current&&(v.current.value=""),s(null)},M="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",D={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},$={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},N={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},F={sm:f?"pl-8":"",md:f?"pl-9":"",lg:f?"pl-10":""},L={sm:d?"pr-8":"",md:d?"pr-9":"",lg:d?"pr-10":""},W=a?"hover:outline-border-disabled":"hover:outline-border-strong",B="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",z=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",H=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",U=a?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",K=a?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",Y="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",te=a?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",ne={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},ie=()=>f?T.jsx("div",{className:G(Y,"left-0 pl-3",N[i]),children:f}):null,ce=()=>t==="file"?A?T.jsx("div",{className:G(te,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",ne[i]),onClick:k,role:"button",tabIndex:0,onKeyDown:re=>{(re.key==="Enter"||re.key===" ")&&k()},children:T.jsx(da,{})}):T.jsx("div",{className:G(te,"right-0 pr-3",ne[i]),children:T.jsx(FC,{})}):d?T.jsx("div",{className:G(Y,"right-0 pr-3",N[i]),children:d}):null,ae=O.useMemo(()=>p?T.jsx("label",{className:G($[i],"text-field-label"),htmlFor:y,children:p}):null,[p,i,y]),le=A?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return t==="file"?T.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[ae,T.jsxs("div",{className:G("w-full relative flex focus-within:z-10",o),children:[T.jsx("input",{ref:g,id:y,type:"file",className:G(M,K,D[i],N[i],B,W,H,le),disabled:a,onChange:E,onInvalid:u,...m}),T.jsx("div",{className:G(te,"right-0 pr-3",ne[i]),children:T.jsx(FC,{})})]})]}):T.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[ae,T.jsxs("div",{className:G("w-full relative flex focus-within:z-10",o),children:[ie(),T.jsx("input",{ref:v,id:y,type:t,className:G(M,U,D[i],N[i],F[i],L[i],B,W,z),disabled:a,onChange:E,onInvalid:u,value:C(),...m}),ce()]})]})},n$=O.forwardRef(dG);n$.displayName="Input";const Kf=O.forwardRef(({children:e=null,tag:t="label",size:n="sm",className:r="",variant:i="neutral",required:o=!1,...a},s)=>{const l="font-medium text-field-label flex items-center gap-0.5",u={xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"},f={neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"};if(!e)return null;let d="";return o&&(d="after:content-['*'] after:text-field-required after:ml-0.5"),T.jsx(t,{ref:s,className:G(l,u[n],f[i],d,r),...a,children:e})}),hG=({title:e="",description:t="",icon:n=null,iconPosition:r="right",tag:i="h2",size:o="sm",className:a=""})=>{const s={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!e)return null;const l=()=>{const f=i,d="font-semibold p-0 m-0",p={xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"};return T.jsx(f,{className:G(d,p[o]),children:e})},u=()=>{const f={xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"};return T.jsx("p",{className:G("text-text-secondary font-normal my-0",f[o]),children:t})};return t?T.jsxs("div",{className:a,children:[T.jsxs("div",{children:[n&&r==="left"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[n,l()]}),n&&r==="right"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[l(),n]}),!n&&l()]}),u()]}):T.jsxs("div",{className:a,children:[n&&r==="left"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[n,l()]}),n&&r==="right"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[l(),n]}),!n&&l()]})},r$=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const i={primary:"text-brand-primary-600 bg-background-primary",secondary:"text-background-primary"}[e],o={sm:"[&>svg]:h-4 [&>svg]:w-4",md:"[&>svg]:h-5 [&>svg]:w-5",lg:"[&>svg]:h-6 [&>svg]:w-6",xl:"[&>svg]:h-8 [&>svg]:w-8"}[t];return T.jsx("span",{className:G("flex",o,i,r),children:n||T.jsx(eK,{className:"animate-spin"})})},pG=({progress:e=0,speed:t=200,className:n=""})=>{let r=e;e<0&&(r=0),e>100&&(r=100);const i=`translateX(-${100-r}%)`,o=`h-2 rounded-full bg-background-brand absolute left-0 top-0 w-full bottom-0 origin-left transition-transform duration-${t} ease-linear`;return T.jsx("div",{className:G("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",n),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,children:T.jsx("div",{className:o,style:{transform:i}})})},i$=O.createContext({activeItem:null,onChange:()=>{},size:"md",iconPosition:"left"}),mG=({children:e,activeItem:t=null,onChange:n,className:r,size:i="md",iconPosition:o="left"})=>{const a=O.useCallback(l=>{n&&n(l)},[n]),s=G("box-border flex border border-border-subtle border-solid rounded",r);return T.jsx("div",{className:s,children:T.jsx(i$.Provider,{value:{activeItem:t,onChange:a,size:i,iconPosition:o},children:O.Children.map(e,(l,u)=>{if(!O.isValidElement(l))return null;const f=u===0,d=u===O.Children.count(e)-1;return O.cloneElement(l,{...l.props,index:u,isFirstChild:f,isLastChild:d})})})})},gG=({slug:e,text:t,icon:n,className:r,disabled:i=!1,isFirstChild:o,isLastChild:a,...s},l)=>{const u=O.useContext(i$);if(!u)throw new Error("Button should be used inside Button Group");const{activeItem:f,onChange:d,size:p,iconPosition:m}=u,g={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-2 px-2 text-base gap-1 [&>svg]:size-4",md:"py-2.5 px-2.5 text-base gap-1 [&>svg]:size-5"},v="bg-background-primary text-primary cursor-pointer flex items-center justify-center",y="hover:bg-button-tertiary-hover",x="focus:outline-none",w=i?"text-text-disabled cursor-not-allowed":"",S=o?"rounded-tl rounded-bl border-0 border-r border-border-subtle":"",A=a?"rounded-tr rounded-br border-0":"",_="border-0 border-r border-border-subtle border-solid",C=f===e?"bg-button-disabled":"",E=G(v,y,x,w,g[p],_,C,S,A,r),k=M=>{d({event:M,value:{slug:e,text:t}})};return T.jsxs("button",{ref:l,className:E,disabled:i,onClick:k,...s,children:[m==="left"&&n&&T.jsx("span",{className:"mr-1",children:n}),t,m==="right"&&n&&T.jsx("span",{className:"ml-1",children:n})]})},o$=O.forwardRef(gG);o$.displayName="Button";const yG={Group:mG,Button:o$},yA=new Set;function Ym(e,t,n){e||yA.has(t)||(console.warn(t),yA.add(t))}function vG(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ym(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function qm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Jb=e=>Array.isArray(e);function a$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Lw(e,t,n,r){if(typeof t=="function"){const[i,o]=vA(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=vA(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Xm(e,t,n){const r=e.getProps();return Lw(r,t,n!==void 0?n:r.custom,e)}const Bw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fw=["initial",...Bw],Hf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],As=new Set(Hf),ki=e=>e*1e3,mo=e=>e/1e3,bG={type:"spring",stiffness:500,damping:25,restSpeed:10},xG=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wG={type:"keyframes",duration:.8},_G={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SG=(e,{keyframes:t})=>t.length>2?wG:As.has(e)?e.startsWith("scale")?xG(t[1]):bG:_G;function Ww(e,t){return e?e[t]||e.default||e:void 0}const OG={skipAnimations:!1,useManualTiming:!1},CG=e=>e!==null;function Zm(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(CG),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Dn=e=>e;function AG(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(u){o.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const m=d&&r?t:n;return f&&o.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,l.process(u))}};return l}const uh=["read","resolveKeyframes","update","preRender","render","postRender"],PG=40;function s$(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=uh.reduce((x,w)=>(x[w]=AG(o),x),{}),{read:s,resolveKeyframes:l,update:u,preRender:f,render:d,postRender:p}=a,m=()=>{const x=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,PG),1),i.timestamp=x,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},g=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:uh.reduce((x,w)=>{const S=a[w];return x[w]=(A,_=!1,C=!1)=>(n||g(),S.schedule(A,_,C)),x},{}),cancel:x=>{for(let w=0;w(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,TG=1e-7,EG=12;function kG(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=l$(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>TG&&++skG(o,0,1,e,n);return o=>o===0||o===1?o:l$(i(o),t,r)}const u$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,c$=e=>t=>1-e(1-t),f$=Gf(.33,1.53,.69,.99),zw=c$(f$),d$=u$(zw),h$=e=>(e*=2)<1?.5*zw(e):.5*(2-Math.pow(2,-10*(e-1))),Vw=e=>1-Math.sin(Math.acos(e)),p$=c$(Vw),m$=u$(Vw),g$=e=>/^0[^.\s]+$/u.test(e);function MG(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||g$(e):!0}let mu=Dn,Oo=Dn;process.env.NODE_ENV!=="production"&&(mu=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Oo=(e,t)=>{if(!e)throw new Error(t)});const y$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),v$=e=>t=>typeof t=="string"&&t.startsWith(e),b$=v$("--"),jG=v$("var(--"),Uw=e=>jG(e)?NG.test(e.split("/*")[0].trim()):!1,NG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$G=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function DG(e){const t=$G.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const IG=4;function x$(e,t,n=1){Oo(n<=IG,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=DG(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return y$(a)?parseFloat(a):a}return Uw(i)?x$(i,t,n+1):i}const ya=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Gc={...gu,transform:e=>ya(0,1,e)},ch={...gu,default:1},Yf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Qo=Yf("deg"),Mi=Yf("%"),De=Yf("px"),RG=Yf("vh"),LG=Yf("vw"),bA={...Mi,parse:e=>Mi.parse(e)/100,transform:e=>Mi.transform(e*100)},BG=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),xA=e=>e===gu||e===De,wA=(e,t)=>parseFloat(e.split(", ")[t]),_A=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return wA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?wA(o[1],e):0}},FG=new Set(["x","y","z"]),WG=Hf.filter(e=>!FG.has(e));function zG(e){const t=[];return WG.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ml={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:_A(4,13),y:_A(5,14)};Ml.translateX=Ml.x;Ml.translateY=Ml.y;const w$=e=>t=>t.test(e),VG={test:e=>e==="auto",parse:e=>e},_$=[gu,De,Mi,Qo,LG,RG,VG],SA=e=>_$.find(w$(e)),us=new Set;let Qb=!1,ex=!1;function S$(){if(ex){const e=Array.from(us).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=zG(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var s;(s=r.getValue(o))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ex=!1,Qb=!1,us.forEach(e=>e.complete()),us.clear()}function O$(){us.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ex=!0)})}function UG(){O$(),S$()}class Kw{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(us.add(this),Qb||(Qb=!0,bt.read(O$),bt.resolveKeyframes(S$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;oMath.round(e*1e5)/1e5,Hw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function KG(e){return e==null}const HG=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gw=(e,t)=>n=>!!(typeof n=="string"&&HG.test(n)&&n.startsWith(e)||t&&!KG(n)&&Object.prototype.hasOwnProperty.call(n,t)),C$=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Hw);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},GG=e=>ya(0,255,e),jv={...gu,transform:e=>Math.round(GG(e))},ts={test:Gw("rgb","red"),parse:C$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jv.transform(e)+", "+jv.transform(t)+", "+jv.transform(n)+", "+Cc(Gc.transform(r))+")"};function YG(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const tx={test:Gw("#"),parse:YG,transform:ts.transform},ul={test:Gw("hsl","hue"),parse:C$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mi.transform(Cc(t))+", "+Mi.transform(Cc(n))+", "+Cc(Gc.transform(r))+")"},Fn={test:e=>ts.test(e)||tx.test(e)||ul.test(e),parse:e=>ts.test(e)?ts.parse(e):ul.test(e)?ul.parse(e):tx.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ts.transform(e):ul.transform(e)},qG=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function XG(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Hw))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(qG))===null||n===void 0?void 0:n.length)||0)>0}const A$="number",P$="color",ZG="var",JG="var(",OA="${}",QG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(QG,l=>(Fn.test(l)?(r.color.push(o),i.push(P$),n.push(Fn.parse(l))):l.startsWith(JG)?(r.var.push(o),i.push(ZG),n.push(l)):(r.number.push(o),i.push(A$),n.push(parseFloat(l))),++o,OA)).split(OA);return{values:n,split:s,indexes:r,types:i}}function T$(e){return Yc(e).values}function E$(e){const{split:t,types:n}=Yc(e),r=t.length;return i=>{let o="";for(let a=0;atypeof e=="number"?0:e;function tY(e){const t=T$(e);return E$(e)(t.map(eY))}const va={test:XG,parse:T$,createTransformer:E$,getAnimatableNone:tY},nY=new Set(["brightness","contrast","saturate","opacity"]);function rY(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Hw)||[];if(!r)return e;const i=n.replace(r,"");let o=nY.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const iY=/\b([a-z-]*)\(.*?\)/gu,nx={...va,getAnimatableNone:e=>{const t=e.match(iY);return t?t.map(rY).join(" "):e}},oY={borderWidth:De,borderTopWidth:De,borderRightWidth:De,borderBottomWidth:De,borderLeftWidth:De,borderRadius:De,radius:De,borderTopLeftRadius:De,borderTopRightRadius:De,borderBottomRightRadius:De,borderBottomLeftRadius:De,width:De,maxWidth:De,height:De,maxHeight:De,top:De,right:De,bottom:De,left:De,padding:De,paddingTop:De,paddingRight:De,paddingBottom:De,paddingLeft:De,margin:De,marginTop:De,marginRight:De,marginBottom:De,marginLeft:De,backgroundPositionX:De,backgroundPositionY:De},aY={rotate:Qo,rotateX:Qo,rotateY:Qo,rotateZ:Qo,scale:ch,scaleX:ch,scaleY:ch,scaleZ:ch,skew:Qo,skewX:Qo,skewY:Qo,distance:De,translateX:De,translateY:De,translateZ:De,x:De,y:De,z:De,perspective:De,transformPerspective:De,opacity:Gc,originX:bA,originY:bA,originZ:De},CA={...gu,transform:Math.round},Yw={...oY,...aY,zIndex:CA,size:De,fillOpacity:Gc,strokeOpacity:Gc,numOctaves:CA},sY={...Yw,color:Fn,backgroundColor:Fn,outlineColor:Fn,fill:Fn,stroke:Fn,borderColor:Fn,borderTopColor:Fn,borderRightColor:Fn,borderBottomColor:Fn,borderLeftColor:Fn,filter:nx,WebkitFilter:nx},qw=e=>sY[e];function k$(e,t){let n=qw(e);return n!==nx&&(n=va),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lY=new Set(["auto","none","0"]);function uY(e,t,n){let r=0,i;for(;r{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Xw(e){return typeof e=="function"}let Fh;function cY(){Fh=void 0}const ji={now:()=>(Fh===void 0&&ji.set(Tn.isProcessing||OG.useManualTiming?Tn.timestamp:performance.now()),Fh),set:e=>{Fh=e,queueMicrotask(cY)}},AA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(va.test(e)||e==="0")&&!e.startsWith("url("));function fY(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nhY?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&UG(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ji.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:s,onUpdate:l,isGenerator:u}=this.options;if(!u&&!dY(t,r,i,o))if(a)this.options.duration=0;else{l==null||l(Zm(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function N$(e,t){return t?e*(1e3/t):0}const pY=5;function $$(e,t,n){const r=Math.max(t-pY,0);return N$(n-e(r),t-r)}const Nv=.001,mY=.01,PA=10,gY=.05,yY=1;function vY({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;mu(e<=ki(PA),"Spring duration must be 10 seconds or less");let a=1-t;a=ya(gY,yY,a),e=ya(mY,PA,mo(e)),a<1?(i=u=>{const f=u*a,d=f*e,p=f-n,m=rx(u,a),g=Math.exp(-d);return Nv-p/m*g},o=u=>{const d=u*a*e,p=d*n+n,m=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-d),v=rx(Math.pow(u,2),a);return(-i(u)+Nv>0?-1:1)*((p-m)*g)/v}):(i=u=>{const f=Math.exp(-u*e),d=(u-n)*e+1;return-Nv+f*d},o=u=>{const f=Math.exp(-u*e),d=(n-u)*(e*e);return f*d});const s=5/e,l=xY(i,o,s);if(e=ki(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const bY=12;function xY(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function SY(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!TA(e,_Y)&&TA(e,wY)){const n=vY(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function D$({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:p}=SY({...r,velocity:-mo(r.velocity||0)}),m=d||0,g=l/(2*Math.sqrt(s*u)),v=o-i,y=mo(Math.sqrt(s/u)),x=Math.abs(v)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let w;if(g<1){const S=rx(y,g);w=A=>{const _=Math.exp(-g*y*A);return o-_*((m+g*y*v)/S*Math.sin(S*A)+v*Math.cos(S*A))}}else if(g===1)w=S=>o-Math.exp(-y*S)*(v+(m+y*v)*S);else{const S=y*Math.sqrt(g*g-1);w=A=>{const _=Math.exp(-g*y*A),C=Math.min(S*A,300);return o-_*((m+g*y*v)*Math.sinh(C)+S*v*Math.cosh(C))/S}}return{calculatedDuration:p&&f||null,next:S=>{const A=w(S);if(p)a.done=S>=f;else{let _=0;g<1&&(_=S===0?ki(m):$$(w,S,A));const C=Math.abs(_)<=n,E=Math.abs(o-A)<=t;a.done=C&&E}return a.value=a.done?o:A,a}}}function EA({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:f}){const d=e[0],p={done:!1,value:d},m=k=>s!==void 0&&kl,g=k=>s===void 0?l:l===void 0||Math.abs(s-k)-v*Math.exp(-k/r),S=k=>x+w(k),A=k=>{const M=w(k),D=S(k);p.done=Math.abs(M)<=u,p.value=p.done?x:D};let _,C;const E=k=>{m(p.value)&&(_=k,C=D$({keyframes:[p.value,g(p.value)],velocity:$$(S,k,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:f}))};return E(0),{calculatedDuration:null,next:k=>{let M=!1;return!C&&_===void 0&&(M=!0,A(k),E(k)),_!==void 0&&k>=_?C.next(k-_):(!M&&A(k),p)}}}const OY=Gf(.42,0,1,1),CY=Gf(0,0,.58,1),I$=Gf(.42,0,.58,1),AY=e=>Array.isArray(e)&&typeof e[0]!="number",Zw=e=>Array.isArray(e)&&typeof e[0]=="number",kA={linear:Dn,easeIn:OY,easeInOut:I$,easeOut:CY,circIn:Vw,circInOut:m$,circOut:p$,backIn:zw,backInOut:d$,backOut:f$,anticipate:h$},MA=e=>{if(Zw(e)){Oo(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return Gf(t,n,r,i)}else if(typeof e=="string")return Oo(kA[e]!==void 0,`Invalid easing type '${e}'`),kA[e];return e},PY=(e,t)=>n=>t(e(n)),go=(...e)=>e.reduce(PY),jl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ft=(e,t,n)=>e+(t-e)*n;function $v(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function TY({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=$v(l,s,e+1/3),o=$v(l,s,e),a=$v(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function rp(e,t){return n=>n>0?t:e}const Dv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},EY=[tx,ts,ul],kY=e=>EY.find(t=>t.test(e));function jA(e){const t=kY(e);if(mu(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ul&&(n=TY(n)),n}const NA=(e,t)=>{const n=jA(e),r=jA(t);if(!n||!r)return rp(e,t);const i={...n};return o=>(i.red=Dv(n.red,r.red,o),i.green=Dv(n.green,r.green,o),i.blue=Dv(n.blue,r.blue,o),i.alpha=Ft(n.alpha,r.alpha,o),ts.transform(i))},ix=new Set(["none","hidden"]);function MY(e,t){return ix.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jY(e,t){return n=>Ft(e,t,n)}function Jw(e){return typeof e=="number"?jY:typeof e=="string"?Uw(e)?rp:Fn.test(e)?NA:DY:Array.isArray(e)?R$:typeof e=="object"?Fn.test(e)?NA:NY:rp}function R$(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Jw(o)(o,t[a]));return o=>{for(let a=0;a{for(const o in r)n[o]=r[o](i);return n}}function $Y(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=va.createTransformer(t),r=Yc(e),i=Yc(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ix.has(e)&&!i.values.length||ix.has(t)&&!r.values.length?MY(e,t):go(R$($Y(r,i),i.values),n):(mu(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),rp(e,t))};function L$(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ft(e,t,n):Jw(e)(e,t)}function IY(e,t,n){const r=[],i=n||L$,o=e.length-1;for(let a=0;at[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=IY(t,r,i),s=a.length,l=u=>{let f=0;if(s>1)for(;fl(ya(e[0],e[o-1],u)):l}function LY(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=jl(0,t,r);e.push(Ft(n,1,i))}}function BY(e){const t=[0];return LY(t,e.length-1),t}function FY(e,t){return e.map(n=>n*t)}function WY(e,t){return e.map(()=>t||I$).splice(0,e.length-1)}function ip({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=AY(r)?r.map(MA):MA(r),o={done:!1,value:t[0]},a=FY(n&&n.length===t.length?n:BY(t),e),s=RY(a,t,{ease:Array.isArray(i)?i:WY(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}const $A=2e4;function zY(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<$A;)t+=n,r=e.next(t);return t>=$A?1/0:t}const VY=e=>{const t=({timestamp:n})=>e(n);return{start:()=>bt.update(t,!0),stop:()=>ga(t),now:()=>Tn.isProcessing?Tn.timestamp:ji.now()}},UY={decay:EA,inertia:EA,tween:ip,keyframes:ip,spring:D$},KY=e=>e/100;class Qw extends j${constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||Kw,s=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(o,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=Xw(n)?n:UY[n]||ip;let l,u;s!==ip&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Oo(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=go(KY,L$(t[0],t[1])),t=[0,100]);const f=s({...this.options,keyframes:t});o==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=zY(f));const{calculatedDuration:d}=f,p=d+i,m=p*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:p,repeat:m,repeatType:g,repeatDelay:v,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-p*(this.speed>=0?1:-1),w=this.speed>=0?x<0:x>f;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let S=this.currentTime,A=o;if(m){const k=Math.min(this.currentTime,f)/d;let M=Math.floor(k),D=k%1;!D&&k>=1&&(D=1),D===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(g==="reverse"?(D=1-D,v&&(D-=v/d)):g==="mirror"&&(A=a)),S=ya(0,1,D)*d}const _=w?{done:!1,value:l[0]}:A.next(S);s&&(_.value=s(_.value));let{done:C}=_;!w&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&i!==void 0&&(_.value=Zm(l,this.options,i)),y&&y(_.value),E&&this.finish(),_}get duration(){const{resolved:t}=this;return t?mo(t.calculatedDuration):0}get time(){return mo(this.currentTime)}set time(t){t=ki(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=mo(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=VY,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const HY=new Set(["opacity","clipPath","filter","transform"]),GY=10,YY=(e,t)=>{let n="";const r=Math.max(Math.round(t/GY),2);for(let i=0;i(t===void 0&&(t=e()),t)}const qY={linearEasing:void 0};function XY(e,t){const n=e1(e);return()=>{var r;return(r=qY[t])!==null&&r!==void 0?r:n()}}const op=XY(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function B$(e){return!!(typeof e=="function"&&op()||!e||typeof e=="string"&&(e in ox||op())||Zw(e)||Array.isArray(e)&&e.every(B$))}const yc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ox={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yc([0,.65,.55,1]),circOut:yc([.55,0,1,.45]),backIn:yc([.31,.01,.66,-.59]),backOut:yc([.33,1.53,.69,.99])};function F$(e,t){if(e)return typeof e=="function"&&op()?YY(e,t):Zw(e)?yc(e):Array.isArray(e)?e.map(n=>F$(n,t)||ox.easeOut):ox[e]}function ZY(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const f=F$(s,i);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function DA(e,t){e.timeline=t,e.onfinish=null}const JY=e1(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ap=10,QY=2e4;function eq(e){return Xw(e.type)||e.type==="spring"||!B$(e.ease)}function tq(e,t){const n=new Qw({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(a,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:s,motionValue:l,name:u,startTime:f}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&op()&&nq(a)&&(a=W$[a]),eq(this.options)){const{onComplete:p,onUpdate:m,motionValue:g,element:v,...y}=this.options,x=tq(t,y);t=x.keyframes,t.length===1&&(t[1]=t[0]),i=x.duration,o=x.times,a=x.ease,s="keyframes"}const d=ZY(l.owner.current,u,t,{...this.options,duration:i,times:o,ease:a});return d.startTime=f??this.calcStartTime(),this.pendingTimeline?(DA(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;l.set(Zm(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:s,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return mo(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return mo(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ki(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Dn;const{animation:r}=n;DA(r,t)}return Dn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:d,element:p,...m}=this.options,g=new Qw({...m,keyframes:r,duration:i,type:o,ease:a,times:s,isGenerator:!0}),v=ki(this.time);u.setWithVelocity(g.sample(v-ap).value,g.sample(v).value,ap)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:a,type:s}=t;return JY()&&r&&HY.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}const rq=e1(()=>window.ScrollTimeline!==void 0);class iq{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rrq()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function oq({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:u,...f}){return!!Object.keys(f).length}const t1=(e,t,n,r={},i,o)=>a=>{const s=Ww(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ki(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};oq(s)||(f={...f,...SG(e,f)}),f.duration&&(f.duration=ki(f.duration)),f.repeatDelay&&(f.repeatDelay=ki(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const p=Zm(f.keyframes,s);if(p!==void 0)return bt.update(()=>{f.onUpdate(p),f.onComplete()}),new iq([])}return!o&&IA.supports(f)?new IA(f):new Qw(f)},aq=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),sq=e=>Jb(e)?e[e.length-1]||0:e;function n1(e,t){e.indexOf(t)===-1&&e.push(t)}function r1(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class i1{constructor(){this.subscriptions=[]}add(t){return n1(this.subscriptions,t),()=>r1(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class uq{constructor(t,n={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=ji.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ji.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lq(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ym(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new i1);const r=this.events[t].add(n);return t==="change"?()=>{r(),bt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ji.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>RA)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,RA);return N$(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qc(e,t){return new uq(e,t)}function cq(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qc(n))}function fq(e,t){const n=Xm(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=sq(o[a]);cq(e,a,s)}}const o1=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dq="framerAppearId",z$="data-"+o1(dq);function V$(e){return e.props[z$]}const Un=e=>!!(e&&e.getVelocity);function hq(e){return!!(Un(e)&&e.add)}function ax(e,t){const n=e.getValue("willChange");if(hq(n))return n.add(t)}function pq({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function U$(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const p=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),m=l[d];if(m===void 0||f&&pq(f,d))continue;const g={delay:n,...Ww(a||{},d)};let v=!1;if(window.MotionHandoffAnimation){const x=V$(e);if(x){const w=window.MotionHandoffAnimation(x,d,bt);w!==null&&(g.startTime=w,v=!0)}}ax(e,d),p.start(t1(d,p,m,e.shouldReduceMotion&&As.has(d)?{type:!1}:g,e,v));const y=p.animation;y&&u.push(y)}return s&&Promise.all(u).then(()=>{bt.update(()=>{s&&fq(e,s)})}),u}function sx(e,t,n={}){var r;const i=Xm(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(U$(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:p}=o;return mq(e,t,f+u,d,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,f]=l==="beforeChildren"?[a,s]:[s,a];return u().then(()=>f())}else return Promise.all([a(),s(n.delay)])}function mq(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(gq).forEach((u,f)=>{u.notify("AnimationStart",t),a.push(sx(u,t,{...o,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function gq(e,t){return e.sortNodePosition(t)}function yq(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>sx(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=sx(e,t,n);else{const i=typeof t=="function"?Xm(e,t,n.custom):t;r=Promise.all(U$(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const vq=Fw.length;function K$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?K$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>yq(e,n,r)))}function _q(e){let t=wq(e),n=LA(),r=!0;const i=l=>(u,f)=>{var d;const p=Xm(e,f,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:m,transitionEnd:g,...v}=p;u={...u,...v,...g}}return u};function o(l){t=l(e)}function a(l){const{props:u}=e,f=K$(e.parent)||{},d=[],p=new Set;let m={},g=1/0;for(let y=0;yg&&A,M=!1;const D=Array.isArray(S)?S:[S];let $=D.reduce(i(x),{});_===!1&&($={});const{prevResolvedValues:N={}}=w,F={...N,...$},L=z=>{k=!0,p.has(z)&&(M=!0,p.delete(z)),w.needsAnimating[z]=!0;const H=e.getValue(z);H&&(H.liveStyle=!1)};for(const z in F){const H=$[z],U=N[z];if(m.hasOwnProperty(z))continue;let K=!1;Jb(H)&&Jb(U)?K=!a$(H,U):K=H!==U,K?H!=null?L(z):p.add(z):H!==void 0&&p.has(z)?L(z):w.protectedKeys[z]=!0}w.prevProp=S,w.prevResolvedValues=$,w.isActive&&(m={...m,...$}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&E)||M)&&d.push(...D.map(z=>({animation:z,options:{type:x}})))}if(p.size){const y={};p.forEach(x=>{const w=e.getBaseTarget(x),S=e.getValue(x);S&&(S.liveStyle=!0),y[x]=w??null}),d.push({animation:y})}let v=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function s(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),n[l].isActive=u;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=LA(),r=!0}}}function Sq(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!a$(t,e):!1}function za(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function LA(){return{animate:za(!0),whileInView:za(),whileHover:za(),whileTap:za(),whileDrag:za(),whileFocus:za(),exit:za()}}class Oa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Oq extends Oa{constructor(t){super(t),t.animationState||(t.animationState=_q(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Cq=0;class Aq extends Oa{constructor(){super(...arguments),this.id=Cq++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Pq={animation:{Feature:Oq},exit:{Feature:Aq}},H$=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Jm(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Tq=e=>t=>H$(t)&&e(t,Jm(t));function lo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function yo(e,t,n,r){return lo(e,t,Tq(n),r)}const BA=(e,t)=>Math.abs(e-t);function Eq(e,t){const n=BA(e.x,t.x),r=BA(e.y,t.y);return Math.sqrt(n**2+r**2)}class G${constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Rv(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=Eq(d.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:g}=d,{timestamp:v}=Tn;this.history.push({...g,timestamp:v});const{onStart:y,onMove:x}=this.handlers;p||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Iv(p,this.transformPagePoint),bt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Rv(d.type==="pointercancel"?this.lastMoveEventInfo:Iv(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,y),g&&g(d,y)},!H$(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=Jm(t),s=Iv(a,this.transformPagePoint),{point:l}=s,{timestamp:u}=Tn;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Rv(s,this.history)),this.removeListeners=go(yo(this.contextWindow,"pointermove",this.handlePointerMove),yo(this.contextWindow,"pointerup",this.handlePointerUp),yo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ga(this.updatePoint)}}function Iv(e,t){return t?{point:t(e.point)}:e}function FA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rv({point:e},t){return{point:e,delta:FA(e,Y$(t)),offset:FA(e,kq(t)),velocity:Mq(t,.1)}}function kq(e){return e[0]}function Y$(e){return e[e.length-1]}function Mq(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Y$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ki(t)));)n--;if(!r)return{x:0,y:0};const o=mo(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function q$(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const WA=q$("dragHorizontal"),zA=q$("dragVertical");function X$(e){let t=!1;if(e==="y")t=zA();else if(e==="x")t=WA();else{const n=WA(),r=zA();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Z$(){const e=X$(!0);return e?(e(),!1):!0}function cl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const J$=1e-4,jq=1-J$,Nq=1+J$,Q$=.01,$q=0-Q$,Dq=0+Q$;function jr(e){return e.max-e.min}function Iq(e,t,n){return Math.abs(e-t)<=n}function VA(e,t,n,r=.5){e.origin=r,e.originPoint=Ft(t.min,t.max,e.origin),e.scale=jr(n)/jr(t),e.translate=Ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=jq&&e.scale<=Nq||isNaN(e.scale))&&(e.scale=1),(e.translate>=$q&&e.translate<=Dq||isNaN(e.translate))&&(e.translate=0)}function Ac(e,t,n,r){VA(e.x,t.x,n.x,r?r.originX:void 0),VA(e.y,t.y,n.y,r?r.originY:void 0)}function UA(e,t,n){e.min=n.min+t.min,e.max=e.min+jr(t)}function Rq(e,t,n){UA(e.x,t.x,n.x),UA(e.y,t.y,n.y)}function KA(e,t,n){e.min=t.min-n.min,e.max=e.min+jr(t)}function Pc(e,t,n){KA(e.x,t.x,n.x),KA(e.y,t.y,n.y)}function Lq(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ft(n,e,r.max):Math.min(e,n)),e}function HA(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Bq(e,{top:t,left:n,bottom:r,right:i}){return{x:HA(e.x,n,i),y:HA(e.y,t,r)}}function GA(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=jl(t.min,t.max-r,e.min):r>i&&(n=jl(e.min,e.max-i,t.min)),ya(0,1,n)}function zq(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const lx=.35;function Vq(e=lx){return e===!1?e=0:e===!0&&(e=lx),{x:YA(e,"left","right"),y:YA(e,"top","bottom")}}function YA(e,t,n){return{min:qA(e,t),max:qA(e,n)}}function qA(e,t){return typeof e=="number"?e:e[t]||0}const XA=()=>({translate:0,scale:1,origin:0,originPoint:0}),fl=()=>({x:XA(),y:XA()}),ZA=()=>({min:0,max:0}),Gt=()=>({x:ZA(),y:ZA()});function qr(e){return[e("x"),e("y")]}function eD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Uq({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Kq(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Lv(e){return e===void 0||e===1}function ux({scale:e,scaleX:t,scaleY:n}){return!Lv(e)||!Lv(t)||!Lv(n)}function Ya(e){return ux(e)||tD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tD(e){return JA(e.x)||JA(e.y)}function JA(e){return e&&e!=="0%"}function sp(e,t,n){const r=e-n,i=t*r;return n+i}function QA(e,t,n,r,i){return i!==void 0&&(e=sp(e,i,r)),sp(e,n,r)+t}function cx(e,t=0,n=1,r,i){e.min=QA(e.min,t,n,r,i),e.max=QA(e.max,t,n,r,i)}function nD(e,{x:t,y:n}){cx(e.x,t.translate,t.scale,t.originPoint),cx(e.y,n.translate,n.scale,n.originPoint)}const eP=.999999999999,tP=1.0000000000001;function Hq(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;seP&&(t.x=1),t.yeP&&(t.y=1)}function dl(e,t){e.min=e.min+t,e.max=e.max+t}function nP(e,t,n,r,i=.5){const o=Ft(e.min,e.max,i);cx(e,t,n,o,r)}function hl(e,t){nP(e.x,t.x,t.scaleX,t.scale,t.originX),nP(e.y,t.y,t.scaleY,t.scale,t.originY)}function rD(e,t){return eD(Kq(e.getBoundingClientRect(),t))}function Gq(e,t,n){const r=rD(e,n),{scroll:i}=t;return i&&(dl(r.x,i.offset.x),dl(r.y,i.offset.y)),r}const iD=({current:e})=>e?e.ownerDocument.defaultView:null,Yq=new WeakMap;class qq{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Jm(f,"page").point)},o=(f,d)=>{const{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=X$(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qr(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Mi.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[y];S&&(x=jr(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),g&&bt.postRender(()=>g(f,d)),ax(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,d)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:y}=d;if(m&&this.currentDirection===null){this.currentDirection=Xq(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&v(f,d)},s=(f,d)=>this.stop(f,d),l=()=>qr(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new G$(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:iD(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&bt.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!fh(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Lq(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&cl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Bq(i.layoutBox,n):this.constraints=!1,this.elastic=Vq(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&qr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=zq(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!cl(t))return!1;const r=t.current;Oo(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Gq(r,i.root,this.visualElement.getTransformPagePoint());let a=Fq(i.layout.layoutBox,o);if(n){const s=n(Uq(a));this.hasMutatedConstraints=!!s,s&&(a=eD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=qr(f=>{if(!fh(f,n,this.currentDirection))return;let d=l&&l[f]||{};a&&(d={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,g={type:"inertia",velocity:r?t[f]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(f,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ax(this.visualElement,t),r.start(t1(t,r,0,n,this.visualElement,!1))}stopAnimation(){qr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){qr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){qr(n=>{const{drag:r}=this.getProps();if(!fh(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Ft(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!cl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};qr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();i[a]=Wq({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),qr(a=>{if(!fh(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(Ft(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;Yq.set(this.visualElement,this);const t=this.visualElement.current,n=yo(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();cl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),bt.read(r);const a=lo(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(qr(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=lx,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function fh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xq(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Zq extends Oa{constructor(t){super(t),this.removeGroupControls=Dn,this.removeListeners=Dn,this.controls=new qq(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const rP=e=>(t,n)=>{e&&bt.postRender(()=>e(t,n))};class Jq extends Oa{constructor(){super(...arguments),this.removePointerDownListener=Dn}onPointerDown(t){this.session=new G$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iD(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:rP(t),onStart:rP(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&bt.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=yo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Qm=O.createContext(null);function Qq(){const e=O.useContext(Qm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=O.useId();O.useEffect(()=>r(i),[]);const o=O.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}const a1=O.createContext({}),oD=O.createContext({}),Wh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function iP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const tc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(De.test(e))e=parseFloat(e);else return e;const n=iP(e,t.target.x),r=iP(e,t.target.y);return`${n}% ${r}%`}},e9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=va.parse(e);if(i.length>5)return r;const o=va.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const u=Ft(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),o(i)}},lp={};function t9(e){Object.assign(lp,e)}const{schedule:s1,cancel:ITe}=s$(queueMicrotask,!1);class n9 extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;t9(r9),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Wh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||bt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),s1.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function aD(e){const[t,n]=Qq(),r=O.useContext(a1);return T.jsx(n9,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(oD),isPresent:t,safeToRemove:n})}const r9={borderRadius:{...tc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tc,borderTopRightRadius:tc,borderBottomLeftRadius:tc,borderBottomRightRadius:tc,boxShadow:e9},sD=["TopLeft","TopRight","BottomLeft","BottomRight"],i9=sD.length,oP=e=>typeof e=="string"?parseFloat(e):e,aP=e=>typeof e=="number"||De.test(e);function o9(e,t,n,r,i,o){i?(e.opacity=Ft(0,n.opacity!==void 0?n.opacity:1,a9(r)),e.opacityExit=Ft(t.opacity!==void 0?t.opacity:1,0,s9(r))):o&&(e.opacity=Ft(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(jl(e,t,r))}function lP(e,t){e.min=t.min,e.max=t.max}function Kr(e,t){lP(e.x,t.x),lP(e.y,t.y)}function uP(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function cP(e,t,n,r,i){return e-=t,e=sp(e,1/n,r),i!==void 0&&(e=sp(e,1/i,r)),e}function l9(e,t=0,n=1,r=.5,i,o=e,a=e){if(Mi.test(t)&&(t=parseFloat(t),t=Ft(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Ft(o.min,o.max,r);e===o&&(s-=t),e.min=cP(e.min,t,n,s,i),e.max=cP(e.max,t,n,s,i)}function fP(e,t,[n,r,i],o,a){l9(e,t[n],t[r],t[i],t.scale,o,a)}const u9=["x","scaleX","originX"],c9=["y","scaleY","originY"];function dP(e,t,n,r){fP(e.x,t,u9,n?n.x:void 0,r?r.x:void 0),fP(e.y,t,c9,n?n.y:void 0,r?r.y:void 0)}function hP(e){return e.translate===0&&e.scale===1}function uD(e){return hP(e.x)&&hP(e.y)}function pP(e,t){return e.min===t.min&&e.max===t.max}function f9(e,t){return pP(e.x,t.x)&&pP(e.y,t.y)}function mP(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function cD(e,t){return mP(e.x,t.x)&&mP(e.y,t.y)}function gP(e){return jr(e.x)/jr(e.y)}function yP(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class d9{constructor(){this.members=[]}add(t){n1(this.members,t),t.scheduleRender()}remove(t){if(r1(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function h9(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:d,rotateY:p,skewX:m,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const p9=(e,t)=>e.depth-t.depth;class m9{constructor(){this.children=[],this.isDirty=!1}add(t){n1(this.children,t),this.isDirty=!0}remove(t){r1(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(p9),this.isDirty=!1,this.children.forEach(t)}}function zh(e){const t=Un(e)?e.get():e;return aq(t)?t.toValue():t}function g9(e,t){const n=ji.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ga(r),e(o-t))};return bt.read(r,!0),()=>ga(r)}function y9(e){return e instanceof SVGElement&&e.tagName!=="svg"}function v9(e,t,n){const r=Un(e)?e:qc(e);return r.start(t1("",r,t,n)),r.animation}const qa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vc=typeof window<"u"&&window.MotionDebug!==void 0,Bv=["","X","Y","Z"],b9={visibility:"hidden"},vP=1e3;let x9=0;function Fv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=V$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",bt,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fD(r)}function dD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=x9++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,vc&&(qa.totalNodes=qa.resolvedTargetDeltas=qa.recalculatedProjection=0),this.nodes.forEach(S9),this.nodes.forEach(T9),this.nodes.forEach(E9),this.nodes.forEach(O9),vc&&window.MotionDebug.record(qa)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=g9(p,250),Wh.hasAnimatedSinceResize&&(Wh.hasAnimatedSinceResize=!1,this.nodes.forEach(xP))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||$9,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=f.getProps(),w=!this.targetLayout||!cD(this.targetLayout,g)||m,S=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const A={...Ww(v,"layout"),onPlay:y,onComplete:x};(f.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else p||xP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ga(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(k9),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const _=A/1e3;wP(d.x,a.x,_),wP(d.y,a.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),j9(this.relativeTarget,this.relativeTargetOrigin,p,_),S&&f9(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Gt()),Kr(S,this.relativeTarget)),v&&(this.animationValues=f,o9(f,u,this.latestValues,_,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ga(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(()=>{Wh.hasAnimatedSinceResize=!0,this.currentAnimation=v9(0,vP,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:f}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&hD(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Gt();const d=jr(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=jr(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}Kr(s,l),hl(s,f),Ac(this.projectionDeltaWithTransform,this.layoutCorrected,s,f)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new d9),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&Fv("z",a,u,this.animationValues);for(let f=0;f{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(bP),this.root.sharedNodes.clear()}}}function w9(e){e.updateLayout()}function _9(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?qr(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],m=jr(p);p.min=r[d].min,p.max=p.min+m}):hD(o,n.layoutBox,r)&&qr(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],m=jr(r[d]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const s=fl();Ac(s,r,n.layoutBox);const l=fl();a?Ac(l,e.applyTransform(i,!0),n.measuredBox):Ac(l,r,n.layoutBox);const u=!uD(s);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const g=Gt();Pc(g,n.layoutBox,p.layoutBox);const v=Gt();Pc(v,r,m.layoutBox),cD(g,v)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function S9(e){vc&&qa.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function O9(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function C9(e){e.clearSnapshot()}function bP(e){e.clearMeasurements()}function A9(e){e.isLayoutDirty=!1}function P9(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function xP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function T9(e){e.resolveTargetDelta()}function E9(e){e.calcProjection()}function k9(e){e.resetSkewAndRotation()}function M9(e){e.removeLeadSnapshot()}function wP(e,t,n){e.translate=Ft(t.translate,0,n),e.scale=Ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _P(e,t,n,r){e.min=Ft(t.min,n.min,r),e.max=Ft(t.max,n.max,r)}function j9(e,t,n,r){_P(e.x,t.x,n.x,r),_P(e.y,t.y,n.y,r)}function N9(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $9={duration:.45,ease:[.4,0,.1,1]},SP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),OP=SP("applewebkit/")&&!SP("chrome/")?Math.round:Dn;function CP(e){e.min=OP(e.min),e.max=OP(e.max)}function D9(e){CP(e.x),CP(e.y)}function hD(e,t,n){return e==="position"||e==="preserve-aspect"&&!Iq(gP(t),gP(n),.2)}function I9(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const R9=dD({attachResizeListener:(e,t)=>lo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wv={current:void 0},pD=dD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wv.current){const e=new R9({});e.mount(window),e.setOptions({layoutScroll:!0}),Wv.current=e}return Wv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),L9={pan:{Feature:Jq},drag:{Feature:Zq,ProjectionNode:pD,MeasureLayout:aD}};function AP(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||Z$())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const l=s[r];l&&bt.postRender(()=>l(o,a))};return yo(e.current,n,i,{passive:!e.getProps()[r]})}class B9 extends Oa{mount(){this.unmount=go(AP(this.node,!0),AP(this.node,!1))}unmount(){}}class F9 extends Oa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=go(lo(this.node.current,"focus",()=>this.onFocus()),lo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const mD=(e,t)=>t?e===t?!0:mD(e,t.parentElement):!1;function zv(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Jm(n))}class W9 extends Oa{constructor(){super(...arguments),this.removeStartListeners=Dn,this.removeEndListeners=Dn,this.removeAccessibleListeners=Dn,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=yo(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f,globalTapTarget:d}=this.node.getProps(),p=!d&&!mD(this.node.current,s.target)?f:u;p&&bt.update(()=>p(s,l))},{passive:!(r.onTap||r.onPointerUp)}),a=yo(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=go(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||zv("up",(l,u)=>{const{onTap:f}=this.node.getProps();f&&bt.postRender(()=>f(l,u))})};this.removeEndListeners(),this.removeEndListeners=lo(this.node.current,"keyup",a),zv("down",(s,l)=>{this.startPress(s,l)})},n=lo(this.node.current,"keydown",t),r=()=>{this.isPressing&&zv("cancel",(o,a)=>this.cancelPress(o,a))},i=lo(this.node.current,"blur",r);this.removeAccessibleListeners=go(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&bt.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Z$()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&bt.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=yo(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=lo(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=go(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const fx=new WeakMap,Vv=new WeakMap,z9=e=>{const t=fx.get(e.target);t&&t(e)},V9=e=>{e.forEach(z9)};function U9({root:e,...t}){const n=e||document;Vv.has(n)||Vv.set(n,{});const r=Vv.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(V9,{root:e,...t})),r[i]}function K9(e,t,n){const r=U9(t);return fx.set(e,n),r.observe(e),()=>{fx.delete(e),r.unobserve(e)}}const H9={some:0,all:1};class G9 extends Oa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:H9[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),p=u?f:d;p&&p(l)};return K9(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Y9(t,n))&&this.startObserver()}unmount(){}}function Y9({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const q9={inView:{Feature:G9},tap:{Feature:W9},focus:{Feature:F9},hover:{Feature:B9}},X9={layout:{ProjectionNode:pD,MeasureLayout:aD}},l1=O.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),eg=O.createContext({}),u1=typeof window<"u",gD=u1?O.useLayoutEffect:O.useEffect,yD=O.createContext({strict:!1});function Z9(e,t,n,r,i){var o,a;const{visualElement:s}=O.useContext(eg),l=O.useContext(yD),u=O.useContext(Qm),f=O.useContext(l1).reducedMotion,d=O.useRef();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f}));const p=d.current,m=O.useContext(oD);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&J9(d.current,n,i,m);const g=O.useRef(!1);O.useInsertionEffect(()=>{p&&g.current&&p.update(n,u)});const v=n[z$],y=O.useRef(!!v&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,v))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,v)));return gD(()=>{p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),s1.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())}),O.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,v)}),y.current=!1))}),p}function J9(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vD(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&cl(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function vD(e){if(e)return e.options.allowProjection!==!1?e.projection:vD(e.parent)}function Q9(e,t,n){return O.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):cl(n)&&(n.current=r))},[t])}function tg(e){return qm(e.animate)||Fw.some(t=>Hc(e[t]))}function bD(e){return!!(tg(e)||e.variants)}function e7(e,t){if(tg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hc(n)?n:void 0,animate:Hc(r)?r:void 0}}return e.inherit!==!1?t:{}}function t7(e){const{initial:t,animate:n}=e7(e,O.useContext(eg));return O.useMemo(()=>({initial:t,animate:n}),[PP(t),PP(n)])}function PP(e){return Array.isArray(e)?e.join(" "):e}const TP={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Nl={};for(const e in TP)Nl[e]={isEnabled:t=>TP[e].some(n=>!!t[n])};function n7(e){for(const t in e)Nl[t]={...Nl[t],...e[t]}}const r7=Symbol.for("motionComponentSymbol");function i7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&n7(e);function o(s,l){let u;const f={...O.useContext(l1),...s,layoutId:o7(s)},{isStatic:d}=f,p=t7(s),m=r(s,d);if(!d&&u1){a7(f,e);const g=s7(f);u=g.MeasureLayout,p.visualElement=Z9(i,m,f,t,g.ProjectionNode)}return T.jsxs(eg.Provider,{value:p,children:[u&&p.visualElement?T.jsx(u,{visualElement:p.visualElement,...f}):null,n(i,s,Q9(m,p.visualElement,l),m,d,p.visualElement)]})}const a=O.forwardRef(o);return a[r7]=i,a}function o7({layoutId:e}){const t=O.useContext(a1).id;return t&&e!==void 0?t+"-"+e:e}function a7(e,t){const n=O.useContext(yD).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?mu(!1,r):Oo(!1,r)}}function s7(e){const{drag:t,layout:n}=Nl;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const l7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function c1(e){return typeof e!="string"||e.includes("-")?!1:!!(l7.indexOf(e)>-1||/[A-Z]/u.test(e))}function xD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const wD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _D(e,t,n,r){xD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(wD.has(i)?i:o1(i),t.attrs[i])}function SD(e,{layout:t,layoutId:n}){return As.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!lp[e]||e==="opacity")}function f1(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(Un(i[a])||t.style&&Un(t.style[a])||SD(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function OD(e,t,n){const r=f1(e,t,n);for(const i in e)if(Un(e[i])||Un(t[i])){const o=Hf.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function d1(e){const t=O.useRef(null);return t.current===null&&(t.current=e()),t.current}function u7({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:c7(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const CD=e=>(t,n)=>{const r=O.useContext(eg),i=O.useContext(Qm),o=()=>u7(e,t,r,i);return n?o():d1(o)};function c7(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=zh(o[p]);let{initial:a,animate:s}=e;const l=tg(e),u=bD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let f=n?n.initial===!1:!1;f=f||a===!1;const d=f?s:a;if(d&&typeof d!="boolean"&&!qm(d)){const p=Array.isArray(d)?d:[d];for(let m=0;m({style:{},transform:{},transformOrigin:{},vars:{}}),AD=()=>({...h1(),attrs:{}}),PD=(e,t)=>t&&typeof e=="number"?t.transform(e):e,f7={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},d7=Hf.length;function h7(e,t,n){let r="",i=!0;for(let o=0;otypeof e=="string"&&e.toLowerCase()==="svg",v7={useVisualState:CD({scrapeMotionValuesFromProps:OD,createRenderState:AD,onMount:(e,t,{renderState:n,latestValues:r})=>{bt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),bt.render(()=>{m1(n,r,g1(t.tagName),e.transformTemplate),_D(t,n)})}})},b7={useVisualState:CD({scrapeMotionValuesFromProps:f1,createRenderState:h1})};function TD(e,t,n){for(const r in t)!Un(t[r])&&!SD(r,n)&&(e[r]=t[r])}function x7({transformTemplate:e},t){return O.useMemo(()=>{const n=h1();return p1(n,t,e),Object.assign({},n.vars,n.style)},[t])}function w7(e,t){const n=e.style||{},r={};return TD(r,n,e),Object.assign(r,x7(e,t)),r}function _7(e,t){const n={},r=w7(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const S7=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function up(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||S7.has(e)}let ED=e=>!up(e);function O7(e){e&&(ED=t=>t.startsWith("on")?!up(t):e(t))}try{O7(require("@emotion/is-prop-valid").default)}catch{}function C7(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(ED(i)||n===!0&&up(i)||!t&&!up(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function A7(e,t,n,r){const i=O.useMemo(()=>{const o=AD();return m1(o,t,g1(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};TD(o,e.style,e),i.style={...o,...i.style}}return i}function P7(e=!1){return(n,r,i,{latestValues:o},a)=>{const l=(c1(n)?A7:_7)(r,o,a,n),u=C7(r,typeof n=="string",e),f=n!==O.Fragment?{...u,...l,ref:i}:{},{children:d}=r,p=O.useMemo(()=>Un(d)?d.get():d,[d]);return O.createElement(n,{...f,children:p})}}function T7(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...c1(r)?v7:b7,preloadedFeatures:e,useRender:P7(i),createVisualElement:t,Component:r};return i7(a)}}const dx={current:null},kD={current:!1};function E7(){if(kD.current=!0,!!u1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dx.current=e.matches;e.addListener(t),t()}else dx.current=!1}function k7(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Un(i))e.addValue(r,i),process.env.NODE_ENV==="development"&&Ym(i.version==="11.11.11",`Attempting to mix Framer Motion versions ${i.version} with 11.11.11 may not work as expected.`);else if(Un(o))e.addValue(r,qc(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,qc(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const kP=new WeakMap,M7=[..._$,Fn,va],j7=e=>M7.find(w$(e)),MP=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class N7{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ji.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),kD.current||E7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:dx.current,process.env.NODE_ENV!=="production"&&Ym(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){kP.delete(this.current),this.projection&&this.projection.unmount(),ga(this.notifyUpdate),ga(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=As.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&bt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Nl){const n=Nl[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qc(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(y$(i)||g$(i))?i=parseFloat(i):!j7(i)&&va.test(n)&&(i=k$(t,n)),this.setBaseTarget(t,Un(i)?i.get():i)),Un(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Lw(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Un(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new i1),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class MD extends N7{constructor(){super(...arguments),this.KeyframeResolver=M$}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function $7(e){return window.getComputedStyle(e)}class D7 extends MD{constructor(){super(...arguments),this.type="html",this.renderInstance=xD}readValueFromInstance(t,n){if(As.has(n)){const r=qw(n);return r&&r.default||0}else{const r=$7(t),i=(b$(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return rD(t,n)}build(t,n,r){p1(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return f1(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class I7 extends MD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(As.has(n)){const r=qw(n);return r&&r.default||0}return n=wD.has(n)?n:o1(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return OD(t,n,r)}build(t,n,r){m1(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){_D(t,n,r,i)}mount(t){this.isSVGTag=g1(t.tagName),super.mount(t)}}const R7=(e,t)=>c1(e)?new I7(t):new D7(t,{allowProjection:e!==O.Fragment}),L7=T7({...Pq,...q9,...L9,...X9},R7),hi=vG(L7);class B7 extends ee.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function F7({children:e,isPresent:t}){const n=O.useId(),r=O.useRef(null),i=O.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=O.useContext(l1);return O.useInsertionEffect(()=>{const{width:a,height:s,top:l,left:u}=i.current;if(t||!r.current||!a||!s)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return o&&(f.nonce=o),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${a}px !important; + height: ${s}px !important; + top: ${l}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(f)}},[t]),T.jsx(B7,{isPresent:t,childRef:r,sizeRef:i,children:ee.cloneElement(e,{ref:r})})}const W7=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=d1(z7),l=O.useId(),u=O.useCallback(d=>{s.set(d,!0);for(const p of s.values())if(!p)return;r&&r()},[s,r]),f=O.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:u,register:d=>(s.set(d,!1),()=>s.delete(d))}),o?[Math.random(),u]:[n,u]);return O.useMemo(()=>{s.forEach((d,p)=>s.set(p,!1))},[n]),ee.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=T.jsx(F7,{isPresent:n,children:e})),T.jsx(Qm.Provider,{value:f,children:e})};function z7(){return new Map}const dh=e=>e.key||"";function jP(e){const t=[];return O.Children.forEach(e,n=>{O.isValidElement(n)&&t.push(n)}),t}const Ps=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{Oo(!t,"Replace exitBeforeEnter with mode='wait'");const s=O.useMemo(()=>jP(e),[e]),l=s.map(dh),u=O.useRef(!0),f=O.useRef(s),d=d1(()=>new Map),[p,m]=O.useState(s),[g,v]=O.useState(s);gD(()=>{u.current=!1,f.current=s;for(let w=0;w1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:x}=O.useContext(a1);return T.jsx(T.Fragment,{children:g.map(w=>{const S=dh(w),A=s===g||l.includes(S),_=()=>{if(d.has(S))d.set(S,!0);else return;let C=!0;d.forEach(E=>{E||(C=!1)}),C&&(x==null||x(),v(f.current),i&&i())};return T.jsx(W7,{isPresent:A,initial:!u.current||r?void 0:!1,custom:A?void 0:n,presenceAffectsLayout:o,mode:a,onExitComplete:A?void 0:_,children:w},S)})})},jD=O.createContext({}),ND=()=>O.useContext(jD),$D=O.createContext(null),V7=()=>O.useContext($D),DD=({children:e,activeItem:t=null,onChange:n,className:r,size:i="sm",orientation:o="horizontal",variant:a="pill",iconPosition:s="left",width:l="full"})=>{const u=ND(),f=(u==null?void 0:u.activeItem)||t,d=O.useCallback((_,C)=>{n&&n({event:_,value:C})},[n]);let p="rounded-full",m="p-1",g,v="ring-1 ring-tab-border";o==="vertical"?g="gap-0.5":(a==="rounded"||a==="pill")&&(i==="xs"||i==="sm"?g="gap-0.5":(i==="md"||i==="lg")&&(g="gap-1")),a==="rounded"||o==="vertical"?p="rounded-md":a==="underline"&&(p="rounded-none",m="p-0",v="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border",i==="xs"?g="gap-0":i==="sm"?g="gap-2.5":(i==="md"||i==="lg")&&(g="gap-3"));const A=G(`box-border [&>*]:box-border flex items-center ${l==="full"?"w-full":""} ${o==="vertical"?"flex-col":""}`,p,m,g,v,a!=="underline"?"bg-tab-background":"",r);return T.jsx("div",{className:A,children:T.jsx($D.Provider,{value:{activeItem:f,onChange:d,size:i,variant:a,orientation:o,iconPosition:s,width:l},children:O.Children.map(e,_=>O.isValidElement(_)?O.cloneElement(_):null)})})};DD.displayName="Tabs.Group";const ID=O.forwardRef(({slug:e,text:t,icon:n,className:r,disabled:i=!1,badge:o=null,...a},s)=>{const l=V7();if(!l)throw new Error("Tab should be used inside Tabs Group");const{activeItem:u,onChange:f,size:d,variant:p,orientation:m,iconPosition:g,width:v}=l,y={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:p==="underline"?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:p==="underline"?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:p==="underline"?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[d],S=G("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200",v==="full"?"flex-1":"",m==="vertical"?"w-full justify-between":""),A="border-none";let _="rounded-full";p==="rounded"?_="rounded-md":p==="underline"&&(_="rounded-none");const D=G(S,A,_,"hover:text-text-primary group","focus:outline-none",y,u===e?"bg-background-primary text-text-primary shadow-sm":"",i?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",r),$=G("flex items-center gap-1 group-hover:text-text-primary",i&&"group-hover:text-text-disabled"),N=F=>{f(F,{slug:e,text:t})};return T.jsxs("button",{ref:s,className:D,disabled:i,onClick:N,...a,children:[u===e&&p==="underline"&&T.jsx(hi.span,{layoutId:"underline",className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),T.jsxs("span",{className:$,children:[g==="left"&&n&&T.jsx("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,g==="right"&&n&&T.jsx("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),o&&O.isValidElement(o)&&o]})});ID.displayName="Tabs.Tab";const ng=({activeItem:e,children:t})=>T.jsx(jD.Provider,{value:{activeItem:e},children:t}),RD=({slug:e,children:t})=>{const n=ND();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?T.jsx(T.Fragment,{children:t}):null};RD.displayName="Tabs.Panel";ng.Group=DD;ng.Tab=ID;ng.Panel=RD;const fi={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-sm font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-sm font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-xs font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-5",label:"text-base font-medium"}},hh={selectButton:"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",icon:"group-disabled:text-icon-disabled",text:"group-disabled:text-field-color-disabled"},LD=O.createContext({}),y1=()=>O.useContext(LD);function BD({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,displayBy:i="name",label:o,className:a}){var k,M;const{sizeValue:s,getReferenceProps:l,getValues:u,selectId:f,refs:d,isOpen:p,multiple:m,combobox:g,setSelected:v,onChange:y,isControlled:x,disabled:w,by:S}=y1(),A={sm:"xs",md:"sm",lg:"md"}[s],_=O.useCallback(()=>{if(t)return t;const D="text-field-placeholder "+hh.icon;return g?T.jsx(J8,{className:D}):T.jsx(Sw,{className:D})},[t]),C=O.useCallback(()=>{const D=u();if(!D)return null;if(typeof e=="function"){const N={value:D,...m?{onClose:E(D)}:{}};return e(N)}if(m)return D.map((N,F)=>{var L;return T.jsx(Uf,{className:"cursor-default",icon:r,type:"rounded",size:A,onMouseDown:E(N),label:typeof N=="object"?(L=N[i])==null?void 0:L.toString():N.toString(),closable:!0,disabled:w},F)});let $=typeof D=="object"?D[i]:D;return O.isValidElement(e)&&($=e),T.jsx("span",{className:G("truncate",fi[s].displaySelected,hh.text),children:$})},[u,w]),E=D=>$=>{$==null||$.preventDefault(),$==null||$.stopPropagation();const N=[...u()??[]],F=N.findIndex(L=>L!==null&&D!==null&&typeof L=="object"?L[S]===D[S]:L===D);F!==-1&&(N.splice(F,1),x||v(N),typeof y=="function"&&y(N))};return T.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!o&&T.jsx("label",{className:G((k=fi[s])==null?void 0:k.label,"text-field-label"),htmlFor:f,children:o}),T.jsxs("button",{id:f,ref:d.setReference,className:G("flex items-center justify-between w-full box-border transition-colors duration-150 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!p&&"focus:ring-2 focus:ring-offset-4 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",fi[s].selectButton,m&&fi[s].multiSelect,hh.selectButton,a),"aria-labelledby":"select-label",tabIndex:0,disabled:w,...l(),children:[T.jsxs("div",{className:G("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",u()&&"flex flex-wrap"),children:[C(),(m?!((M=u())!=null&&M.length):!u())&&T.jsx("div",{className:G("[grid-area:1/1/2/3] text-field-input px-1",fi[s].displaySelected,hh.text),children:n})]}),T.jsx("div",{className:G("flex items-center [&>svg]:shrink-0",fi[s].icon),children:_()})]})]})}function FD({children:e,searchBy:t="id",searchPlaceholder:n="Search...",className:r}){const{isOpen:i,context:o,refs:a,combobox:s,floatingStyles:l,getFloatingProps:u,sizeValue:f,setSearchKeyword:d,setActiveIndex:p,setSelectedIndex:m,value:g,selected:v,getValues:y,searchKeyword:x,listContentRef:w,by:S}=y1(),A=O.useMemo(()=>{const E=y();let k=0;return E&&(k=O.Children.toArray(e).findIndex(M=>O.isValidElement(M)?typeof M.props.value=="object"?M.props.value[S]===E[S]:M.props.value===E:!1)),k===-1?0:k},[g,v,e]);O.useLayoutEffect(()=>{p(A),m(A)},[]);const _=O.useMemo(()=>O.Children.map(e,(E,k)=>{if(!O.isValidElement(E))return null;if(x){const M=E.props.value;if(typeof M=="object"){if(M[t].toLowerCase().indexOf(x.toLowerCase())===-1)return null}else if(M.toLowerCase().indexOf(x.toLowerCase())===-1)return null}return O.cloneElement(E,{...E.props,index:k})}),[x,g,v,e]),C=O.Children.count(_);return O.useEffect(()=>{w.current=[],O.Children.forEach(e,E=>{if(O.isValidElement(E)&&E.props.value){if(x){const k=E.props.value;if(typeof k=="object"){if(k[t].toLowerCase().indexOf(x.toLowerCase())===-1)return}else if(k.toLowerCase().indexOf(x.toLowerCase())===-1)return}w.current.push(E.props.value)}})},[x]),T.jsx(T.Fragment,{children:i&&T.jsx(T.Fragment,{children:T.jsx(KH,{context:o,modal:!1,children:T.jsxs("div",{ref:a.setFloating,className:G("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",s&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",fi[f].dropdown,!s&&"h-auto",s?"overflow-hidden":"overflow-y-auto",r),style:{...l},...u(),children:[s&&T.jsxs("div",{className:G(fi[f].searchbarWrapper),children:[T.jsx(xN,{className:G("text-icon-secondary shrink-0",fi[f].searchbarIcon)}),T.jsx("input",{className:G("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",fi[f].searchbar),type:"search",name:"keyword",placeholder:n,onChange:E=>d(E.target.value),autoComplete:"off"})]}),T.jsxs("div",{className:G("overflow-y-auto",!s&&"w-full h-full",fi[f].dropdownItemsWrapper),children:[!!C&&_,!C&&T.jsx("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function WD({children:e,root:t,id:n}){return T.jsx(Vm,{id:n,root:t,children:e})}function zD({value:e,selected:t,children:n,className:r,...i}){const{sizeValue:o,getItemProps:a,onKeyDownItem:s,onClickItem:l,activeIndex:u,selectedIndex:f,updateListRef:d,getValues:p,by:m,multiple:g}=y1(),{index:v}=i,y={sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},x={sm:"size-4",md:"size-4",lg:"size-5"},w=O.useMemo(()=>{if(!g)return!1;const A=p();return A?A.some(_=>_!==null&&e!==null&&typeof _=="object"?_[m]===e[m]:_===e):!1},[e,p]),S=O.useMemo(()=>typeof t=="boolean"?t:g?w:v===f,[w,f,t]);return T.jsxs("div",{className:G("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",y[o],v===u&&"bg-button-tertiary-hover",r),ref:A=>{d(v,A)},role:"option",tabIndex:v===u?0:-1,"aria-selected":S&&v===u,...a({onClick(){l(v,e)},onKeyDown(A){s(A,v,e)}}),children:[T.jsx("span",{className:"w-full truncate",children:n}),S&&T.jsx(Bf,{className:G("text-icon-on-color-disabled",x[o])})]})}const qf=({id:e,size:t="md",value:n,defaultValue:r,onChange:i,by:o="id",children:a,multiple:s=!1,combobox:l=!1,disabled:u=!1})=>{const f=O.useMemo(()=>e||`select-${_a()}`,[e]),d=O.useMemo(()=>typeof n<"u",[n]),[p,m]=O.useState(r),[g,v]=O.useState(""),y=O.useCallback(()=>d?n:p,[d,n,p]),[x,w]=O.useState(!1),[S,A]=O.useState(null),[_,C]=O.useState(null),E={sm:l?256:172,md:l?256:216,lg:l?256:216},{refs:k,floatingStyles:M,context:D}=Km({placement:"bottom-start",open:x,onOpenChange:w,whileElementsMounted:Rm,middleware:[Lm(5),Bm({padding:10}),WN({apply({rects:le,elements:re,availableHeight:Q}){Object.assign(re.floating.style,{maxHeight:`min(${Q}px, ${E[t]}px)`,maxWidth:`${le.reference.width}px`})},padding:10})]}),$=O.useRef([]),N=O.useRef([]),F=O.useRef(!1),L=Dw(D,{event:"mousedown"}),W=Um(D),B=Iw(D,{role:"listbox"}),z=ZH(D,{listRef:$,activeIndex:S,selectedIndex:_,onNavigate:A,loop:!0}),H=tG(D,{listRef:N,activeIndex:S,selectedIndex:_,onMatch:x?A:C,onTypingChange(le){F.current=le}}),{getReferenceProps:U,getFloatingProps:K,getItemProps:Y}=Hm([W,B,z,L,...l?[]:[H]]),te=(le,re)=>{const Q=[...y()??[]];Q.findIndex(ye=>ye!==null&&re!==null&&typeof ye=="object"?ye[o]===re[o]:ye===re)===-1&&(Q.push(re),d||m(Q),C(le),k.reference.current.focus(),w(!1),v(""),typeof i=="function"&&i(Q))},ne=(le,re)=>{if(s)return te(le,re);C(le),d||m(re),k.reference.current.focus(),w(!1),v(""),typeof i=="function"&&i(re)},ie=O.useCallback((le,re)=>{$.current[le]=re},[]),ce=(le,re)=>{ne(le,re)},ae=(le,re,Q)=>{le.key==="Enter"&&(le.preventDefault(),ne(re,Q)),le.key===" "&&!F.current&&(le.preventDefault(),ne(re,Q))};return T.jsx(LD.Provider,{value:{selectedIndex:_,setSelectedIndex:C,activeIndex:S,setActiveIndex:A,selected:p,setSelected:m,handleSelect:ne,combobox:l,sizeValue:t,multiple:s,onChange:i,isTypingRef:F,getItemProps:Y,onClickItem:ce,onKeyDownItem:ae,getValues:y,selectId:f,getReferenceProps:U,isOpen:x,value:n,updateListRef:ie,refs:k,listContentRef:N,by:o,getFloatingProps:K,floatingStyles:M,context:D,searchKeyword:g,setSearchKeyword:v,disabled:u,isControlled:d},children:a})};WD.displayName="Select.Portal";BD.displayName="Select.Button";FD.displayName="Select.Options";zD.displayName="Select.Option";qf.Portal=WD;qf.Button=BD;qf.Options=FD;qf.Option=zD;let U7=1;var sr,Oi;class K7{constructor(){bv(this,sr);bv(this,Oi);Wa(this,sr,[]),Wa(this,Oi,[])}subscribe(t){return wr(this,Oi).push(t),()=>{Wa(this,Oi,wr(this,Oi).filter(n=>n!==t))}}publish(t){wr(this,Oi).forEach(n=>n(t))}add(t){wr(this,sr).push(t),this.publish(t)}remove(t){return Wa(this,sr,wr(this,sr).filter(n=>n.id!==t)),t}create(t){const{id:n=void 0,message:r="",jsx:i=void 0,...o}=t;if(!r&&typeof i!="function")return;const a=typeof n=="number"?n:U7++;return wr(this,sr).find(l=>l.id===a)&&Wa(this,sr,wr(this,sr).map(l=>l.id===a?(this.publish({...l,title:r,jsx:i,...o}),{...l,title:r,jsx:i,...o}):l)),this.add({id:a,title:r,jsx:i,...o}),a}update(t,n){const{render:r=void 0}=n;let i=n;switch(typeof r){case"function":i={jsx:r,...n};break;case"string":i={title:r,...n};break}Wa(this,sr,wr(this,sr).map(o=>o.id===t?(this.publish({...o,...i}),{...o,...i}):o))}dismiss(t){return t||wr(this,sr).forEach(n=>wr(this,Oi).forEach(r=>r({id:n.id,dismiss:!0}))),wr(this,Oi).forEach(n=>n({id:t,dismiss:!0})),t}history(){return wr(this,sr)}default(t="",n={}){return this.create({message:t,type:"neutral",...n})}success(t="",n={}){return this.create({message:t,type:"success",...n})}error(t="",n={}){return this.create({message:t,type:"error",...n})}warning(t="",n={}){return this.create({message:t,type:"warning",...n})}info(t="",n={}){return this.create({message:t,type:"info",...n})}custom(t,n={}){return this.create({jsx:t,type:"custom",...n})}}sr=new WeakMap,Oi=new WeakMap;const gn=new K7,H7=(e,t)=>gn.default(e,t),G7=Object.seal(Object.assign(H7,{success:gn.success.bind(gn),error:gn.error.bind(gn),warning:gn.warning.bind(gn),info:gn.info.bind(gn),custom:gn.custom.bind(gn),dismiss:gn.dismiss.bind(gn),update:gn.update.bind(gn)},{getHistory:gn.history.bind(gn)}));let NP=!1;const Y7=e=>O.memo(n=>{const r=n.singleTon;return NP&&r?null:(NP=!0,T.jsx(e,{...n}))}),$P={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},DP={stack:"w-[22.5rem]",inline:"lg:w-[47.5rem] w-full"},ph={light:{neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},dark:"bg-background-inverse border-background-inverse"},mh={light:"text-icon-secondary",dark:"text-icon-inverse"},q7=({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:i=!0,dismissAfter:o=5e3})=>{const[a,s]=O.useState([]);O.useEffect(()=>{gn.subscribe(u=>{if(u!=null&&u.dismiss){s(f=>f.map(d=>d.id===u.id?{...d,dismiss:!0}:d));return}setTimeout(()=>{Tl.flushSync(()=>s(f=>f.findIndex(p=>p.id===u.id)!==-1?f.map(p=>p.id===u.id?{...p,...u}:p):[...f,u]))})})},[]);const l=u=>{s(f=>f.filter(d=>d.id!==u))};return T.jsx("ul",{className:G("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",$P[e]??$P["top-right"],r),children:T.jsx(Ps,{initial:!1,children:a.map(u=>T.jsx(hi.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${u.id}`,children:T.jsx(X7,{toastItem:u,title:u.title,content:u==null?void 0:u.description,icon:(u==null?void 0:u.icon)??void 0,design:(u==null?void 0:u.design)??t,autoDismiss:(u==null?void 0:u.autoDismiss)??i,dismissAfter:(u==null?void 0:u.dismissAfter)??o,removeToast:l,variant:u.type,theme:(u==null?void 0:u.theme)??n})},u.id))})})},X7=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:i=5e3,theme:o="light",design:a="stack",icon:s,variant:l="neutral",removeToast:u})=>{var w,S,A,_,C,E,k;const f=O.useRef(0),d=O.useRef(0),p=O.useRef(),m=(M,D=i)=>{if(!(!r||i<0))return f.current=new Date().getTime(),setTimeout(()=>{typeof u=="function"&&u(M.id)},D)},g=()=>{clearTimeout(p.current),d.current=new Date().getTime()},v=()=>{p.current=m(e,i-(d.current-f.current))};O.useEffect(()=>{const M=i;return p.current=m(e,M),()=>{clearTimeout(p.current)}},[]),O.useEffect(()=>{!(e!=null&&e.dismiss)||typeof u!="function"||u(e.id)},[e]);const y=()=>{var M,D;typeof u=="function"&&((D=(M=e==null?void 0:e.action)==null?void 0:M.onClick)==null||D.call(M,()=>u(e.id)))};let x=null;return a==="stack"&&(x=T.jsx("div",{className:G("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg",o==="dark"?ph.dark:(w=ph.light)==null?void 0:w[l],DP.stack),onMouseEnter:g,onMouseLeave:v,children:e.type!=="custom"?T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ep({variant:l,icon:s,theme:o})}),T.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5",children:[tp({title:t,theme:o}),np({content:n,theme:o}),((S=e==null?void 0:e.action)==null?void 0:S.label)&&typeof((A=e==null?void 0:e.action)==null?void 0:A.onClick)=="function"&&T.jsx("div",{className:"mt-2.5",children:Xb({actionLabel:(_=e==null?void 0:e.action)==null?void 0:_.label,actionType:((C=e==null?void 0:e.action)==null?void 0:C.type)??"button",onAction:y,theme:o})})]}),T.jsx("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:T.jsx("button",{className:G("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",mh[o]??mh.light),onClick:()=>{typeof u=="function"&&u(e.id)},children:T.jsx(da,{})})})]}):(E=e==null?void 0:e.jsx)==null?void 0:E.call(e,{close:()=>u(e.id),action:e!=null&&e.action?{...e==null?void 0:e.action,onClick:y}:null})})),a==="inline"&&(x=T.jsxs("div",{className:G("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg",o==="dark"?ph.dark:(k=ph.light)==null?void 0:k[l],DP.inline),children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ep({variant:l,icon:s,theme:o})}),T.jsxs("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[tp({title:t,theme:o}),np({content:n,theme:o})]}),T.jsx("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:T.jsx("button",{className:G("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",mh[o]??mh.light),onClick:()=>u(e.id),children:T.jsx(da,{})})})]})),x},Z7=Y7(q7),J7={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},VD={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},UD={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},KD={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},Q7={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},eX={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},tX={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},HD={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},GD={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},YD={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},qD={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},nX={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},rX={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},iX={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},oX={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},aX={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},sX={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},It=(e,t,n,r="sm")=>{var o,a,s,l,u;const i=[];switch(typeof e){case"object":for(const[d,p]of Object.entries(e))t[d]&&i.push(((o=t==null?void 0:t[d])==null?void 0:o[p])??((a=t==null?void 0:t[d])==null?void 0:a[n==null?void 0:n[d]])??"");break;case"string":case"number":const f=r;i.push(((s=t==null?void 0:t[f])==null?void 0:s[e])??((l=t==null?void 0:t[f])==null?void 0:l[n==null?void 0:n[f]])??"");break;default:if(e===void 0)break;i.push(((u=t==null?void 0:t[r])==null?void 0:u[n])??"");break}return i.join(" ")},cp=({className:e,cols:t,gap:n,gapX:r,gapY:i,align:o,justify:a,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:u=!1,autoRows:f=!1,autoCols:d=!1,children:p,...m})=>{const g=It(t,J7,1),v=It(n,VD,"sm"),y=It(r,UD,""),x=It(i,KD,""),w=It(o,GD,""),S=It(a,HD,""),A=It(s,tX,"");return T.jsx("div",{className:G("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":u,"auto-cols-auto":d,"auto-rows-auto":f},g,v,y,x,w,S,A,e),...m,children:p})},lX=({className:e,children:t,colSpan:n,colStart:r,alignSelf:i,justifySelf:o,...a})=>{const s=It(n,Q7,0),l=It(r,eX,0),u=It(i,YD,""),f=It(o,qD,"");return T.jsx("div",{className:G(s,l,u,f,e),...a,children:t})};cp.Item=lX;const hx=O.createContext({}),uX=()=>O.useContext(hx),v1=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:i,justify:o,align:a,wrap:s,cols:l,className:u,children:f,...d})=>{if(e==="grid")return T.jsx(hx.Provider,{value:{containerType:e},children:T.jsx(cp,{className:u,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:o,...d})});const p=It(s,rX,""),m=It(t,VD,"sm"),g=It(n,UD,""),v=It(r,KD,""),y=It(i,nX,""),x=It(o,HD,""),w=It(a,GD,""),S=G("flex",p,m,g,v,y,x,w,u),A=()=>e==="flex"?T.jsx("div",{className:S,children:f}):T.jsx(cp,{className:u,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:o,...d});return T.jsx(hx.Provider,{value:{containerType:e,cols:l},children:A()})},XD=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:i,className:o,children:a,...s})=>{const{containerType:l,cols:u}=uX();if(l==="grid")return T.jsx(cp.Item,{className:o,alignSelf:r,justifySelf:i,children:a,...s});const f=It(r,YD,""),d=It(i,qD,""),p=It(e,aX,0),m=It(t,sX,0),g=It(n,oX,0),v=It(u,iX,1);return T.jsx("div",{className:G("box-border",p,m,g,f,d,v,o),children:a})};v1.Item=XD;v1.displayName="Container";XD.displayName="Container.Item";const cX=({design:e="inline",theme:t="light",variant:n="neutral",className:r="",title:i="",content:o="",icon:a=null,onClose:s,action:l={label:"",onClick:()=>{},type:"link"}})=>{var m,g;const u=()=>{typeof s=="function"&&s()},f={light:{neutral:"ring-alert-border-neutral bg-alert-background-neutral",custom:"ring-alert-border-neutral bg-alert-background-neutral",info:"ring-alert-border-info bg-alert-background-info",success:"ring-alert-border-green bg-alert-background-green",warning:"ring-alert-border-warning bg-alert-background-warning",error:"ring-alert-border-danger bg-alert-background-danger"},dark:"bg-background-inverse ring-background-inverse"},d={light:"text-icon-secondary",dark:"text-icon-inverse"},p=()=>{var v;(v=l==null?void 0:l.onClick)==null||v.call(l,u)};return e==="stack"?T.jsx("div",{className:G("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg",t==="dark"?f.dark:(m=f.light)==null?void 0:m[n],r),children:T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ep({variant:n,icon:a,theme:t})}),T.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-7",children:[tp({title:i,theme:t}),np({content:o,theme:t}),(l==null?void 0:l.label)&&typeof(l==null?void 0:l.onClick)=="function"&&T.jsx("div",{className:"mt-2.5",children:Xb({actionLabel:l==null?void 0:l.label,actionType:(l==null?void 0:l.type)??"button",onAction:p,theme:t})})]}),T.jsx("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:T.jsx("button",{className:G("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",d[t]??d.light),onClick:()=>u(),children:T.jsx(da,{})})})]})}):T.jsxs("div",{className:G("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg",t==="dark"?f.dark:(g=f.light)==null?void 0:g[n],r),children:[T.jsxs("div",{className:"flex items-center justify-start gap-2",children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ep({variant:n,icon:a,theme:t})}),T.jsxs("p",{className:"content-start space-x-1 my-0 mr-10 px-1",children:[tp({title:i,theme:t,inline:!0}),np({content:o,theme:t,inline:!0})]})]}),T.jsxs("div",{className:"flex h-full justify-start gap-4 [&_svg]:size-4",children:[(l==null?void 0:l.label)&&typeof(l==null?void 0:l.onClick)=="function"&&T.jsx("div",{className:"self-center flex h-5",children:Xb({actionLabel:l==null?void 0:l.label,actionType:(l==null?void 0:l.type)??"button",onAction:p,theme:t})}),typeof s=="function"&&T.jsx("button",{className:G("self-start bg-transparent m-0 border-none p-0.5 focus:outline-none active:outline-none cursor-pointer size-5",d[t]??d.light),onClick:()=>u(),children:T.jsx(da,{})})]})]})};function fX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dX=fX(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n{t.focus(()=>{const n=document.activeElement,r=t.getRootElement();r===null||n!==null&&r.contains(n)||r.focus({preventScroll:!0})},{defaultSelection:e})},[e,t]),null}function mX(e){return{}}const b1={},gX={},cs={},_l={},px={},Sl={},x1={},mx={},Xc={},Zc={},ns={},w1={},_1={},JD={},S1={},yX={},O1={},vX={},QD={},eI={},Jc={},bX={},C1={},tI={},nI={},rI={},iI={},oI={},xX={},wX={},A1={},P1={},gx={},_X={},SX={},gh={},yh={},OX={},CX={},AX={},vi=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,PX=vi&&"documentMode"in document?document.documentMode:null,oi=vi&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ca=vi&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),fp=!(!vi||!("InputEvent"in window)||PX)&&"getTargetRanges"in new window.InputEvent("input"),T1=vi&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),rg=vi&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,TX=vi&&/Android/.test(navigator.userAgent),aI=vi&&/^(?=.*Chrome).*/i.test(navigator.userAgent),EX=vi&&TX&&aI,E1=vi&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!aI,Xf=1,Ca=3,vs=0,sI=1,$l=2,kX=0,MX=1,jX=2,dp=4,hp=8,k1=128,NX=112|(3|dp|hp)|k1,M1=1,j1=2,N1=3,$1=4,D1=5,I1=6,ig=T1||rg||E1?" ":"​",Co=` + +`,$X=ca?" ":ig,lI="֑-߿יִ-﷽ﹰ-ﻼ",uI="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",DX=new RegExp("^[^"+uI+"]*["+lI+"]"),IX=new RegExp("^[^"+lI+"]*["+uI+"]"),vo={bold:1,code:16,highlight:k1,italic:2,strikethrough:dp,subscript:32,superscript:64,underline:hp},RX={directionless:1,unmergeable:2},IP={center:j1,end:I1,justify:$1,left:M1,right:N1,start:D1},LX={[j1]:"center",[I1]:"end",[$1]:"justify",[M1]:"left",[N1]:"right",[D1]:"start"},BX={normal:0,segmented:2,token:1},FX={[kX]:"normal",[jX]:"segmented",[MX]:"token"};function WX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we=WX(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;nzX;try{Pr(e,()=>{const i=Ee()||function(p){return p.getEditorState().read(()=>{const m=Ee();return m!==null?m.clone():null})}(e),o=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let u=!1,f="";for(let p=0;p0){let A=0;for(let _=0;_0)for(const[p,m]of o)if(ge(m)){const g=m.getChildrenKeys();let v=p.firstChild;for(let y=0;y0){for(let p=0;p{cI(e,t,n)})}function RP(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,a=t.__format,s=t.__style;return!(n!==null&&n!==o||r!==null&&r!==a||i!==null&&i!==s)}function LP(e,t){const n=e.mergeWithSibling(t),r=en()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function BP(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&_e(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(RP(t,r)){r=LP(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&_e(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(RP(r,n)){r=LP(r,n);break}break}n.remove()}}else r.remove()}function HX(e){return FP(e.anchor),FP(e.focus),e}function FP(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),_e(r)){e.set(r.__key,i?r.getTextContentSize():0,"text");break}if(!ge(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element")}}let GX=1;const YX=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function hI(e){const t=document.activeElement;if(t===null)return!1;const n=t.nodeName;return Nt(sg(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&ag(t)==null)}function og(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!hI(t)&&pI(t)===e}catch{return!1}}function L1(e){return e instanceof vg}function pI(e){let t=e;for(;t!=null;){const n=ag(t);if(L1(n))return n;t=ug(t)}return null}function ag(e){return e?e.__lexicalEditor:null}function ol(e){return e.isToken()||e.isSegmented()}function qX(e){return e.nodeType===Ca}function mp(e){let t=e;for(;t!=null;){if(qX(t))return t;t=t.firstChild}return null}function vx(e,t,n){const r=vo[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=~vo.superscript:t==="superscript"&&(i&=~vo.subscript),i}function XX(e,t){if(t!=null)return void(e.__key=t);lr(),UI();const n=en(),r=jo(),i=""+GX++;r._nodeMap.set(i,e),ge(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=sI,e.__key=i}function fs(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling();if(i===null)if(o!==null){const a=o.getWritable();r.__first=o.__key,a.__prev=null}else r.__first=null;else{const a=i.getWritable();if(o!==null){const s=o.getWritable();s.__prev=a.__key,a.__next=s.__key}else a.__next=null;n.__prev=null}if(o===null)if(i!==null){const a=i.getWritable();r.__last=i.__key,a.__next=null}else r.__last=null;else{const a=o.getWritable();if(i!==null){const s=i.getWritable();s.__next=a.__key,a.__prev=s.__key}else a.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function gp(e){UI();const t=e.getLatest(),n=t.__parent,r=jo(),i=en(),o=r._nodeMap,a=i._dirtyElements;n!==null&&function(l,u,f){let d=l;for(;d!==null;){if(f.has(d))return;const p=u.get(d);if(p===void 0)break;f.set(d,!1),d=p.__parent}}(n,o,a);const s=t.__key;i._dirtyType=sI,ge(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function jn(e){lr();const t=en(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=vn(n);r!==null&&r.getWritable()}if(e!==null){const r=vn(e);r!==null&&r.getWritable()}}}function oa(){return ed()?null:en()._compositionKey}function vn(e,t){const n=(t||jo())._nodeMap.get(e);return n===void 0?null:n}function mI(e,t){const n=e[`__lexicalKey_${en()._key}`];return n!==void 0?vn(n,t):null}function sg(e,t){let n=e;for(;n!=null;){const r=mI(n,t);if(r!==null)return r;n=ug(n)}return null}function gI(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function WP(e){return e.read(()=>Kn().getTextContent())}function Kn(){return yI(jo())}function yI(e){return e._nodeMap.get("root")}function Ao(e){lr();const t=jo();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function pl(e){const t=en(),n=function(r,i){let o=r;for(;o!=null;){const a=o[`__lexicalKey_${i._key}`];if(a!==void 0)return a;o=ug(o)}return null}(e,t);return n===null?e===t.getRootElement()?vn("root"):null:vn(n)}function zP(e,t){return t?e.getTextContentSize():0}function vI(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function B1(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function bI(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function xI(e){return e.nodeType===Ca?e.nodeValue:null}function F1(e,t,n){const r=Li(t._window);if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:a}=r;if(i!==null){let s=xI(i);const l=sg(i);if(s!==null&&_e(l)){if(s===ig&&n){const u=n.length;s=n,o=u,a=u}s!==null&&W1(l,s,o,a,e)}}}function W1(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();let s=t;(a||i)&&t[t.length-1]===ig&&(s=t.slice(0,-1));const l=o.getTextContent();if(i||s!==l){if(s===""){if(jn(null),T1||rg||E1)o.remove();else{const v=en();setTimeout(()=>{v.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),f=mg(),d=o.getTextContentSize(),p=oa(),m=o.getKey();if(o.isToken()||p!==null&&m===p&&!a||xe(f)&&(u!==null&&!u.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!a||f.focus.key===e.__key&&f.focus.offset===d&&!o.canInsertTextAfter()&&!a))return void o.markDirty();const g=Ee();if(!xe(g)||n===null||r===null)return void o.setTextContent(s);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const v=En(o.getTextContent());o.replace(v),o=v}o.setTextContent(s)}}}function ZX(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),i=t.isToken();return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(o){const a=o.getPreviousSibling();return(_e(a)||ge(a)&&a.isInline())&&!a.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}function VP(e){return e==="ArrowLeft"}function UP(e){return e==="ArrowRight"}function bc(e,t){return oi?e:t}function KP(e){return e==="Enter"}function nc(e){return e==="Backspace"}function rc(e){return e==="Delete"}function HP(e,t,n){return e.toLowerCase()==="a"&&bc(t,n)}function JX(){const e=Kn();Ao(HX(e.select(0,e.getChildrenSize())))}function Tc(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=pp(i);return n[t]=o,o}return i}function z1(e,t,n,r,i){if(n.size===0)return;const o=r.__type,a=r.__key,s=t.get(o);s===void 0&&we(33,o);const l=s.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const f=u.get(a),d=f==="destroyed"&&i==="created";(f===void 0||d)&&u.set(a,d?"updated":i)}function GP(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}function bx(e,t){const n=e.offset;if(e.type==="element")return GP(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?GP(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function wI(e){const t=cg(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Oe(e,t,n){return GI(e,t,n)}function lg(e){return!Zn(e)&&!e.isLastChild()&&!e.isInline()}function yp(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&we(75,t),n}function ug(e){const t=e.assignedSlot||e.parentElement;return t!==null&&t.nodeType===11?t.host:t}function xx(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function cg(e){const t=e._window;return t===null&&we(78),t}function QX(e){let t=e.getParentOrThrow();for(;t!==null;){if(Zf(t))return t;t=t.getParentOrThrow()}return t}function Zf(e){return Zn(e)||ge(e)&&e.isShadowRoot()}function fg(e){const t=en(),n=e.constructor.getType(),r=t._nodes.get(n);r===void 0&&we(97);const i=r.replace;if(i!==null){const o=i(e);return o instanceof e.constructor||we(98),o}return e}function Kv(e,t){!Zn(e.getParent())||ge(t)||Nt(t)||we(99)}function Hv(e){return(Nt(e)||ge(e)&&!e.canBeEmpty())&&!e.isInline()}function V1(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function eZ(e,t,n){let r=e._blockCursorElement;if(xe(n)&&n.isCollapsed()&&n.anchor.type==="element"&&t.contains(document.activeElement)){const i=n.anchor,o=i.getNode(),a=i.offset;let s=!1,l=null;if(a===o.getChildrenSize())Hv(o.getChildAtIndex(a-1))&&(s=!0);else{const u=o.getChildAtIndex(a);if(Hv(u)){const f=u.getPreviousSibling();(f===null||Hv(f))&&(s=!0,l=e.getElementByKey(u.__key))}}if(s){const u=e.getElementByKey(o.__key);return r===null&&(e._blockCursorElement=r=function(f){const d=f.theme,p=document.createElement("div");p.contentEditable="false",p.setAttribute("data-lexical-cursor","true");let m=d.blockCursor;if(m!==void 0){if(typeof m=="string"){const g=pp(m);m=d.blockCursor=g}m!==void 0&&p.classList.add(...m)}return p}(e._config)),t.style.caretColor="transparent",void(l===null?u.appendChild(r):u.insertBefore(r,l))}}r!==null&&V1(r,e,t)}function Li(e){return vi?(e||window).getSelection():null}function U1(e){return e.nodeType===1}function tZ(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function YP(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function al(e){if(Zn(e)||Nt(e)&&!e.isInline())return!0;if(!ge(e)||Zf(e))return!1;const t=e.getFirstChild(),n=t===null||Mc(t)||_e(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Gv(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const qP=new WeakMap,nZ=new Map;function rZ(e){if(!e._readOnly&&e.isEmpty())return nZ;e._readOnly||we(192);let t=qP.get(e);if(!t){t=new Map,qP.set(e,t);for(const[n,r]of e._nodeMap){const i=r.__type;let o=t.get(i);o||(o=new Map,t.set(i,o)),o.set(n,r)}}return t}function _I(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function SI(e,t,n,r,i,o){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&(ge(a)&&SI(a,s,n,r,i,o),n.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}let ba,tr,Qc,dg,wx,_x,bs,pi,Sx,ef,ln="",Xn="",Si=null,ai="",ao="",OI=!1,tf=!1,Vh=null;function vp(e,t){const n=bs.get(e);if(t!==null){const r=Ax(e);r.parentNode===t&&t.removeChild(r)}if(pi.has(e)||tr._keyToDOMMap.delete(e),ge(n)){const r=xp(n,bs);Ox(r,0,r.length-1,null)}n!==void 0&&z1(ef,Qc,dg,n,"destroyed")}function Ox(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&vp(o,r)}}function Va(e,t){e.setProperty("text-align",t)}const iZ="40px";function CI(e,t){const n=ba.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||iZ;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function AI(e,t){const n=e.style;t===0?Va(n,""):t===M1?Va(n,"left"):t===j1?Va(n,"center"):t===N1?Va(n,"right"):t===$1?Va(n,"justify"):t===D1?Va(n,"start"):t===I1&&Va(n,"end")}function bp(e,t,n){const r=pi.get(e);r===void 0&&we(60);const i=r.createDOM(ba,tr);if(function(o,a,s){const l=s._keyToDOMMap;a["__lexicalKey_"+s._key]=o,l.set(o,a)}(e,i,tr),_e(r)?i.setAttribute("data-lexical-text","true"):Nt(r)&&i.setAttribute("data-lexical-decorator","true"),ge(r)){const o=r.__indent,a=r.__size;if(o!==0&&CI(i,o),a!==0){const l=a-1;(function(u,f,d,p){const m=Xn;Xn="",Cx(u,d,0,f,p,null),TI(d,p),Xn=m})(xp(r,pi),l,r,i)}const s=r.__format;s!==0&&AI(i,s),r.isInline()||PI(null,r,i),lg(r)&&(ln+=Co,ao+=Co)}else{const o=r.getTextContent();if(Nt(r)){const a=r.decorate(tr,ba);a!==null&&EI(e,a),i.contentEditable="false"}else _e(r)&&(r.isDirectionless()||(Xn+=o));ln+=o,ao+=o}if(t!==null)if(n!=null)t.insertBefore(i,n);else{const o=t.__lexicalLineBreak;o!=null?t.insertBefore(i,o):t.appendChild(i)}return z1(ef,Qc,dg,r,"created"),i}function Cx(e,t,n,r,i,o){const a=ln;ln="";let s=n;for(;s<=r;++s){bp(e[s],i,o);const l=pi.get(e[s]);l!==null&&_e(l)&&(Si===null&&(Si=l.getFormat()),ai===""&&(ai=l.getStyle()))}lg(t)&&(ln+=Co),i.__lexicalTextContent=ln,ln=a+ln}function XP(e,t){const n=t.get(e);return Mc(n)||Nt(n)&&n.isInline()}function PI(e,t,n){const r=e!==null&&(e.__size===0||XP(e.__last,bs)),i=t.__size===0||XP(t.__last,pi);if(r){if(!i){const o=n.__lexicalLineBreak;if(o!=null)try{n.removeChild(o)}catch(a){if(typeof a=="object"&&a!=null){const s=`${a.toString()} Parent: ${n.tagName}, child: ${o.tagName}.`;throw new Error(s)}throw a}n.__lexicalLineBreak=null}}else if(i){const o=document.createElement("br");n.__lexicalLineBreak=o,n.appendChild(o)}}function TI(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==Xn||r!==Vh){const o=Xn==="",a=o?Vh:(i=Xn,DX.test(i)?"rtl":IX.test(i)?"ltr":null);if(a!==r){const s=t.classList,l=ba.theme;let u=r!==null?l[r]:void 0,f=a!==null?l[a]:void 0;if(u!==void 0){if(typeof u=="string"){const d=pp(u);u=l[r]=d}s.remove(...u)}if(a===null||o&&a==="ltr")t.removeAttribute("dir");else{if(f!==void 0){if(typeof f=="string"){const d=pp(f);f=l[a]=d}f!==void 0&&s.add(...f)}t.dir=a}tf||(e.getWritable().__dir=a)}Vh=a,t.__lexicalDirTextContent=Xn,t.__lexicalDir=a}var i}function oZ(e,t,n){const r=Xn;var i;Xn="",Si=null,ai="",function(o,a,s){const l=ln,u=o.__size,f=a.__size;if(ln="",u===1&&f===1){const d=o.__first,p=a.__first;if(d===p)xc(d,s);else{const g=Ax(d),v=bp(p,null,null);try{s.replaceChild(v,g)}catch(y){if(typeof y=="object"&&y!=null){const x=`${y.toString()} Parent: ${s.tagName}, new child: {tag: ${v.tagName} key: ${p}}, old child: {tag: ${g.tagName}, key: ${d}}.`;throw new Error(x)}throw y}vp(d,null)}const m=pi.get(p);_e(m)&&(Si===null&&(Si=m.getFormat()),ai===""&&(ai=m.getStyle()))}else{const d=xp(o,bs),p=xp(a,pi);if(u===0)f!==0&&Cx(p,a,0,f-1,s,null);else if(f===0){if(u!==0){const m=s.__lexicalLineBreak==null;Ox(d,0,u-1,m?null:s),m&&(s.textContent="")}}else(function(m,g,v,y,x,w){const S=y-1,A=x-1;let _,C,E=(D=w,D.firstChild),k=0,M=0;for(var D;k<=S&&M<=A;){const F=g[k],L=v[M];if(F===L)E=Yv(xc(L,w)),k++,M++;else{_===void 0&&(_=new Set(g)),C===void 0&&(C=new Set(v));const B=C.has(F),z=_.has(L);if(B)if(z){const H=yp(tr,L);H===E?E=Yv(xc(L,w)):(E!=null?w.insertBefore(H,E):w.appendChild(H),xc(L,w)),k++,M++}else bp(L,w,E),M++;else E=Yv(Ax(F)),vp(F,w),k++}const W=pi.get(L);W!==null&&_e(W)&&(Si===null&&(Si=W.getFormat()),ai===""&&(ai=W.getStyle()))}const $=k>S,N=M>A;if($&&!N){const F=v[A+1];Cx(v,m,M,A,w,F===void 0?null:tr.getElementByKey(F))}else N&&!$&&Ox(g,k,S,w)})(a,d,p,u,f,s)}lg(a)&&(ln+=Co),s.__lexicalTextContent=ln,ln=l+ln}(e,t,n),TI(t,n),Nx(i=t)&&Si!=null&&Si!==i.__textFormat&&!tf&&(i.setTextFormat(Si),i.setTextStyle(ai)),function(o){Nx(o)&&ai!==""&&ai!==o.__textStyle&&!tf&&o.setTextStyle(ai)}(t),Xn=r}function xp(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&we(101),n.push(r),r=i.__next}return n}function xc(e,t){const n=bs.get(e);let r=pi.get(e);n!==void 0&&r!==void 0||we(61);const i=OI||_x.has(e)||wx.has(e),o=yp(tr,e);if(n===r&&!i){if(ge(n)){const a=o.__lexicalTextContent;a!==void 0&&(ln+=a,ao+=a);const s=o.__lexicalDirTextContent;s!==void 0&&(Xn+=s)}else{const a=n.getTextContent();_e(n)&&!n.isDirectionless()&&(Xn+=a),ao+=a,ln+=a}return o}if(n!==r&&i&&z1(ef,Qc,dg,r,"updated"),r.updateDOM(n,o,ba)){const a=bp(e,null,null);return t===null&&we(62),t.replaceChild(a,o),vp(e,null),a}if(ge(n)&&ge(r)){const a=r.__indent;a!==n.__indent&&CI(o,a);const s=r.__format;s!==n.__format&&AI(o,s),i&&(oZ(n,r,o),Zn(r)||r.isInline()||PI(n,r,o)),lg(r)&&(ln+=Co,ao+=Co)}else{const a=r.getTextContent();if(Nt(r)){const s=r.decorate(tr,ba);s!==null&&EI(e,s)}else _e(r)&&!r.isDirectionless()&&(Xn+=a);ln+=a,ao+=a}if(!tf&&Zn(r)&&r.__cachedText!==ao){const a=r.getWritable();a.__cachedText=ao,r=a}return o}function EI(e,t){let n=tr._pendingDecorators;const r=tr._decorators;if(n===null){if(r[e]===t)return;n=gI(tr)}n[e]=t}function Yv(e){let t=e.nextSibling;return t!==null&&t===tr._blockCursorElement&&(t=t.nextSibling),t}function aZ(e,t,n,r,i,o){ln="",ao="",Xn="",OI=r===$l,Vh=null,tr=n,ba=n._config,Qc=n._nodes,dg=tr._listeners.mutation,wx=i,_x=o,bs=e._nodeMap,pi=t._nodeMap,tf=t._readOnly,Sx=new Map(n._keyToDOMMap);const a=new Map;return ef=a,xc("root",null),tr=void 0,Qc=void 0,wx=void 0,_x=void 0,bs=void 0,pi=void 0,ba=void 0,Sx=void 0,ef=void 0,a}function Ax(e){const t=Sx.get(e);return t===void 0&&we(75,e),t}const ro=Object.freeze({}),Px=30,Tx=[["keydown",function(e,t){if(Ec=e.timeStamp,kI=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:a}=e;Oe(t,JD,e)||n!=null&&(function(s,l,u,f){return UP(s)&&!l&&!f&&!u}(n,i,a,o)?Oe(t,S1,e):function(s,l,u,f,d){return UP(s)&&!f&&!u&&(l||d)}(n,i,r,a,o)?Oe(t,yX,e):function(s,l,u,f){return VP(s)&&!l&&!f&&!u}(n,i,a,o)?Oe(t,O1,e):function(s,l,u,f,d){return VP(s)&&!f&&!u&&(l||d)}(n,i,r,a,o)?Oe(t,vX,e):function(s,l,u){return function(f){return f==="ArrowUp"}(s)&&!l&&!u}(n,i,o)?Oe(t,QD,e):function(s,l,u){return function(f){return f==="ArrowDown"}(s)&&!l&&!u}(n,i,o)?Oe(t,eI,e):function(s,l){return KP(s)&&l}(n,r)?(kc=!0,Oe(t,Jc,e)):function(s){return s===" "}(n)?Oe(t,bX,e):function(s,l){return oi&&l&&s.toLowerCase()==="o"}(n,i)?(e.preventDefault(),kc=!0,Oe(t,_l,!0)):function(s,l){return KP(s)&&!l}(n,r)?(kc=!1,Oe(t,Jc,e)):function(s,l,u,f){return oi?!l&&!u&&(nc(s)||s.toLowerCase()==="h"&&f):!(f||l||u)&&nc(s)}(n,a,o,i)?nc(n)?Oe(t,C1,e):(e.preventDefault(),Oe(t,cs,!0)):function(s){return s==="Escape"}(n)?Oe(t,tI,e):function(s,l,u,f,d){return oi?!(u||f||d)&&(rc(s)||s.toLowerCase()==="d"&&l):!(l||f||d)&&rc(s)}(n,i,r,a,o)?rc(n)?Oe(t,nI,e):(e.preventDefault(),Oe(t,cs,!1)):function(s,l,u){return nc(s)&&(oi?l:u)}(n,a,i)?(e.preventDefault(),Oe(t,Xc,!0)):function(s,l,u){return rc(s)&&(oi?l:u)}(n,a,i)?(e.preventDefault(),Oe(t,Xc,!1)):function(s,l){return oi&&l&&nc(s)}(n,o)?(e.preventDefault(),Oe(t,Zc,!0)):function(s,l){return oi&&l&&rc(s)}(n,o)?(e.preventDefault(),Oe(t,Zc,!1)):function(s,l,u,f){return s.toLowerCase()==="b"&&!l&&bc(u,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,ns,"bold")):function(s,l,u,f){return s.toLowerCase()==="u"&&!l&&bc(u,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,ns,"underline")):function(s,l,u,f){return s.toLowerCase()==="i"&&!l&&bc(u,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,ns,"italic")):function(s,l,u,f){return s==="Tab"&&!l&&!u&&!f}(n,a,i,o)?Oe(t,rI,e):function(s,l,u,f){return s.toLowerCase()==="z"&&!l&&bc(u,f)}(n,r,o,i)?(e.preventDefault(),Oe(t,w1,void 0)):function(s,l,u,f){return oi?s.toLowerCase()==="z"&&u&&l:s.toLowerCase()==="y"&&f||s.toLowerCase()==="z"&&f&&l}(n,r,o,i)?(e.preventDefault(),Oe(t,_1,void 0)):pg(t._editorState._selection)?function(s,l,u,f){return!l&&s.toLowerCase()==="c"&&(oi?u:f)}(n,r,o,i)?(e.preventDefault(),Oe(t,A1,e)):function(s,l,u,f){return!l&&s.toLowerCase()==="x"&&(oi?u:f)}(n,r,o,i)?(e.preventDefault(),Oe(t,P1,e)):HP(n,o,i)&&(e.preventDefault(),Oe(t,gx,e)):!ca&&HP(n,o,i)&&(e.preventDefault(),Oe(t,gx,e)),function(s,l,u,f){return s||l||u||f}(i,r,a,o)&&Oe(t,AX,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&r!=="touch"&&Pr(t,()=>{Nt(sg(n))||(kx=!0)})}],["compositionstart",function(e,t){Pr(t,()=>{const n=Ee();if(xe(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();jn(r.key),(e.timeStamp{qv(t,e.data)})}],["input",function(e,t){e.stopPropagation(),Pr(t,()=>{const n=Ee(),r=e.data,i=$I(e);if(r!=null&&xe(n)&&NI(n,i,r,e.timeStamp,!1)){ic&&(qv(t,r),ic=!1);const o=n.anchor.getNode(),a=Li(t._window);if(a===null)return;const s=n.isBackward(),l=s?n.anchor.offset:n.focus.offset,u=s?n.focus.offset:n.anchor.offset;fp&&!n.isCollapsed()&&_e(o)&&a.anchorNode!==null&&o.getTextContent().slice(0,l)+r+o.getTextContent().slice(l+u)===xI(a.anchorNode)||Oe(t,Sl,r);const f=r.length;ca&&f>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=f),T1||rg||E1||!t.isComposing()||(Ec=0,jn(null))}else F1(!1,t,r!==null?r:void 0),ic&&(qv(t,r||void 0),ic=!1);lr(),fI(en())}),sl=null}],["click",function(e,t){Pr(t,()=>{const n=Ee(),r=Li(t._window),i=mg();if(r){if(xe(n)){const o=n.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Zn(a)&&Kn().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)?(r.removeAllRanges(),n.dirty=!0):e.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()&&(ge(a)?a.select(0):a.getParentOrThrow().select(0))}else if(e.pointerType==="touch"){const o=r.anchorNode;if(o!==null){const a=o.nodeType;(a===Xf||a===Ca)&&Ao(G1(i,r,t,e))}}}Oe(t,gX,e)})}],["cut",ro],["copy",ro],["dragstart",ro],["dragover",ro],["dragend",ro],["paste",ro],["focus",ro],["blur",ro],["drop",ro]];fp&&Tx.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=$I(n);i==="deleteCompositionText"||ca&&wI(r)||i!=="insertCompositionText"&&Pr(r,()=>{const a=Ee();if(i==="deleteContentBackward"){if(a===null){const m=mg();if(!xe(m))return;Ao(m.clone())}if(xe(a)){const m=a.anchor.key===a.focus.key;if(s=n.timeStamp,kI==="MediaLast"&&s{Pr(r,()=>{jn(null)})},Px),xe(a)){const g=a.anchor.getNode();g.markDirty(),a.format=g.getFormat(),_e(g)||we(142),a.style=g.getStyle()}}else{jn(null),n.preventDefault();const g=a.anchor.getNode().getTextContent(),v=a.anchor.offset===0&&a.focus.offset===g.length;EX&&m&&!v||Oe(r,cs,!0)}return}}var s;if(!xe(a))return;const l=n.data;sl!==null&&F1(!1,r,sl),a.dirty&&sl===null||!a.isCollapsed()||Zn(a.anchor.getNode())||o===null||a.applyDOMRange(o),sl=null;const u=a.anchor,f=a.focus,d=u.getNode(),p=f.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Oe(r,Sl,n);break;case"insertFromComposition":jn(null),Oe(r,Sl,n);break;case"insertLineBreak":jn(null),Oe(r,_l,!1);break;case"insertParagraph":jn(null),kc&&!rg?(kc=!1,Oe(r,_l,!1)):Oe(r,px,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Oe(r,x1,n);break;case"deleteByComposition":(function(m,g){return m!==g||ge(m)||ge(g)||!m.isToken()||!g.isToken()})(d,p)&&Oe(r,mx,n);break;case"deleteByDrag":case"deleteByCut":Oe(r,mx,n);break;case"deleteContent":Oe(r,cs,!1);break;case"deleteWordBackward":Oe(r,Xc,!0);break;case"deleteWordForward":Oe(r,Xc,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Oe(r,Zc,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Oe(r,Zc,!1);break;case"formatStrikeThrough":Oe(r,ns,"strikethrough");break;case"formatBold":Oe(r,ns,"bold");break;case"formatItalic":Oe(r,ns,"italic");break;case"formatUnderline":Oe(r,ns,"underline");break;case"historyUndo":Oe(r,w1,void 0);break;case"historyRedo":Oe(r,_1,void 0)}else{if(l===` +`)n.preventDefault(),Oe(r,_l,!1);else if(l===Co)n.preventDefault(),Oe(r,px,void 0);else if(l==null&&n.dataTransfer){const m=n.dataTransfer.getData("text/plain");n.preventDefault(),a.insertRawText(m)}else l!=null&&NI(a,o,l,n.timeStamp,!0)?(n.preventDefault(),Oe(r,Sl,l)):sl=l;MI=n.timeStamp}})}(e,t)]);let Ec=0,kI=null,MI=0,sl=null;const wp=new WeakMap;let Ex=!1,kx=!1,kc=!1,ic=!1,jI=[0,"",0,"root",0];function NI(e,t,n,r,i){const o=e.anchor,a=e.focus,s=o.getNode(),l=en(),u=Li(l._window),f=u!==null?u.anchorNode:null,d=o.key,p=l.getElementByKey(d),m=n.length;return d!==a.key||!_e(s)||(!i&&(!fp||MI1||(i||!fp)&&p!==null&&!s.isComposing()&&f!==mp(p)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||ZX(e,s)}function ZP(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===Ca&&t!==0&&t!==e.nodeValue.length}function JP(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}=e;Ex&&(Ex=!1,ZP(r,i)&&ZP(o,a))||Pr(t,()=>{if(!n)return void Ao(null);if(!og(t,r,o))return;const s=Ee();if(xe(s)){const l=s.anchor,u=l.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);const f=cg(t).event,d=f?f.timeStamp:performance.now(),[p,m,g,v,y]=jI,x=Kn(),w=t.isComposing()===!1&&x.getTextContent()==="";if(d{const u=mg(),f=n.anchorNode;if(f===null)return;const d=f.nodeType;d!==Xf&&d!==Ca||Ao(G1(u,n,r,e))}));const i=B1(r),o=i[i.length-1],a=o._key,s=Ol.get(a),l=s||o;l!==r&&JP(n,l,!1),JP(n,r,!0),r!==o?Ol.set(a,r):s&&Ol.delete(a)}function QP(e){e._lexicalHandled=!0}function eT(e){return e._lexicalHandled===!0}function sZ(e){const t=e.ownerDocument,n=wp.get(t);n===void 0&&we(162);const r=n-1;r>=0||we(164),wp.set(t,r),r===0&&t.removeEventListener("selectionchange",II);const i=ag(e);L1(i)?(function(a){if(a._parentEditor!==null){const s=B1(a),l=s[s.length-1]._key;Ol.get(l)===a&&Ol.delete(l)}else Ol.delete(a._key)}(i),e.__lexicalEditor=null):i&&we(198);const o=DI(e);for(let a=0;ai.__key===this.__key);if(_e(this))return r;if(xe(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Nt(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor,a=o.getNode();if(o.offset===a.getChildrenSize()&&a.is(i)&&a.getLastChildOrThrow().is(this))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:vn(t)}getParentOrThrow(){const t=this.getParent();return t===null&&we(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(Zf(n))return ge(t)||t===this&&Nt(t)||we(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&we(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:vn(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:vn(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=this.getParents(),r=t.getParents();ge(this)&&n.unshift(this),ge(t)&&r.unshift(t);const i=n.length,o=r.length;if(i===0||o===0||n[i-1]!==r[o-1])return null;const a=new Set(r);for(let s=0;s{s.append(v)})),xe(r)){Ao(r);const v=r.anchor,y=r.focus;v.key===o&&iT(v,s),y.key===o&&iT(y,s)}return oa()===o&&jn(a),s}insertAfter(t,n=!0){lr(),Kv(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.getParent(),a=Ee();let s=!1,l=!1;if(o!==null){const m=t.getIndexWithinParent();if(fs(i),xe(a)){const g=o.__key,v=a.anchor,y=a.focus;s=v.type==="element"&&v.key===g&&v.offset===m+1,l=y.type==="element"&&y.key===g&&y.offset===m+1}}const u=this.getNextSibling(),f=this.getParentOrThrow().getWritable(),d=i.__key,p=r.__next;if(u===null?f.__last=d:u.getWritable().__prev=d,f.__size++,r.__next=d,i.__next=p,i.__prev=r.__key,i.__parent=r.__parent,n&&xe(a)){const m=this.getIndexWithinParent();_p(a,f,m+1);const g=f.__key;s&&a.anchor.set(g,m+2,"element"),l&&a.focus.set(g,m+2,"element")}return t}insertBefore(t,n=!0){lr(),Kv(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;fs(i);const a=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),l=r.__prev,u=this.getIndexWithinParent();a===null?s.__first=o:a.getWritable().__next=o,s.__size++,r.__prev=o,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const f=Ee();return n&&xe(f)&&_p(f,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return bo()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){lr();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(ge(r))return r.select();if(!_e(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(t,n)}selectNext(t,n){lr();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(ge(r))return r.select(0,0);if(!_e(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(t,n)}markDirty(){this.getWritable()}}class Jf extends hg{static getType(){return"linebreak"}static clone(t){return new Jf(t.__key)}constructor(t){super(t)}getTextContent(){return` +`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&YP(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&vh(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&vh(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&YP(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&vh(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&vh(o))return!0}return!1}(t)?null:{conversion:lZ,priority:0}}}static importJSON(t){return nf()}exportJSON(){return{type:"linebreak",version:1}}}function lZ(e){return{node:nf()}}function nf(){return fg(new Jf)}function Mc(e){return e instanceof Jf}function vh(e){return e.nodeType===Ca&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Xv(e,t){return 16&t?"code":t&k1?"mark":32&t?"sub":64&t?"sup":null}function Zv(e,t){return 1&t?"strong":2&t?"em":"span"}function RI(e,t,n,r,i){const o=r.classList;let a=Tc(i,"base");a!==void 0&&o.add(...a),a=Tc(i,"underlineStrikethrough");let s=!1;const l=t&hp&&t&dp;a!==void 0&&(n&hp&&n&dp?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const u in vo){const f=vo[u];if(a=Tc(i,u),a!==void 0)if(n&f){if(s&&(u==="underline"||u==="strikethrough")){t&f&&o.remove(...a);continue}t&f&&(!l||u!=="underline")&&u!=="strikethrough"||o.add(...a)}else t&f&&o.remove(...a)}}function LI(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?ig:"");if(r==null)t.textContent=o;else{const a=r.nodeValue;if(a!==o)if(i||ca){const[s,l,u]=function(f,d){const p=f.length,m=d.length;let g=0,v=0;for(;g({conversion:dZ,priority:0}),b:()=>({conversion:cZ,priority:0}),code:()=>({conversion:Zo,priority:0}),em:()=>({conversion:Zo,priority:0}),i:()=>({conversion:Zo,priority:0}),s:()=>({conversion:Zo,priority:0}),span:()=>({conversion:uZ,priority:0}),strong:()=>({conversion:Zo,priority:0}),sub:()=>({conversion:Zo,priority:0}),sup:()=>({conversion:Zo,priority:0}),u:()=>({conversion:Zo,priority:0})}}static importJSON(t){const n=En(t.text);return n.setFormat(t.format),n.setDetail(t.detail),n.setMode(t.mode),n.setStyle(t.style),n}exportDOM(t){let{element:n}=super.exportDOM(t);return n!==null&&U1(n)||we(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=bh(n,"b")),this.hasFormat("italic")&&(n=bh(n,"i")),this.hasFormat("strikethrough")&&(n=bh(n,"s")),this.hasFormat("underline")&&(n=bh(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?vo[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?RX[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=vx(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=BX[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){lr();let r=t,i=n;const o=Ee(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;r===void 0&&(r=l),i===void 0&&(i=l)}else r=0,i=0;if(!xe(o))return VI(s,r,s,i,"text","text");{const l=oa();l!==o.anchor.key&&l!==o.focus.key||jn(s),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),a=o.__text,s=r.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const u=Ee();if(i&&xe(u)){const d=t+s;u.setTextNodeRange(o,d,o,d)}const f=a.slice(0,l)+r+a.slice(l+n);return o.__text=f,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){lr();const n=this.getLatest(),r=n.getTextContent(),i=n.__key,o=oa(),a=new Set(t),s=[],l=r.length;let u="";for(let _=0;_A&&$.offset<=D&&($.key=M,$.offset-=A,w.dirty=!0),N.key===i&&N.type==="text"&&N.offset>A&&N.offset<=D&&(N.key=M,N.offset-=A,w.dirty=!0)}o===i&&jn(M),A=D,S.push(k)}if(p!==null){(function(E){const k=E.getPreviousSibling(),M=E.getNextSibling();k!==null&&gp(k),M!==null&&gp(M)})(this);const _=p.getWritable(),C=this.getIndexWithinParent();x?(_.splice(C,0,S),this.remove()):_.splice(C,1,S),xe(w)&&_p(w,p,C,f-1)}return S}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||we(50);const r=this.__key,i=t.__key,o=this.__text,a=o.length;oa()===i&&jn(r);const s=Ee();if(xe(s)){const d=s.anchor,p=s.focus;d!==null&&d.key===i&&(fT(d,n,r,t,a),s.dirty=!0),p!==null&&p.key===i&&(fT(p,n,r,t,a),s.dirty=!0)}const l=t.__text,u=n?l+o:o+l;this.setTextContent(u);const f=this.getWritable();return t.remove(),f}isTextEntity(){return!1}}function uZ(e){return{forChild:K1(e.style),node:null}}function cZ(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:K1(t.style,n?void 0:"bold"),node:null}}const nT=new WeakMap;function fZ(e){return e.nodeName==="PRE"||e.nodeType===Xf&&e.style!==void 0&&e.style.whiteSpace!==void 0&&e.style.whiteSpace.startsWith("pre")}function dZ(e){const t=e;e.parentElement===null&&we(129);let n=t.textContent||"";if(function(r){let i,o=r.parentNode;const a=[r];for(;o!==null&&(i=nT.get(o))===void 0&&!fZ(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=rT(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:En(n)}}function rT(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,n.nodeType===Xf){const o=n.style.display;if(o===""&&!tZ(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(n.nodeType===Ca)return n;if(n.nodeName==="BR")return null}}const hZ={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Zo(e){const t=hZ[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:K1(e.style,t),node:null}}function En(e=""){return fg(new yu(e))}function _e(e){return e instanceof yu}function K1(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),a=e.fontStyle==="italic",s=r.includes("underline"),l=e.verticalAlign;return u=>(_e(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),a&&!u.hasFormat("italic")&&u.toggleFormat("italic"),s&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class Qf extends yu{static getType(){return"tab"}static clone(t){return new Qf(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}static importJSON(t){const n=H1();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(t){we(126)}setDetail(t){we(127)}setMode(t){we(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function H1(){return fg(new Qf)}function pZ(e){return e instanceof Qf}class mZ{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let n=this.getNode(),r=t.getNode();const i=this.offset,o=t.offset;if(ge(n)){const a=n.getDescendantByIndex(i);n=a??n}if(ge(r)){const a=r.getDescendantByIndex(o);r=a??r}return n===r?io&&(r=o)}else if(!ge(t)){const o=t.getNextSibling();if(_e(o))n=o.__key,r=0,i="text";else{const a=t.getParent();a&&(n=a.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function iT(e,t){if(ge(t)){const n=t.getLastDescendant();ge(n)||_e(n)?Jv(e,n):Jv(e,t)}else Jv(e,t)}function na(e,t,n,r){e.key=t,e.offset=n,e.type=r}let BI=class FI{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!pg(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new FI(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(_e(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(t);for(let a=0;a0?[]:[s]:s.getNodesBetween(l),ed()||(this._cachedNodes=d),d}setTextNodeRange(t,n,r,i){na(this.anchor,t.__key,n,"text"),na(this.focus,r.__key,i,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=jx(this);let u="",f=!0;for(let d=0;d=0;k--){const M=A[k];if(M.is(p)||ge(M)&&M.isParentOf(p))break;M.isAttached()&&(!_.has(M)||M.is(S)?C||E.insertAfter(M,!1):M.remove())}if(!C){let k=w,M=null;for(;k!==null;){const D=k.getChildren(),$=D.length;($===0||D[$-1].is(M))&&(y.delete(k.__key),M=k),k=k.getParent()}}if(p.isToken())if(l===m)p.select();else{const k=En(t);k.select(),p.replace(k)}else p=p.spliceText(l,m-l,t,!0),p.getTextContent()===""?p.remove():p.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let k=1;k0&&(y===v.getTextContentSize()||ol(v)||([v]=v.splitText(y)),v.setFormat(x));for(let w=f+1;w(ge(m)||Nt(m))&&!m.isInline())){ge(n)||we(135);const m=Qv(this);return n.splice(m,0,t),void r.selectEnd()}const i=function(m){const g=bo();let v=null;for(let y=0;yu?u:l,p=l>u?l:u,m=a.splitText(d,p),g=d===0?m[0]:m[1];return g!=null?[g]:[]}return[a]}const f=i.isBefore(o);if(_e(a)){const d=f?l:u;d===a.getTextContentSize()?t.shift():d!==0&&([,a]=a.splitText(d),t[0]=a)}if(_e(s)){const d=s.getTextContent().length,p=f?u:l;p===0?t.pop():p!==d&&([s]=s.splitText(p),t[r]=s)}return t}modify(t,n,r){const i=this.focus,o=this.anchor,a=t==="move",s=bx(i,n);if(Nt(s)&&!s.isIsolated()){if(a&&s.isKeyboardSelectable()){const m=uT();return m.add(s.__key),void Ao(m)}const p=n?s.getPreviousSibling():s.getNextSibling();if(_e(p)){const m=p.__key,g=n?p.getTextContent().length:0;return i.set(m,g,"text"),void(a&&o.set(m,g,"text"))}{const m=s.getParentOrThrow();let g,v;return ge(p)?(v=p.__key,g=n?p.getChildrenSize():0):(g=s.getIndexWithinParent(),v=m.__key,n||g++),i.set(v,g,"element"),void(a&&o.set(v,g,"element"))}}const l=en(),u=Li(l._window);if(!u)return;const f=l._blockCursorElement,d=l._rootElement;if(d===null||f===null||!ge(s)||s.isInline()||s.canBeEmpty()||V1(f,l,d),function(p,m,g,v){p.modify(m,g,v)}(u,t,n?"backward":"forward",r),u.rangeCount>0){const p=u.getRangeAt(0),m=this.anchor.getNode(),g=Zn(m)?m:QX(m);if(this.applyDOMRange(p),this.dirty=!0,!a){const v=this.getNodes(),y=[];let x=!1;for(let w=0;w0)if(n){const w=y[0];ge(w)?w.selectStart():w.getParentOrThrow().selectStart()}else{const w=y[y.length-1];ge(w)?w.selectEnd():w.getParentOrThrow().selectEnd()}u.anchorNode===p.startContainer&&u.anchorOffset===p.startOffset||function(w){const S=w.focus,A=w.anchor,_=A.key,C=A.offset,E=A.type;na(A,S.key,S.offset,S.type),na(S,_,C,E),w._cachedNodes=null}(this)}}}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&ge(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(ge(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=this.focus,a=bx(o,t);if(Nt(a)&&!a.isIsolated()){if(a.isKeyboardSelectable()&&ge(i)&&i.getChildrenSize()===0){i.remove();const s=uT();s.add(a.__key),Ao(s)}else a.remove(),en().dispatchCommand(b1,void 0);return}if(!t&&ge(a)&&ge(i)&&i.isEmpty())return i.remove(),void a.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const s=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,s!==null&&s.isSegmented()){const l=o.offset,u=s.getTextContentSize();if(s.is(i)||t&&l!==u||!t&&l!==0)return void aT(s,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==u)return void aT(i,t,l)}(function(l,u){const f=l.anchor,d=l.focus,p=f.getNode(),m=d.getNode();if(p===m&&f.type==="text"&&d.type==="text"){const g=f.offset,v=d.offset,y=gn||f){i.splice(u,1),f&&(s=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(s,s))}function sT(e,t,n,r){let i,o=t;if(e.nodeType===Xf){let a=!1;const s=e.childNodes,l=s.length,u=r._blockCursorElement;o===l&&(a=!0,o=l-1);let f=s[o],d=!1;if(f===u)f=s[o+1],d=!0;else if(u!==null){const p=u.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,u)&&o--}if(i=pl(f),_e(i))o=zP(i,a);else{let p=pl(e);if(p===null)return null;if(ge(p)){o=Math.min(p.getChildrenSize(),o);let m=p.getChildAtIndex(o);if(ge(m)&&function(g,v,y){const x=g.getParent();return y===null||x===null||!x.canBeEmpty()||x!==y.getNode()}(m,0,n)){const g=a?m.getLastDescendant():m.getFirstDescendant();g===null?p=m:(m=g,p=ge(m)?m:m.getParentOrThrow()),o=0}_e(m)?(i=m,p=null,o=zP(m,a)):m!==p&&a&&!d&&o++}else{const m=p.getIndexWithinParent();o=t===0&&Nt(p)&&pl(e)===p?m:m+1,p=p.getParentOrThrow()}if(ge(p))return xa(p.__key,o,"element")}}else i=pl(e);return _e(i)?xa(i.__key,o,"text"):null}function lT(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&o===null&&ge(a)&&a.isInline()){const s=a.getPreviousSibling();_e(s)&&(e.key=s.__key,e.offset=s.getTextContent().length)}}else ge(o)&&!n&&o.isInline()?(e.key=o.__key,e.offset=o.getChildrenSize(),e.type="element"):_e(o)&&(e.key=o.__key,e.offset=o.getTextContent().length)}else if(r===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(t&&ge(o)&&o.isInline())e.key=o.__key,e.offset=0,e.type="element";else if((n||t)&&o===null&&ge(a)&&a.isInline()&&!a.canInsertTextAfter()){const s=a.getNextSibling();_e(s)&&(e.key=s.__key,e.offset=0)}}}function WI(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);lT(e,r,i),lT(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const o=en();if(o.isComposing()&&o._compositionKey!==e.key&&xe(n)){const a=n.anchor,s=n.focus;na(e,a.key,a.offset,a.type),na(t,s.key,s.offset,s.type)}}}function zI(e,t,n,r,i,o){if(e===null||n===null||!og(i,e,n))return null;const a=sT(e,t,xe(o)?o.anchor:null,i);if(a===null)return null;const s=sT(n,r,xe(o)?o.focus:null,i);if(s===null)return null;if(a.type==="element"&&s.type==="element"){const l=pl(e),u=pl(n);if(Nt(l)&&Nt(u))return null}return WI(a,s,o),[a,s]}function VI(e,t,n,r,i,o){const a=jo(),s=new Ts(xa(e,t,i),xa(n,r,o),0,"");return s.dirty=!0,a._selection=s,s}function uT(){return new BI(new Set)}function G1(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!yx&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let u,f,d,p;if(xe(e)&&!l)return e.clone();if(t===null)return null;if(u=t.anchorNode,f=t.focusNode,d=t.anchorOffset,p=t.focusOffset,s&&xe(e)&&!og(n,u,f))return e.clone();const m=zI(u,d,f,p,n,e);if(m===null)return null;const[g,v]=m;return new Ts(g,v,xe(e)?e.format:0,xe(e)?e.style:"")}function Ee(){return jo()._selection}function mg(){return en()._editorState._selection}function _p(e,t,n,r=1){const i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n0||n0||n=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(_e(u)){let f=0;l&&(f=u.getTextContentSize()),t.set(u.__key,f,"text"),r.set(u.__key,f,"text")}}else{if(ge(o)){const s=o.getChildrenSize(),l=n>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(_e(u)){let f=0;l&&(f=u.getTextContentSize()),t.set(u.__key,f,"text")}}if(ge(a)){const s=a.getChildrenSize(),l=i>=s,u=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(_e(u)){let f=0;l&&(f=u.getTextContentSize()),r.set(u.__key,f,"text")}}}}function Sp(e,t,n,r,i){let o=null,a=0,s=null;r!==null?(o=r.__key,_e(r)?(a=r.getTextContentSize(),s="text"):ge(r)&&(a=r.getChildrenSize(),s="element")):i!==null&&(o=i.__key,_e(i)?s="text":ge(i)&&(s="element")),o!==null&&s!==null?e.set(o,a,s):(a=t.getIndexWithinParent(),a===-1&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function fT(e,t,n,r,i){e.type==="text"?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function gZ(e,t,n,r,i,o,a){const s=r.anchorNode,l=r.focusNode,u=r.anchorOffset,f=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&hI(d))return;if(!xe(t))return void(e!==null&&og(n,s,l)&&r.removeAllRanges());const p=t.anchor,m=t.focus,g=p.key,v=m.key,y=yp(n,g),x=yp(n,v),w=p.offset,S=m.offset,A=t.format,_=t.style,C=t.isCollapsed();let E=y,k=x,M=!1;if(p.type==="text"){E=mp(y);const W=p.getNode();M=W.getFormat()!==A||W.getStyle()!==_}else xe(e)&&e.anchor.type==="text"&&(M=!0);var D,$,N,F,L;if(m.type==="text"&&(k=mp(x)),E!==null&&k!==null&&(C&&(e===null||M||xe(e)&&(e.format!==A||e.style!==_))&&(D=A,$=_,N=w,F=g,L=performance.now(),jI=[D,$,N,F,L]),u!==w||f!==S||s!==E||l!==k||r.type==="Range"&&C||(d!==null&&o.contains(d)||o.focus({preventScroll:!0}),p.type==="element"))){try{r.setBaseAndExtent(E,w,k,S)}catch{}if(!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===document.activeElement){const W=t instanceof Ts&&t.anchor.type==="element"?E.childNodes[w]||null:r.rangeCount>0?r.getRangeAt(0):null;if(W!==null){let B;if(W instanceof Text){const z=document.createRange();z.selectNode(W),B=z.getBoundingClientRect()}else B=W.getBoundingClientRect();(function(z,H,U){const K=U.ownerDocument,Y=K.defaultView;if(Y===null)return;let{top:te,bottom:ne}=H,ie=0,ce=0,ae=U;for(;ae!==null;){const le=ae===K.body;if(le)ie=0,ce=cg(z).innerHeight;else{const Q=ae.getBoundingClientRect();ie=Q.top,ce=Q.bottom}let re=0;if(tece&&(re=ne-ce),re!==0)if(le)Y.scrollBy(0,re);else{const Q=ae.scrollTop;ae.scrollTop+=re;const fe=ae.scrollTop-Q;te-=fe,ne-=fe}if(le)break;ae=ug(ae)}})(n,B,o)}}Ex=!0}}function Qv(e){let t=e;e.isCollapsed()||t.removeText();const n=Ee();xe(n)&&(t=n),xe(t)||we(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!al(i);)[i,o]=yZ(i,o);return o}function yZ(e,t){const n=e.getParent();if(!n){const i=bo();return Kn().append(i),i.select(),[Kn(),0]}if(_e(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!ge(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new Ts(xa(e.__key,t,"element"),xa(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let bn=null,xn=null,dr=!1,eb=!1,Uh=0;const dT={characterData:!0,childList:!0,subtree:!0};function ed(){return dr||bn!==null&&bn._readOnly}function lr(){dr&&we(13)}function UI(){Uh>99&&we(14)}function jo(){return bn===null&&we(195,KI()),bn}function en(){return xn===null&&we(196,KI()),xn}function KI(){let e=0;const t=new Set,n=vg.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=ag(i);if(L1(o))e++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===n&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function vZ(){return xn}function hT(e,t,n){const r=t.__type,i=function(s,l){const u=s._nodes.get(l);return u===void 0&&we(30,l),u}(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const a=o.length;for(let s=0;s{i=GI(e,t,n)}),i}const r=B1(e);for(let i=4;i>=0;i--)for(let o=0;o0||N>0;){if(D>0){S._dirtyLeaves=new Set;for(const F of M){const L=C.get(F);_e(L)&&L.isAttached()&&L.isSimpleText()&&!L.isUnmergeable()&&BP(L),L!==void 0&&pT(L,E)&&hT(S,L,k),A.add(F)}if(M=S._dirtyLeaves,D=M.size,D>0){Uh++;continue}}S._dirtyLeaves=new Set,S._dirtyElements=new Map;for(const F of $){const L=F[0],W=F[1];if(L!=="root"&&!W)continue;const B=C.get(L);B!==void 0&&pT(B,E)&&hT(S,B,k),_.set(L,W)}M=S._dirtyLeaves,D=M.size,$=S._dirtyElements,N=$.size,Uh++}S._dirtyLeaves=A,S._dirtyElements=_}(u,e),gT(e),function(w,S,A,_){const C=w._nodeMap,E=S._nodeMap,k=[];for(const[M]of _){const D=E.get(M);D!==void 0&&(D.isAttached()||(ge(D)&&SI(D,M,C,E,k,_),C.has(M)||_.delete(M),k.push(M)))}for(const M of k)E.delete(M);for(const M of A){const D=E.get(M);D===void 0||D.isAttached()||(C.has(M)||A.delete(M),E.delete(M))}}(l,u,e._dirtyLeaves,e._dirtyElements)),y!==e._compositionKey&&(u._flushSync=!0);const x=u._selection;if(xe(x)){const w=u._nodeMap,S=x.anchor.key,A=x.focus.key;w.get(S)!==void 0&&w.get(A)!==void 0||we(19)}else pg(x)&&x._nodes.size===0&&(u._selection=null)}catch(y){return y instanceof Error&&e._onError(y),e._pendingEditorState=l,e._dirtyType=$l,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void aa(e)}finally{bn=d,dr=p,xn=m,e._updating=g,Uh=0}e._dirtyType!==vs||function(y,x){const w=x.getEditorState()._selection,S=y._selection;if(S!==null){if(S.dirty||!S.is(w))return!0}else if(w!==null)return!0;return!1}(u,e)?u._flushSync?(u._flushSync=!1,aa(e)):f&&YX(()=>{aa(e)}):(u._flushSync=!1,f&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Pr(e,t,n){e._updating?e._updates.push([t,n]):YI(e,t,n)}class gg extends hg{constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return LX[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=en()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(_e(n)&&t.push(n),ge(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;ge(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;ge(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const o=n[r-1];return ge(o)&&o.getLastDescendant()||o||null}const i=n[t];return ge(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:vn(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&we(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:vn(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&we(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;in.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?IP[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){const i=r.length,o=this.getChildrenSize(),a=this.getWritable(),s=a.__key,l=[],u=[],f=this.getChildAtIndex(t+n);let d=null,p=o-n+i;if(t!==0)if(t===o)d=this.getLastChild();else{const g=this.getChildAtIndex(t);g!==null&&(d=g.getPreviousSibling())}if(n>0){let g=d===null?this.getFirstChild():d.getNextSibling();for(let v=0;v({root:XI(Kn())}))}}class bZ extends gg{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class vu extends gg{constructor(t){super(t),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}hasTextFormat(t){const n=vo[t];return!!(this.getTextFormat()&n)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}static clone(t){return new vu(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}createDOM(t){const n=document.createElement("p"),r=Tc(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:xZ,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(n&&U1(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i);const o=this.getIndent();o>0&&(n.style.textIndent=20*o+"px")}return{element:n}}static importJSON(t){const n=bo();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n.setTextFormat(t.textFormat),n}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(t,n){const r=bo();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getTextStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||_e(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function xZ(e){const t=bo();if(e.style){t.setFormat(e.style.textAlign);const n=parseInt(e.style.textIndent,10)/20;n>0&&t.setIndent(n)}return{node:t}}function bo(){return fg(new vu)}function Nx(e){return e instanceof vu}const Vt=0,Dl=1;function ZI(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Y1(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=vs,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function wZ(e){const t=e||{},n=vZ(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,a=Y1(),s=t.namespace||(i!==null?i._config.namespace:bI()),l=t.editorState,u=[td,yu,Jf,Qf,vu,bZ,...t.nodes||[]],{onError:f,html:d}=t,p=t.editable===void 0||t.editable;let m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let v=0;v{Object.keys(A).forEach(_=>{let C=x.get(_);C===void 0&&(C=[],x.set(_,C)),C.push(A[_])})};return v.forEach(A=>{const _=A.klass.importDOM;if(_==null||w.has(_))return;w.add(_);const C=_.call(A.klass);C!==null&&S(C)}),y&&S(y),x}(m,d?d.import:void 0),p);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=$l),g}class vg{constructor(t,n,r,i,o,a,s){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=vs,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=bI(),this._onError=o,this._htmlConversions=a,this._editable=s,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&we(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(t);o===void 0&&we(36,String(t));const a=o[r];return a.add(n),()=>{a.delete(n),o.every(s=>s.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;o.set(n,i);const a=r&&r.skipInitialization;return a===void 0||a||this.initializeMutationListener(n,i),()=>{o.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&we(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=rZ(r).get(n.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],o=r.replaceWithKlass;if(o!=null){const l=this.registerNodeTransformToKlass(o,n);i.push(l)}var a,s;return a=this,s=t.getType(),Pr(a,()=>{const l=jo();if(l.isEmpty())return;if(s==="root")return void Kn().markDirty();const u=l._nodeMap;for(const[,f]of u)f.markDirty()},a._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{i.forEach(l=>l.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return Oe(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=Tc(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,ZI(this,n,t,i),n!==null&&(this._config.disableEvents||sZ(n),r!=null&&n.classList.remove(...r)),t!==null){const o=function(s){const l=s.ownerDocument;return l&&l.defaultView||null}(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=$l,dI(this),this._updateTags.add("history-merge"),aa(this),this._config.disableEvents||function(s,l){const u=s.ownerDocument,f=wp.get(u);(f===void 0||f<1)&&u.addEventListener("selectionchange",II),wp.set(u,(f||0)+1),s.__lexicalEditor=l;const d=DI(s);for(let p=0;p{eT(y)||(QP(y),(l.isEditable()||m==="click")&&g(y,l))}:y=>{if(eT(y))return;QP(y);const x=l.isEditable();switch(m){case"cut":return x&&Oe(l,P1,y);case"copy":return Oe(l,A1,y);case"paste":return x&&Oe(l,x1,y);case"dragstart":return x&&Oe(l,oI,y);case"dragover":return x&&Oe(l,xX,y);case"dragend":return x&&Oe(l,wX,y);case"focus":return x&&Oe(l,OX,y);case"blur":return x&&Oe(l,CX,y);case"drop":return x&&Oe(l,iI,y)}};s.addEventListener(m,v),d.push(()=>{s.removeEventListener(m,v)})}}(t,this),r!=null&&t.classList.add(...r)}else this._editorState=i,this._pendingEditorState=null,this._window=null;jc("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&we(38),fI(this);const r=this._pendingEditorState,i=this._updateTags,o=n!==void 0?n.tag:null;r===null||r.isEmpty()||(o!=null&&i.add(o),aa(this)),this._pendingEditorState=t,this._dirtyType=$l,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&i.add(o),aa(this)}parseEditorState(t,n){return function(r,i,o){const a=Y1(),s=bn,l=dr,u=xn,f=i._dirtyElements,d=i._dirtyLeaves,p=i._cloneNotNeeded,m=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,bn=a,dr=!1,xn=i;try{const g=i._nodes;HI(r.root,g),o&&o(),a._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=f,i._dirtyLeaves=d,i._cloneNotNeeded=p,i._dirtyType=m,bn=s,dr=l,xn=u}return a}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return aa(this),this.getEditorState().read(t,{editor:this})}update(t,n){Pr(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Pr(this,()=>{const i=Ee(),o=Kn();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=Li(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,jc("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}vg.version="0.17.1+prod.esm";const JI=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,_Z=JI?O.useLayoutEffect:O.useEffect,xh={tag:"history-merge"};function SZ({initialConfig:e,children:t}){const n=O.useMemo(()=>{const{theme:r,namespace:i,nodes:o,onError:a,editorState:s,html:l}=e,u=hX(null,r),f=wZ({editable:e.editable,html:l,namespace:i,nodes:o,onError:d=>a(d,f),theme:r});return function(d,p){if(p!==null){if(p===void 0)d.update(()=>{const m=Kn();if(m.isEmpty()){const g=bo();m.append(g);const v=JI?document.activeElement:null;(Ee()!==null||v!==null&&v===d.getRootElement())&&g.select()}},xh);else if(p!==null)switch(typeof p){case"string":{const m=d.parseEditorState(p);d.setEditorState(m,xh);break}case"object":d.setEditorState(p,xh);break;case"function":d.update(()=>{Kn().isEmpty()&&p(d)},xh)}}}(f,s),[f,u]},[]);return _Z(()=>{const r=e.editable,[i]=n;i.setEditable(r===void 0||r)},[]),T.jsx(ZD.Provider,{value:n,children:t})}const OZ=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function CZ(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function AZ(){return function(e){const[t]=Nr(),n=O.useMemo(()=>e(t),[t,e]),r=O.useRef(n.initialValueFn()),[i,o]=O.useState(r.current);return OZ(()=>{const{initialValueFn:a,subscribe:s}=n,l=a();return r.current!==l&&(r.current=l,o(l)),s(u=>{r.current=u,o(u)})},[n,e]),i}(CZ)}function PZ(){return Kn().getTextContent()}function TZ(e,t=!0){if(e)return!1;let n=PZ();return t&&(n=n.trim()),n===""}function EZ(e){if(!TZ(e,!1))return!1;const t=Kn().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;rEZ(e)}function kZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}kZ(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;nd?d:f,v=f>d?f:d):m?(y=o?d:f,v=void 0):g&&(y=0,v=o?f:d),t.__text=t.__text.slice(y,v),t}}return t}function vT(e,t){const n=bx(e.focus,t);return Nt(n)&&!n.isIsolated()||ge(n)&&!n.isInline()&&!n.canBeEmpty()}function NZ(e,t,n,r){e.modify(t?"extend":"move",n,r)}function $Z(e){const t=e.anchor.getNode();return(Zn(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function bT(e,t,n){const r=$Z(e);NZ(e,t,n?!r:r,"character")}function DZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}DZ(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function RZ(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function LZ(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let a;try{a=JSON.parse(o)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"){const s=a.payload;if(s&&s.functionId==="makeChanges"){const l=s.args;if(l){const[u,f,d,p,m,g]=l;e.update(()=>{const v=Ee();if(xe(v)){const y=v.anchor;let x=y.getNode(),w=0,S=0;if(_e(x)&&u>=0&&f>=0&&(w=u,S=u+f,v.setTextNodeRange(x,w,x,S)),w===S&&d===""||(v.insertRawText(d),x=y.getNode()),_e(x)){w=p,S=p+m;const A=x.getTextContentSize();w=w>A?A:w,S=S>A?A:S,v.setTextNodeRange(x,w,x,S)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function BZ(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Kn().getChildren();for(let i=0;i{if(e!==null){const n=RZ(e,KeyboardEvent)?null:e.clipboardData,r=Ee();if(r!==null&&n!=null){e.preventDefault();const i=zZ(t);i!==null&&n.setData("text/html",i),n.setData("text/plain",r.getTextContent())}}})}function qZ(e){return Po(e.registerCommand(cs,t=>{const n=Ee();return!!xe(n)&&(n.deleteCharacter(t),!0)},Vt),e.registerCommand(Xc,t=>{const n=Ee();return!!xe(n)&&(n.deleteWord(t),!0)},Vt),e.registerCommand(Zc,t=>{const n=Ee();return!!xe(n)&&(n.deleteLine(t),!0)},Vt),e.registerCommand(Sl,t=>{const n=Ee();if(!xe(n))return!1;if(typeof t=="string")n.insertText(t);else{const r=t.dataTransfer;if(r!=null)xT(r,n);else{const i=t.data;i&&n.insertText(i)}}return!0},Vt),e.registerCommand(mx,()=>{const t=Ee();return!!xe(t)&&(t.removeText(),!0)},Vt),e.registerCommand(_l,t=>{const n=Ee();return!!xe(n)&&(n.insertLineBreak(t),!0)},Vt),e.registerCommand(px,()=>{const t=Ee();return!!xe(t)&&(t.insertLineBreak(),!0)},Vt),e.registerCommand(O1,t=>{const n=Ee();if(!xe(n))return!1;const r=t,i=r.shiftKey;return!!vT(n,!0)&&(r.preventDefault(),bT(n,i,!0),!0)},Vt),e.registerCommand(S1,t=>{const n=Ee();if(!xe(n))return!1;const r=t,i=r.shiftKey;return!!vT(n,!1)&&(r.preventDefault(),bT(n,i,!1),!0)},Vt),e.registerCommand(C1,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),e.dispatchCommand(cs,!0))},Vt),e.registerCommand(nI,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),e.dispatchCommand(cs,!1))},Vt),e.registerCommand(Jc,t=>{const n=Ee();if(!xe(n))return!1;if(t!==null){if((HZ||KZ||YZ)&&UZ)return!1;t.preventDefault()}return e.dispatchCommand(_l,!1)},Vt),e.registerCommand(gx,()=>(JX(),!0),Vt),e.registerCommand(A1,t=>{const n=Ee();return!!xe(n)&&(wT(t,e),!0)},Vt),e.registerCommand(P1,t=>{const n=Ee();return!!xe(n)&&(function(r,i){wT(r,i),i.update(()=>{const o=Ee();xe(o)&&o.removeText()})}(t,e),!0)},Vt),e.registerCommand(x1,t=>{const n=Ee();return!!xe(n)&&(function(r,i){r.preventDefault(),i.update(()=>{const o=Ee(),{clipboardData:a}=r;a!=null&&xe(o)&&xT(a,o)},{tag:"paste"})}(t,e),!0)},Vt),e.registerCommand(iI,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),!0)},Vt),e.registerCommand(oI,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),!0)},Vt))}const $x=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function _T(e){return e.getEditorState().read(QI(e.isComposing()))}function XZ({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=Nr(),i=function(o,a){const[s,l]=O.useState(()=>o.getDecorators());return $x(()=>o.registerDecoratorListener(u=>{Tl.flushSync(()=>{l(u)})}),[o]),O.useEffect(()=>{l(o.getDecorators())},[o]),O.useMemo(()=>{const u=[],f=Object.keys(s);for(let d=0;do._onError(v),children:T.jsx(O.Suspense,{fallback:null,children:s[p]})}),g=o.getElementByKey(p);g!==null&&u.push(Tl.createPortal(m,g,p))}return u},[a,s,o])}(r,n);return function(o){$x(()=>Po(qZ(o),LZ(o)),[o])}(r),T.jsxs(T.Fragment,{children:[e,T.jsx(ZZ,{content:t}),i]})}function ZZ({content:e}){const[t]=Nr(),n=function(i){const[o,a]=O.useState(()=>_T(i));return $x(()=>{function s(){const l=_T(i);a(l)}return s(),Po(i.registerUpdateListener(()=>{s()}),i.registerEditableListener(()=>{s()}))},[i]),o}(t),r=AZ();return n?typeof e=="function"?e(r):e:null}const nR=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function JZ({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaExpanded:o,ariaLabel:a,ariaLabelledBy:s,ariaMultiline:l,ariaOwns:u,ariaRequired:f,autoCapitalize:d,className:p,id:m,role:g="textbox",spellCheck:v=!0,style:y,tabIndex:x,"data-testid":w,...S},A){const[_,C]=O.useState(e.isEditable()),E=O.useCallback(M=>{M&&M.ownerDocument&&M.ownerDocument.defaultView?e.setRootElement(M):e.setRootElement(null)},[e]),k=O.useMemo(()=>function(...M){return D=>{M.forEach($=>{typeof $=="function"?$(D):$!=null&&($.current=D)})}}(A,E),[E,A]);return nR(()=>(C(e.isEditable()),e.registerEditableListener(M=>{C(M)})),[e]),T.jsx("div",{...S,"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":i,"aria-expanded":_&&g==="combobox"?!!o:void 0,"aria-label":a,"aria-labelledby":s,"aria-multiline":l,"aria-owns":_?u:void 0,"aria-readonly":!_||void 0,"aria-required":f,autoCapitalize:d,className:p,contentEditable:_,"data-testid":w,id:m,ref:k,role:_?g:void 0,spellCheck:v,style:y,tabIndex:x})}const QZ=O.forwardRef(JZ);function ST(e){return e.getEditorState().read(QI(e.isComposing()))}const eJ=O.forwardRef(tJ);function tJ(e,t){const{placeholder:n,...r}=e,[i]=Nr();return T.jsxs(T.Fragment,{children:[T.jsx(QZ,{editor:i,...r,ref:t}),n!=null&&T.jsx(nJ,{editor:i,content:n})]})}function nJ({content:e,editor:t}){const n=function(a){const[s,l]=O.useState(()=>ST(a));return nR(()=>{function u(){const f=ST(a);l(f)}return u(),Po(a.registerUpdateListener(()=>{u()}),a.registerEditableListener(()=>{u()}))},[a]),s}(t),[r,i]=O.useState(t.isEditable());if(O.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(a=>{i(a)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:T.jsx("div",{"aria-hidden":!0,children:o})}const wh=0,Dx=1,Ix=2,si=0,rJ=1,OT=2,iJ=3,oJ=4;function aJ(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return si;const o=t._selection,a=e._selection;if(i)return rJ;if(!(xe(o)&&xe(a)&&a.isCollapsed()&&o.isCollapsed()))return si;const s=function(x,w,S){const A=x._nodeMap,_=[];for(const C of w){const E=A.get(C);E!==void 0&&_.push(E)}for(const[C,E]of S){if(!E)continue;const k=A.get(C);k===void 0||Zn(k)||_.push(k)}return _}(t,n,r);if(s.length===0)return si;if(s.length>1){const x=t._nodeMap,w=x.get(o.anchor.key),S=x.get(a.anchor.key);return w&&S&&!e._nodeMap.has(w.__key)&&_e(w)&&w.__text.length===1&&o.anchor.offset===1?OT:si}const l=s[0],u=e._nodeMap.get(l.__key);if(!_e(u)||!_e(l)||u.__mode!==l.__mode)return si;const f=u.__text,d=l.__text;if(f===d)return si;const p=o.anchor,m=a.anchor;if(p.key!==m.key||p.type!=="text")return si;const g=p.offset,v=m.offset,y=d.length-f.length;return y===1&&v===g-1?OT:y===-1&&v===g+1?iJ:y===-1&&v===g?oJ:si}function sJ(e,t){let n=Date.now(),r=si;return(i,o,a,s,l,u)=>{const f=Date.now();if(u.has("historic"))return r=si,n=f,Ix;const d=aJ(i,o,s,l,e.isComposing()),p=(()=>{const m=a===null||a.editor===e,g=u.has("history-push");if(!g&&m&&u.has("history-merge"))return wh;if(i===null)return Dx;const v=o._selection;return s.size>0||l.size>0?g===!1&&d!==si&&d===r&&fS.exportJSON()))===JSON.stringify(w.read(()=>A.exportJSON()))}(Array.from(s)[0],i,o)?wh:Dx:v!==null?wh:Ix})();return n=f,r=d,p}}function CT(e){e.undoStack=[],e.redoStack=[],e.current=null}function lJ(e,t,n){const r=sJ(e,n);return Po(e.registerCommand(w1,()=>(function(o,a){const s=a.redoStack,l=a.undoStack;if(l.length!==0){const u=a.current,f=l.pop();u!==null&&(s.push(u),o.dispatchCommand(gh,!0)),l.length===0&&o.dispatchCommand(yh,!1),a.current=f||null,f&&f.editor.setEditorState(f.editorState,{tag:"historic"})}}(e,t),!0),Vt),e.registerCommand(_1,()=>(function(o,a){const s=a.redoStack,l=a.undoStack;if(s.length!==0){const u=a.current;u!==null&&(l.push(u),o.dispatchCommand(yh,!0));const f=s.pop();s.length===0&&o.dispatchCommand(gh,!1),a.current=f||null,f&&f.editor.setEditorState(f.editorState,{tag:"historic"})}}(e,t),!0),Vt),e.registerCommand(_X,()=>(CT(t),!1),Vt),e.registerCommand(SX,()=>(CT(t),e.dispatchCommand(gh,!1),e.dispatchCommand(yh,!1),!0),Vt),e.registerUpdateListener(({editorState:o,prevEditorState:a,dirtyLeaves:s,dirtyElements:l,tags:u})=>{const f=t.current,d=t.redoStack,p=t.undoStack,m=f===null?null:f.editorState;if(f!==null&&o===m)return;const g=r(a,o,f,s,l,u);if(g===Dx)d.length!==0&&(t.redoStack=[],e.dispatchCommand(gh,!1)),f!==null&&(p.push({...f}),e.dispatchCommand(yh,!0));else if(g===Ix)return;t.current={editor:e,editorState:o}}))}function uJ(){return{current:null,redoStack:[],undoStack:[]}}function cJ({delay:e,externalHistoryState:t}){const[n]=Nr();return function(r,i,o=1e3){const a=O.useMemo(()=>i||uJ(),[i]);O.useEffect(()=>lJ(r,a,o),[o,r,a])}(n,t,e),null}function Rx(e,t){return Rx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Rx(e,t)}var AT={error:null},fJ=function(e){var t,n;function r(){for(var o,a=arguments.length,s=new Array(a),l=0;l{if(n)return r.registerUpdateListener(({editorState:i,dirtyElements:o,dirtyLeaves:a,prevEditorState:s,tags:l})=>{t&&o.size===0&&a.size===0||e&&l.has("history-merge")||s.isEmpty()||n(i,r,l)})},[r,e,t,n]),null}function mJ({editorRef:e}){const[t]=Nr();return ee.useEffect(()=>{typeof e=="function"?e(t):typeof e=="object"&&(e.current=t)},[t]),null}const gJ="w-full [&>p]:w-full [&>p]:m-0",yJ="focus-within:ring-2 focus-within:ring-offset-2 hover:outline-border-strong hover:focus-within:outline-focus-border focus-within:outline-focus-border focus-within:ring-focus transition-[color,outline,box-shadow] duration-150 ease-in-out outline outline-1 outline-field-border",vJ="bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",bJ={sm:"px-3 py-1.5 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-5",md:"px-3.5 py-2 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-6",lg:"px-4 py-2.5 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-7"},xJ="absolute inset-x-0 top-full mt-2 mx-0 mb-0 w-full h-auto overflow-y-auto overflow-x-hidden z-10 bg-background-primary border border-solid border-border-subtle shadow-lg",wJ={sm:"p-1.5 rounded-md max-h-[10.75rem]",md:"p-2 rounded-lg max-h-[13.5rem]",lg:"p-2 rounded-lg max-h-[13.5rem]"},_J="m-0 text-text-primary cursor-pointer",SJ={sm:"p-1.5 rounded text-xs leading-5 font-normal",md:"p-2 rounded-md text-sm leading-6 font-normal",lg:"p-2 rounded-md text-base leading-6 font-normal"},OJ="bg-button-tertiary-hover",PT="startTransition",CJ=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect,TT=e=>{const t=document.getElementById("typeahead-menu");if(!t)return;const n=t.getBoundingClientRect();n.top+n.height>window.innerHeight&&t.scrollIntoView({block:"center"}),n.top<0&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})};function ET(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>r.top&&n.top{if(t!=null&&e!=null){const o=i.getRootElement(),a=o!=null?function(d,p){let m=getComputedStyle(d);const g=m.position==="absolute",v=/(auto|scroll)/;if(m.position==="fixed")return document.body;for(let y=d;y=y.parentElement;)if(m=getComputedStyle(y),(!g||m.position!=="static")&&v.test(m.overflow+m.overflowY+m.overflowX))return y;return document.body}(o):document.body;let s=!1,l=ET(t,a);const u=function(){s||(window.requestAnimationFrame(function(){n(),s=!1}),s=!0);const d=ET(t,a);d!==l&&(l=d,r!=null&&r(d))},f=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",u,{capture:!0,passive:!0}),f.observe(t),()=>{f.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",u,!0)}}},[t,i,r,n,e])}const kT=mX();function PJ({close:e,editor:t,anchorElementRef:n,resolution:r,options:i,menuRenderFn:o,onSelectOption:a,shouldSplitNodeWithQuery:s=!1,commandPriority:l=Dl}){const[u,f]=O.useState(null),d=r.match&&r.match.matchingString;O.useEffect(()=>{f(0)},[d]);const p=O.useCallback(g=>{t.update(()=>{const v=r.match!=null&&s?function(y){const x=Ee();if(!xe(x)||!x.isCollapsed())return null;const w=x.anchor;if(w.type!=="text")return null;const S=w.getNode();if(!S.isSimpleText())return null;const A=w.offset,_=S.getTextContent().slice(0,A),C=y.replaceableString.length,E=A-function(M,D,$){let N=$;for(let F=N;F<=D.length;F++)M.substr(-F)===D.substr(0,F)&&(N=F);return N}(_,y.matchingString,C);if(E<0)return null;let k;return E===0?[k]=S.splitText(A):[,k]=S.splitText(E,A),k}(r.match):null;a(g,v,e,r.match?r.match.matchingString:"")})},[t,s,r.match,a,e]),m=O.useCallback(g=>{const v=t.getRootElement();v!==null&&(v.setAttribute("aria-activedescendant","typeahead-item-"+g),f(g))},[t]);return O.useEffect(()=>()=>{const g=t.getRootElement();g!==null&&g.removeAttribute("aria-activedescendant")},[t]),CJ(()=>{i===null?f(null):u===null&&m(0)},[i,u,m]),O.useEffect(()=>Po(t.registerCommand(kT,({option:g})=>!(!g.ref||g.ref.current==null)&&(TT(g.ref.current),!0),l)),[t,m,l]),O.useEffect(()=>Po(t.registerCommand(eI,g=>{const v=g;if(i!==null&&i.length&&u!==null){const y=u!==i.length-1?u+1:0;m(y);const x=i[y];x.ref!=null&&x.ref.current&&t.dispatchCommand(kT,{index:y,option:x}),v.preventDefault(),v.stopImmediatePropagation()}return!0},l),t.registerCommand(QD,g=>{const v=g;if(i!==null&&i.length&&u!==null){const y=u!==0?u-1:i.length-1;m(y);const x=i[y];x.ref!=null&&x.ref.current&&TT(x.ref.current),v.preventDefault(),v.stopImmediatePropagation()}return!0},l),t.registerCommand(tI,g=>{const v=g;return v.preventDefault(),v.stopImmediatePropagation(),e(),!0},l),t.registerCommand(rI,g=>{const v=g;return i!==null&&u!==null&&i[u]!=null&&(v.preventDefault(),v.stopImmediatePropagation(),p(i[u]),!0)},l),t.registerCommand(Jc,g=>i!==null&&u!==null&&i[u]!=null&&(g!==null&&(g.preventDefault(),g.stopImmediatePropagation()),p(i[u]),!0),l)),[p,e,t,i,u,m,l]),o(n,O.useMemo(()=>({options:i,selectOptionAndCleanUp:p,selectedIndex:u,setHighlightedIndex:f}),[p,u,i]),r.match?r.match.matchingString:"")}function TJ({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:i,menuRenderFn:o,triggerFn:a,anchorClassName:s,commandPriority:l=Dl,parent:u}){const[f]=Nr(),[d,p]=O.useState(null),m=function(y,x,w,S=document.body){const[A]=Nr(),_=O.useRef(document.createElement("div")),C=O.useCallback(()=>{_.current.style.top=_.current.style.bottom;const k=A.getRootElement(),M=_.current,D=M.firstChild;if(k!==null&&y!==null){const{left:$,top:N,width:F,height:L}=y.getRect(),W=_.current.offsetHeight;if(M.style.top=`${N+window.pageYOffset+W+3}px`,M.style.left=`${$+window.pageXOffset}px`,M.style.height=`${L}px`,M.style.width=`${F}px`,D!==null){D.style.top=`${N}`;const B=D.getBoundingClientRect(),z=B.height,H=B.width,U=k.getBoundingClientRect();$+H>U.right&&(M.style.left=`${U.right-H+window.pageXOffset}px`),(N+z>window.innerHeight||N+z>U.bottom)&&N-U.top>z+L&&(M.style.top=N-z+window.pageYOffset-L+"px")}M.isConnected||(w!=null&&(M.className=w),M.setAttribute("aria-label","Typeahead menu"),M.setAttribute("id","typeahead-menu"),M.setAttribute("role","listbox"),M.style.display="block",M.style.position="absolute",S.append(M)),_.current=M,k.setAttribute("aria-controls","typeahead-menu")}},[A,y,w,S]);O.useEffect(()=>{const k=A.getRootElement();if(y!==null)return C(),()=>{k!==null&&k.removeAttribute("aria-controls");const M=_.current;M!==null&&M.isConnected&&M.remove()}},[A,C,y]);const E=O.useCallback(k=>{y!==null&&(k||x(null))},[y,x]);return AJ(y,_.current,C,E),_}(d,p,s,u),g=O.useCallback(()=>{p(null),i!=null&&d!==null&&i()},[i,d]),v=O.useCallback(y=>{p(y),r!=null&&d===null&&r(y)},[r,d]);return O.useEffect(()=>{const y=f.registerUpdateListener(()=>{f.getEditorState().read(()=>{const x=f._window||window,w=x.document.createRange(),S=Ee(),A=function(E){let k=null;return E.getEditorState().read(()=>{const M=Ee();xe(M)&&(k=function(D){const $=D.anchor;if($.type!=="text")return null;const N=$.getNode();if(!N.isSimpleText())return null;const F=$.offset;return N.getTextContent().slice(0,F)}(M))}),k}(f);if(!xe(S)||!S.isCollapsed()||A===null||w===null)return void g();const _=a(A,f);if(t(_?_.matchingString:null),_!==null&&!function(E,k){return k===0&&E.getEditorState().read(()=>{const M=Ee();if(xe(M)){const D=M.anchor.getNode().getPreviousSibling();return _e(D)&&D.isTextEntity()}return!1})}(f,_.leadOffset)&&function(k,M,D){const $=D.getSelection();if($===null||!$.isCollapsed)return!1;const N=$.anchorNode,F=k,L=$.anchorOffset;if(N==null||L==null)return!1;try{M.setStart(N,F),M.setEnd(N,L)}catch{return!1}return!0}(_.leadOffset,w,x)!==null)return C=()=>v({getRect:()=>w.getBoundingClientRect(),match:_}),void(PT in O?O[PT](C):C());var C;g()})});return()=>{y()}},[f,a,t,d,g,v]),d===null||f===null?null:T.jsx(PJ,{close:g,resolution:d,editor:f,anchorElementRef:m,options:e,menuRenderFn:o,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:l})}const EJ=e=>{switch(e){case"sm":return"xs";case"md":return"sm";case"lg":return"md";default:return"sm"}},kJ=({data:e,by:t,size:n,nodeKey:r})=>{const[i]=Nr(),o=!i.isEditable(),a=f=>{f.stopPropagation(),f.preventDefault(),!o&&i.update(()=>{const d=vn(r);d&&d.remove()})};let s=e;typeof e=="object"&&(s=e[t]);const l=O.useCallback(f=>{const d=vn(r);if(!d||!d.isSelected())return!1;let p=!1;const m=d.getPreviousSibling();return ge(m)&&(m.selectEnd(),p=!0),_e(m)&&(m.select(),p=!0),Nt(m)&&(m.selectNext(),p=!0),m===null&&(d.selectPrevious(),p=!0),p&&f.preventDefault(),p},[r]),u=O.useCallback(f=>{const d=vn(r);if(!d||!d.isSelected())return!1;let p=!1;const m=d.getNextSibling();return ge(m)&&(m.selectStart(),p=!0),_e(m)&&(m.select(0,0),p=!0),Nt(m)&&(m.selectPrevious(),p=!0),m===null&&(d.selectNext(),p=!0),p&&f.preventDefault(),p},[r]);return O.useEffect(()=>{const f=Po(i.registerCommand(O1,l,Dl),i.registerCommand(S1,u,Dl));return()=>{f()}},[i,l,u]),T.jsx(Uf,{className:"inline-flex mr-0.5",type:"rounded",size:EJ(n),label:s,icon:null,closable:!0,onClose:a,disabled:o})};class Il extends qI{constructor(n,r,i,o){super(o);Yo(this,"__data");Yo(this,"__by");Yo(this,"__size");this.__data=n,this.__by=r,this.__size=i}static getType(){return"mention"}static clone(n){return new Il(n.__data,n.__by,n.__size,n.__key)}static importJSON(n){return rR(n.data,n.by,n.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:Il.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return T.jsx(kJ,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const rR=(e,t,n)=>new Il(e,t,n),MJ=e=>e instanceof Il;class jJ{constructor(t){Yo(this,"data");Yo(this,"key");Yo(this,"ref");Yo(this,"setRefElement");this.initData=t,this.key="",this.data=t,this.ref={current:null},this.setRefElement=n=>{this.ref.current=n}}}const tb=new Map;function NJ(e,t,n="name"){const[r,i]=O.useState([]);return O.useEffect(()=>{if(t===null){i([]);return}const o=tb.get(t);if(o!==null){if(o!==void 0){i(o);return}tb.set(t,null),$J.search(e,t,a=>{tb.set(t,a),i(a)},n)}},[t]),r}const $J={search(e,t,n,r){setTimeout(()=>{if(!Array.isArray(e))return[];const i=e.filter(o=>{var s;if(typeof o=="string")return o.toLowerCase().includes(t.toLowerCase());const a=(s=o==null?void 0:o[r])==null?void 0:s.toString();return a?a.toLowerCase().includes(t.toLowerCase()):!1});n(i)},500)}},Op=({size:e,className:t,children:n})=>T.jsx("ul",{role:"menu",className:G(xJ,wJ[e],t),children:n});Op.displayName="EditorCombobox";const iR=O.forwardRef(({size:e,children:t,selected:n=!1,className:r,...i},o)=>T.jsx("li",{role:"option",ref:o,className:G(_J,SJ[e],n&&OJ,r),...i,children:t}));iR.displayName="EditorCombobox.Item";Op.Item=iR;const DJ=({optionsArray:e,by:t="name",size:n="md",trigger:r="@",menuComponent:i=Op,menuItemComponent:o=Op.Item,autoSpace:a=!0})=>{const s=O.useRef(!1),l=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,u=[r].join(""),f="[^"+u+l+"\\s]",d="(?:\\.[ |$]| |["+l+"]|)",p=75,m=new RegExp(`(^|\\s|\\()([${u}]((?:${f}${d}){0,${p}}))$`),g=50,v=new RegExp(`(^|\\s|\\()([${u}]((?:${f}){0,${g}}))$`),y=M=>{let D=m.exec(M);if(D===null&&(D=v.exec(M)),D!==null){const $=D[1],N=D[3];if(N.length>=0)return{leadOffset:D.index+$.length,matchingString:N,replaceableString:D[2]}}return null},[x]=Nr(),[w,S]=O.useState(null),A=NJ(e,w,t),_=O.useCallback((M,D,$)=>{x.update(()=>{const N=rR(M.data,t,n);D&&D.replace(N),$()})},[x]),C=O.useMemo(()=>A.map(M=>new jJ(M)),[x,A]),E=O.useCallback(M=>{if(!a)return!1;const{key:D,ctrlKey:$,metaKey:N}=M;if($||N||D===" "||D.length>1||s.current)return s.current&&(s.current=!1),!1;const F=Ee(),{focus:L,anchor:W}=F,[B]=F.getNodes();if(!W||!L||(W==null?void 0:W.key)!==(L==null?void 0:L.key)||(W==null?void 0:W.offset)!==(L==null?void 0:L.offset)||!B)return!1;if(MJ(B)){const z=En(" ");return B.insertAfter(z),!0}return!1},[x,r,a]),k=O.useCallback(M=>{const{key:D}=M;return D==="Backspace"?(s.current=!0,!0):!1},[s]);return O.useEffect(()=>{if(x)return Po(x.registerCommand(JD,E,Dl),x.registerCommand(C1,k,Dl))},[x,E]),T.jsx(TJ,{onQueryChange:S,onSelectOption:_,triggerFn:y,options:C,menuRenderFn:(M,{selectedIndex:D,selectOptionAndCleanUp:$,setHighlightedIndex:N})=>M.current&&(C!=null&&C.length)?T.jsx(i,{size:n,children:C.map((F,L)=>{var W;return T.jsx(o,{ref:F.ref,size:n,selected:L===D,onMouseEnter:()=>{N(L)},onClick:()=>$(F),children:typeof F.data=="string"?F.data:(W=F.data)==null?void 0:W[t]},L)})}):null})},IJ={ltr:"ltr",rtl:"rtl",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5",h6:"editor-heading-h6"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listItem",listitemChecked:"editor-listItemChecked",listitemUnchecked:"editor-listItemUnchecked"},hashtag:"editor-hashtag",image:"editor-image",link:"editor-link",text:{bold:"editor-textBold",code:"editor-textCode",italic:"editor-textItalic",strikethrough:"editor-textStrikethrough",subscript:"editor-textSubscript",superscript:"editor-textSuperscript",underline:"editor-textUnderline",underlineStrikethrough:"editor-textUnderlineStrikethrough"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}},RJ=({content:e})=>T.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:T.jsx("span",{className:"truncate",children:e})});function LJ(e){console.error(e)}const BJ=`{ + "root": { + "children": [ + { + "children": [], + "direction": null, + "format": "", + "indent": 0, + "type": "paragraph", + "version": 1, + "textFormat": 0, + "textStyle": "" + } + ], + "direction": null, + "format": "", + "indent": 0, + "type": "root", + "version": 1 + } +}`,oR=O.forwardRef(({defaultValue:e="",placeholder:t="Press @ to view variable suggestions",onChange:n,size:r="md",autoFocus:i=!1,options:o,by:a="name",trigger:s="@",menuComponent:l,menuItemComponent:u,className:f,wrapperClassName:d,disabled:p=!1,autoSpaceAfterMention:m=!1},g)=>{const v={namespace:"Editor",editorTheme:IJ,onError:LJ,nodes:[Il],editorState:e||BJ,editable:!p},y=(S,A)=>{typeof n=="function"&&n(S,A)};let x,w;return O.isValidElement(l)&&(x=l),O.isValidElement(u)&&(w=u),T.jsx("div",{className:G("relative w-full",yJ,bJ[r],p&&vJ,d),children:T.jsxs(SZ,{initialConfig:v,children:[T.jsx("div",{className:"relative w-full [&_p]:m-0",children:T.jsx(XZ,{contentEditable:T.jsx(eJ,{className:G("editor-content focus-visible:outline-none outline-none",gJ,f)}),placeholder:T.jsx(RJ,{content:t}),ErrorBoundary:dJ})}),T.jsx(cJ,{}),T.jsx(DJ,{menuComponent:x,menuItemComponent:w,size:r,by:a,optionsArray:o,trigger:s,autoSpace:m}),T.jsx(pJ,{onChange:y,ignoreSelectionChange:!0}),g&&T.jsx(mJ,{editorRef:g}),i&&T.jsx(pX,{})]})})});oR.displayName="EditorInput";const FJ=(e,t,n,r)=>{const i=`absolute rounded-full transition-colors duration-500 ${n[r].dot}`;return e==="dot"?G(i,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):e==="number"?G(i,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):e==="icon"?G(i,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""},WJ=(e,t,n)=>G("relative flex items-center rounded-full justify-center transition-colors z-10 duration-500 ring-1",e?"ring-brand-primary-600":"ring-border-subtle",t[n].ring),zJ=(e,t)=>G("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),VJ={sm:{dot:"size-2.5",ring:"size-5",numberIcon:"size-5 text-tiny",icon:"size-5",label:"text-xs"},md:{dot:"size-3",ring:"size-6",numberIcon:"size-6 text-sm",icon:"size-6",label:"text-sm"},lg:{dot:"size-3.5",ring:"size-7",numberIcon:"size-7 text-md",icon:"size-7",label:"text-sm"}},aR=({variant:e="dot",size:t="sm",type:n="inline",currentStep:r=1,children:i,className:o,lineClassName:a="min-w-10",...s})=>{const l=O.Children.count(i);r===-1&&(r=l+1);const u=O.Children.map(i,(f,d)=>{const p=d+1{const m=UJ(a,r,n,s,l,t,f),g={lg:"left-[calc(50%+14px)] right-[calc(-50%+14px)]",md:"left-[calc(50%+12px)] right-[calc(-50%+12px)]",sm:"left-[calc(50%+10px)] right-[calc(-50%+10px)]"},v={lg:"top-3.5",md:"top-3",sm:"top-2.5"},y=()=>{if(e){const w=G(s[l].label,"text-text-tertiary",n?"text-brand-primary-600":"","break-word",o==="stack"?"mt-2 transform max-w-xs":"mx-2 max-w-32");return T.jsx("span",{className:w,children:e})}return null},x=()=>{if(!u){const w=G("block",r?"border-brand-primary-600":"border-border-subtle",d);return o==="stack"?T.jsx("div",{className:G("relative","flex","border-solid","border-y","absolute",r?"border-brand-primary-600":"border-border-subtle",v[l],g[l]),children:T.jsx("span",{className:"block"})}):T.jsx("div",{className:"flex-1",children:T.jsx("span",{className:G("mr-2 border-y border-solid",!e&&"ml-2",w)})})}return null};return o==="stack"?T.jsxs("div",{className:"relative flex-1 justify-center",children:[T.jsxs("div",{className:G("flex items-center flex-col",i),...p,children:[m,y()]}),x()]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:G("flex items-center",i),...p,children:[m,y()]}),x()]})};sR.displayName="ProgressSteps.Step";const UJ=(e,t,n,r,i,o,a)=>{if(t)return T.jsx(Bf,{className:zJ(r,i)});const s=WJ(!!n,r,i),l=FJ(e,n,r,i);let u=null;return e==="number"?u=a+1:e==="icon"&&o&&(u=o),T.jsx("span",{className:s,children:T.jsx("span",{className:l,children:u})})};aR.Step=sR;const KJ=({variant:e="rectangular",className:t,...n})=>{const r={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],i={circular:"size-10",rectangular:"w-96 h-3"}[e];return T.jsx("div",{className:G(r,"animate-pulse",i,t),...n})},lR=O.createContext({}),uR=()=>O.useContext(lR),No=({size:e="md",children:t,className:n})=>T.jsx(lR.Provider,{value:{size:e},children:T.jsx("div",{className:G("flex flex-col bg-background-primary p-2",n),children:t})});No.displayName="Menu";const cR=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:r=!0,onClick:i,children:o,className:a})=>{const[s,l]=O.useState(r),[u,f]=O.useState(!1),{size:d}=uR(),p="text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",m={sm:"text-xs",md:"text-sm"}[d??"md"],g={sm:"[&>svg]:size-4",md:"[&>svg]:size-5"}[d??"md"],v=()=>{l(!s),i&&i(!s)},y={open:{rotate:180},closed:{rotate:0}},x={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},w={visible:{opacity:1},hidden:{opacity:0}},S=()=>n?s||u?"visible":"hidden":"visible";return T.jsxs("div",{children:[T.jsxs("div",{role:"button",tabIndex:0,onClick:v,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&v()},onMouseEnter:()=>n&&f(!0),onMouseLeave:()=>n&&f(!1),className:G(p,m,e?"p-1":"p-0",a),"aria-expanded":s,children:[T.jsx("span",{className:"text-text-tertiary",children:e}),t&&T.jsx(hi.span,{variants:y,animate:s?"open":"closed",transition:{duration:.15},className:G("flex items-center text-border-strong",g),children:T.jsx(hi.div,{initial:"hidden",animate:S(),exit:"hidden",variants:w,transition:{duration:.15},children:T.jsx(Sw,{})})})]}),T.jsx(Ps,{initial:!1,children:s&&T.jsx(hi.ul,{variants:x,initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:o})})]})};cR.displayName="Menu.List";const fR=({disabled:e=!1,active:t,onClick:n,children:r,className:i})=>{const{size:o}=uR(),a="flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",s={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[o??"md"],l="hover:bg-background-secondary hover:text-text-primary",u=e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",f=t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"";return T.jsx("li",{role:"menuitem",tabIndex:0,onClick:n,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(n==null||n())},className:G(a,s,l,u,f,"transition-colors duration-300 ease-in-out",i),children:r})};fR.displayName="Menu.Item";const dR=({variant:e="solid",className:t})=>{const n={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e];return T.jsx(T.Fragment,{children:T.jsx("hr",{className:G("w-full border-0 border-t border-border-subtle",n,t)})})};dR.displayName="Menu.Separator";No.List=cR;No.Item=fR;No.Separator=dR;const hR=O.createContext({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),pR=({children:e,className:t,onCollapseChange:n,collapsible:r=!0,screenHeight:i=!0,borderOn:o=!0,...a})=>{const s=O.useRef(null),[l,u]=O.useState(()=>{const f=localStorage.getItem("sidebar-collapsed"),d=window.innerWidth<1280;return f?JSON.parse(f):d});return O.useEffect(()=>{n&&n(l)},[l,n]),O.useEffect(()=>{const f=()=>{const d=window.innerWidth<1280;if(!r)u(!1),localStorage.removeItem("sidebar-collapsed");else if(d)u(!0),localStorage.setItem("sidebar-collapsed",JSON.stringify(!0));else{const p=localStorage.getItem("sidebar-collapsed");u(p?JSON.parse(p):!1)}s.current&&(i?s.current.style.height=`${window.innerHeight}px`:s.current.style.height="auto")};return window.addEventListener("resize",f),f(),()=>{window.removeEventListener("resize",f)}},[i,r]),T.jsx(hR.Provider,{value:{isCollapsed:l,setIsCollapsed:u,collapsible:r},children:T.jsx("div",{ref:s,className:G("overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",o&&"border-0 border-r border-solid border-border-subtle",!!i&&"h-screen","transition-all duration-200",l&&"w-16 px-2",t),...a,children:e})})};pR.displayName="Sidebar";const mR=({children:e})=>T.jsx("div",{className:"space-y-2",children:e});mR.displayName="Sidebar.Header";const gR=({children:e})=>T.jsx("div",{className:G("space-y-4 grow items-start"),children:e});gR.displayName="Sidebar.Body";const yR=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:r}=O.useContext(hR);return T.jsxs("div",{className:"space-y-4",children:[e,r&&T.jsx("button",{className:G("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{n(!t),localStorage.setItem("sidebar-collapsed",JSON.stringify(!t))},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?T.jsx(T.Fragment,{children:T.jsx(Rw,{title:"Expand",children:T.jsx(nK,{className:"size-5"})})}):T.jsxs(T.Fragment,{children:[T.jsx(tK,{className:"size-5"})," Collapse"]})})]})};yR.displayName="Sidebar.Footer";const vR=({children:e,className:t})=>T.jsx("div",{className:G("w-full",t),children:e});vR.displayName="Sidebar.Item";const HJ=Object.assign(pR,{Header:mR,Body:gR,Footer:yR,Item:vR}),Lx={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},nd=O.createContext({sizes:Lx.sm}),Aa=({children:e,size:t="sm"})=>{const n=Lx[t]||Lx.sm;return T.jsx(nd.Provider,{value:{sizes:n},children:T.jsx("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:T.jsx("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};Aa.displayName="Breadcrumb";const bR=({children:e})=>T.jsx(T.Fragment,{children:e});bR.displayName="Breadcrumb.List";const xR=({children:e})=>T.jsx("li",{className:"m-0 inline-flex items-center gap-2",children:e});xR.displayName="Breadcrumb.Item";const wR=({href:e,children:t,className:n,as:r="a",...i})=>{const{sizes:o}=O.useContext(nd);return T.jsx(r,{href:e,className:G(o.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",n),...i,children:t})};wR.displayName="Breadcrumb.Link";const _R=({type:e})=>{const{sizes:t}=O.useContext(nd),n={slash:T.jsx("span",{className:G("mx-1",t.separator),children:"/"}),arrow:T.jsx(Ow,{size:t.separatorIconSize})};return T.jsx("span",{className:"flex items-center text-text-tertiary mx-2",children:n[e]||n.arrow})};_R.displayName="Breadcrumb.Separator";const SR=()=>{const{sizes:e}=O.useContext(nd);return T.jsx(Q8,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};SR.displayName="Breadcrumb.Ellipsis";const OR=({children:e})=>{const{sizes:t}=O.useContext(nd);return T.jsx("span",{className:G(t.text,"font-medium text-text-primary"),children:e})};OR.displayName="Breadcrumb.Page";Aa.List=bR;Aa.Item=xR;Aa.Link=wR;Aa.Separator=_R;Aa.Ellipsis=SR;Aa.Page=OR;const CR=O.createContext({}),bg=()=>O.useContext(CR),AR={open:{opacity:1},exit:{opacity:0}},PR={duration:.2},Wi=({open:e,setOpen:t,children:n,trigger:r=null,className:i,exitOnClickOutside:o=!1,exitOnEsc:a=!0,design:s="simple",scrollLock:l=!0})=>{const u=e!==void 0&&t!==void 0,[f,d]=O.useState(!1),p=O.useRef(null),m=O.useRef(null),g=O.useMemo(()=>u?e:f,[e,f]),v=O.useMemo(()=>u?t:d,[d,d]),y=()=>{g||v(!0)},x=()=>{g&&v(!1)},w=O.useCallback(()=>{var _;return O.isValidElement(r)?O.cloneElement(r,{onClick:Wc(y,(_=r==null?void 0:r.props)==null?void 0:_.onClick)}):typeof r=="function"?r({onClick:y}):null},[r,y,x]),S=_=>{switch(_.key){case"Escape":a&&x();break}},A=_=>{o&&p.current&&!p.current.contains(_.target)&&x()};return O.useEffect(()=>(window.addEventListener("keydown",S),document.addEventListener("mousedown",A),()=>{window.removeEventListener("keydown",S),document.removeEventListener("mousedown",A)}),[g]),O.useEffect(()=>{if(!l)return;const _=document.querySelector("html");return g&&_&&(_.style.overflow="hidden"),()=>{_&&(_.style.overflow="")}},[g]),T.jsxs(T.Fragment,{children:[w(),T.jsx(CR.Provider,{value:{open:g,setOpen:v,handleClose:x,design:s,dialogContainerRef:m,dialogRef:p},children:T.jsx("div",{ref:m,className:G("fixed z-999999 w-0 h-0 overflow-visible",i),children:n})})]})};Wi.displayName="Dialog";const TR=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:i}=bg();return T.jsx(Ps,{children:n&&T.jsx(hi.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:AR,role:"dialog",transition:PR,children:T.jsx("div",{className:"flex items-center justify-center min-h-full",children:T.jsx("div",{ref:i,className:G("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:typeof e=="function"?e({close:r}):e})})})})};TR.displayName="Dialog.Panel";const ER=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=bg();return r!=null&&r.current?T.jsx(T.Fragment,{children:Tl.createPortal(T.jsx(Ps,{children:n&&T.jsx(hi.div,{className:G("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",e),...t,initial:"exit",animate:"open",exit:"exit",variants:AR,transition:PR})}),r.current)}):null};ER.displayName="Dialog.Backdrop";const kR=({children:e,className:t,...n})=>T.jsx("div",{className:G("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});kR.displayName="Dialog.Header";const MR=({children:e,as:t="h3",className:n,...r})=>T.jsx(t,{className:G("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});MR.displayName="Dialog.Title";const jR=({children:e,as:t="p",className:n,...r})=>T.jsx(t,{className:G("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});jR.displayName="Dialog.Description";const GJ=({className:e,...t})=>T.jsx("button",{className:G("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:T.jsx(da,{className:"size-4 text-text-primary shrink-0"})}),NR=({children:e,as:t=O.Fragment,...n})=>{const{handleClose:r}=bg();return e?t===O.Fragment?typeof e=="function"?e({close:r}):O.cloneElement(e,{onClick:r}):T.jsx(t,{...n,onClick:r,children:e}):T.jsx(GJ,{onClick:r,...n})};NR.displayName="Dialog.CloseButton";const $R=({children:e,className:t,...n})=>T.jsx("div",{className:G("px-5",t),...n,children:e});$R.displayName="Dialog.Body";const DR=({children:e,className:t})=>{const{design:n,handleClose:r}=bg(),i=()=>e?typeof e=="function"?e({close:r}):e:null;return T.jsx("div",{className:G("p-4 flex justify-end gap-3",{"bg-background-secondary":n==="footer-divided"},t),children:i()})};DR.displayName="Dialog.Footer";Wi.Panel=TR;Wi.Title=MR;Wi.Description=jR;Wi.CloseButton=NR;Wi.Header=kR;Wi.Body=$R;Wi.Footer=DR;Wi.Backdrop=ER;const xu=({children:e,gap:t="lg",className:n,...r})=>T.jsx("div",{className:G("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",Mm(t),n),...r,children:e});xu.displayName="Topbar";const IR=({gap:e="sm",children:t,className:n})=>T.jsx("div",{className:G("flex items-center",Mm(e),n),children:t});IR.displayName="Topbar.Left";const RR=({gap:e="md",children:t,align:n="center",className:r})=>{const i={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return T.jsx("div",{className:G("flex items-center grow",Mm(e),i,r),children:t})};RR.displayName="Topbar.Middle";const LR=({gap:e="sm",children:t,className:n})=>T.jsx("div",{className:G("flex items-center",Mm(e),n),children:t});LR.displayName="Topbar.Right";const BR=({children:e,className:t})=>T.jsx("div",{className:G("flex items-center [&>svg]:block h-full",t),children:e});BR.displayName="Topbar.Item";xu.Left=IR;xu.Middle=RR;xu.Right=LR;xu.Item=BR;var Cp={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Cp.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",d=1,p=2,m=4,g=1,v=2,y=1,x=2,w=4,S=8,A=16,_=32,C=64,E=128,k=256,M=512,D=30,$="...",N=800,F=16,L=1,W=2,B=3,z=1/0,H=9007199254740991,U=17976931348623157e292,K=NaN,Y=4294967295,te=Y-1,ne=Y>>>1,ie=[["ary",E],["bind",y],["bindKey",x],["curry",S],["curryRight",A],["flip",M],["partial",_],["partialRight",C],["rearg",k]],ce="[object Arguments]",ae="[object Array]",le="[object AsyncFunction]",re="[object Boolean]",Q="[object Date]",fe="[object DOMException]",ye="[object Error]",X="[object Function]",Re="[object GeneratorFunction]",pe="[object Map]",Ie="[object Number]",Ze="[object Null]",tt="[object Object]",In="[object Promise]",Me="[object Proxy]",nt="[object RegExp]",Se="[object Set]",ze="[object String]",Lt="[object Symbol]",at="[object Undefined]",Wt="[object WeakMap]",$r="[object WeakSet]",pn="[object ArrayBuffer]",nn="[object DataView]",nr="[object Float32Array]",qe="[object Float64Array]",$t="[object Int8Array]",pt="[object Int16Array]",Sn="[object Int32Array]",Dr="[object Uint8Array]",Hi="[object Uint8ClampedArray]",qt="[object Uint16Array]",pr="[object Uint32Array]",Xt=/\b__p \+= '';/g,Ir=/\b(__p \+=) '' \+/g,lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gd=/&(?:amp|lt|gt|quot|#39);/g,yd=/[&<>"']/g,ay=RegExp(gd.source),Iu=RegExp(yd.source),Ru=/<%-([\s\S]+?)%>/g,RW=/<%([\s\S]+?)%>/g,uS=/<%=([\s\S]+?)%>/g,LW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,BW=/^\w*$/,FW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sy=/[\\^$.*+?()[\]{}|]/g,WW=RegExp(sy.source),ly=/^\s+/,zW=/\s/,VW=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,UW=/\{\n\/\* \[wrapped with (.+)\] \*/,KW=/,? & /,HW=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,GW=/[()=,{}\[\]\/\s]/,YW=/\\(\\)?/g,qW=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cS=/\w*$/,XW=/^[-+]0x[0-9a-f]+$/i,ZW=/^0b[01]+$/i,JW=/^\[object .+?Constructor\]$/,QW=/^0o[0-7]+$/i,ez=/^(?:0|[1-9]\d*)$/,tz=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vd=/($^)/,nz=/['\n\r\u2028\u2029\\]/g,bd="\\ud800-\\udfff",rz="\\u0300-\\u036f",iz="\\ufe20-\\ufe2f",oz="\\u20d0-\\u20ff",fS=rz+iz+oz,dS="\\u2700-\\u27bf",hS="a-z\\xdf-\\xf6\\xf8-\\xff",az="\\xac\\xb1\\xd7\\xf7",sz="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lz="\\u2000-\\u206f",uz=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pS="A-Z\\xc0-\\xd6\\xd8-\\xde",mS="\\ufe0e\\ufe0f",gS=az+sz+lz+uz,uy="['’]",cz="["+bd+"]",yS="["+gS+"]",xd="["+fS+"]",vS="\\d+",fz="["+dS+"]",bS="["+hS+"]",xS="[^"+bd+gS+vS+dS+hS+pS+"]",cy="\\ud83c[\\udffb-\\udfff]",dz="(?:"+xd+"|"+cy+")",wS="[^"+bd+"]",fy="(?:\\ud83c[\\udde6-\\uddff]){2}",dy="[\\ud800-\\udbff][\\udc00-\\udfff]",Ls="["+pS+"]",_S="\\u200d",SS="(?:"+bS+"|"+xS+")",hz="(?:"+Ls+"|"+xS+")",OS="(?:"+uy+"(?:d|ll|m|re|s|t|ve))?",CS="(?:"+uy+"(?:D|LL|M|RE|S|T|VE))?",AS=dz+"?",PS="["+mS+"]?",pz="(?:"+_S+"(?:"+[wS,fy,dy].join("|")+")"+PS+AS+")*",mz="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gz="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",TS=PS+AS+pz,yz="(?:"+[fz,fy,dy].join("|")+")"+TS,vz="(?:"+[wS+xd+"?",xd,fy,dy,cz].join("|")+")",bz=RegExp(uy,"g"),xz=RegExp(xd,"g"),hy=RegExp(cy+"(?="+cy+")|"+vz+TS,"g"),wz=RegExp([Ls+"?"+bS+"+"+OS+"(?="+[yS,Ls,"$"].join("|")+")",hz+"+"+CS+"(?="+[yS,Ls+SS,"$"].join("|")+")",Ls+"?"+SS+"+"+OS,Ls+"+"+CS,gz,mz,vS,yz].join("|"),"g"),_z=RegExp("["+_S+bd+fS+mS+"]"),Sz=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Oz=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Cz=-1,Et={};Et[nr]=Et[qe]=Et[$t]=Et[pt]=Et[Sn]=Et[Dr]=Et[Hi]=Et[qt]=Et[pr]=!0,Et[ce]=Et[ae]=Et[pn]=Et[re]=Et[nn]=Et[Q]=Et[ye]=Et[X]=Et[pe]=Et[Ie]=Et[tt]=Et[nt]=Et[Se]=Et[ze]=Et[Wt]=!1;var St={};St[ce]=St[ae]=St[pn]=St[nn]=St[re]=St[Q]=St[nr]=St[qe]=St[$t]=St[pt]=St[Sn]=St[pe]=St[Ie]=St[tt]=St[nt]=St[Se]=St[ze]=St[Lt]=St[Dr]=St[Hi]=St[qt]=St[pr]=!0,St[ye]=St[X]=St[Wt]=!1;var Az={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Pz={"&":"&","<":"<",">":">",'"':""","'":"'"},Tz={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ez={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kz=parseFloat,Mz=parseInt,ES=typeof Qe.commonjsGlobal=="object"&&Qe.commonjsGlobal&&Qe.commonjsGlobal.Object===Object&&Qe.commonjsGlobal,jz=typeof self=="object"&&self&&self.Object===Object&&self,On=ES||jz||Function("return this")(),py=t&&!t.nodeType&&t,ja=py&&!0&&e&&!e.nodeType&&e,kS=ja&&ja.exports===py,my=kS&&ES.process,Rr=function(){try{var Z=ja&&ja.require&&ja.require("util").types;return Z||my&&my.binding&&my.binding("util")}catch{}}(),MS=Rr&&Rr.isArrayBuffer,jS=Rr&&Rr.isDate,NS=Rr&&Rr.isMap,$S=Rr&&Rr.isRegExp,DS=Rr&&Rr.isSet,IS=Rr&&Rr.isTypedArray;function mr(Z,ue,oe){switch(oe.length){case 0:return Z.call(ue);case 1:return Z.call(ue,oe[0]);case 2:return Z.call(ue,oe[0],oe[1]);case 3:return Z.call(ue,oe[0],oe[1],oe[2])}return Z.apply(ue,oe)}function Nz(Z,ue,oe,Ce){for(var We=-1,st=Z==null?0:Z.length;++We-1}function gy(Z,ue,oe){for(var Ce=-1,We=Z==null?0:Z.length;++Ce-1;);return oe}function US(Z,ue){for(var oe=Z.length;oe--&&Bs(ue,Z[oe],0)>-1;);return oe}function zz(Z,ue){for(var oe=Z.length,Ce=0;oe--;)Z[oe]===ue&&++Ce;return Ce}var Vz=xy(Az),Uz=xy(Pz);function Kz(Z){return"\\"+Ez[Z]}function Hz(Z,ue){return Z==null?n:Z[ue]}function Fs(Z){return _z.test(Z)}function Gz(Z){return Sz.test(Z)}function Yz(Z){for(var ue,oe=[];!(ue=Z.next()).done;)oe.push(ue.value);return oe}function Oy(Z){var ue=-1,oe=Array(Z.size);return Z.forEach(function(Ce,We){oe[++ue]=[We,Ce]}),oe}function KS(Z,ue){return function(oe){return Z(ue(oe))}}function Wo(Z,ue){for(var oe=-1,Ce=Z.length,We=0,st=[];++oe-1}function D3(c,h){var b=this.__data__,P=Ld(b,c);return P<0?(++this.size,b.push([c,h])):b[P][1]=h,this}Gi.prototype.clear=M3,Gi.prototype.delete=j3,Gi.prototype.get=N3,Gi.prototype.has=$3,Gi.prototype.set=D3;function Yi(c){var h=-1,b=c==null?0:c.length;for(this.clear();++h=h?c:h)),c}function Wr(c,h,b,P,j,R){var V,q=h&d,J=h&p,de=h&m;if(b&&(V=j?b(c,P,j,R):b(c)),V!==n)return V;if(!Bt(c))return c;var he=Ve(c);if(he){if(V=B5(c),!q)return rr(c,V)}else{var me=Ln(c),be=me==X||me==Re;if(Go(c))return PO(c,q);if(me==tt||me==ce||be&&!j){if(V=J||be?{}:HO(c),!q)return J?T5(c,Z3(V,c)):P5(c,rO(V,c))}else{if(!St[me])return j?c:{};V=F5(c,me,q)}}R||(R=new ti);var Pe=R.get(c);if(Pe)return Pe;R.set(c,V),wC(c)?c.forEach(function(Ne){V.add(Wr(Ne,h,b,Ne,c,R))}):bC(c)&&c.forEach(function(Ne,Je){V.set(Je,Wr(Ne,h,b,Je,c,R))});var je=de?J?Xy:qy:J?or:mn,Ye=he?n:je(c);return Lr(Ye||c,function(Ne,Je){Ye&&(Je=Ne,Ne=c[Je]),Uu(V,Je,Wr(Ne,h,b,Je,c,R))}),V}function J3(c){var h=mn(c);return function(b){return iO(b,c,h)}}function iO(c,h,b){var P=b.length;if(c==null)return!P;for(c=xt(c);P--;){var j=b[P],R=h[j],V=c[j];if(V===n&&!(j in c)||!R(V))return!1}return!0}function oO(c,h,b){if(typeof c!="function")throw new Br(a);return Zu(function(){c.apply(n,b)},h)}function Ku(c,h,b,P){var j=-1,R=wd,V=!0,q=c.length,J=[],de=h.length;if(!q)return J;b&&(h=Dt(h,gr(b))),P?(R=gy,V=!1):h.length>=i&&(R=Lu,V=!1,h=new Da(h));e:for(;++jj?0:j+b),P=P===n||P>j?j:Ke(P),P<0&&(P+=j),P=b>P?0:SC(P);b0&&b(q)?h>1?Cn(q,h-1,b,P,j):Fo(j,q):P||(j[j.length]=q)}return j}var My=NO(),lO=NO(!0);function xi(c,h){return c&&My(c,h,mn)}function jy(c,h){return c&&lO(c,h,mn)}function Fd(c,h){return Bo(h,function(b){return Qi(c[b])})}function Ra(c,h){h=Ko(h,c);for(var b=0,P=h.length;c!=null&&bh}function t5(c,h){return c!=null&&mt.call(c,h)}function n5(c,h){return c!=null&&h in xt(c)}function r5(c,h,b){return c>=Rn(h,b)&&c=120&&he.length>=120)?new Da(V&&he):n}he=c[0];var me=-1,be=q[0];e:for(;++me-1;)q!==c&&Md.call(q,J,1),Md.call(c,J,1);return c}function bO(c,h){for(var b=c?h.length:0,P=b-1;b--;){var j=h[b];if(b==P||j!==R){var R=j;Ji(j)?Md.call(c,j,1):zy(c,j)}}return c}function By(c,h){return c+$d(QS()*(h-c+1))}function g5(c,h,b,P){for(var j=-1,R=on(Nd((h-c)/(b||1)),0),V=oe(R);R--;)V[P?R:++j]=c,c+=b;return V}function Fy(c,h){var b="";if(!c||h<1||h>H)return b;do h%2&&(b+=c),h=$d(h/2),h&&(c+=c);while(h);return b}function Xe(c,h){return rv(qO(c,h,ar),c+"")}function y5(c){return nO(Zs(c))}function v5(c,h){var b=Zs(c);return Zd(b,Ia(h,0,b.length))}function Yu(c,h,b,P){if(!Bt(c))return c;h=Ko(h,c);for(var j=-1,R=h.length,V=R-1,q=c;q!=null&&++jj?0:j+h),b=b>j?j:b,b<0&&(b+=j),j=h>b?0:b-h>>>0,h>>>=0;for(var R=oe(j);++P>>1,V=c[R];V!==null&&!vr(V)&&(b?V<=h:V=i){var de=h?null:j5(c);if(de)return Sd(de);V=!1,j=Lu,J=new Da}else J=h?[]:q;e:for(;++P=P?c:zr(c,h,b)}var AO=u3||function(c){return On.clearTimeout(c)};function PO(c,h){if(h)return c.slice();var b=c.length,P=YS?YS(b):new c.constructor(b);return c.copy(P),P}function Hy(c){var h=new c.constructor(c.byteLength);return new Ed(h).set(new Ed(c)),h}function S5(c,h){var b=h?Hy(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function O5(c){var h=new c.constructor(c.source,cS.exec(c));return h.lastIndex=c.lastIndex,h}function C5(c){return Vu?xt(Vu.call(c)):{}}function TO(c,h){var b=h?Hy(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function EO(c,h){if(c!==h){var b=c!==n,P=c===null,j=c===c,R=vr(c),V=h!==n,q=h===null,J=h===h,de=vr(h);if(!q&&!de&&!R&&c>h||R&&V&&J&&!q&&!de||P&&V&&J||!b&&J||!j)return 1;if(!P&&!R&&!de&&c=q)return J;var de=b[P];return J*(de=="desc"?-1:1)}}return c.index-h.index}function kO(c,h,b,P){for(var j=-1,R=c.length,V=b.length,q=-1,J=h.length,de=on(R-V,0),he=oe(J+de),me=!P;++q1?b[j-1]:n,V=j>2?b[2]:n;for(R=c.length>3&&typeof R=="function"?(j--,R):n,V&&Gn(b[0],b[1],V)&&(R=j<3?n:R,j=1),h=xt(h);++P-1?j[R?h[V]:V]:n}}function IO(c){return Zi(function(h){var b=h.length,P=b,j=Fr.prototype.thru;for(c&&h.reverse();P--;){var R=h[P];if(typeof R!="function")throw new Br(a);if(j&&!V&&qd(R)=="wrapper")var V=new Fr([],!0)}for(P=V?P:b;++P1&&it.reverse(),he&&Jq))return!1;var de=R.get(c),he=R.get(h);if(de&&he)return de==h&&he==c;var me=-1,be=!0,Pe=b&v?new Da:n;for(R.set(c,h),R.set(h,c);++me1?"& ":"")+h[P],h=h.join(b>2?", ":" "),c.replace(VW,`{ +/* [wrapped with `+h+`] */ +`)}function z5(c){return Ve(c)||Fa(c)||!!(ZS&&c&&c[ZS])}function Ji(c,h){var b=typeof c;return h=h??H,!!h&&(b=="number"||b!="symbol"&&ez.test(c))&&c>-1&&c%1==0&&c0){if(++h>=N)return arguments[0]}else h=0;return c.apply(n,arguments)}}function Zd(c,h){var b=-1,P=c.length,j=P-1;for(h=h===n?P:h;++b1?c[h-1]:n;return b=typeof b=="function"?(c.pop(),b):n,sC(c,b)});function lC(c){var h=I(c);return h.__chain__=!0,h}function QV(c,h){return h(c),c}function Jd(c,h){return h(c)}var eU=Zi(function(c){var h=c.length,b=h?c[0]:0,P=this.__wrapped__,j=function(R){return ky(R,c)};return h>1||this.__actions__.length||!(P instanceof rt)||!Ji(b)?this.thru(j):(P=P.slice(b,+b+(h?1:0)),P.__actions__.push({func:Jd,args:[j],thisArg:n}),new Fr(P,this.__chain__).thru(function(R){return h&&!R.length&&R.push(n),R}))});function tU(){return lC(this)}function nU(){return new Fr(this.value(),this.__chain__)}function rU(){this.__values__===n&&(this.__values__=_C(this.value()));var c=this.__index__>=this.__values__.length,h=c?n:this.__values__[this.__index__++];return{done:c,value:h}}function iU(){return this}function oU(c){for(var h,b=this;b instanceof Rd;){var P=tC(b);P.__index__=0,P.__values__=n,h?j.__wrapped__=P:h=P;var j=P;b=b.__wrapped__}return j.__wrapped__=c,h}function aU(){var c=this.__wrapped__;if(c instanceof rt){var h=c;return this.__actions__.length&&(h=new rt(this)),h=h.reverse(),h.__actions__.push({func:Jd,args:[iv],thisArg:n}),new Fr(h,this.__chain__)}return this.thru(iv)}function sU(){return OO(this.__wrapped__,this.__actions__)}var lU=Ud(function(c,h,b){mt.call(c,b)?++c[b]:qi(c,b,1)});function uU(c,h,b){var P=Ve(c)?RS:Q3;return b&&Gn(c,h,b)&&(h=n),P(c,ke(h,3))}function cU(c,h){var b=Ve(c)?Bo:sO;return b(c,ke(h,3))}var fU=DO(nC),dU=DO(rC);function hU(c,h){return Cn(Qd(c,h),1)}function pU(c,h){return Cn(Qd(c,h),z)}function mU(c,h,b){return b=b===n?1:Ke(b),Cn(Qd(c,h),b)}function uC(c,h){var b=Ve(c)?Lr:Vo;return b(c,ke(h,3))}function cC(c,h){var b=Ve(c)?$z:aO;return b(c,ke(h,3))}var gU=Ud(function(c,h,b){mt.call(c,b)?c[b].push(h):qi(c,b,[h])});function yU(c,h,b,P){c=ir(c)?c:Zs(c),b=b&&!P?Ke(b):0;var j=c.length;return b<0&&(b=on(j+b,0)),ih(c)?b<=j&&c.indexOf(h,b)>-1:!!j&&Bs(c,h,b)>-1}var vU=Xe(function(c,h,b){var P=-1,j=typeof h=="function",R=ir(c)?oe(c.length):[];return Vo(c,function(V){R[++P]=j?mr(h,V,b):Hu(V,h,b)}),R}),bU=Ud(function(c,h,b){qi(c,b,h)});function Qd(c,h){var b=Ve(c)?Dt:hO;return b(c,ke(h,3))}function xU(c,h,b,P){return c==null?[]:(Ve(h)||(h=h==null?[]:[h]),b=P?n:b,Ve(b)||(b=b==null?[]:[b]),yO(c,h,b))}var wU=Ud(function(c,h,b){c[b?0:1].push(h)},function(){return[[],[]]});function _U(c,h,b){var P=Ve(c)?yy:WS,j=arguments.length<3;return P(c,ke(h,4),b,j,Vo)}function SU(c,h,b){var P=Ve(c)?Dz:WS,j=arguments.length<3;return P(c,ke(h,4),b,j,aO)}function OU(c,h){var b=Ve(c)?Bo:sO;return b(c,nh(ke(h,3)))}function CU(c){var h=Ve(c)?nO:y5;return h(c)}function AU(c,h,b){(b?Gn(c,h,b):h===n)?h=1:h=Ke(h);var P=Ve(c)?Y3:v5;return P(c,h)}function PU(c){var h=Ve(c)?q3:x5;return h(c)}function TU(c){if(c==null)return 0;if(ir(c))return ih(c)?Ws(c):c.length;var h=Ln(c);return h==pe||h==Se?c.size:Iy(c).length}function EU(c,h,b){var P=Ve(c)?vy:w5;return b&&Gn(c,h,b)&&(h=n),P(c,ke(h,3))}var kU=Xe(function(c,h){if(c==null)return[];var b=h.length;return b>1&&Gn(c,h[0],h[1])?h=[]:b>2&&Gn(h[0],h[1],h[2])&&(h=[h[0]]),yO(c,Cn(h,1),[])}),eh=c3||function(){return On.Date.now()};function MU(c,h){if(typeof h!="function")throw new Br(a);return c=Ke(c),function(){if(--c<1)return h.apply(this,arguments)}}function fC(c,h,b){return h=b?n:h,h=c&&h==null?c.length:h,Xi(c,E,n,n,n,n,h)}function dC(c,h){var b;if(typeof h!="function")throw new Br(a);return c=Ke(c),function(){return--c>0&&(b=h.apply(this,arguments)),c<=1&&(h=n),b}}var av=Xe(function(c,h,b){var P=y;if(b.length){var j=Wo(b,qs(av));P|=_}return Xi(c,P,h,b,j)}),hC=Xe(function(c,h,b){var P=y|x;if(b.length){var j=Wo(b,qs(hC));P|=_}return Xi(h,P,c,b,j)});function pC(c,h,b){h=b?n:h;var P=Xi(c,S,n,n,n,n,n,h);return P.placeholder=pC.placeholder,P}function mC(c,h,b){h=b?n:h;var P=Xi(c,A,n,n,n,n,n,h);return P.placeholder=mC.placeholder,P}function gC(c,h,b){var P,j,R,V,q,J,de=0,he=!1,me=!1,be=!0;if(typeof c!="function")throw new Br(a);h=Ur(h)||0,Bt(b)&&(he=!!b.leading,me="maxWait"in b,R=me?on(Ur(b.maxWait)||0,h):R,be="trailing"in b?!!b.trailing:be);function Pe(Ht){var ri=P,to=j;return P=j=n,de=Ht,V=c.apply(to,ri),V}function je(Ht){return de=Ht,q=Zu(Je,h),he?Pe(Ht):V}function Ye(Ht){var ri=Ht-J,to=Ht-de,DC=h-ri;return me?Rn(DC,R-to):DC}function Ne(Ht){var ri=Ht-J,to=Ht-de;return J===n||ri>=h||ri<0||me&&to>=R}function Je(){var Ht=eh();if(Ne(Ht))return it(Ht);q=Zu(Je,Ye(Ht))}function it(Ht){return q=n,be&&P?Pe(Ht):(P=j=n,V)}function br(){q!==n&&AO(q),de=0,P=J=j=q=n}function Yn(){return q===n?V:it(eh())}function xr(){var Ht=eh(),ri=Ne(Ht);if(P=arguments,j=this,J=Ht,ri){if(q===n)return je(J);if(me)return AO(q),q=Zu(Je,h),Pe(J)}return q===n&&(q=Zu(Je,h)),V}return xr.cancel=br,xr.flush=Yn,xr}var jU=Xe(function(c,h){return oO(c,1,h)}),NU=Xe(function(c,h,b){return oO(c,Ur(h)||0,b)});function $U(c){return Xi(c,M)}function th(c,h){if(typeof c!="function"||h!=null&&typeof h!="function")throw new Br(a);var b=function(){var P=arguments,j=h?h.apply(this,P):P[0],R=b.cache;if(R.has(j))return R.get(j);var V=c.apply(this,P);return b.cache=R.set(j,V)||R,V};return b.cache=new(th.Cache||Yi),b}th.Cache=Yi;function nh(c){if(typeof c!="function")throw new Br(a);return function(){var h=arguments;switch(h.length){case 0:return!c.call(this);case 1:return!c.call(this,h[0]);case 2:return!c.call(this,h[0],h[1]);case 3:return!c.call(this,h[0],h[1],h[2])}return!c.apply(this,h)}}function DU(c){return dC(2,c)}var IU=_5(function(c,h){h=h.length==1&&Ve(h[0])?Dt(h[0],gr(ke())):Dt(Cn(h,1),gr(ke()));var b=h.length;return Xe(function(P){for(var j=-1,R=Rn(P.length,b);++j=h}),Fa=cO(function(){return arguments}())?cO:function(c){return zt(c)&&mt.call(c,"callee")&&!XS.call(c,"callee")},Ve=oe.isArray,ZU=MS?gr(MS):o5;function ir(c){return c!=null&&rh(c.length)&&!Qi(c)}function Kt(c){return zt(c)&&ir(c)}function JU(c){return c===!0||c===!1||zt(c)&&Hn(c)==re}var Go=d3||vv,QU=jS?gr(jS):a5;function e4(c){return zt(c)&&c.nodeType===1&&!Ju(c)}function t4(c){if(c==null)return!0;if(ir(c)&&(Ve(c)||typeof c=="string"||typeof c.splice=="function"||Go(c)||Xs(c)||Fa(c)))return!c.length;var h=Ln(c);if(h==pe||h==Se)return!c.size;if(Xu(c))return!Iy(c).length;for(var b in c)if(mt.call(c,b))return!1;return!0}function n4(c,h){return Gu(c,h)}function r4(c,h,b){b=typeof b=="function"?b:n;var P=b?b(c,h):n;return P===n?Gu(c,h,n,b):!!P}function lv(c){if(!zt(c))return!1;var h=Hn(c);return h==ye||h==fe||typeof c.message=="string"&&typeof c.name=="string"&&!Ju(c)}function i4(c){return typeof c=="number"&&JS(c)}function Qi(c){if(!Bt(c))return!1;var h=Hn(c);return h==X||h==Re||h==le||h==Me}function vC(c){return typeof c=="number"&&c==Ke(c)}function rh(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=H}function Bt(c){var h=typeof c;return c!=null&&(h=="object"||h=="function")}function zt(c){return c!=null&&typeof c=="object"}var bC=NS?gr(NS):l5;function o4(c,h){return c===h||Dy(c,h,Jy(h))}function a4(c,h,b){return b=typeof b=="function"?b:n,Dy(c,h,Jy(h),b)}function s4(c){return xC(c)&&c!=+c}function l4(c){if(K5(c))throw new We(o);return fO(c)}function u4(c){return c===null}function c4(c){return c==null}function xC(c){return typeof c=="number"||zt(c)&&Hn(c)==Ie}function Ju(c){if(!zt(c)||Hn(c)!=tt)return!1;var h=kd(c);if(h===null)return!0;var b=mt.call(h,"constructor")&&h.constructor;return typeof b=="function"&&b instanceof b&&Ad.call(b)==a3}var uv=$S?gr($S):u5;function f4(c){return vC(c)&&c>=-H&&c<=H}var wC=DS?gr(DS):c5;function ih(c){return typeof c=="string"||!Ve(c)&&zt(c)&&Hn(c)==ze}function vr(c){return typeof c=="symbol"||zt(c)&&Hn(c)==Lt}var Xs=IS?gr(IS):f5;function d4(c){return c===n}function h4(c){return zt(c)&&Ln(c)==Wt}function p4(c){return zt(c)&&Hn(c)==$r}var m4=Yd(Ry),g4=Yd(function(c,h){return c<=h});function _C(c){if(!c)return[];if(ir(c))return ih(c)?ei(c):rr(c);if(Bu&&c[Bu])return Yz(c[Bu]());var h=Ln(c),b=h==pe?Oy:h==Se?Sd:Zs;return b(c)}function eo(c){if(!c)return c===0?c:0;if(c=Ur(c),c===z||c===-z){var h=c<0?-1:1;return h*U}return c===c?c:0}function Ke(c){var h=eo(c),b=h%1;return h===h?b?h-b:h:0}function SC(c){return c?Ia(Ke(c),0,Y):0}function Ur(c){if(typeof c=="number")return c;if(vr(c))return K;if(Bt(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=Bt(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=zS(c);var b=ZW.test(c);return b||QW.test(c)?Mz(c.slice(2),b?2:8):XW.test(c)?K:+c}function OC(c){return wi(c,or(c))}function y4(c){return c?Ia(Ke(c),-H,H):c===0?c:0}function ut(c){return c==null?"":yr(c)}var v4=Gs(function(c,h){if(Xu(h)||ir(h)){wi(h,mn(h),c);return}for(var b in h)mt.call(h,b)&&Uu(c,b,h[b])}),CC=Gs(function(c,h){wi(h,or(h),c)}),oh=Gs(function(c,h,b,P){wi(h,or(h),c,P)}),b4=Gs(function(c,h,b,P){wi(h,mn(h),c,P)}),x4=Zi(ky);function w4(c,h){var b=Hs(c);return h==null?b:rO(b,h)}var _4=Xe(function(c,h){c=xt(c);var b=-1,P=h.length,j=P>2?h[2]:n;for(j&&Gn(h[0],h[1],j)&&(P=1);++b1),R}),wi(c,Xy(c),b),P&&(b=Wr(b,d|p|m,N5));for(var j=h.length;j--;)zy(b,h[j]);return b});function F4(c,h){return PC(c,nh(ke(h)))}var W4=Zi(function(c,h){return c==null?{}:p5(c,h)});function PC(c,h){if(c==null)return{};var b=Dt(Xy(c),function(P){return[P]});return h=ke(h),vO(c,b,function(P,j){return h(P,j[0])})}function z4(c,h,b){h=Ko(h,c);var P=-1,j=h.length;for(j||(j=1,c=n);++Ph){var P=c;c=h,h=P}if(b||c%1||h%1){var j=QS();return Rn(c+j*(h-c+kz("1e-"+((j+"").length-1))),h)}return By(c,h)}var Q4=Ys(function(c,h,b){return h=h.toLowerCase(),c+(b?kC(h):h)});function kC(c){return dv(ut(c).toLowerCase())}function MC(c){return c=ut(c),c&&c.replace(tz,Vz).replace(xz,"")}function e6(c,h,b){c=ut(c),h=yr(h);var P=c.length;b=b===n?P:Ia(Ke(b),0,P);var j=b;return b-=h.length,b>=0&&c.slice(b,j)==h}function t6(c){return c=ut(c),c&&Iu.test(c)?c.replace(yd,Uz):c}function n6(c){return c=ut(c),c&&WW.test(c)?c.replace(sy,"\\$&"):c}var r6=Ys(function(c,h,b){return c+(b?"-":"")+h.toLowerCase()}),i6=Ys(function(c,h,b){return c+(b?" ":"")+h.toLowerCase()}),o6=$O("toLowerCase");function a6(c,h,b){c=ut(c),h=Ke(h);var P=h?Ws(c):0;if(!h||P>=h)return c;var j=(h-P)/2;return Gd($d(j),b)+c+Gd(Nd(j),b)}function s6(c,h,b){c=ut(c),h=Ke(h);var P=h?Ws(c):0;return h&&P>>0,b?(c=ut(c),c&&(typeof h=="string"||h!=null&&!uv(h))&&(h=yr(h),!h&&Fs(c))?Ho(ei(c),0,b):c.split(h,b)):[]}var p6=Ys(function(c,h,b){return c+(b?" ":"")+dv(h)});function m6(c,h,b){return c=ut(c),b=b==null?0:Ia(Ke(b),0,c.length),h=yr(h),c.slice(b,b+h.length)==h}function g6(c,h,b){var P=I.templateSettings;b&&Gn(c,h,b)&&(h=n),c=ut(c),h=oh({},h,P,WO);var j=oh({},h.imports,P.imports,WO),R=mn(j),V=Sy(j,R),q,J,de=0,he=h.interpolate||vd,me="__p += '",be=Cy((h.escape||vd).source+"|"+he.source+"|"+(he===uS?qW:vd).source+"|"+(h.evaluate||vd).source+"|$","g"),Pe="//# sourceURL="+(mt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Cz+"]")+` +`;c.replace(be,function(Ne,Je,it,br,Yn,xr){return it||(it=br),me+=c.slice(de,xr).replace(nz,Kz),Je&&(q=!0,me+=`' + +__e(`+Je+`) + +'`),Yn&&(J=!0,me+=`'; +`+Yn+`; +__p += '`),it&&(me+=`' + +((__t = (`+it+`)) == null ? '' : __t) + +'`),de=xr+Ne.length,Ne}),me+=`'; +`;var je=mt.call(h,"variable")&&h.variable;if(!je)me=`with (obj) { +`+me+` +} +`;else if(GW.test(je))throw new We(s);me=(J?me.replace(Xt,""):me).replace(Ir,"$1").replace(lt,"$1;"),me="function("+(je||"obj")+`) { +`+(je?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(q?", __e = _.escape":"")+(J?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+me+`return __p +}`;var Ye=NC(function(){return st(R,Pe+"return "+me).apply(n,V)});if(Ye.source=me,lv(Ye))throw Ye;return Ye}function y6(c){return ut(c).toLowerCase()}function v6(c){return ut(c).toUpperCase()}function b6(c,h,b){if(c=ut(c),c&&(b||h===n))return zS(c);if(!c||!(h=yr(h)))return c;var P=ei(c),j=ei(h),R=VS(P,j),V=US(P,j)+1;return Ho(P,R,V).join("")}function x6(c,h,b){if(c=ut(c),c&&(b||h===n))return c.slice(0,HS(c)+1);if(!c||!(h=yr(h)))return c;var P=ei(c),j=US(P,ei(h))+1;return Ho(P,0,j).join("")}function w6(c,h,b){if(c=ut(c),c&&(b||h===n))return c.replace(ly,"");if(!c||!(h=yr(h)))return c;var P=ei(c),j=VS(P,ei(h));return Ho(P,j).join("")}function _6(c,h){var b=D,P=$;if(Bt(h)){var j="separator"in h?h.separator:j;b="length"in h?Ke(h.length):b,P="omission"in h?yr(h.omission):P}c=ut(c);var R=c.length;if(Fs(c)){var V=ei(c);R=V.length}if(b>=R)return c;var q=b-Ws(P);if(q<1)return P;var J=V?Ho(V,0,q).join(""):c.slice(0,q);if(j===n)return J+P;if(V&&(q+=J.length-q),uv(j)){if(c.slice(q).search(j)){var de,he=J;for(j.global||(j=Cy(j.source,ut(cS.exec(j))+"g")),j.lastIndex=0;de=j.exec(he);)var me=de.index;J=J.slice(0,me===n?q:me)}}else if(c.indexOf(yr(j),q)!=q){var be=J.lastIndexOf(j);be>-1&&(J=J.slice(0,be))}return J+P}function S6(c){return c=ut(c),c&&ay.test(c)?c.replace(gd,Jz):c}var O6=Ys(function(c,h,b){return c+(b?" ":"")+h.toUpperCase()}),dv=$O("toUpperCase");function jC(c,h,b){return c=ut(c),h=b?n:h,h===n?Gz(c)?t3(c):Lz(c):c.match(h)||[]}var NC=Xe(function(c,h){try{return mr(c,n,h)}catch(b){return lv(b)?b:new We(b)}}),C6=Zi(function(c,h){return Lr(h,function(b){b=_i(b),qi(c,b,av(c[b],c))}),c});function A6(c){var h=c==null?0:c.length,b=ke();return c=h?Dt(c,function(P){if(typeof P[1]!="function")throw new Br(a);return[b(P[0]),P[1]]}):[],Xe(function(P){for(var j=-1;++jH)return[];var b=Y,P=Rn(c,Y);h=ke(h),c-=Y;for(var j=_y(P,h);++b0||h<0)?new rt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),h!==n&&(h=Ke(h),b=h<0?b.dropRight(-h):b.take(h-c)),b)},rt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},rt.prototype.toArray=function(){return this.take(Y)},xi(rt.prototype,function(c,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),P=/^(?:head|last)$/.test(h),j=I[P?"take"+(h=="last"?"Right":""):h],R=P||/^find/.test(h);j&&(I.prototype[h]=function(){var V=this.__wrapped__,q=P?[1]:arguments,J=V instanceof rt,de=q[0],he=J||Ve(V),me=function(Je){var it=j.apply(I,Fo([Je],q));return P&&be?it[0]:it};he&&b&&typeof de=="function"&&de.length!=1&&(J=he=!1);var be=this.__chain__,Pe=!!this.__actions__.length,je=R&&!be,Ye=J&&!Pe;if(!R&&he){V=Ye?V:new rt(this);var Ne=c.apply(V,q);return Ne.__actions__.push({func:Jd,args:[me],thisArg:n}),new Fr(Ne,be)}return je&&Ye?c.apply(this,q):(Ne=this.thru(me),je?P?Ne.value()[0]:Ne.value():Ne)})}),Lr(["pop","push","shift","sort","splice","unshift"],function(c){var h=Od[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",P=/^(?:pop|shift)$/.test(c);I.prototype[c]=function(){var j=arguments;if(P&&!this.__chain__){var R=this.value();return h.apply(Ve(R)?R:[],j)}return this[b](function(V){return h.apply(Ve(V)?V:[],j)})}}),xi(rt.prototype,function(c,h){var b=I[h];if(b){var P=b.name+"";mt.call(Ks,P)||(Ks[P]=[]),Ks[P].push({name:h,func:b})}}),Ks[Kd(n,x).name]=[{name:"wrapper",func:n}],rt.prototype.clone=S3,rt.prototype.reverse=O3,rt.prototype.value=C3,I.prototype.at=eU,I.prototype.chain=tU,I.prototype.commit=nU,I.prototype.next=rU,I.prototype.plant=oU,I.prototype.reverse=aU,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=sU,I.prototype.first=I.prototype.head,Bu&&(I.prototype[Bu]=iU),I},zs=n3();ja?((ja.exports=zs)._=zs,py._=zs):On._=zs}).call(Qe.commonjsGlobal)})(Cp,Cp.exports);var YJ=Cp.exports;const Bx={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},Ni={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},qJ={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong",ghost:"bg-field-secondary-background outline outline-1 outline-transparent"},XJ="text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary",MT={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"border-border-disabled hover:border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"border-border-disabled hover:border-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"},FR=O.createContext({}),Es=()=>O.useContext(FR),zi=O.forwardRef(({className:e,size:t="sm",open:n=!1,onOpenChange:r=()=>{},loading:i=!1,...o},a)=>{const[s,l]=O.useState(""),[u,f]=O.useState(i??!1),{refs:d,floatingStyles:p,context:m}=Km({open:n,onOpenChange:r,placement:"bottom-start",whileElementsMounted:Rm,middleware:[Lm(t==="sm"?4:6),Bm({padding:10}),WN({apply({rects:x,elements:w,availableHeight:S}){w.floating.style.maxHeight=`${S}px`,w.floating.style.width=`${x.reference.width}px`,w.floating.style.fontFamily=window.getComputedStyle(w.reference).fontFamily}})]}),g=Um(m),{getReferenceProps:v,getFloatingProps:y}=Hm([g]);return O.useEffect(()=>{const x=K8(),w=S=>{const _=x==="Mac OS"?S.metaKey:S.ctrlKey;if(S.key==="/"&&_&&(S.preventDefault(),d.reference&&d.reference.current)){const C=d.reference.current instanceof HTMLElement?d.reference.current.querySelector("input"):null;C&&C.focus()}};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[d.reference]),T.jsx(FR.Provider,{value:{size:t,open:n,onOpenChange:r,refs:d,floatingStyles:p,context:m,getReferenceProps:v,getFloatingProps:y,searchTerm:s,setSearchTerm:l,isLoading:u,setIsLoading:f},children:T.jsx("div",{className:G("searchbox-wrapper box-border relative w-full",e),...o,ref:a})})});zi.displayName="SearchBox";const WR=O.forwardRef(({className:e,type:t="text",placeholder:n="Search...",variant:r="primary",disabled:i=!1,onChange:o=()=>{},...a},s)=>{const{size:l,onOpenChange:u,refs:f,getReferenceProps:d,searchTerm:p,setSearchTerm:m}=Es(),g=l==="lg"?"sm":"xs",v=y=>{const x=y.target.value;m(x),o(x),typeof u=="function"&&(x.trim()?u(!0):u(!1))};return T.jsxs("div",{ref:f.setReference,className:G("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",qJ[r],Ni.input[l],i?MT[r]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border"),...d,children:[T.jsx("span",{className:G(Bx[l],i?"text-icon-disabled":XJ,"flex justify-center items-center"),children:T.jsx(xN,{})}),T.jsx("input",{type:t,ref:s,className:G(Bx[l],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",i?MT[r]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],e),disabled:i,value:p,onChange:v,placeholder:n,...YJ.omit(a,["size","open","onOpenChange","loading"])}),T.jsx(Uf,{label:"⌘/",size:g,type:"rounded",variant:"neutral"})]})});WR.displayName="SearchBox.Input";const zR=({className:e,dropdownPortalRoot:t=null,dropdownPortalId:n="",children:r,...i})=>{const{size:o,open:a,refs:s,floatingStyles:l,getFloatingProps:u}=Es();return a?T.jsx(Vm,{id:n,root:t,children:T.jsx("div",{ref:s.setFloating,style:{...l},className:G("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",Ni.dialog[o],e),...u(),...i,children:r})}):null};zR.displayName="SearchBox.Content";const VR=({filter:e=!0,children:t})=>{const{searchTerm:n,isLoading:r}=Es();if(!e)return T.jsx("div",{children:t});const i=O.Children.toArray(t).map(o=>{if(O.isValidElement(o)&&o.type===X1){const a=O.Children.toArray(o.props.children).filter(s=>O.isValidElement(s)&&typeof s.props.children=="string"&&s.props.children.toLowerCase().includes(n.toLowerCase()));return a.length>0?O.cloneElement(o,{children:a}):null}return o}).filter(Boolean);return r?T.jsx(Z1,{}):T.jsx("div",{children:i.some(o=>O.isValidElement(o)&&o.type!==J1)?i:T.jsx(q1,{})})};VR.displayName="SearchBox.List";const q1=({children:e="No results found."})=>{const{size:t}=Es();return T.jsx("div",{className:G("flex justify-center items-center",Ni.item[t],"text-text-tertiary p-4"),children:e})};q1.displayName="SearchBox.Empty";const X1=({heading:e,children:t})=>{const{size:n}=Es();return T.jsxs("div",{className:G(Ni.content[n],Ni.item[n]),children:[e&&T.jsx("div",{className:G(Ni.title[n],"text-text-secondary"),children:e}),t]})};X1.displayName="SearchBox.Group";const UR=O.forwardRef(({className:e,icon:t,children:n,...r},i)=>{const{size:o}=Es();return T.jsxs("div",{ref:i,className:G("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",Ni.item[o]),...r,children:[t&&T.jsx("span",{className:G(Ni.icon[o],"flex items-center justify-center"),children:t}),T.jsx("span",{className:G("flex-grow p-1 font-normal cursor-pointer",Ni.item[o],e),children:n})]})});UR.displayName="SearchBox.Item";const Z1=({loadingIcon:e=T.jsx(r$,{})})=>{const{size:t}=Es(),n=O.isValidElement(e)?O.cloneElement(e,{size:t}):e;return T.jsx("div",{className:G("flex justify-center p-4",Bx[t],Ni.item[t]),children:n})};Z1.displayName="SearchBox.Loading";const J1=O.forwardRef(({className:e,...t},n)=>T.jsx("hr",{ref:n,className:G("border-0 border-t border-border-subtle border-solid m-0",e),...t}));J1.displayName="SearchBox.Separator";zi.Input=WR;zi.Loading=Z1;zi.Separator=J1;zi.Content=zR;zi.List=VR;zi.Empty=q1;zi.Group=X1;zi.Item=UR;const KR=O.createContext({}),ZJ=()=>O.useContext(KR),ks=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",dropdownPortalRoot:r=null,dropdownPortalId:i="",children:o,className:a})=>{const[s,l]=O.useState(!1),{refs:u,floatingStyles:f,context:d}=Km({open:s,onOpenChange:l,placement:e,strategy:"absolute",middleware:[Lm(t),Bm({boundary:n}),FN({boundary:n})],whileElementsMounted:Rm}),p=Dw(d),m=Um(d),g=Iw(d,{role:"menu"}),{getReferenceProps:v,getFloatingProps:y}=Hm([p,m,g]),{isMounted:x,styles:w}=XN(d,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),S=()=>l(_=>!_),A=()=>l(!1);return T.jsx(KR.Provider,{value:{handleClose:A},children:T.jsxs("div",{className:G("relative inline-block",a),children:[T.jsx("div",{ref:u.setReference,onClick:S,role:"button",tabIndex:0,...v(),className:"cursor-pointer",children:O.Children.map(o,_=>{var C;return((C=_==null?void 0:_.type)==null?void 0:C.displayName)==="DropdownMenu.Trigger"?_:null})}),x&&T.jsx(Vm,{id:i,root:r,children:T.jsx("div",{ref:u.setFloating,style:{...f,...w},...y(),children:O.Children.map(o,_=>{var C;return((C=_==null?void 0:_.type)==null?void 0:C.displayName)==="DropdownMenu.Content"?_:null})})})]})})};ks.displayName="DropdownMenu";const HR=O.forwardRef(({children:e,className:t},n)=>T.jsx("div",{ref:n,role:"button",tabIndex:0,className:t,children:e}));HR.displayName="DropdownMenu.Trigger";const GR=({children:e,className:t,...n})=>T.jsx("div",{className:G("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:T.jsx(No,{...n,children:e})});GR.displayName="DropdownMenu.Content";const YR=e=>T.jsx(No.List,{...e});YR.displayName="DropdownMenu.List";const qR=({children:e,as:t=No.Item,...n})=>{var i;const{handleClose:r}=ZJ();return e?t===O.Fragment&&O.isValidElement(e)?O.cloneElement(e,{onClick:Wc((i=e.props)==null?void 0:i.onClick,r)}):T.jsx(t,{...n,className:G("px-2",n.className),onClick:Wc(n.onClick,r),children:e}):null};qR.displayName="DropdownMenu.Item";const XR=e=>T.jsx(No.Separator,{...e});XR.displayName="DropdownMenu.Separator";ks.Trigger=HR;ks.Content=GR;ks.List=YR;ks.Item=qR;ks.Separator=XR;const JJ={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},ZR=({children:e,className:t})=>{const{open:n,position:r,handleClose:i,drawerRef:o,transitionDuration:a}=xg();return T.jsx(Ps,{children:n&&T.jsx("div",{className:"fixed inset-0",children:T.jsx("div",{className:G("flex items-center justify-center h-full",{"justify-start":r==="left","justify-end":r==="right"}),children:T.jsx(hi.div,{ref:o,className:G("flex flex-col gap-5 w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",t),initial:"exit",animate:"open",exit:"exit",variants:JJ[r],transition:a,children:typeof e=="function"?e({close:i}):e})})})})};ZR.displayName="Drawer.Panel";const JR=({children:e,className:t,...n})=>T.jsx("div",{className:G("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});JR.displayName="Drawer.Header";const QR=({children:e,as:t="h3",className:n,...r})=>T.jsx(t,{className:G("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});QR.displayName="Drawer.Title";const e2=({children:e,as:t="p",className:n,...r})=>T.jsx(t,{className:G("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});e2.displayName="Drawer.Description";const t2=({children:e,className:t,...n})=>T.jsx("div",{className:G("px-5 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});t2.displayName="Drawer.Body";const n2=({children:e,className:t})=>{const{design:n,handleClose:r}=xg(),i=()=>e?typeof e=="function"?e({close:r}):e:null;return T.jsx("div",{className:G("p-5 flex justify-end gap-3 mt-auto",{"bg-background-secondary":n==="footer-divided"},t),children:i()})};n2.displayName="Drawer.Footer";const jT=({className:e,...t})=>T.jsx("button",{className:G("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:T.jsx(da,{className:"size-4 text-text-primary shrink-0"})}),r2=({children:e,as:t=O.Fragment,...n})=>{const{handleClose:r}=xg();return e?t===O.Fragment?typeof e=="function"?e({close:r}):O.isValidElement(e)?O.cloneElement(e,{onClick:r}):T.jsx(jT,{onClick:r,...n}):T.jsx(t,{...n,onClick:r,children:e}):T.jsx(jT,{onClick:r,...n})};r2.displayName="Drawer.CloseButton";const QJ={open:{opacity:1},exit:{opacity:0}},i2=({className:e,...t})=>{const{open:n,drawerContainerRef:r,transitionDuration:i}=xg();return r!=null&&r.current?!!r.current&&Tl.createPortal(T.jsx(Ps,{children:n&&T.jsx(hi.div,{className:G("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",e),...t,initial:"exit",animate:"open",exit:"exit",variants:QJ,transition:i})}),r.current):null};i2.displayName="Drawer.Backdrop";const eQ=.2,o2=O.createContext({}),xg=()=>O.useContext(o2),Vi=({open:e,setOpen:t,children:n,trigger:r,className:i,exitOnClickOutside:o=!1,exitOnEsc:a=!0,design:s="simple",position:l="right",transitionDuration:u=eQ,scrollLock:f=!0})=>{const d=e!==void 0&&t!==void 0,[p,m]=O.useState(!1),g=O.useRef(null),v=O.useRef(null),y=O.useMemo(()=>d?e:p,[e,p]),x=O.useMemo(()=>d?t:m,[m,m]),w=()=>{y||x(!0)},S=()=>{y&&x(!1)},A=O.useCallback(()=>O.isValidElement(r)?O.cloneElement(r,{onClick:Wc(w,r.props.onClick)}):typeof r=="function"?r({onClick:w}):null,[r,w,S]),_=E=>{switch(E.key){case"Escape":a&&S();break}},C=E=>{o&&g.current&&!g.current.contains(E.target)&&S()};return O.useEffect(()=>(window.addEventListener("keydown",_),document.addEventListener("mousedown",C),()=>{window.removeEventListener("keydown",_),document.removeEventListener("mousedown",C)}),[y]),O.useEffect(()=>{if(!f)return;const E=document.querySelector("html");return y&&E&&(E.style.overflow="hidden"),()=>{E&&(E.style.overflow="")}},[y]),T.jsxs(T.Fragment,{children:[A(),T.jsx(o2.Provider,{value:{open:y,setOpen:x,handleClose:S,design:s,position:l,drawerContainerRef:v,drawerRef:g,transitionDuration:{duration:u}},children:T.jsx("div",{className:G("fixed z-auto w-0 h-0 overflow-visible",i),role:"dialog",ref:v,children:n})})]})};Vi.displayName="Drawer";Vi.Panel=ZR;Vi.Header=JR;Vi.Title=QR;Vi.Description=e2;Vi.Body=t2;Vi.CloseButton=r2;Vi.Footer=n2;Vi.Backdrop=i2;const wg={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},xs={general:"group disabled:border-field-border-disabled opacity-50",text:"group-disabled:text-field-color-disabled"},a2=O.createContext({size:"sm",disabled:!1}),rd=()=>O.useContext(a2),Ms=({size:e="sm",disabled:t=!1,children:n,className:r,...i})=>T.jsx(a2.Provider,{value:{size:e,disabled:t},children:T.jsx("nav",{role:"navigation","aria-label":"pagination",className:G("flex w-full justify-center box-border m-0",r),...i,children:n})});Ms.displayName="Pagination";const s2=O.forwardRef(({className:e,...t},n)=>T.jsx("ul",{ref:n,className:G("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t}));s2.displayName="Pagination.Content";const l2=O.forwardRef(({isActive:e=!1,className:t,children:n,...r},i)=>{const{disabled:o}=rd();return T.jsx("li",{ref:i,className:G("flex",o&&xs.general),children:T.jsx(Q1,{isActive:e,disabled:o,className:t,...r,children:n})})});l2.displayName="Pagination.Item";const Q1=({isActive:e=!1,tag:t="a",children:n,className:r,...i})=>{const{size:o,disabled:a}=rd(),s=l=>l.preventDefault();return T.jsx(zn,{tag:t,size:o,variant:"ghost",className:G("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",wg[o].general,!a&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",a&&[xs.general,xs.text,"focus:ring-transparent cursor-not-allowed"],r),disabled:a,...i,onClick:l=>Wc(i.onClick||(()=>{}),a?s:()=>{})(l),children:T.jsx("span",{className:"px-1 flex",children:n})})},u2=e=>{const{size:t,disabled:n}=rd();return T.jsx("li",{className:G("flex",n&&xs.general),children:T.jsx(Q1,{"aria-label":"Go to previous page",className:G("[&>span]:flex [&>span]:items-center"),...e,children:T.jsx(yN,{className:G(wg[t].icon)})})})};u2.displayName="Pagination.Previous";const c2=e=>{const{size:t,disabled:n}=rd();return T.jsx("li",{className:G("flex",n&&xs.general),children:T.jsx(Q1,{"aria-label":"Go to next page",className:G("[&>span]:flex [&>span]:items-center"),...e,children:T.jsx(Ow,{className:G(wg[t].icon)})})})};c2.displayName="Pagination.Next";const f2=e=>{const{size:t,disabled:n}=rd();return T.jsx("li",{className:G("flex",n&&xs.general),children:T.jsx("span",{className:G("flex justify-center",wg[t].ellipse,n&&xs.general),...e,children:"•••"})})};f2.displayName="Pagination.Ellipsis";Ms.Content=s2;Ms.Item=l2;Ms.Previous=u2;Ms.Next=c2;Ms.Ellipsis=f2;var $e;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})($e||($e={}));var At;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(At||(At={}));var sn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(sn||(sn={}));const d2=6048e5,tQ=864e5,NT=Symbol.for("constructDateFrom");function dn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&NT in e?e[NT](t):e instanceof Date?new e.constructor(t):new Date(t)}function Tt(e,t){return dn(t||e,e)}function h2(e,t,n){const r=Tt(e,n==null?void 0:n.in);return isNaN(t)?dn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function e_(e,t,n){const r=Tt(e,n==null?void 0:n.in);if(isNaN(t))return dn(e,NaN);if(!t)return r;const i=r.getDate(),o=dn(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let nQ={};function id(){return nQ}function wa(e,t){var s,l,u,f;const n=id(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=Tt(e,t==null?void 0:t.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function $T(e){const t=Tt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function od(e,...t){const n=dn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Rl(e,t){const n=Tt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function m2(e,t,n){const[r,i]=od(n==null?void 0:n.in,e,t),o=Rl(r),a=Rl(i),s=+o-$T(o),l=+a-$T(a);return Math.round((s-l)/tQ)}function rQ(e,t){const n=p2(e,t),r=dn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),rf(r)}function g2(e,t,n){return h2(e,t*7,n)}function iQ(e,t,n){return e_(e,t*12,n)}function oQ(e,t){let n,r=t==null?void 0:t.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=dn.bind(null,i));const o=Tt(i,r);(!n||n{!r&&typeof i=="object"&&(r=dn.bind(null,i));const o=Tt(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),dn(r,n||NaN)}function DT(e){return dn(e,Date.now())}function sQ(e,t,n){const[r,i]=od(n==null?void 0:n.in,e,t);return+Rl(r)==+Rl(i)}function y2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function lQ(e){return!(!y2(e)&&typeof e!="number"||isNaN(+Tt(e)))}function uQ(e,t,n){const[r,i]=od(n==null?void 0:n.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Fx(e,t){const n=Tt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Wx(e,t){const n=Tt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function cQ(e,t){const n=Tt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function v2(e,t){const n=Tt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ap(e,t){var s,l,u,f;const n=id(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=Tt(e,t==null?void 0:t.in),o=i.getDay(),a=(o{let r;const i=dQ[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function nb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const pQ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mQ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gQ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yQ={date:nb({formats:pQ,defaultWidth:"full"}),time:nb({formats:mQ,defaultWidth:"full"}),dateTime:nb({formats:gQ,defaultWidth:"full"})},vQ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bQ=(e,t,n,r)=>vQ[e];function oc(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const xQ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wQ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_Q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},SQ={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},OQ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},CQ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},AQ=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},PQ={ordinalNumber:AQ,era:oc({values:xQ,defaultWidth:"wide"}),quarter:oc({values:wQ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oc({values:_Q,defaultWidth:"wide"}),day:oc({values:SQ,defaultWidth:"wide"}),dayPeriod:oc({values:OQ,defaultWidth:"wide",formattingValues:CQ,defaultFormattingWidth:"wide"})};function ac(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?EQ(s,d=>d.test(a)):TQ(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(a.length);return{value:u,rest:f}}}function TQ(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function EQ(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const MQ=/^(\d+)(th|st|nd|rd)?/i,jQ=/\d+/i,NQ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$Q={any:[/^b/i,/^(a|c)/i]},DQ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IQ={any:[/1/i,/2/i,/3/i,/4/i]},RQ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},LQ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},BQ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},FQ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},WQ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zQ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},VQ={ordinalNumber:kQ({matchPattern:MQ,parsePattern:jQ,valueCallback:e=>parseInt(e,10)}),era:ac({matchPatterns:NQ,defaultMatchWidth:"wide",parsePatterns:$Q,defaultParseWidth:"any"}),quarter:ac({matchPatterns:DQ,defaultMatchWidth:"wide",parsePatterns:IQ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ac({matchPatterns:RQ,defaultMatchWidth:"wide",parsePatterns:LQ,defaultParseWidth:"any"}),day:ac({matchPatterns:BQ,defaultMatchWidth:"wide",parsePatterns:FQ,defaultParseWidth:"any"}),dayPeriod:ac({matchPatterns:WQ,defaultMatchWidth:"any",parsePatterns:zQ,defaultParseWidth:"any"})},_g={code:"en-US",formatDistance:hQ,formatLong:yQ,formatRelative:bQ,localize:PQ,match:VQ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function UQ(e,t){const n=Tt(e,t==null?void 0:t.in);return m2(n,v2(n))+1}function b2(e,t){const n=Tt(e,t==null?void 0:t.in),r=+rf(n)-+rQ(n);return Math.round(r/d2)+1}function x2(e,t){var f,d,p,m;const n=Tt(e,t==null?void 0:t.in),r=n.getFullYear(),i=id(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,a=dn((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=wa(a,t),l=dn((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const u=wa(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function KQ(e,t){var s,l,u,f;const n=id(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=x2(e,t),o=dn((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),wa(o,t)}function w2(e,t){const n=Tt(e,t==null?void 0:t.in),r=+wa(n,t)-+KQ(n,t);return Math.round(r/d2)+1}function gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Jo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):gt(n+1,2)},d(e,t){return gt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return gt(e.getHours()%12||12,t.length)},H(e,t){return gt(e.getHours(),t.length)},m(e,t){return gt(e.getMinutes(),t.length)},s(e,t){return gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return gt(i,t.length)}},el={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},IT={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Jo.y(e,t)},Y:function(e,t,n,r){const i=x2(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return gt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):gt(o,t.length)},R:function(e,t){const n=p2(e);return gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return gt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return gt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return gt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Jo.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return gt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=w2(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):gt(i,t.length)},I:function(e,t,n){const r=b2(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Jo.d(e,t)},D:function(e,t,n){const r=UQ(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):gt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return gt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return gt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return gt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=el.noon:r===0?i=el.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=el.evening:r>=12?i=el.afternoon:r>=4?i=el.morning:i=el.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Jo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Jo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Jo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Jo.s(e,t)},S:function(e,t){return Jo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return LT(r);case"XXXX":case"XX":return Xa(r);case"XXXXX":case"XXX":default:return Xa(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return LT(r);case"xxxx":case"xx":return Xa(r);case"xxxxx":case"xxx":default:return Xa(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+RT(r,":");case"OOOO":default:return"GMT"+Xa(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+RT(r,":");case"zzzz":default:return"GMT"+Xa(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return gt(r,t.length)},T:function(e,t,n){return gt(+e,t.length)}};function RT(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+gt(o,2)}function LT(e,t){return e%60===0?(e>0?"-":"+")+gt(Math.abs(e)/60,2):Xa(e,t)}function Xa(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=gt(Math.trunc(r/60),2),o=gt(r%60,2);return n+i+t+o}const BT=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},_2=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},HQ=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return BT(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",BT(r,t)).replace("{{time}}",_2(i,t))},GQ={p:_2,P:HQ},YQ=/^D+$/,qQ=/^Y+$/,XQ=["D","DD","YY","YYYY"];function ZQ(e){return YQ.test(e)}function JQ(e){return qQ.test(e)}function QQ(e,t,n){const r=eee(e,t,n);if(console.warn(r),XQ.includes(e))throw new RangeError(r)}function eee(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const tee=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ree=/^'([^]*?)'?$/,iee=/''/g,oee=/[a-zA-Z]/;function An(e,t,n){var f,d,p,m,g,v,y,x;const r=id(),i=(n==null?void 0:n.locale)??r.locale??_g,o=(n==null?void 0:n.firstWeekContainsDate)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((v=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((x=(y=r.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0,s=Tt(e,n==null?void 0:n.in);if(!lQ(s))throw new RangeError("Invalid time value");let l=t.match(nee).map(w=>{const S=w[0];if(S==="p"||S==="P"){const A=GQ[S];return A(w,i.formatLong)}return w}).join("").match(tee).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const S=w[0];if(S==="'")return{isToken:!1,value:aee(w)};if(IT[S])return{isToken:!0,value:w};if(S.match(oee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(w=>{if(!w.isToken)return w.value;const S=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&JQ(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&ZQ(S))&&QQ(S,t,String(e));const A=IT[S[0]];return A(s,S,i.localize,u)}).join("")}function aee(e){const t=e.match(ree);return t?t[1].replace(iee,"'"):e}function see(e,t){const n=Tt(e,t==null?void 0:t.in),r=n.getFullYear(),i=n.getMonth(),o=dn(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function lee(e,t){return+Tt(e)>+Tt(t)}function uee(e,t){return+Tt(e)<+Tt(t)}function cee(e,t,n){const[r,i]=od(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function fee(e,t,n){const[r,i]=od(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()}function dee(e,t,n){const r=Tt(e,n==null?void 0:n.in),i=r.getFullYear(),o=r.getDate(),a=dn(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=see(a);return r.setMonth(t,Math.min(o,s)),r}function hee(e,t,n){const r=Tt(e,n==null?void 0:n.in);return isNaN(+r)?dn(e,NaN):(r.setFullYear(t),r)}function FT(e){return Rl(Date.now(),e)}function WT(e){const t=DT(e==null?void 0:e.in),n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),o=DT(e==null?void 0:e.in);return o.setFullYear(n,r,i-1),o.setHours(0,0,0,0),o}function zx(e,t,n){return e_(e,-t,n)}function zT(e,t,n){return g2(e,-t,n)}class $o{constructor(t,n){this.Date=Date,this.addDays=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addDays?this.overrides.addDays(r,i):h2(r,i)},this.addMonths=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addMonths?this.overrides.addMonths(r,i):e_(r,i)},this.addWeeks=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addWeeks?this.overrides.addWeeks(r,i):g2(r,i)},this.addYears=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addYears?this.overrides.addYears(r,i):iQ(r,i)},this.differenceInCalendarDays=(r,i)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,i):m2(r,i)},this.differenceInCalendarMonths=(r,i)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,i):uQ(r,i)},this.endOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfISOWeek?this.overrides.endOfISOWeek(r):fQ(r)},this.endOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.endOfMonth?this.overrides.endOfMonth(r):Fx(r)},this.endOfWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,this.options):Ap(r,this.options)},this.endOfYear=r=>{var i;return(i=this.overrides)!=null&&i.endOfYear?this.overrides.endOfYear(r):cQ(r)},this.format=(r,i)=>{var o;return(o=this.overrides)!=null&&o.format?this.overrides.format(r,i,this.options):An(r,i,this.options)},this.getISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.getISOWeek?this.overrides.getISOWeek(r):b2(r)},this.getWeek=r=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):w2(r,this.options)},this.isAfter=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isAfter?this.overrides.isAfter(r,i):lee(r,i)},this.isBefore=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isBefore?this.overrides.isBefore(r,i):uee(r,i)},this.isDate=r=>{var i;return(i=this.overrides)!=null&&i.isDate?this.overrides.isDate(r):y2(r)},this.isSameDay=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameDay?this.overrides.isSameDay(r,i):sQ(r,i)},this.isSameMonth=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameMonth?this.overrides.isSameMonth(r,i):cee(r,i)},this.isSameYear=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameYear?this.overrides.isSameYear(r,i):fee(r,i)},this.max=r=>{var i;return(i=this.overrides)!=null&&i.max?this.overrides.max(r):oQ(r)},this.min=r=>{var i;return(i=this.overrides)!=null&&i.min?this.overrides.min(r):aQ(r)},this.setMonth=(r,i)=>{var o;return(o=this.overrides)!=null&&o.setMonth?this.overrides.setMonth(r,i):dee(r,i)},this.setYear=(r,i)=>{var o;return(o=this.overrides)!=null&&o.setYear?this.overrides.setYear(r,i):hee(r,i)},this.startOfDay=r=>{var i;return(i=this.overrides)!=null&&i.startOfDay?this.overrides.startOfDay(r):Rl(r)},this.startOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.startOfISOWeek?this.overrides.startOfISOWeek(r):rf(r)},this.startOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.startOfMonth?this.overrides.startOfMonth(r):Wx(r)},this.startOfWeek=r=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):wa(r,this.options)},this.startOfYear=r=>{var i;return(i=this.overrides)!=null&&i.startOfYear?this.overrides.startOfYear(r):v2(r)},this.options={locale:_g,...t},this.overrides=n}}const js=new $o;function pee(e,t,n={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[o])=>(n[o]?i.push(n[o]):t[At[o]]?i.push(t[At[o]]):t[sn[o]]&&i.push(t[sn[o]]),i),[t[$e.Day]])}function mee(e){return O.createElement("button",{...e})}function gee(e){return O.createElement("span",{...e})}function yee(e){const{size:t=24,orientation:n="left",className:r}=e;return O.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&O.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&O.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&O.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&O.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))}function vee(e){const{day:t,modifiers:n,...r}=e;return O.createElement("td",{...r})}function bee(e){const{day:t,modifiers:n,...r}=e,i=O.useRef(null);return O.useEffect(()=>{var o;n.focused&&((o=i.current)==null||o.focus())},[n.focused]),O.createElement("button",{ref:i,...r})}function xee(e){const{options:t,className:n,components:r,classNames:i,...o}=e,a=[i[$e.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:l})=>l===o.value);return O.createElement("span",{"data-disabled":o.disabled,className:i[$e.DropdownRoot]},O.createElement(r.Select,{className:a,...o},t==null?void 0:t.map(({value:l,label:u,disabled:f})=>O.createElement(r.Option,{key:l,value:l,disabled:f},u))),O.createElement("span",{className:i[$e.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,O.createElement(r.Chevron,{orientation:"down",size:18,className:i[$e.Chevron]})))}function wee(e){return O.createElement("div",{...e})}function _ee(e){return O.createElement("div",{...e})}function See(e){const{calendarMonth:t,displayIndex:n,...r}=e;return O.createElement("div",{...r},e.children)}function Oee(e){const{calendarMonth:t,displayIndex:n,...r}=e;return O.createElement("div",{...r})}function Cee(e){return O.createElement("table",{...e})}function Aee(e){return O.createElement("div",{...e})}const S2=O.createContext(void 0);function wu(){const e=O.useContext(S2);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Pee(e){const{components:t}=wu();return O.createElement(t.Dropdown,{...e})}function Tee(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...o}=e,{components:a,classNames:s,labels:{labelPrevious:l,labelNext:u}}=wu();return O.createElement("nav",{...o},O.createElement(a.PreviousMonthButton,{type:"button",className:s[$e.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:r?void 0:!0,"aria-label":l(r),onClick:e.onPreviousClick},O.createElement(a.Chevron,{disabled:r?void 0:!0,className:s[$e.Chevron],orientation:"left"})),O.createElement(a.NextMonthButton,{type:"button",className:s[$e.NextMonthButton],tabIndex:i?void 0:-1,disabled:i?void 0:!0,"aria-label":u(i),onClick:e.onNextClick},O.createElement(a.Chevron,{disabled:i?void 0:!0,orientation:"right",className:s[$e.Chevron]})))}function Eee(e){const{components:t}=wu();return O.createElement(t.Button,{...e})}function kee(e){return O.createElement("option",{...e})}function Mee(e){const{components:t}=wu();return O.createElement(t.Button,{...e})}function jee(e){return O.createElement("div",{...e})}function Nee(e){return O.createElement("select",{...e})}function $ee(e){const{week:t,...n}=e;return O.createElement("tr",{...n})}function Dee(e){return O.createElement("th",{...e})}function Iee(e){return O.createElement("thead",null,O.createElement("tr",{...e}))}function Ree(e){const{week:t,...n}=e;return O.createElement("th",{...n})}function Lee(e){return O.createElement("th",{...e})}function Bee(e){return O.createElement("tbody",{...e})}function Fee(e){const{components:t}=wu();return O.createElement(t.Dropdown,{...e})}const Wee=Object.freeze(Object.defineProperty({__proto__:null,Button:mee,CaptionLabel:gee,Chevron:yee,Day:vee,DayButton:bee,Dropdown:xee,DropdownNav:wee,Footer:_ee,Month:See,MonthCaption:Oee,MonthGrid:Cee,Months:Aee,MonthsDropdown:Pee,Nav:Tee,NextMonthButton:Eee,Option:kee,PreviousMonthButton:Mee,Root:jee,Select:Nee,Week:$ee,WeekNumber:Ree,WeekNumberHeader:Lee,Weekday:Dee,Weekdays:Iee,Weeks:Bee,YearsDropdown:Fee},Symbol.toStringTag,{value:"Module"}));function zee(e){return{...Wee,...e}}function Vee(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Uee(){const e={};for(const t in $e)e[$e[t]]=`rdp-${$e[t]}`;for(const t in At)e[At[t]]=`rdp-${At[t]}`;for(const t in sn)e[sn[t]]=`rdp-${sn[t]}`;return e}function O2(e,t,n){return(n??new $o(t)).format(e,"LLLL y")}const Kee=O2;function Hee(e,t,n){return(n??new $o(t)).format(e,"d")}function Gee(e,t=_g){var n;return(n=t.localize)==null?void 0:n.month(e)}function Yee(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function qee(){return""}function Xee(e,t,n){return(n??new $o(t)).format(e,"cccccc")}function C2(e){return e.toString()}const Zee=C2,Jee=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:O2,formatDay:Hee,formatMonthCaption:Kee,formatMonthDropdown:Gee,formatWeekNumber:Yee,formatWeekNumberHeader:qee,formatWeekdayName:Xee,formatYearCaption:Zee,formatYearDropdown:C2},Symbol.toStringTag,{value:"Module"}));function Qee(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Jee,...e}}function ete(e,t,n,r,i){if(!t||!n)return;const{addMonths:o,startOfMonth:a,isBefore:s}=i,l=e.getFullYear(),u=[];let f=t;for(;u.length<12&&s(f,o(n,1));)u.push(f.getMonth()),f=o(f,1);return u.sort((m,g)=>m-g).map(m=>{const g=r.formatMonthDropdown(m,i.options.locale),v=i.Date?new i.Date(l,m):new Date(l,m),y=t&&va(n)||!1;return{value:m,label:g,disabled:y}})}function tte(e,t={},n={}){let r={...t==null?void 0:t[$e.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{r={...r,...n==null?void 0:n[i]}}),r}const rb={},wc={};function Nc(e,t){try{const r=(rb[e]||(rb[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in wc?wc[r]:VT(r,r.split(":"))}catch{if(e in wc)return wc[e];const n=e==null?void 0:e.match(nte);return n?VT(e,n.slice(1)):NaN}}const nte=/([+-]\d\d):?(\d\d)?/;function VT(e,t){const n=+t[0],r=+(t[1]||0);return wc[e]=n>0?n*60+r:n*60-r}class Ci extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Nc(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),A2(this),Vx(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Ci(...n,t):new Ci(Date.now(),t)}withTimeZone(t){return new Ci(+this,t)}getTimezoneOffset(){return-Nc(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Vx(this),+this}[Symbol.for("constructDateFrom")](t){return new Ci(+new Date(t),this.timeZone)}}const UT=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!UT.test(e))return;const t=e.replace(UT,"$1UTC");Ci.prototype[t]&&(e.startsWith("get")?Ci.prototype[e]=function(){return this.internal[t]()}:(Ci.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),rte(this),+this},Ci.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Vx(this),+this}))});function Vx(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function rte(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),A2(e)}function A2(e){const t=Nc(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),o=r-i,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const l=Nc(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-l,d=l!==t,p=f-s;if(d&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const m=Nc(e.timeZone,e),g=l-m;g&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g))}}class Ai extends Ci{static tz(t,...n){return n.length?new Ai(...n,t):new Ai(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),i=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+i}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,i]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${i}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,i]=this.tzComponents();return`${t} GMT${n}${r}${i} (${ite(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),i=String(Math.abs(t)%60).padStart(2,"0");return[n,r,i]}withTimeZone(t){return new Ai(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ai(+new Date(t),this.timeZone)}}function ite(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}function ote(e,t,n){const r=n?Ai.tz(n):e.Date?new e.Date:new Date,i=t?e.startOfISOWeek(r):e.startOfWeek(r),o=[];for(let a=0;a<7;a++){const s=e.addDays(i,a);o.push(s)}return o}function ate(e,t,n,r,i){if(!t||!n)return;const{startOfMonth:o,startOfYear:a,endOfYear:s,addYears:l,isBefore:u,isSameYear:f}=i,d=e.getMonth(),p=a(t),m=s(n),g=[];let v=p;for(;u(v,m)||f(v,m);)g.push(v.getFullYear()),v=l(v,1);return g.map(y=>{const x=i.Date?new i.Date(y,d):new Date(y,d),w=t&&xo(n)||!1,S=r.formatYearDropdown(y);return{value:y,label:S,disabled:w}})}function P2(e,t,n){return(n??new $o(t)).format(e,"LLLL y")}const ste=P2;function lte(e,t,n,r){let i=(r??new $o(n)).format(e,"PPPP");return t!=null&&t.today&&(i=`Today, ${i}`),i}function T2(e,t,n,r){let i=(r??new $o(n)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const ute=T2;function cte(){return""}function fte(e){return"Choose the Month"}function dte(e){return"Go to the Next Month"}function hte(e){return"Go to the Previous Month"}function pte(e,t,n){return(n??new $o(t)).format(e,"cccc")}function mte(e,t){return`Week ${e}`}function gte(e){return"Week Number"}function yte(e){return"Choose the Year"}const vte=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:ste,labelDay:ute,labelDayButton:T2,labelGrid:P2,labelGridcell:lte,labelMonthDropdown:fte,labelNav:cte,labelNext:dte,labelPrevious:hte,labelWeekNumber:mte,labelWeekNumberHeader:gte,labelWeekday:pte,labelYearDropdown:yte},Symbol.toStringTag,{value:"Module"})),bte=42;function xte(e,t,n,r){const i=e[0],o=e[e.length-1],{ISOWeek:a,fixedWeeks:s}=n??{},{startOfWeek:l,endOfWeek:u,startOfISOWeek:f,endOfISOWeek:d,addDays:p,differenceInCalendarDays:m,differenceInCalendarMonths:g,isAfter:v,endOfMonth:y}=r,x=a?f(i):l(i),w=a?d(y(o)):u(y(o)),S=m(w,x),A=g(o,i)+1,_=[];for(let E=0;E<=S;E++){const k=p(x,E);if(t&&v(k,t))break;_.push(k)}const C=bte*A;if(s&&_.length{const i=[],o=r.weeks.reduce((a,s)=>[...a,...s.days],i);return[...n,...o]},t)}function _te(e,t,n,r){const{numberOfMonths:i=1}=n,o=[];for(let a=0;at)break;o.push(s)}return o}function KT(e,t){const{month:n,defaultMonth:r,today:i=e.timeZone?Ai.tz(e.timeZone):t.Date?new t.Date:new Date,numberOfMonths:o=1,endMonth:a,startMonth:s}=e;let l=n||r||i;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:d}=t;if(a&&u(a,l)<0){const p=-1*(o-1);l=f(a,p)}return s&&u(l,s)<0&&(l=s),d(l)}class E2{constructor(t,n,r=js){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Ste{constructor(t,n){this.date=t,this.weeks=n}}class Ote{constructor(t,n){this.days=n,this.weekNumber=t}}function Cte(e,t,n,r){const{startOfWeek:i,endOfWeek:o,startOfISOWeek:a,endOfISOWeek:s,endOfMonth:l,addDays:u,getWeek:f,getISOWeek:d}=r,p=e.reduce((m,g)=>{const v=n.ISOWeek?a(g):i(g),y=n.ISOWeek?s(l(g)):o(l(g)),x=t.filter(A=>A>=v&&A<=y);if(n.fixedWeeks&&x.length<42){const A=t.filter(_=>_>y&&_<=u(y,7));x.push(...A)}const w=x.reduce((A,_)=>{const C=n.ISOWeek?d(_):f(_),E=A.find(M=>M.weekNumber===C),k=new E2(_,g,r);return E?E.days.push(k):A.push(new Ote(C,[k])),A},[]),S=new Ste(g,w);return m.push(S),m},[]);return n.reverseMonths?p.reverse():p}function Ate(e,t){var v;let{startMonth:n,endMonth:r}=e;const{startOfYear:i,startOfDay:o,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:u}=t,{fromYear:f,toYear:d,fromMonth:p,toMonth:m}=e;!n&&p&&(n=p),!n&&f&&(n=new Date(f,0,1)),!r&&m&&(r=m),!r&&d&&(r=new Date(d,11,31));const g=(v=e.captionLayout)==null?void 0:v.startsWith("dropdown");if(n)n=a(n);else if(f)n=new Date(f,0,1);else if(!n&&g){const y=e.today??(e.timeZone?Ai.tz(e.timeZone):t.Date?new t.Date:new Date);n=i(l(y,-100))}if(r)r=s(r);else if(d)r=new Date(d,11,31);else if(!r&&g){const y=e.today??(e.timeZone?Ai.tz(e.timeZone):t.Date?new t.Date:new Date);r=u(y)}return[n&&o(n),r&&o(r)]}function Pte(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,u=i?o:1,f=a(e);if(!t)return s(f,u);if(!(l(t,e)[...n,...r.weeks],t)}function Sg(e,t){const[n,r]=O.useState(e);return[t===void 0?n:t,r]}function kte(e,t){const[n,r]=Ate(e,t),{startOfMonth:i,endOfMonth:o}=t,a=KT(e,t),[s,l]=Sg(a,e.month?i(e.month):void 0);O.useEffect(()=>{const C=KT(e,t);l(C)},[e.timeZone]);const u=_te(s,r,e,t),f=xte(u,e.endMonth?o(e.endMonth):void 0,e,t),d=Cte(u,f,e,t),p=Ete(d),m=wte(d),g=Tte(s,n,e,t),v=Pte(s,r,e,t),{disableNavigation:y,onMonthChange:x}=e,w=C=>p.some(E=>E.days.some(k=>k.isEqualTo(C))),S=C=>{if(y)return;let E=i(C);n&&Ei(r)&&(E=i(r)),l(E),x==null||x(E)};return{months:d,weeks:p,days:m,navStart:n,navEnd:r,previousMonth:g,nextMonth:v,goToMonth:S,goToDay:C=>{w(C)||S(C.date)}}}function Mte(e,t,n,r){let i,o=0,a=!1;for(;o{const l=t(s);return!l[At.disabled]&&!l[At.hidden]&&!l[At.outside]})),i}function uo(e,t,n=!1,r=js){let{from:i,to:o}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return i&&o?(a(o,i)<0&&([i,o]=[o,i]),a(t,i)>=(n?1:0)&&a(o,t)>=(n?1:0)):!n&&o?s(o,t):!n&&i?s(i,t):!1}function k2(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function t_(e){return!!(e&&typeof e=="object"&&"from"in e)}function M2(e){return!!(e&&typeof e=="object"&&"after"in e)}function j2(e){return!!(e&&typeof e=="object"&&"before"in e)}function N2(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function $2(e,t){return Array.isArray(e)&&e.every(t.isDate)}function co(e,t,n=js){const r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:o,isAfter:a}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return i(e,s);if($2(s,n))return s.includes(e);if(t_(s))return uo(s,e,!1,n);if(N2(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(k2(s)){const l=o(s.before,e),u=o(s.after,e),f=l>0,d=u<0;return a(s.before,s.after)?d&&f:f||d}return M2(s)?o(e,s.after)>0:j2(s)?o(s.before,e)>0:typeof s=="function"?s(e):!1})}function jte(e,t,n,r,i,o,a){const{ISOWeek:s}=o,{addDays:l,addMonths:u,addYears:f,addWeeks:d,startOfISOWeek:p,endOfISOWeek:m,startOfWeek:g,endOfWeek:v,max:y,min:x}=a;let S={day:l,week:d,month:u,year:f,startOfWeek:A=>s?p(A):g(A),endOfWeek:A=>s?m(A):v(A)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=y([r,S]):t==="after"&&i&&(S=x([i,S])),S}function D2(e,t,n,r,i,o,a,s=0){if(s>365)return;const l=jte(e,t,n.date,r,i,o,a),u=!!(o.disabled&&co(l,o.disabled,a)),f=!!(o.hidden&&co(l,o.hidden,a)),d=l,p=new E2(l,d,a);return!u&&!f?p:D2(e,t,p,r,i,o,a,s+1)}function Nte(e,t,n,r,i){const{autoFocus:o}=e,[a,s]=O.useState(),l=Mte(t.days,n,r||(()=>!1),a),[u,f]=O.useState(o?l:void 0);return{isFocusTarget:v=>!!(l!=null&&l.isEqualTo(v)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(v,y)=>{if(!u)return;const x=D2(v,y,u,t.navStart,t.navEnd,e,i);x&&(t.goToDay(x),f(x))}}}function $te(e,t,n){const{disabled:r,hidden:i,modifiers:o,showOutsideDays:a,today:s}=t,{isSameDay:l,isSameMonth:u}=n,f={[At.focused]:[],[At.outside]:[],[At.disabled]:[],[At.hidden]:[],[At.today]:[]},d={},p={[sn.range_end]:[],[sn.range_middle]:[],[sn.range_start]:[],[sn.selected]:[]};for(const m of e){const{date:g,displayMonth:v}=m,y=!!(v&&!u(g,v)),x=!!(r&&co(g,r,n)),w=!!(i&&co(g,i,n))||!a&&y,S=l(g,s??(t.timeZone?Ai.tz(t.timeZone):n.Date?new n.Date:new Date));y&&f.outside.push(m),x&&f.disabled.push(m),w&&f.hidden.push(m),S&&f.today.push(m),o&&Object.keys(o).forEach(A=>{const _=o==null?void 0:o[A];_&&co(g,_,n)&&(d[A]?d[A].push(m):d[A]=[m])})}return m=>{const g={[At.focused]:!1,[At.disabled]:!1,[At.hidden]:!1,[At.outside]:!1,[At.today]:!1},v={[sn.range_end]:!1,[sn.range_middle]:!1,[sn.range_start]:!1,[sn.selected]:!1},y={};for(const x in f){const w=f[x];g[x]=w.some(S=>S===m)}for(const x in p){const w=p[x];v[x]=w.some(S=>S===m)}for(const x in d)y[x]=d[x].some(w=>w===m);return{...v,...g,...y}}}function Dte(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=Sg(n,i?n:void 0),s=i?n:o,{isSameDay:l}=t,u=m=>(s==null?void 0:s.some(g=>l(g,m)))??!1,{min:f,max:d}=e;return{selected:s,select:(m,g,v)=>{let y=[...s??[]];if(u(m)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;y=s==null?void 0:s.filter(x=>!l(x,m))}else(s==null?void 0:s.length)===d?y=[m]:y=[...y,m];return i||a(y),i==null||i(y,m,g,v),y},isSelected:u}}function Ite(e,t,n=0,r=0,i=!1,o=js){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:u,isBefore:f}=o;let d;if(!a&&!s)d={from:e,to:n>0?void 0:e};else if(a&&!s)l(a,e)?i?d={from:a,to:void 0}:d=void 0:f(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))i?d={from:a,to:s}:d=void 0;else if(l(a,e))d={from:a,to:n>0?void 0:e};else if(l(s,e))d={from:e,to:n>0?void 0:e};else if(f(e,a))d={from:e,to:s};else if(u(e,a))d={from:a,to:e};else if(u(e,s))d={from:a,to:e};else throw new Error("Invalid range");if(d!=null&&d.from&&(d!=null&&d.to)){const p=o.differenceInCalendarDays(d.to,d.from);r>0&&p>r?d={from:e,to:void 0}:n>1&&ptypeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?uo(e,s,!1,n):$2(s,n)?s.some(l=>uo(e,l,!1,n)):t_(s)?s.from&&s.to?HT(e,{from:s.from,to:s.to},n):!1:N2(s)?Rte(e,s.dayOfWeek,n):k2(s)?n.isAfter(s.before,s.after)?HT(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):co(e.from,s,n)||co(e.to,s,n):M2(s)||j2(s)?co(e.from,s,n)||co(e.to,s,n):!1))return!0;const a=r.filter(s=>typeof s=="function");if(a.length){let s=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(a.some(f=>f(s)))return!0;s=n.addDays(s,1)}}return!1}function Bte(e,t){const{disabled:n,excludeDisabled:r,selected:i,required:o,onSelect:a}=e,[s,l]=Sg(i,a?i:void 0),u=a?i:s;return{selected:u,select:(p,m,g)=>{const{min:v,max:y}=e,x=p?Ite(p,u,v,y,o,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&Lte({from:x.from,to:x.to},n,t)&&(x.from=p,x.to=void 0),a||l(x),a==null||a(x,p,m,g),x},isSelected:p=>u&&uo(u,p,!1,t)}}function Fte(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=Sg(n,i?n:void 0),s=i?n:o,{isSameDay:l}=t;return{selected:s,select:(d,p,m)=>{let g=d;return!r&&s&&s&&l(d,s)&&(g=void 0),i||a(g),i==null||i(g,d,p,m),g},isSelected:d=>s?l(s,d):!1}}function Wte(e,t){const n=Fte(e,t),r=Dte(e,t),i=Bte(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return i;default:return}}function zte(e){const{components:t,formatters:n,labels:r,dateLib:i,locale:o,classNames:a}=O.useMemo(()=>{const qe={..._g,...e.locale};return{dateLib:new $o({locale:qe,weekStartsOn:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens},e.dateLib),components:zee(e.components),formatters:Qee(e.formatters),labels:{...vte,...e.labels},locale:qe,classNames:{...Uee(),...e.classNames}}},[e.classNames,e.components,e.dateLib,e.firstWeekContainsDate,e.formatters,e.labels,e.locale,e.useAdditionalDayOfYearTokens,e.useAdditionalWeekYearTokens,e.weekStartsOn]),{captionLayout:s,mode:l,onDayBlur:u,onDayClick:f,onDayFocus:d,onDayKeyDown:p,onDayMouseEnter:m,onDayMouseLeave:g,onNextClick:v,onPrevClick:y,showWeekNumber:x,styles:w}=e,{formatCaption:S,formatDay:A,formatMonthDropdown:_,formatWeekNumber:C,formatWeekNumberHeader:E,formatWeekdayName:k,formatYearDropdown:M}=n,D=kte(e,i),{days:$,months:N,navStart:F,navEnd:L,previousMonth:W,nextMonth:B,goToMonth:z}=D,H=$te($,e,i),{isSelected:U,select:K,selected:Y}=Wte(e,i)??{},{blur:te,focused:ne,isFocusTarget:ie,moveFocus:ce,setFocused:ae}=Nte(e,D,H,U??(()=>!1),i),{labelDayButton:le,labelGridcell:re,labelGrid:Q,labelMonthDropdown:fe,labelNav:ye,labelWeekday:X,labelWeekNumber:Re,labelWeekNumberHeader:pe,labelYearDropdown:Ie}=r,Ze=O.useMemo(()=>ote(i,e.ISOWeek,e.timeZone),[i,e.ISOWeek,e.timeZone]),tt=l!==void 0||f!==void 0,In=O.useCallback(()=>{W&&(z(W),y==null||y(W))},[W,z,y]),Me=O.useCallback(()=>{B&&(z(B),v==null||v(B))},[z,B,v]),nt=O.useCallback((qe,$t)=>pt=>{pt.preventDefault(),pt.stopPropagation(),ae(qe),K==null||K(qe.date,$t,pt),f==null||f(qe.date,$t,pt)},[K,f,ae]),Se=O.useCallback((qe,$t)=>pt=>{ae(qe),d==null||d(qe.date,$t,pt)},[d,ae]),ze=O.useCallback((qe,$t)=>pt=>{te(),u==null||u(qe.date,$t,pt)},[te,u]),Lt=O.useCallback((qe,$t)=>pt=>{const Sn={ArrowLeft:["day",e.dir==="rtl"?"after":"before"],ArrowRight:["day",e.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[pt.shiftKey?"year":"month","before"],PageDown:[pt.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Sn[pt.key]){pt.preventDefault(),pt.stopPropagation();const[Dr,Hi]=Sn[pt.key];ce(Dr,Hi)}p==null||p(qe.date,$t,pt)},[ce,p,e.dir]),at=O.useCallback((qe,$t)=>pt=>{m==null||m(qe.date,$t,pt)},[m]),Wt=O.useCallback((qe,$t)=>pt=>{g==null||g(qe.date,$t,pt)},[g]),{className:$r,style:pn}=O.useMemo(()=>({className:[a[$e.Root],e.className].filter(Boolean).join(" "),style:{...w==null?void 0:w[$e.Root],...e.style}}),[a,e.className,e.style,w]),nn=Vee(e),nr={dayPickerProps:e,selected:Y,select:K,isSelected:U,months:N,nextMonth:B,previousMonth:W,goToMonth:z,getModifiers:H,components:t,classNames:a,styles:w,labels:r,formatters:n};return O.createElement(S2.Provider,{value:nr},O.createElement(t.Root,{className:$r,style:pn,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,...nn},O.createElement(t.Months,{className:a[$e.Months],style:w==null?void 0:w[$e.Months]},!e.hideNavigation&&O.createElement(t.Nav,{className:a[$e.Nav],style:w==null?void 0:w[$e.Nav],"aria-label":ye(),onPreviousClick:In,onNextClick:Me,previousMonth:W,nextMonth:B}),N.map((qe,$t)=>{const pt=qt=>{const pr=Number(qt.target.value),Xt=i.setMonth(i.startOfMonth(qe.date),pr);z(Xt)},Sn=qt=>{const pr=i.setYear(i.startOfMonth(qe.date),Number(qt.target.value));z(pr)},Dr=ete(qe.date,F,L,n,i),Hi=ate(N[0].date,F,L,n,i);return O.createElement(t.Month,{className:a[$e.Month],style:w==null?void 0:w[$e.Month],key:$t,displayIndex:$t,calendarMonth:qe},O.createElement(t.MonthCaption,{className:a[$e.MonthCaption],style:w==null?void 0:w[$e.MonthCaption],calendarMonth:qe,displayIndex:$t},s!=null&&s.startsWith("dropdown")?O.createElement(t.DropdownNav,{className:a[$e.Dropdowns],style:w==null?void 0:w[$e.Dropdowns]},s==="dropdown"||s==="dropdown-months"?O.createElement(t.MonthsDropdown,{className:a[$e.MonthsDropdown],"aria-label":fe(),classNames:a,components:t,disabled:!!e.disableNavigation,onChange:pt,options:Dr,style:w==null?void 0:w[$e.Dropdown],value:qe.date.getMonth()}):O.createElement("span",{role:"status","aria-live":"polite"},_(qe.date.getMonth(),o)),s==="dropdown"||s==="dropdown-years"?O.createElement(t.YearsDropdown,{className:a[$e.YearsDropdown],"aria-label":Ie(i.options),classNames:a,components:t,disabled:!!e.disableNavigation,onChange:Sn,options:Hi,style:w==null?void 0:w[$e.Dropdown],value:qe.date.getFullYear()}):O.createElement("span",{role:"status","aria-live":"polite"},M(qe.date.getFullYear()))):O.createElement(t.CaptionLabel,{className:a[$e.CaptionLabel],role:"status","aria-live":"polite"},S(qe.date,i.options,i))),O.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":Q(qe.date,i.options,i)||void 0,className:a[$e.MonthGrid],style:w==null?void 0:w[$e.MonthGrid]},!e.hideWeekdays&&O.createElement(t.Weekdays,{className:a[$e.Weekdays],style:w==null?void 0:w[$e.Weekdays]},x&&O.createElement(t.WeekNumberHeader,{"aria-label":pe(i.options),className:a[$e.WeekNumberHeader],style:w==null?void 0:w[$e.WeekNumberHeader],scope:"col"},E()),Ze.map((qt,pr)=>O.createElement(t.Weekday,{"aria-label":X(qt,i.options,i),className:a[$e.Weekday],key:pr,style:w==null?void 0:w[$e.Weekday],scope:"col"},k(qt,i.options,i)))),O.createElement(t.Weeks,{className:a[$e.Weeks],style:w==null?void 0:w[$e.Weeks]},qe.weeks.map((qt,pr)=>O.createElement(t.Week,{className:a[$e.Week],key:qt.weekNumber,style:w==null?void 0:w[$e.Week],week:qt},x&&O.createElement(t.WeekNumber,{week:qt,style:w==null?void 0:w[$e.WeekNumber],"aria-label":Re(qt.weekNumber,{locale:o}),className:a[$e.WeekNumber],scope:"row"},C(qt.weekNumber)),qt.days.map(Xt=>{const{date:Ir}=Xt,lt=H(Xt);if(lt[At.focused]=!lt.hidden&&!!(ne!=null&&ne.isEqualTo(Xt)),lt[sn.selected]=!lt.disabled&&((U==null?void 0:U(Ir))||lt.selected),t_(Y)){const{from:Iu,to:Ru}=Y;lt[sn.range_start]=!!(Iu&&Ru&&i.isSameDay(Ir,Iu)),lt[sn.range_end]=!!(Iu&&Ru&&i.isSameDay(Ir,Ru)),lt[sn.range_middle]=uo(Y,Ir,!0,i)}const gd=tte(lt,w,e.modifiersStyles),yd=pee(lt,a,e.modifiersClassNames),ay=tt?void 0:re(Ir,lt,i.options,i);return O.createElement(t.Day,{key:`${i.format(Ir,"yyyy-MM-dd")}_${i.format(Xt.displayMonth,"yyyy-MM")}`,day:Xt,modifiers:lt,className:yd.join(" "),style:gd,"aria-hidden":lt.hidden||void 0,"aria-selected":lt.selected||void 0,"aria-label":ay,"data-day":i.format(Ir,"yyyy-MM-dd"),"data-month":Xt.outside?i.format(Ir,"yyyy-MM"):void 0,"data-selected":lt.selected||void 0,"data-disabled":lt.disabled||void 0,"data-hidden":lt.hidden||void 0,"data-outside":Xt.outside||void 0,"data-focused":lt.focused||void 0,"data-today":lt.today||void 0},tt?O.createElement(t.DayButton,{className:a[$e.DayButton],style:w==null?void 0:w[$e.DayButton],type:"button",day:Xt,modifiers:lt,disabled:lt.disabled||void 0,tabIndex:ie(Xt)?0:-1,"aria-label":le(Ir,lt,i.options,i),onClick:nt(Xt,lt),onBlur:ze(Xt,lt),onFocus:Se(Xt,lt),onKeyDown:Lt(Xt,lt),onMouseEnter:at(Xt,lt),onMouseLeave:Wt(Xt,lt)},A(Ir,i.options,i)):A(Xt.date,i.options,i))}))))))})),e.footer&&O.createElement(t.Footer,{className:a[$e.Footer],style:w==null?void 0:w[$e.Footer],role:"status","aria-live":"polite"},e.footer)))}const GT=()=>T.jsx("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),YT=e=>An(e,"E").slice(0,1),Vte=(e,t=24)=>Array.from({length:t},(n,r)=>e+r),ib=({width:e,className:t,classNames:n,selectedDates:r,setSelectedDates:i,showOutsideDays:o=!0,mode:a="single",variant:s="normal",alignment:l="horizontal",numberOfMonths:u,...f})=>{const d=O.isValidElement(f.footer)||typeof f.footer=="function",[p,m]=O.useState(!1),[g,v]=O.useState(!1),[y,x]=O.useState(new Date().getFullYear()),[w,S]=O.useState(y-y%24);r==null&&(a==="multiple"?r=[]:a==="range"?r={from:null,to:null}:r=null);function A($){const{goToMonth:N,nextMonth:F,previousMonth:L}=wu(),W=An($.calendarMonth.date,"yyyy"),B=An($.calendarMonth.date,"MMMM"),z=new Date($.calendarMonth.date);z.setDate(z.getDate()-z.getDay());const H=Array.from({length:7},(ne,ie)=>{const ce=new Date(z);return ce.setDate(z.getDate()+ie),YT(ce)}),U=()=>{if(g)S(w-24);else if(p){const ne=new Date(y-1,$.calendarMonth.date.getMonth());x(ne.getFullYear()),N(ne)}else N(L)},K=()=>{if(g)S(w+24);else if(p){const ne=new Date(y+1,$.calendarMonth.date.getMonth());x(ne.getFullYear()),N(ne)}else N(F)},Y=({yearValue:ne})=>{x(ne),v(!1),m(!0),N(new Date(ne,$.calendarMonth.date.getMonth()))};let te;return g?te=`${w} - ${w+23}`:p?te=W:te=`${B} ${W}`,T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"flex justify-between",children:[T.jsx(zn,{variant:"ghost",onClick:U,className:"bg-background-primary border-none cursor-pointer",children:T.jsx(yN,{className:"h-4 w-4"})}),T.jsx(zn,{variant:"ghost",onClick:()=>{u>1||(p?(v(!0),m(!1)):g?v(!1):m(!p))},children:te}),T.jsx(zn,{variant:"ghost",onClick:K,className:"bg-background-primary border-none cursor-pointer",children:T.jsx(Ow,{className:"h-4 w-4"})})]}),g&&T.jsx("div",{className:"grid grid-cols-4 w-full",children:Vte(w).map(ne=>T.jsxs(zn,{variant:"ghost",onClick:()=>Y(ne),className:G("h-10 w-full text-center font-normal relative",ne===y&&ne!==new Date().getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black"),children:[ne,ne===new Date().getFullYear()&>()]},ne))}),p&&!g&&T.jsx("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},(ne,ie)=>T.jsxs(zn,{variant:"ghost",onClick:()=>{m(!1),N(new Date(y,ie))},className:G("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",ie===$.calendarMonth.date.getMonth()&&ie!==new Date().getMonth()&&y===$.calendarMonth.date.getFullYear()&&$.calendarMonth.date.getFullYear()!==new Date().getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black"),children:[An(new Date(0,ie),"MMM"),new Date().getMonth()===ie&&new Date().getFullYear()===y&>()]},ie))}),!p&&!g&&T.jsx(_,{weekdays:H})]})}const _=({weekdays:$})=>T.jsx("div",{className:"flex justify-between",children:$.map((N,F)=>T.jsx("button",{className:"h-10 w-10 px-1.5 py-2 text-center text-muted-foreground text-[0.8rem] font-normal content-center bg-transparent border-none",children:N},F))}),C=({day:$,modifiers:N,onSelect:F})=>{const{selected:L,today:W,disabled:B,outside:z,range_middle:H,range_start:U,range_end:K}=N,Y=U||K||H,te=()=>!B&&F($.date),ne=new Date,ie=r==null?void 0:r.to,ce=An($.displayMonth,"yyyy-MM")===An(ne,"yyyy-MM"),ae=ie&&An(ie,"yyyy-MM")===An($.date,"yyyy-MM"),le=zx(ne,1),re=An($.date,"yyyy-MM")===An(le,"yyyy-MM"),Q=ce||ae||Y,fe=!o&&z,X=G("h-10 w-10 flex items-center justify-center transition text-text-secondary relative","border-none rounded",(L||Y)&&(!z||re)?"bg-background-brand text-text-on-color":"bg-transparent hover:bg-button-tertiary-hover",H&&Q&&(!z||Y)?"bg-brand-background-50 text-text-secondary rounded-none":"",B?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",z&&!Y||!Q&&z||z&&!re?"bg-transperant opacity-50 text-text-disabled cursor-auto":"");return T.jsxs("button",{onClick:te,className:X,disabled:B||z,"aria-label":An($.date,"EEEE, MMMM do, yyyy"),children:[(!fe||Y&&Q)&&An($.date,"d"),W&&T.jsx("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"})]})},E=$=>{const{day:N,modifiers:F,className:L,onSelect:W}=$;return T.jsx("td",{className:L,children:T.jsx(C,{day:N,modifiers:F,onSelect:W})})},k=({monthGridProps:$,onSelect:N})=>T.jsx("div",{className:"flex flex-col",children:$.children[1].props.children.map((F,L)=>T.jsx("div",{className:"flex flex-row justify-between",children:F.props.children[1].map((W,B)=>T.jsx("div",{className:"flex gap-1",children:T.jsx(C,{...W.props,onSelect:N})},B))},L))}),M=$=>{a==="range"?!(r!=null&&r.from)||r!=null&&r.from&&(r!=null&&r.to)?i({from:$,to:null}):i({from:r.from,to:$}):a==="multiple"?r.some(N=>An(N,"yyyy-MM-dd")===An($,"yyyy-MM-dd"))?i(r.filter(N=>An(N,"yyyy-MM-dd")!==An($,"yyyy-MM-dd"))):i([...r,$]):a==="single"&&i([$])},D=G("relative bg-background-primary shadow-datepicker-wrapper",e,l==="vertical"?"flex flex-col":"flex flex-row gap-3",s==="normal"?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",s==="presets"?"rounded-tr-md border border-solid border-border-subtle":"",s==="dualdate"?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",d?"rounded-b-none":"rounded-bl-md rounded-br-md");return T.jsx(T.Fragment,{children:T.jsx(zte,{mode:a,selected:r,onSelect:M,hideNavigation:!0,captionLayout:"label",className:G(t),formatters:{formatWeekdayName:YT},classNames:{months:D,month:"flex flex-col p-2 gap-1 text-center border border-border-subtle rounded-md w-full",caption:"relative flex justify-center items-center",table:"w-full border-separate border-spacing-0",head_row:"flex mb-1",head_cell:"text-muted-foreground rounded-md w-10 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",day:"h-10 w-10 p-0 font-normal bg-background-primary text-current",...n},numberOfMonths:u,components:{MonthCaption:A,Day:$=>{const N={selected:$.modifiers.selected||!1,today:$.modifiers.today||!1,disabled:$.modifiers.disabled||!1,outside:$.modifiers.outside||!1,range_middle:$.modifiers.range_middle||!1,range_start:$.modifiers.range_start||!1,range_end:$.modifiers.range_end||!1};return T.jsx(E,{...$,modifiers:N,onSelect:M})},Weekdays:()=>T.jsx(T.Fragment,{}),Months:$=>{var N;return T.jsx(T.Fragment,{children:T.jsx("div",{className:D,children:(N=$==null?void 0:$.children)==null?void 0:N.map((F,L)=>F?T.jsx(O.Fragment,{children:F.map((W,B)=>T.jsxs(O.Fragment,{children:[B>0&&T.jsx("div",{className:"border border-solid border-border-subtle border-l-0"}),W]},B))},L):null)})})},MonthGrid:$=>!p&&!g?T.jsx(k,{monthGridProps:$,onSelect:M}):T.jsx(T.Fragment,{})},...a==="range"?{required:!0}:{},...f})})},Ute=({selectionType:e="single",variant:t="normal",presets:n=[],onCancel:r,onApply:i,onDateSelect:o,applyButtonText:a="Apply",cancelButtonText:s="Cancel",showOutsideDays:l=!0,isFooter:u=!0,...f})=>{const[d,p]=O.useState(()=>e==="multiple"?[]:e==="range"?{from:null,to:null}:null),m=S=>{p(S),o&&o(S)},g=[{label:"Today",range:{from:FT(),to:FT()}},{label:"Yesterday",range:{from:WT(),to:WT()}},{label:"This Week",range:{from:wa(new Date,{weekStartsOn:1}),to:Ap(new Date,{weekStartsOn:1})}},{label:"Last Week",range:{from:wa(zT(new Date,1),{weekStartsOn:1}),to:Ap(zT(new Date,1),{weekStartsOn:1})}},{label:"This Month",range:{from:Wx(new Date),to:Fx(new Date)}},{label:"Last Month",range:{from:Wx(zx(new Date,1)),to:Fx(zx(new Date,1))}}],v=n.length>0?n:g,y=S=>{p(S)},x=()=>{p(e==="multiple"?[]:{from:null,to:null}),r&&r()},w=()=>{i&&i(d)};if(t==="normal")return T.jsx(ib,{...f,mode:e,variant:t,width:"w-[18.5rem]",selectedDates:d,showOutsideDays:l,setSelectedDates:m,footer:u&&T.jsxs("div",{className:"flex justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[T.jsx(zn,{variant:"outline",onClick:x,children:s}),T.jsx(zn,{onClick:w,children:a})]})});if(t==="dualdate")return T.jsx(ib,{mode:e,numberOfMonths:2,alignment:"horizontal",selectedDates:d,setSelectedDates:m,showOutsideDays:l,variant:t,width:"w-auto",footer:T.jsxs("div",{className:"flex justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[T.jsx(zn,{variant:"outline",onClick:x,children:s}),T.jsx(zn,{onClick:w,children:a})]}),...f});if(t==="presets")return T.jsxs("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[T.jsx("div",{className:"flex flex-col gap-1 p-3 items-start border border-solid border-border-subtle border-r-0 rounded-tl-md rounded-bl-md",children:v.map((S,A)=>T.jsx(zn,{onClick:()=>y(S.range),variant:"ghost",className:"font-medium text-sm",children:S.label},A))}),T.jsx(ib,{...f,mode:e,selectedDates:d,setSelectedDates:m,variant:t,showOutsideDays:l,width:"w-auto",numberOfMonths:2,footer:T.jsxs("div",{className:"flex justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[T.jsx(zn,{variant:"outline",onClick:x,children:s}),T.jsx(zn,{onClick:w,children:a})]})})]})},I2=({type:e="simple",defaultValue:t=[],autoClose:n=!1,disabled:r=!1,children:i,className:o})=>{const[a,s]=O.useState(Array.isArray(t)?t:[t]),l=f=>{s(d=>n?d.includes(f)?[]:[f]:d.includes(f)?d.filter(p=>p!==f):[...d,f])},u=e==="boxed"?"space-y-3":"";return T.jsx("div",{className:G(u,o),children:O.Children.map(i,f=>O.isValidElement(f)&&"value"in f.props?O.cloneElement(f,{isOpen:a.includes(f.props.value),onToggle:()=>l(f.props.value),type:e,disabled:r||f.props.disabled}):f)})};I2.displayName="Accordion";const R2=({isOpen:e,onToggle:t,type:n="simple",disabled:r=!1,children:i,className:o})=>{const a={simple:"border-0",separator:"border-0 border-b border-solid border-border-subtle",boxed:"border border-solid border-border-subtle rounded-md"}[n];return T.jsx("div",{className:G(a,o),children:O.Children.map(i,s=>O.isValidElement(s)?O.cloneElement(s,{isOpen:e,onToggle:t,type:n,disabled:r}):s)})};R2.displayName="Accordion.Item";const L2=({onToggle:e,isOpen:t,iconType:n="arrow",disabled:r=!1,tag:i="h3",type:o="simple",children:a,className:s,...l})=>{const u={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[o],f=()=>n==="arrow"?T.jsx(Sw,{className:G("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",t?"rotate-180":"rotate-0")}):n==="plus-minus"?T.jsx(hi.span,{initial:{opacity:0,rotate:t?-180:0},animate:{opacity:1,rotate:t?0:180},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center flex-shrink-0 text-icon-secondary",children:t?T.jsx(vN,{}):T.jsx(bN,{})},t?"minus":"plus"):null,d=i;return T.jsx(d,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:T.jsxs("button",{className:G("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",u,r&&"cursor-not-allowed opacity-40",s),onClick:r?()=>{}:e,"aria-expanded":t,disabled:r,...l,children:[T.jsx("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:a}),f()]})})};L2.displayName="Accordion.Trigger";const B2=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:i})=>{const o={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},a={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return T.jsx(Ps,{initial:!1,children:e&&T.jsx(hi.div,{variants:o,initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:G("overflow-hidden text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",i),"aria-hidden":!e,children:T.jsx("div",{className:G(a),children:r})},"content")})};B2.displayName="Accordion.Content";const Kte=Object.assign(I2,{Item:R2,Trigger:L2,Content:B2});var Hte=Array.isArray,hr=Hte,Gte=typeof Qe.commonjsGlobal=="object"&&Qe.commonjsGlobal&&Qe.commonjsGlobal.Object===Object&&Qe.commonjsGlobal,F2=Gte,Yte=F2,qte=typeof self=="object"&&self&&self.Object===Object&&self,Xte=Yte||qte||Function("return this")(),Ui=Xte,Zte=Ui,Jte=Zte.Symbol,ad=Jte,qT=ad,W2=Object.prototype,Qte=W2.hasOwnProperty,ene=W2.toString,sc=qT?qT.toStringTag:void 0;function tne(e){var t=Qte.call(e,sc),n=e[sc];try{e[sc]=void 0;var r=!0}catch{}var i=ene.call(e);return r&&(t?e[sc]=n:delete e[sc]),i}var nne=tne,rne=Object.prototype,ine=rne.toString;function one(e){return ine.call(e)}var ane=one,XT=ad,sne=nne,lne=ane,une="[object Null]",cne="[object Undefined]",ZT=XT?XT.toStringTag:void 0;function fne(e){return e==null?e===void 0?cne:une:ZT&&ZT in Object(e)?sne(e):lne(e)}var Do=fne;function dne(e){return e!=null&&typeof e=="object"}var Io=dne,hne=Do,pne=Io,mne="[object Symbol]";function gne(e){return typeof e=="symbol"||pne(e)&&hne(e)==mne}var _u=gne,yne=hr,vne=_u,bne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xne=/^\w*$/;function wne(e,t){if(yne(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||vne(e)?!0:xne.test(e)||!bne.test(e)||t!=null&&e in Object(t)}var n_=wne;function _ne(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Pa=_ne;const Su=Qe.getDefaultExportFromCjs(Pa);var Sne=Do,One=Pa,Cne="[object AsyncFunction]",Ane="[object Function]",Pne="[object GeneratorFunction]",Tne="[object Proxy]";function Ene(e){if(!One(e))return!1;var t=Sne(e);return t==Ane||t==Pne||t==Cne||t==Tne}var r_=Ene;const Be=Qe.getDefaultExportFromCjs(r_);var kne=Ui,Mne=kne["__core-js_shared__"],jne=Mne,ob=jne,JT=function(){var e=/[^.]+$/.exec(ob&&ob.keys&&ob.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Nne(e){return!!JT&&JT in e}var $ne=Nne,Dne=Function.prototype,Ine=Dne.toString;function Rne(e){if(e!=null){try{return Ine.call(e)}catch{}try{return e+""}catch{}}return""}var z2=Rne,Lne=r_,Bne=$ne,Fne=Pa,Wne=z2,zne=/[\\^$.*+?()[\]{}|]/g,Vne=/^\[object .+?Constructor\]$/,Une=Function.prototype,Kne=Object.prototype,Hne=Une.toString,Gne=Kne.hasOwnProperty,Yne=RegExp("^"+Hne.call(Gne).replace(zne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qne(e){if(!Fne(e)||Bne(e))return!1;var t=Lne(e)?Yne:Vne;return t.test(Wne(e))}var Xne=qne;function Zne(e,t){return e==null?void 0:e[t]}var Jne=Zne,Qne=Xne,ere=Jne;function tre(e,t){var n=ere(e,t);return Qne(n)?n:void 0}var Ns=tre,nre=Ns,rre=nre(Object,"create"),Og=rre,QT=Og;function ire(){this.__data__=QT?QT(null):{},this.size=0}var ore=ire;function are(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sre=are,lre=Og,ure="__lodash_hash_undefined__",cre=Object.prototype,fre=cre.hasOwnProperty;function dre(e){var t=this.__data__;if(lre){var n=t[e];return n===ure?void 0:n}return fre.call(t,e)?t[e]:void 0}var hre=dre,pre=Og,mre=Object.prototype,gre=mre.hasOwnProperty;function yre(e){var t=this.__data__;return pre?t[e]!==void 0:gre.call(t,e)}var vre=yre,bre=Og,xre="__lodash_hash_undefined__";function wre(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bre&&t===void 0?xre:t,this}var _re=wre,Sre=ore,Ore=sre,Cre=hre,Are=vre,Pre=_re;function Ou(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Ure=Vre,Kre=Cg;function Hre(e,t){var n=this.__data__,r=Kre(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Gre=Hre,Yre=kre,qre=Lre,Xre=Wre,Zre=Ure,Jre=Gre;function Cu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},rs=function(t){return sd(t)&&t.indexOf("%")===t.length-1},ve=function(t){return xoe(t)&&!Pu(t)},fn=function(t){return ve(t)||sd(t)},Ooe=0,$s=function(t){var n=++Ooe;return"".concat(t||"").concat(n)},Qn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ve(t)&&!sd(t))return r;var o;if(rs(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Pu(o)&&(o=r),i&&o>n&&(o=n),o},ia=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Coe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Moe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hx(e){"@babel/helpers - typeof";return Hx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hx(e)}var lE={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},xo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},uE=null,sb=null,f_=function e(t){if(t===uE&&Array.isArray(sb))return sb;var n=[];return O.Children.forEach(t,function(r){Fe(r)||(moe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),sb=n,uE=t,n};function kr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return xo(i)}):r=[xo(t)],f_(e).forEach(function(i){var o=Er(i,"type.displayName")||Er(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Or(e,t){var n=kr(e,t);return n&&n[0]}var cE=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ve(r)||r<=0||!ve(i)||i<=0)},joe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Noe=function(t){return t&&t.type&&sd(t.type)&&joe.indexOf(t.type)>=0},X2=function(t){return t&&Hx(t)==="object"&&"clipDot"in t},$oe=function(t,n,r,i){var o,a=(o=ab==null?void 0:ab[i])!==null&&o!==void 0?o:[];return!Be(t)&&(i&&a.includes(n)||Poe.includes(n))||r&&c_.includes(n)},Te=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(O.isValidElement(t)&&(i=t.props),!Su(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;$oe((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},Gx=function e(t,n){if(t===n)return!0;var r=O.Children.count(t);if(r!==O.Children.count(n))return!1;if(r===0)return!0;if(r===1)return fE(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Boe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qx(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,u=Loe(e,Roe),f=i||{width:n,height:r,x:0,y:0},d=Ue("recharts-surface",o);return O.createElement("svg",Yx({},Te(u,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),O.createElement("title",null,s),O.createElement("desc",null,l),t)}var Foe=["children","className"];function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zoe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var et=O.forwardRef(function(e,t){var n=e.children,r=e.className,i=Woe(e,Foe),o=Ue("recharts-layer",r);return O.createElement("g",Xx({className:o},Te(i,!0),{ref:t}),n)}),Voe=process.env.NODE_ENV!=="production",mi=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:Hoe(e,t,n)}var Yoe=Goe,qoe="\\ud800-\\udfff",Xoe="\\u0300-\\u036f",Zoe="\\ufe20-\\ufe2f",Joe="\\u20d0-\\u20ff",Qoe=Xoe+Zoe+Joe,eae="\\ufe0e\\ufe0f",tae="\\u200d",nae=RegExp("["+tae+qoe+Qoe+eae+"]");function rae(e){return nae.test(e)}var Z2=rae;function iae(e){return e.split("")}var oae=iae,J2="\\ud800-\\udfff",aae="\\u0300-\\u036f",sae="\\ufe20-\\ufe2f",lae="\\u20d0-\\u20ff",uae=aae+sae+lae,cae="\\ufe0e\\ufe0f",fae="["+J2+"]",Zx="["+uae+"]",Jx="\\ud83c[\\udffb-\\udfff]",dae="(?:"+Zx+"|"+Jx+")",Q2="[^"+J2+"]",eL="(?:\\ud83c[\\udde6-\\uddff]){2}",tL="[\\ud800-\\udbff][\\udc00-\\udfff]",hae="\\u200d",nL=dae+"?",rL="["+cae+"]?",pae="(?:"+hae+"(?:"+[Q2,eL,tL].join("|")+")"+rL+nL+")*",mae=rL+nL+pae,gae="(?:"+[Q2+Zx+"?",Zx,eL,tL,fae].join("|")+")",yae=RegExp(Jx+"(?="+Jx+")|"+gae+mae,"g");function vae(e){return e.match(yae)||[]}var bae=vae,xae=oae,wae=Z2,_ae=bae;function Sae(e){return wae(e)?_ae(e):xae(e)}var Oae=Sae,Cae=Yoe,Aae=Z2,Pae=Oae,Tae=H2;function Eae(e){return function(t){t=Tae(t);var n=Aae(t)?Pae(t):void 0,r=n?n[0]:t.charAt(0),i=n?Cae(n,1).join(""):t.slice(1);return r[e]()+i}}var kae=Eae,Mae=kae,jae=Mae("toUpperCase"),Nae=jae;const Eg=Qe.getDefaultExportFromCjs(Nae);function Ct(e){return function(){return e}}const iL=Math.cos,Ep=Math.sin,bi=Math.sqrt,kp=Math.PI,kg=2*kp,Qx=Math.PI,e0=2*Qx,Za=1e-6,$ae=e0-Za;function oL(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return oL;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iZa)if(!(Math.abs(d*l-u*f)>Za)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,g=i-s,v=l*l+u*u,y=m*m+g*g,x=Math.sqrt(v),w=Math.sqrt(p),S=o*Math.tan((Qx-Math.acos((v+p-y)/(2*x*w)))/2),A=S/w,_=S/x;Math.abs(A-1)>Za&&this._append`L${t+A*f},${n+A*d}`,this._append`A${o},${o},0,0,${+(d*m>f*g)},${this._x1=t+_*l},${this._y1=n+_*u}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,f=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Za||Math.abs(this._y1-f)>Za)&&this._append`L${u},${f}`,r&&(p<0&&(p=p%e0+e0),p>$ae?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:p>Za&&this._append`A${r},${r},0,${+(p>=Qx)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function d_(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Iae(t)}function h_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function aL(e){this._context=e}aL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Mg(e){return new aL(e)}function sL(e){return e[0]}function lL(e){return e[1]}function uL(e,t){var n=Ct(!0),r=null,i=Mg,o=null,a=d_(s);e=typeof e=="function"?e:e===void 0?sL:Ct(e),t=typeof t=="function"?t:t===void 0?lL:Ct(t);function s(l){var u,f=(l=h_(l)).length,d,p=!1,m;for(r==null&&(o=i(m=a())),u=0;u<=f;++u)!(u=m;--g)s.point(S[g],A[g]);s.lineEnd(),s.areaEnd()}x&&(S[p]=+e(y,p,d),A[p]=+t(y,p,d),s.point(r?+r(y,p,d):S[p],n?+n(y,p,d):A[p]))}if(w)return s=null,w+""||null}function f(){return uL().defined(i).curve(a).context(o)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ct(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ct(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ct(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ct(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ct(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ct(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Ct(!!d),u):i},u.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),u):a},u.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),u):o},u}class cL{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Rae(e){return new cL(e,!0)}function Lae(e){return new cL(e,!1)}const p_={draw(e,t){const n=bi(t/kp);e.moveTo(n,0),e.arc(0,0,n,0,kg)}},Bae={draw(e,t){const n=bi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},fL=bi(1/3),Fae=fL*2,Wae={draw(e,t){const n=bi(t/Fae),r=n*fL;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},zae={draw(e,t){const n=bi(t),r=-n/2;e.rect(r,r,n,n)}},Vae=.8908130915292852,dL=Ep(kp/10)/Ep(7*kp/10),Uae=Ep(kg/10)*dL,Kae=-iL(kg/10)*dL,Hae={draw(e,t){const n=bi(t*Vae),r=Uae*n,i=Kae*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=kg*o/5,s=iL(a),l=Ep(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},lb=bi(3),Gae={draw(e,t){const n=-bi(t/(lb*3));e.moveTo(0,n*2),e.lineTo(-lb*n,-n),e.lineTo(lb*n,-n),e.closePath()}},Hr=-.5,Gr=bi(3)/2,t0=1/bi(12),Yae=(t0/2+1)*3,qae={draw(e,t){const n=bi(t/Yae),r=n/2,i=n*t0,o=r,a=n*t0+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Hr*r-Gr*i,Gr*r+Hr*i),e.lineTo(Hr*o-Gr*a,Gr*o+Hr*a),e.lineTo(Hr*s-Gr*l,Gr*s+Hr*l),e.lineTo(Hr*r+Gr*i,Hr*i-Gr*r),e.lineTo(Hr*o+Gr*a,Hr*a-Gr*o),e.lineTo(Hr*s+Gr*l,Hr*l-Gr*s),e.closePath()}};function Xae(e,t){let n=null,r=d_(i);e=typeof e=="function"?e:Ct(e||p_),t=typeof t=="function"?t:Ct(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ct(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ct(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Mp(){}function jp(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function hL(e){this._context=e}hL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:jp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:jp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zae(e){return new hL(e)}function pL(e){this._context=e}pL.prototype={areaStart:Mp,areaEnd:Mp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:jp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jae(e){return new pL(e)}function mL(e){this._context=e}mL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:jp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qae(e){return new mL(e)}function gL(e){this._context=e}gL.prototype={areaStart:Mp,areaEnd:Mp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ese(e){return new gL(e)}function hE(e){return e<0?-1:1}function pE(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(hE(o)+hE(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function mE(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ub(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Np(e){this._context=e}Np.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ub(this,this._t0,mE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ub(this,mE(this,n=pE(this,e,t)),n);break;default:ub(this,this._t0,n=pE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function yL(e){this._context=new vL(e)}(yL.prototype=Object.create(Np.prototype)).point=function(e,t){Np.prototype.point.call(this,t,e)};function vL(e){this._context=e}vL.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function tse(e){return new Np(e)}function nse(e){return new yL(e)}function bL(e){this._context=e}bL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=gE(e),i=gE(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function ise(e){return new jg(e,.5)}function ose(e){return new jg(e,0)}function ase(e){return new jg(e,1)}function Ll(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function sse(e,t){return e[t]}function lse(e){const t=[];return t.key=e,t}function use(){var e=Ct([]),t=n0,n=Ll,r=sse;function i(o){var a=Array.from(e.apply(this,arguments),lse),s,l=a.length,u=-1,f;for(const d of o)for(s=0,++u;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var xL={symbolCircle:p_,symbolCross:Bae,symbolDiamond:Wae,symbolSquare:zae,symbolStar:Hae,symbolTriangle:Gae,symbolWye:qae},bse=Math.PI/180,xse=function(t){var n="symbol".concat(Eg(t));return xL[n]||p_},wse=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*bse;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},_se=function(t,n){xL["symbol".concat(Eg(t))]=n},m_=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,l=yse(t,hse),u=vE(vE({},l),{},{type:r,size:o,sizeType:s}),f=function(){var y=xse(r),x=Xae().type(y).size(wse(o,s,r));return x()},d=u.className,p=u.cx,m=u.cy,g=Te(u,!0);return p===+p&&m===+m&&o===+o?O.createElement("path",r0({},g,{className:Ue("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(m,")"),d:f()})):null};m_.registerSymbol=_se;function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function i0(){return i0=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var w=m.inactive?u:m.color;return O.createElement("li",i0({className:y,style:d,key:"legend-item-".concat(g)},ws(r.props,m,g)),O.createElement(qx,{width:a,height:a,viewBox:f,style:p},r.renderIcon(m)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},v?v(x,m,g):x))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return O.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(O.PureComponent);af(g_,"displayName","Legend");af(g_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var jse=Ag;function Nse(){this.__data__=new jse,this.size=0}var $se=Nse;function Dse(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Ise=Dse;function Rse(e){return this.__data__.get(e)}var Lse=Rse;function Bse(e){return this.__data__.has(e)}var Fse=Bse,Wse=Ag,zse=o_,Vse=a_,Use=200;function Kse(e,t){var n=this.__data__;if(n instanceof Wse){var r=n.__data__;if(!zse||r.lengths))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,m=n&hle?new ule:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=yue}var x_=vue,bue=Do,xue=x_,wue=Io,_ue="[object Arguments]",Sue="[object Array]",Oue="[object Boolean]",Cue="[object Date]",Aue="[object Error]",Pue="[object Function]",Tue="[object Map]",Eue="[object Number]",kue="[object Object]",Mue="[object RegExp]",jue="[object Set]",Nue="[object String]",$ue="[object WeakMap]",Due="[object ArrayBuffer]",Iue="[object DataView]",Rue="[object Float32Array]",Lue="[object Float64Array]",Bue="[object Int8Array]",Fue="[object Int16Array]",Wue="[object Int32Array]",zue="[object Uint8Array]",Vue="[object Uint8ClampedArray]",Uue="[object Uint16Array]",Kue="[object Uint32Array]",Mt={};Mt[Rue]=Mt[Lue]=Mt[Bue]=Mt[Fue]=Mt[Wue]=Mt[zue]=Mt[Vue]=Mt[Uue]=Mt[Kue]=!0;Mt[_ue]=Mt[Sue]=Mt[Due]=Mt[Oue]=Mt[Iue]=Mt[Cue]=Mt[Aue]=Mt[Pue]=Mt[Tue]=Mt[Eue]=Mt[kue]=Mt[Mue]=Mt[jue]=Mt[Nue]=Mt[$ue]=!1;function Hue(e){return wue(e)&&xue(e.length)&&!!Mt[bue(e)]}var Gue=Hue;function Yue(e){return function(t){return e(t)}}var ML=Yue,Rp={exports:{}};Rp.exports;(function(e,t){var n=F2,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(Rp,Rp.exports);var que=Rp.exports,Xue=Gue,Zue=ML,CE=que,AE=CE&&CE.isTypedArray,Jue=AE?Zue(AE):Xue,jL=Jue,Que=nue,ece=v_,tce=hr,nce=kL,rce=b_,ice=jL,oce=Object.prototype,ace=oce.hasOwnProperty;function sce(e,t){var n=tce(e),r=!n&&ece(e),i=!n&&!r&&nce(e),o=!n&&!r&&!i&&ice(e),a=n||r||i||o,s=a?Que(e.length,String):[],l=s.length;for(var u in e)(t||ace.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||rce(u,l)))&&s.push(u);return s}var lce=sce,uce=Object.prototype;function cce(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||uce;return e===n}var fce=cce;function dce(e,t){return function(n){return e(t(n))}}var NL=dce,hce=NL,pce=hce(Object.keys,Object),mce=pce,gce=fce,yce=mce,vce=Object.prototype,bce=vce.hasOwnProperty;function xce(e){if(!gce(e))return yce(e);var t=[];for(var n in Object(e))bce.call(e,n)&&n!="constructor"&&t.push(n);return t}var wce=xce,_ce=r_,Sce=x_;function Oce(e){return e!=null&&Sce(e.length)&&!_ce(e)}var ld=Oce,Cce=lce,Ace=wce,Pce=ld;function Tce(e){return Pce(e)?Cce(e):Ace(e)}var Ng=Tce,Ece=Ule,kce=eue,Mce=Ng;function jce(e){return Ece(e,Mce,kce)}var Nce=jce,PE=Nce,$ce=1,Dce=Object.prototype,Ice=Dce.hasOwnProperty;function Rce(e,t,n,r,i,o){var a=n&$ce,s=PE(e),l=s.length,u=PE(t),f=u.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:Ice.call(t,p)))return!1}var m=o.get(e),g=o.get(t);if(m&&g)return m==t&&g==e;var v=!0;o.set(e,t),o.set(t,e);for(var y=a;++d-1}var Dde=$de;function Ide(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Zde){var u=t?null:qde(e);if(u)return Xde(u);a=!1,i=Yde,l=new Kde}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hhe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function phe(e){return e.value}function mhe(e,t){if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return O.createElement(e,t);t.ref;var n=dhe(t,ihe);return O.createElement(g_,n)}var VE=1,wo=function(e){function t(){var n;ohe(this,t);for(var r=arguments.length,i=new Array(r),o=0;oVE||Math.abs(i.height-this.lastBoundingBox.height)>VE)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?io({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();p={top:((f||0)-g.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return io(io({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=io(io({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return O.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},mhe(o,io(io({},this.props),{},{payload:FL(f,u,phe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=io(io({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&ve(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(O.PureComponent);$g(wo,"displayName","Legend");$g(wo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var UE=ad,ghe=v_,yhe=hr,KE=UE?UE.isConcatSpreadable:void 0;function vhe(e){return yhe(e)||ghe(e)||!!(KE&&e&&e[KE])}var bhe=vhe,xhe=TL,whe=bhe;function VL(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=whe),i||(i=[]);++o0&&n(s)?t>1?VL(s,t-1,n,r,i):xhe(i,s):r||(i[i.length]=s)}return i}var UL=VL;function _he(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var She=_he,Ohe=She,Che=Ohe(),Ahe=Che,Phe=Ahe,The=Ng;function Ehe(e,t){return e&&Phe(e,t,The)}var KL=Ehe,khe=ld;function Mhe(e,t){return function(n,r){if(n==null)return n;if(!khe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Khe=Uhe,hb=l_,Hhe=u_,Ghe=Ki,Yhe=HL,qhe=Fhe,Xhe=ML,Zhe=Khe,Jhe=ku,Qhe=hr;function epe(e,t,n){t.length?t=hb(t,function(o){return Qhe(o)?function(a){return Hhe(a,o.length===1?o[0]:o)}:o}):t=[Jhe];var r=-1;t=hb(t,Xhe(Ghe));var i=Yhe(e,function(o,a,s){var l=hb(t,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return qhe(i,function(o,a){return Zhe(o,a,n)})}var tpe=epe;function npe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var rpe=npe,ipe=rpe,GE=Math.max;function ope(e,t,n){return t=GE(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=GE(r.length-t,0),a=Array(o);++i0){if(++t>=mpe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var bpe=vpe,xpe=ppe,wpe=bpe,_pe=wpe(xpe),Spe=_pe,Ope=ku,Cpe=ape,Ape=Spe;function Ppe(e,t){return Ape(Cpe(e,t,Ope),e+"")}var Tpe=Ppe,Epe=i_,kpe=ld,Mpe=b_,jpe=Pa;function Npe(e,t,n){if(!jpe(n))return!1;var r=typeof t;return(r=="number"?kpe(n)&&Mpe(t,n.length):r=="string"&&t in n)?Epe(n[t],e):!1}var Dg=Npe,$pe=UL,Dpe=tpe,Ipe=Tpe,qE=Dg,Rpe=Ipe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&qE(e,t[0],t[1])?t=[]:n>2&&qE(t[0],t[1],t[2])&&(t=[t[0]]),Dpe(e,$pe(t,1),[])}),Lpe=Rpe;const S_=Qe.getDefaultExportFromCjs(Lpe);function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function d0(){return d0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(lc,"-left"),ve(n)&&t&&ve(t.x)&&n=t.y),"".concat(lc,"-top"),ve(r)&&t&&ve(t.y)&&rv?Math.max(f,l[r]):Math.max(d,l[r])}function Qpe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function eme(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return a.height>0&&a.width>0&&n?(f=JE({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=JE({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),u=Qpe({translateX:f,translateY:d,useTranslate3d:s})):u=Zpe,{cssProperties:u,cssClasses:Jpe({translateX:f,translateY:d,coordinate:n})}}function Wl(e){"@babel/helpers - typeof";return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function QE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ek(e){for(var t=1;ttk||Math.abs(r.height-this.state.lastBoundingBox.height)>tk)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,m=i.offset,g=i.position,v=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,w=i.wrapperStyle,S=eme({allowEscapeViewBox:a,coordinate:f,offsetTopLeft:m,position:g,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),A=S.cssClasses,_=S.cssProperties,C=ek(ek({transition:p&&o?"transform ".concat(s,"ms ").concat(l):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},w);return O.createElement("div",{tabIndex:-1,className:A,style:C,ref:function(k){r.wrapperNode=k}},u)}}])}(O.PureComponent),cme=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gi={isSsr:cme(),get:function(t){return gi[t]},set:function(t,n){if(typeof t=="string")gi[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){gi[i]=t[i]})}}};function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rk(e){for(var t=1;t0;return O.createElement(ume,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:p,active:o,coordinate:f,hasPayload:C,offset:m,position:y,reverseDirection:x,useTranslate3d:w,viewBox:S,wrapperStyle:A},xme(u,rk(rk({},this.props),{},{payload:_})))}}])}(O.PureComponent);O_(Cr,"displayName","Tooltip");O_(Cr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gi.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var wme=Ui,_me=function(){return wme.Date.now()},Sme=_me,Ome=/\s/;function Cme(e){for(var t=e.length;t--&&Ome.test(e.charAt(t)););return t}var Ame=Cme,Pme=Ame,Tme=/^\s+/;function Eme(e){return e&&e.slice(0,Pme(e)+1).replace(Tme,"")}var kme=Eme,Mme=kme,ik=Pa,jme=_u,ok=NaN,Nme=/^[-+]0x[0-9a-f]+$/i,$me=/^0b[01]+$/i,Dme=/^0o[0-7]+$/i,Ime=parseInt;function Rme(e){if(typeof e=="number")return e;if(jme(e))return ok;if(ik(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ik(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Mme(e);var n=$me.test(e);return n||Dme.test(e)?Ime(e.slice(2),n?2:8):Nme.test(e)?ok:+e}var JL=Rme,Lme=Pa,mb=Sme,ak=JL,Bme="Expected a function",Fme=Math.max,Wme=Math.min;function zme(e,t,n){var r,i,o,a,s,l,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(Bme);t=ak(t)||0,Lme(n)&&(f=!!n.leading,d="maxWait"in n,o=d?Fme(ak(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p);function m(C){var E=r,k=i;return r=i=void 0,u=C,a=e.apply(k,E),a}function g(C){return u=C,s=setTimeout(x,t),f?m(C):a}function v(C){var E=C-l,k=C-u,M=t-E;return d?Wme(M,o-k):M}function y(C){var E=C-l,k=C-u;return l===void 0||E>=t||E<0||d&&k>=o}function x(){var C=mb();if(y(C))return w(C);s=setTimeout(x,v(C))}function w(C){return s=void 0,p&&r?m(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function A(){return s===void 0?a:w(mb())}function _(){var C=mb(),E=y(C);if(r=arguments,i=this,l=C,E){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(x,t),m(l)}return s===void 0&&(s=setTimeout(x,t)),a}return _.cancel=S,_.flush=A,_}var Vme=zme,Ume=Vme,Kme=Pa,Hme="Expected a function";function Gme(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Hme);return Kme(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ume(e,t,{leading:r,maxWait:t,trailing:i})}var Yme=Gme;const QL=Qe.getDefaultExportFromCjs(Yme);function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}function sk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ch(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(F=QL(F,v,{trailing:!0,leading:!1}));var L=new ResizeObserver(F),W=_.current.getBoundingClientRect(),B=W.width,z=W.height;return $(B,z),L.observe(_.current),function(){L.disconnect()}},[$,v]);var N=O.useMemo(function(){var F=M.containerWidth,L=M.containerHeight;if(F<0||L<0)return null;mi(rs(a)||rs(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,l),mi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var W=rs(a)?F:a,B=rs(l)?L:l;n&&n>0&&(W?B=W/n:B&&(W=B*n),p&&B>p&&(B=p)),mi(W>0||B>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,W,B,a,l,f,d,n);var z=!Array.isArray(m)&&xo(m.type).endsWith("Chart");return O.Children.map(m,function(H){return O.isValidElement(H)?O.cloneElement(H,Ch({width:W,height:B},z?{style:Ch({height:"100%",width:"100%",maxHeight:B,maxWidth:W},H.props.style)}:{})):H})},[n,m,l,p,d,f,M,a]);return O.createElement("div",{id:y?"".concat(y):void 0,className:Ue("recharts-responsive-container",x),style:Ch(Ch({},A),{},{width:a,height:l,minWidth:f,minHeight:d,maxHeight:p}),ref:_},N)}),C_=function(t){return null};C_.displayName="Cell";function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function g0(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||gi.isSsr)return{width:0,height:0};var r=lge(n),i=JSON.stringify({text:t,copyStyle:r});if(tl.widthCache[i])return tl.widthCache[i];try{var o=document.getElementById(ck);o||(o=document.createElement("span"),o.setAttribute("id",ck),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=g0(g0({},sge),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return tl.widthCache[i]=l,++tl.cacheCount>age&&(tl.cacheCount=0,tl.widthCache={}),l}catch{return{width:0,height:0}}},uge=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ff(e){"@babel/helpers - typeof";return ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ff(e)}function Wp(e,t){return hge(e)||dge(e,t)||fge(e,t)||cge()}function cge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fge(e,t){if(e){if(typeof e=="string")return fk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fk(e,t)}}function fk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yk(e,t){return Mge(e)||kge(e,t)||Ege(e,t)||Tge()}function Tge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ege(e,t){if(e){if(typeof e=="string")return vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vk(e,t)}}function vk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return W.reduce(function(B,z){var H=z.word,U=z.width,K=B[B.length-1];if(K&&(i==null||o||K.width+U+rz.width?B:z})};if(!f)return m;for(var v="…",y=function(W){var B=d.slice(0,W),z=iB({breakAll:u,style:l,children:B+v}).wordsWithComputedWidth,H=p(z),U=H.length>a||g(H).width>Number(i);return[U,H]},x=0,w=d.length-1,S=0,A;x<=w&&S<=d.length-1;){var _=Math.floor((x+w)/2),C=_-1,E=y(C),k=yk(E,2),M=k[0],D=k[1],$=y(_),N=yk($,1),F=N[0];if(!M&&!F&&(x=_+1),M&&F&&(w=_-1),!M&&F){A=D;break}S++}return A||m},bk=function(t){var n=Fe(t)?[]:t.toString().split(rB);return[{words:n}]},Nge=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!gi.isSsr){var l,u,f=iB({breakAll:a,children:i,style:o});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;l=d,u=p}else return bk(i);return jge({breakAll:a,children:i,maxLines:s,style:o},l,u,n,r)}return bk(i)},xk="#808080",_s=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,m=p===void 0?"start":p,g=t.verticalAnchor,v=g===void 0?"end":g,y=t.fill,x=y===void 0?xk:y,w=gk(t,Cge),S=O.useMemo(function(){return Nge({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:d,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,d,w.style,w.width]),A=w.dx,_=w.dy,C=w.angle,E=w.className,k=w.breakAll,M=gk(w,Age);if(!fn(r)||!fn(o))return null;var D=r+(ve(A)?A:0),$=o+(ve(_)?_:0),N;switch(v){case"start":N=gb("calc(".concat(u,")"));break;case"middle":N=gb("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:N=gb("calc(".concat(S.length-1," * -").concat(s,")"));break}var F=[];if(d){var L=S[0].width,W=w.width;F.push("scale(".concat((ve(W)?W/L:1)/L,")"))}return C&&F.push("rotate(".concat(C,", ").concat(D,", ").concat($,")")),F.length&&(M.transform=F.join(" ")),O.createElement("text",y0({},Te(M,!0),{x:D,y:$,className:Ue("recharts-text",E),textAnchor:m,fill:x.includes("url")?xk:x}),S.map(function(B,z){var H=B.words.join(k?"":" ");return O.createElement("tspan",{x:D,dy:z===0?N:s,key:"".concat(H,"-").concat(z)},H)}))};function fa(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function $ge(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function A_(e){let t,n,r;e.length!==2?(t=fa,n=(s,l)=>fa(e(s),l),r=(s,l)=>e(s)-l):(t=e===fa||e===$ge?e:Dge,n=e,r=e);function i(s,l,u=0,f=s.length){if(u>>1;n(s[d],l)<0?u=d+1:f=d}while(u>>1;n(s[d],l)<=0?u=d+1:f=d}while(uu&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function Dge(){return 0}function oB(e){return e===null?NaN:+e}function*Ige(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Rge=A_(fa),ud=Rge.right;A_(oB).center;class wk extends Map{constructor(t,n=Fge){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(_k(this,t))}has(t){return super.has(_k(this,t))}set(t,n){return super.set(Lge(this,t),n)}delete(t){return super.delete(Bge(this,t))}}function _k({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Lge({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Bge({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Fge(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Wge(e=fa){if(e===fa)return aB;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function aB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const zge=Math.sqrt(50),Vge=Math.sqrt(10),Uge=Math.sqrt(2);function zp(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=zge?10:o>=Vge?5:o>=Uge?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u=r)&&(n=r);return n}function Ok(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function sB(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?aB:Wge(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/l+p)),g=Math.min(r,Math.floor(t+(l-u)*d/l+p));sB(e,t,m,g,i)}const o=e[t];let a=n,s=r;for(uc(e,n,t),i(e[r],o)>0&&uc(e,n,r);a0;)--s}i(e[n],o)===0?uc(e,n,s):(++s,uc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function uc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Kge(e,t,n){if(e=Float64Array.from(Ige(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Ok(e);if(t>=1)return Sk(e);var r,i=(r-1)*t,o=Math.floor(i),a=Sk(sB(e,o).subarray(0,o+1)),s=Ok(e.subarray(o+1));return a+(s-a)*(i-o)}}function Hge(e,t,n=oB){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function Gge(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ph(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ph(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=qge.exec(e))?new ur(t[1],t[2],t[3],1):(t=Xge.exec(e))?new ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Zge.exec(e))?Ph(t[1],t[2],t[3],t[4]):(t=Jge.exec(e))?Ph(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Qge.exec(e))?Mk(t[1],t[2]/100,t[3]/100,1):(t=eye.exec(e))?Mk(t[1],t[2]/100,t[3]/100,t[4]):Ck.hasOwnProperty(e)?Tk(Ck[e]):e==="transparent"?new ur(NaN,NaN,NaN,0):null}function Tk(e){return new ur(e>>16&255,e>>8&255,e&255,1)}function Ph(e,t,n,r){return r<=0&&(e=t=n=NaN),new ur(e,t,n,r)}function rye(e){return e instanceof cd||(e=mf(e)),e?(e=e.rgb(),new ur(e.r,e.g,e.b,e.opacity)):new ur}function _0(e,t,n,r){return arguments.length===1?rye(e):new ur(e,t,n,r??1)}function ur(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}T_(ur,_0,uB(cd,{brighter(e){return e=e==null?Vp:Math.pow(Vp,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hf:Math.pow(hf,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ur(ds(this.r),ds(this.g),ds(this.b),Up(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:Ek,formatHex:Ek,formatHex8:iye,formatRgb:kk,toString:kk}));function Ek(){return`#${is(this.r)}${is(this.g)}${is(this.b)}`}function iye(){return`#${is(this.r)}${is(this.g)}${is(this.b)}${is((isNaN(this.opacity)?1:this.opacity)*255)}`}function kk(){const e=Up(this.opacity);return`${e===1?"rgb(":"rgba("}${ds(this.r)}, ${ds(this.g)}, ${ds(this.b)}${e===1?")":`, ${e})`}`}function Up(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ds(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function is(e){return e=ds(e),(e<16?"0":"")+e.toString(16)}function Mk(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new di(e,t,n,r)}function cB(e){if(e instanceof di)return new di(e.h,e.s,e.l,e.opacity);if(e instanceof cd||(e=mf(e)),!e)return new di;if(e instanceof di)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&l<1?0:a,new di(a,s,l,e.opacity)}function oye(e,t,n,r){return arguments.length===1?cB(e):new di(e,t,n,r??1)}function di(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}T_(di,oye,uB(cd,{brighter(e){return e=e==null?Vp:Math.pow(Vp,e),new di(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hf:Math.pow(hf,e),new di(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ur(yb(e>=240?e-240:e+120,i,r),yb(e,i,r),yb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new di(jk(this.h),Th(this.s),Th(this.l),Up(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=Up(this.opacity);return`${e===1?"hsl(":"hsla("}${jk(this.h)}, ${Th(this.s)*100}%, ${Th(this.l)*100}%${e===1?")":`, ${e})`}`}}));function jk(e){return e=(e||0)%360,e<0?e+360:e}function Th(e){return Math.max(0,Math.min(1,e||0))}function yb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const E_=e=>()=>e;function aye(e,t){return function(n){return e+n*t}}function sye(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function lye(e){return(e=+e)==1?fB:function(t,n){return n-t?sye(t,n,e):E_(isNaN(t)?n:t)}}function fB(e,t){var n=t-e;return n?aye(e,n):E_(isNaN(e)?t:e)}const Nk=function e(t){var n=lye(t);function r(i,o){var a=n((i=_0(i)).r,(o=_0(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=fB(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function uye(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Kp(r,i)})),n=vb.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function xye(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?wye:xye,l=u=null,d}function d(p){return p==null||isNaN(p=+p)?o:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return d.invert=function(p){return a(i((u||(u=s(t,e.map(r),Kp)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Hp),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=k_,f()},d.clamp=function(p){return arguments.length?(a=p?!0:er,f()):a!==er},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,m){return r=p,i=m,f()}}function M_(){return Ig()(er,er)}function _ye(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Gp(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 Vl(e){return e=Gp(Math.abs(e)),e?e[1]:NaN}function Sye(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Oye(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Cye=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gf(e){if(!(t=Cye.exec(e)))throw new Error("invalid format: "+e);var t;return new j_({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]})}gf.prototype=j_.prototype;function j_(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}j_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Aye(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var dB;function Pye(e,t){var n=Gp(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(dB=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Gp(e,Math.max(0,t+o-1))[0]}function Dk(e,t){var n=Gp(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Ik={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:_ye,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)=>Dk(e*100,t),r:Dk,s:Pye,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Rk(e){return e}var Lk=Array.prototype.map,Bk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tye(e){var t=e.grouping===void 0||e.thousands===void 0?Rk:Sye(Lk.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Rk:Oye(Lk.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=gf(d);var p=d.fill,m=d.align,g=d.sign,v=d.symbol,y=d.zero,x=d.width,w=d.comma,S=d.precision,A=d.trim,_=d.type;_==="n"?(w=!0,_="g"):Ik[_]||(S===void 0&&(S=12),A=!0,_="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",E=v==="$"?r:/[%p]/.test(_)?a:"",k=Ik[_],M=/[defgprs%]/.test(_);S=S===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function D($){var N=C,F=E,L,W,B;if(_==="c")F=k($)+F,$="";else{$=+$;var z=$<0||1/$<0;if($=isNaN($)?l:k(Math.abs($),S),A&&($=Aye($)),z&&+$==0&&g!=="+"&&(z=!1),N=(z?g==="("?g:s:g==="-"||g==="("?"":g)+N,F=(_==="s"?Bk[8+dB/3]:"")+F+(z&&g==="("?")":""),M){for(L=-1,W=$.length;++LB||B>57){F=(B===46?i+$.slice(L+1):$.slice(L))+F,$=$.slice(0,L);break}}}w&&!y&&($=t($,1/0));var H=N.length+$.length+F.length,U=H>1)+N+$+F+U.slice(H);break;default:$=U+N+$+F;break}return o($)}return D.toString=function(){return d+""},D}function f(d,p){var m=u((d=gf(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Vl(p)/3)))*3,v=Math.pow(10,-g),y=Bk[8+g/3];return function(x){return m(v*x)+y}}return{format:u,formatPrefix:f}}var Eh,N_,hB;Eye({thousands:",",grouping:[3],currency:["$",""]});function Eye(e){return Eh=Tye(e),N_=Eh.format,hB=Eh.formatPrefix,Eh}function kye(e){return Math.max(0,-Vl(Math.abs(e)))}function Mye(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vl(t)/3)))*3-Vl(Math.abs(e)))}function jye(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vl(t)-Vl(e))+1}function pB(e,t,n,r){var i=x0(e,t,n),o;switch(r=gf(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Mye(i,a))&&(r.precision=o),hB(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=jye(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=kye(i))&&(r.precision=o-(r.type==="%")*2);break}}return N_(r)}function Ta(e){var t=e.domain;return e.ticks=function(n){var r=t();return v0(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return pB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,f=10;for(s0;){if(u=b0(a,s,n),u===l)return r[i]=a,r[o]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function Yp(){var e=M_();return e.copy=function(){return fd(e,Yp())},Qr.apply(e,arguments),Ta(e)}function mB(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Hp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return mB(e).unknown(t)},e=arguments.length?Array.from(e,Hp):[0,1],Ta(n)}function gB(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function Rye(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function zk(e){return(t,n)=>-e(-t,n)}function $_(e){const t=e(Fk,Wk),n=t.domain;let r=10,i,o;function a(){return i=Rye(r),o=Iye(r),n()[0]<0?(i=zk(i),o=zk(o),e(Nye,$ye)):e(Fk,Wk),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f0){for(;p<=m;++p)for(g=1;gf)break;x.push(v)}}else for(;p<=m;++p)for(g=r-1;g>=1;--g)if(v=p>0?g/o(-p):g*o(p),!(vf)break;x.push(v)}x.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=gf(l)).precision==null&&(l.trim=!0),l=N_(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*rn(gB(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function yB(){const e=$_(Ig()).domain([1,10]);return e.copy=()=>fd(e,yB()).base(e.base()),Qr.apply(e,arguments),e}function Vk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Uk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function D_(e){var t=1,n=e(Vk(t),Uk(t));return n.constant=function(r){return arguments.length?e(Vk(t=+r),Uk(t)):t},Ta(n)}function vB(){var e=D_(Ig());return e.copy=function(){return fd(e,vB()).constant(e.constant())},Qr.apply(e,arguments)}function Kk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Lye(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Bye(e){return e<0?-e*e:e*e}function I_(e){var t=e(er,er),n=1;function r(){return n===1?e(er,er):n===.5?e(Lye,Bye):e(Kk(n),Kk(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ta(t)}function R_(){var e=I_(Ig());return e.copy=function(){return fd(e,R_()).exponent(e.exponent())},Qr.apply(e,arguments),e}function Fye(){return R_.apply(null,arguments).exponent(.5)}function Hk(e){return Math.sign(e)*e*e}function Wye(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function bB(){var e=M_(),t=[0,1],n=!1,r;function i(o){var a=Wye(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(Hk(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Hp)).map(Hk)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return bB(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Qr.apply(i,arguments),Ta(i)}function xB(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return wB().domain([e,t]).range(i).unknown(o)},Qr.apply(Ta(a),arguments)}function _B(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[ud(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return _B().domain(e).range(t).unknown(n)},Qr.apply(i,arguments)}const bb=new Date,xb=new Date;function hn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return l;let u;do l.push(u=new Date(+o)),t(o,s),e(o);while(uhn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(bb.setTime(+o),xb.setTime(+a),e(bb),e(xb),Math.floor(n(bb,xb))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const qp=hn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);qp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?hn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):qp);qp.range;const fo=1e3,Zr=fo*60,ho=Zr*60,To=ho*24,L_=To*7,Gk=To*30,wb=To*365,os=hn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*fo)},(e,t)=>(t-e)/fo,e=>e.getUTCSeconds());os.range;const B_=hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fo)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getMinutes());B_.range;const F_=hn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getUTCMinutes());F_.range;const W_=hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fo-e.getMinutes()*Zr)},(e,t)=>{e.setTime(+e+t*ho)},(e,t)=>(t-e)/ho,e=>e.getHours());W_.range;const z_=hn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ho)},(e,t)=>(t-e)/ho,e=>e.getUTCHours());z_.range;const dd=hn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zr)/To,e=>e.getDate()-1);dd.range;const Rg=hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/To,e=>e.getUTCDate()-1);Rg.range;const SB=hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/To,e=>Math.floor(e/To));SB.range;function Ds(e){return hn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Zr)/L_)}const Lg=Ds(0),Xp=Ds(1),zye=Ds(2),Vye=Ds(3),Ul=Ds(4),Uye=Ds(5),Kye=Ds(6);Lg.range;Xp.range;zye.range;Vye.range;Ul.range;Uye.range;Kye.range;function Is(e){return hn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/L_)}const Bg=Is(0),Zp=Is(1),Hye=Is(2),Gye=Is(3),Kl=Is(4),Yye=Is(5),qye=Is(6);Bg.range;Zp.range;Hye.range;Gye.range;Kl.range;Yye.range;qye.range;const V_=hn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());V_.range;const U_=hn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());U_.range;const Eo=hn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Eo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Eo.range;const ko=hn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ko.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ko.range;function OB(e,t,n,r,i,o){const a=[[os,1,fo],[os,5,5*fo],[os,15,15*fo],[os,30,30*fo],[o,1,Zr],[o,5,5*Zr],[o,15,15*Zr],[o,30,30*Zr],[i,1,ho],[i,3,3*ho],[i,6,6*ho],[i,12,12*ho],[r,1,To],[r,2,2*To],[n,1,L_],[t,1,Gk],[t,3,3*Gk],[e,1,wb]];function s(u,f,d){const p=fy).right(a,p);if(m===a.length)return e.every(x0(u/wb,f/wb,d));if(m===0)return qp.every(Math.max(x0(u,f,d),1));const[g,v]=a[p/a[m-1][2]53)return null;"w"in X||(X.w=1),"Z"in X?(pe=Sb(cc(X.y,0,1)),Ie=pe.getUTCDay(),pe=Ie>4||Ie===0?Zp.ceil(pe):Zp(pe),pe=Rg.offset(pe,(X.V-1)*7),X.y=pe.getUTCFullYear(),X.m=pe.getUTCMonth(),X.d=pe.getUTCDate()+(X.w+6)%7):(pe=_b(cc(X.y,0,1)),Ie=pe.getDay(),pe=Ie>4||Ie===0?Xp.ceil(pe):Xp(pe),pe=dd.offset(pe,(X.V-1)*7),X.y=pe.getFullYear(),X.m=pe.getMonth(),X.d=pe.getDate()+(X.w+6)%7)}else("W"in X||"U"in X)&&("w"in X||(X.w="u"in X?X.u%7:"W"in X?1:0),Ie="Z"in X?Sb(cc(X.y,0,1)).getUTCDay():_b(cc(X.y,0,1)).getDay(),X.m=0,X.d="W"in X?(X.w+6)%7+X.W*7-(Ie+5)%7:X.w+X.U*7-(Ie+6)%7);return"Z"in X?(X.H+=X.Z/100|0,X.M+=X.Z%100,Sb(X)):_b(X)}}function k(Q,fe,ye,X){for(var Re=0,pe=fe.length,Ie=ye.length,Ze,tt;Re=Ie)return-1;if(Ze=fe.charCodeAt(Re++),Ze===37){if(Ze=fe.charAt(Re++),tt=_[Ze in Yk?fe.charAt(Re++):Ze],!tt||(X=tt(Q,ye,X))<0)return-1}else if(Ze!=ye.charCodeAt(X++))return-1}return X}function M(Q,fe,ye){var X=u.exec(fe.slice(ye));return X?(Q.p=f.get(X[0].toLowerCase()),ye+X[0].length):-1}function D(Q,fe,ye){var X=m.exec(fe.slice(ye));return X?(Q.w=g.get(X[0].toLowerCase()),ye+X[0].length):-1}function $(Q,fe,ye){var X=d.exec(fe.slice(ye));return X?(Q.w=p.get(X[0].toLowerCase()),ye+X[0].length):-1}function N(Q,fe,ye){var X=x.exec(fe.slice(ye));return X?(Q.m=w.get(X[0].toLowerCase()),ye+X[0].length):-1}function F(Q,fe,ye){var X=v.exec(fe.slice(ye));return X?(Q.m=y.get(X[0].toLowerCase()),ye+X[0].length):-1}function L(Q,fe,ye){return k(Q,t,fe,ye)}function W(Q,fe,ye){return k(Q,n,fe,ye)}function B(Q,fe,ye){return k(Q,r,fe,ye)}function z(Q){return a[Q.getDay()]}function H(Q){return o[Q.getDay()]}function U(Q){return l[Q.getMonth()]}function K(Q){return s[Q.getMonth()]}function Y(Q){return i[+(Q.getHours()>=12)]}function te(Q){return 1+~~(Q.getMonth()/3)}function ne(Q){return a[Q.getUTCDay()]}function ie(Q){return o[Q.getUTCDay()]}function ce(Q){return l[Q.getUTCMonth()]}function ae(Q){return s[Q.getUTCMonth()]}function le(Q){return i[+(Q.getUTCHours()>=12)]}function re(Q){return 1+~~(Q.getUTCMonth()/3)}return{format:function(Q){var fe=C(Q+="",S);return fe.toString=function(){return Q},fe},parse:function(Q){var fe=E(Q+="",!1);return fe.toString=function(){return Q},fe},utcFormat:function(Q){var fe=C(Q+="",A);return fe.toString=function(){return Q},fe},utcParse:function(Q){var fe=E(Q+="",!0);return fe.toString=function(){return Q},fe}}}var Yk={"-":"",_:" ",0:"0"},_n=/^\s*\d+/,tve=/^%/,nve=/[\\^$*+?|[\]().{}]/g;function ot(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function ive(e,t,n){var r=_n.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ove(e,t,n){var r=_n.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ave(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function sve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function lve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qk(e,t,n){var r=_n.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Xk(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function uve(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cve(e,t,n){var r=_n.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function fve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Zk(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function dve(e,t,n){var r=_n.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Jk(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function hve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function pve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function mve(e,t,n){var r=_n.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gve(e,t,n){var r=_n.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yve(e,t,n){var r=tve.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function vve(e,t,n){var r=_n.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function bve(e,t,n){var r=_n.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Qk(e,t){return ot(e.getDate(),t,2)}function xve(e,t){return ot(e.getHours(),t,2)}function wve(e,t){return ot(e.getHours()%12||12,t,2)}function _ve(e,t){return ot(1+dd.count(Eo(e),e),t,3)}function CB(e,t){return ot(e.getMilliseconds(),t,3)}function Sve(e,t){return CB(e,t)+"000"}function Ove(e,t){return ot(e.getMonth()+1,t,2)}function Cve(e,t){return ot(e.getMinutes(),t,2)}function Ave(e,t){return ot(e.getSeconds(),t,2)}function Pve(e){var t=e.getDay();return t===0?7:t}function Tve(e,t){return ot(Lg.count(Eo(e)-1,e),t,2)}function AB(e){var t=e.getDay();return t>=4||t===0?Ul(e):Ul.ceil(e)}function Eve(e,t){return e=AB(e),ot(Ul.count(Eo(e),e)+(Eo(e).getDay()===4),t,2)}function kve(e){return e.getDay()}function Mve(e,t){return ot(Xp.count(Eo(e)-1,e),t,2)}function jve(e,t){return ot(e.getFullYear()%100,t,2)}function Nve(e,t){return e=AB(e),ot(e.getFullYear()%100,t,2)}function $ve(e,t){return ot(e.getFullYear()%1e4,t,4)}function Dve(e,t){var n=e.getDay();return e=n>=4||n===0?Ul(e):Ul.ceil(e),ot(e.getFullYear()%1e4,t,4)}function Ive(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ot(t/60|0,"0",2)+ot(t%60,"0",2)}function eM(e,t){return ot(e.getUTCDate(),t,2)}function Rve(e,t){return ot(e.getUTCHours(),t,2)}function Lve(e,t){return ot(e.getUTCHours()%12||12,t,2)}function Bve(e,t){return ot(1+Rg.count(ko(e),e),t,3)}function PB(e,t){return ot(e.getUTCMilliseconds(),t,3)}function Fve(e,t){return PB(e,t)+"000"}function Wve(e,t){return ot(e.getUTCMonth()+1,t,2)}function zve(e,t){return ot(e.getUTCMinutes(),t,2)}function Vve(e,t){return ot(e.getUTCSeconds(),t,2)}function Uve(e){var t=e.getUTCDay();return t===0?7:t}function Kve(e,t){return ot(Bg.count(ko(e)-1,e),t,2)}function TB(e){var t=e.getUTCDay();return t>=4||t===0?Kl(e):Kl.ceil(e)}function Hve(e,t){return e=TB(e),ot(Kl.count(ko(e),e)+(ko(e).getUTCDay()===4),t,2)}function Gve(e){return e.getUTCDay()}function Yve(e,t){return ot(Zp.count(ko(e)-1,e),t,2)}function qve(e,t){return ot(e.getUTCFullYear()%100,t,2)}function Xve(e,t){return e=TB(e),ot(e.getUTCFullYear()%100,t,2)}function Zve(e,t){return ot(e.getUTCFullYear()%1e4,t,4)}function Jve(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Kl(e):Kl.ceil(e),ot(e.getUTCFullYear()%1e4,t,4)}function Qve(){return"+0000"}function tM(){return"%"}function nM(e){return+e}function rM(e){return Math.floor(+e/1e3)}var nl,EB,kB;ebe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ebe(e){return nl=eve(e),EB=nl.format,nl.parse,kB=nl.utcFormat,nl.utcParse,nl}function tbe(e){return new Date(e)}function nbe(e){return e instanceof Date?+e:+new Date(+e)}function K_(e,t,n,r,i,o,a,s,l,u){var f=M_(),d=f.invert,p=f.domain,m=u(".%L"),g=u(":%S"),v=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),w=u("%b %d"),S=u("%B"),A=u("%Y");function _(C){return(l(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Kge(e,o/r))},n.copy=function(){return $B(t).domain(e)},Ro.apply(n,arguments)}function Wg(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,u=er,f,d=!1,p;function m(v){return isNaN(v=+v)?p:(v=.5+((v=+f(v))-o)*(r*vt}var LB=ube,cbe=zg,fbe=LB,dbe=ku;function hbe(e){return e&&e.length?cbe(e,dbe,fbe):void 0}var pbe=hbe;const sa=Qe.getDefaultExportFromCjs(pbe);function mbe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};Ae.decimalPlaces=Ae.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*jt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ae.dividedBy=Ae.div=function(e){return _o(this,new this.constructor(e))};Ae.dividedToIntegerBy=Ae.idiv=function(e){var t=this,n=t.constructor;return _t(_o(t,new n(e),0,1),n.precision)};Ae.equals=Ae.eq=function(e){return!this.cmp(e)};Ae.exponent=function(){return tn(this)};Ae.greaterThan=Ae.gt=function(e){return this.cmp(e)>0};Ae.greaterThanOrEqualTo=Ae.gte=function(e){return this.cmp(e)>=0};Ae.isInteger=Ae.isint=function(){return this.e>this.d.length-2};Ae.isNegative=Ae.isneg=function(){return this.s<0};Ae.isPositive=Ae.ispos=function(){return this.s>0};Ae.isZero=function(){return this.s===0};Ae.lessThan=Ae.lt=function(e){return this.cmp(e)<0};Ae.lessThanOrEqualTo=Ae.lte=function(e){return this.cmp(e)<1};Ae.logarithm=Ae.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Tr))throw Error(Jr+"NaN");if(n.s<1)throw Error(Jr+(n.s?"NaN":"-Infinity"));return n.eq(Tr)?new r(0):(Rt=!1,t=_o(yf(n,o),yf(e,o),o),Rt=!0,_t(t,i))};Ae.minus=Ae.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?VB(t,e):WB(t,(e.s=-e.s,e))};Ae.modulo=Ae.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Jr+"NaN");return n.s?(Rt=!1,t=_o(n,e,0,1).times(e),Rt=!0,n.minus(t)):_t(new r(n),i)};Ae.naturalExponential=Ae.exp=function(){return zB(this)};Ae.naturalLogarithm=Ae.ln=function(){return yf(this)};Ae.negated=Ae.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ae.plus=Ae.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?WB(t,e):VB(t,(e.s=-e.s,e))};Ae.precision=Ae.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(hs+e);if(t=tn(i)+1,r=i.d.length-1,n=r*jt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ae.squareRoot=Ae.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Jr+"NaN")}for(e=tn(s),Rt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Pi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Nu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(_o(s,o,a+2)).times(.5),Pi(o.d).slice(0,a)===(t=Pi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(_t(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Rt=!0,_t(r,n)};Ae.times=Ae.mul=function(e){var t,n,r,i,o,a,s,l,u,f=this,d=f.constructor,p=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=p.length,u=m.length,l=0;){for(t=0,i=l+r;i>r;)s=o[i]+m[r]*p[i-r-1]+t,o[i--]=s%yn|0,t=s/yn|0;o[i]=(o[i]+t)%yn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Rt?_t(e,d.precision):e};Ae.toDecimalPlaces=Ae.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Bi(e,0,ju),t===void 0?t=r.rounding:Bi(t,0,8),_t(n,e+tn(n)+1,t))};Ae.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Os(r,!0):(Bi(e,0,ju),t===void 0?t=i.rounding:Bi(t,0,8),r=_t(new i(r),e+1,t),n=Os(r,!0,e+1)),n};Ae.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Os(i):(Bi(e,0,ju),t===void 0?t=o.rounding:Bi(t,0,8),r=_t(new o(i),e+tn(i)+1,t),n=Os(r.abs(),!1,e+tn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ae.toInteger=Ae.toint=function(){var e=this,t=e.constructor;return _t(new t(e),tn(e)+1,t.rounding)};Ae.toNumber=function(){return+this};Ae.toPower=Ae.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(Tr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Jr+"Infinity");return s}if(s.eq(Tr))return s;if(r=l.precision,e.eq(Tr))return _t(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=f<0?-f:f)<=FB){for(i=new l(Tr),t=Math.ceil(r/jt+4),Rt=!1;n%2&&(i=i.times(s),aM(i.d,t)),n=Nu(n/2),n!==0;)s=s.times(s),aM(s.d,t);return Rt=!0,e.s<0?new l(Tr).div(i):_t(i,r)}}else if(o<0)throw Error(Jr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Rt=!1,i=e.times(yf(s,r+u)),Rt=!0,i=zB(i),i.s=o,i};Ae.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=tn(i),r=Os(i,n<=o.toExpNeg||n>=o.toExpPos)):(Bi(e,1,ju),t===void 0?t=o.rounding:Bi(t,0,8),i=_t(new o(i),e,t),n=tn(i),r=Os(i,e<=n||n<=o.toExpNeg,e)),r};Ae.toSignificantDigits=Ae.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Bi(e,1,ju),t===void 0?t=r.rounding:Bi(t,0,8)),_t(new r(n),e,t)};Ae.toString=Ae.valueOf=Ae.val=Ae.toJSON=Ae[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=tn(e),n=e.constructor;return Os(e,t<=n.toExpNeg||t>=n.toExpPos)};function WB(e,t){var n,r,i,o,a,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Rt?_t(t,d):t;if(l=e.d,u=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=u.length):(r=u,i=a,s=l.length),a=Math.ceil(d/jt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=u.length,s-o<0&&(o=s,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/yn|0,l[o]%=yn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Rt?_t(t,d):t}function Bi(e,t,n){if(e!==~~e||en)throw Error(hs+e)}function Pi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,l,u,f,d,p,m,g,v,y,x,w,S,A,_,C,E,k,M=r.constructor,D=r.s==i.s?1:-1,$=r.d,N=i.d;if(!r.s)return new M(r);if(!i.s)throw Error(Jr+"Division by zero");for(l=r.e-i.e,E=N.length,_=$.length,m=new M(D),g=m.d=[],u=0;N[u]==($[u]||0);)++u;if(N[u]>($[u]||0)&&--l,o==null?w=o=M.precision:a?w=o+(tn(r)-tn(i))+1:w=o,w<0)return new M(0);if(w=w/jt+2|0,u=0,E==1)for(f=0,N=N[0],w++;(u<_||f)&&w--;u++)S=f*yn+($[u]||0),g[u]=S/N|0,f=S%N|0;else{for(f=yn/(N[0]+1)|0,f>1&&(N=e(N,f),$=e($,f),E=N.length,_=$.length),A=E,v=$.slice(0,E),y=v.length;y=yn/2&&++C;do f=0,s=t(N,v,E,y),s<0?(x=v[0],E!=y&&(x=x*yn+(v[1]||0)),f=x/C|0,f>1?(f>=yn&&(f=yn-1),d=e(N,f),p=d.length,y=v.length,s=t(d,v,p,y),s==1&&(f--,n(d,E16)throw Error(Y_+tn(e));if(!e.s)return new f(Tr);for(t==null?(Rt=!1,s=d):s=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(Qa(2,u))/Math.LN10*2+5|0,s+=r,n=i=o=new f(Tr),f.precision=s;;){if(i=_t(i.times(e),s),n=n.times(++l),a=o.plus(_o(i,n,s)),Pi(a.d).slice(0,s)===Pi(o.d).slice(0,s)){for(;u--;)o=_t(o.times(o),s);return f.precision=d,t==null?(Rt=!0,_t(o,d)):o}o=a}}function tn(e){for(var t=e.e*jt,n=e.d[0];n>=10;n/=10)t++;return t}function Ob(e,t,n){if(t>e.LN10.sd())throw Rt=!0,n&&(e.precision=n),Error(Jr+"LN10 precision limit exceeded");return _t(new e(e.LN10),t)}function ra(e){for(var t="";e--;)t+="0";return t}function yf(e,t){var n,r,i,o,a,s,l,u,f,d=1,p=10,m=e,g=m.d,v=m.constructor,y=v.precision;if(m.s<1)throw Error(Jr+(m.s?"NaN":"-Infinity"));if(m.eq(Tr))return new v(0);if(t==null?(Rt=!1,u=y):u=t,m.eq(10))return t==null&&(Rt=!0),Ob(v,u);if(u+=p,v.precision=u,n=Pi(g),r=n.charAt(0),o=tn(m),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Pi(m.d),r=n.charAt(0),d++;o=tn(m),r>1?(m=new v("0."+n),o++):m=new v(r+"."+n.slice(1))}else return l=Ob(v,u+2,y).times(o+""),m=yf(new v(r+"."+n.slice(1)),u-p).plus(l),v.precision=y,t==null?(Rt=!0,_t(m,y)):m;for(s=a=m=_o(m.minus(Tr),m.plus(Tr),u),f=_t(m.times(m),u),i=3;;){if(a=_t(a.times(f),u),l=s.plus(_o(a,new v(i),u)),Pi(l.d).slice(0,u)===Pi(s.d).slice(0,u))return s=s.times(2),o!==0&&(s=s.plus(Ob(v,u+2,y).times(o+""))),s=_o(s,new v(d),u),v.precision=y,t==null?(Rt=!0,_t(s,y)):s;s=l,i+=2}}function oM(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Nu(n/jt),e.d=[],r=(n+1)%jt,n<0&&(r+=jt),rJp||e.e<-Jp))throw Error(Y_+n)}else e.s=0,e.e=0,e.d=[0];return e}function _t(e,t,n){var r,i,o,a,s,l,u,f,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=jt,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/jt),o=d.length,f>=o)return e;for(u=o=d[f],a=1;o>=10;o/=10)a++;r%=jt,i=r-jt+a}if(n!==void 0&&(o=Qa(10,a-i-1),s=u/o%10|0,l=t<0||d[f+1]!==void 0||u%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/Qa(10,a-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=tn(e),d.length=1,t=t-o-1,d[0]=Qa(10,(jt-t%jt)%jt),e.e=Nu(-t/jt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,o=1,f--):(d.length=f+1,o=Qa(10,jt-r),d[f]=i>0?(u/Qa(10,a-i)%Qa(10,i)|0)*o:0),l)for(;;)if(f==0){(d[0]+=o)==yn&&(d[0]=1,++e.e);break}else{if(d[f]+=o,d[f]!=yn)break;d[f--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Rt&&(e.e>Jp||e.e<-Jp))throw Error(Y_+tn(e));return e}function VB(e,t){var n,r,i,o,a,s,l,u,f,d,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Rt?_t(t,m):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(f=a<0,f?(n=l,a=-a,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(m/jt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]0?o=o.charAt(0)+"."+o.slice(1)+ra(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ra(-i-1)+o,n&&(r=n-a)>0&&(o+=ra(r))):i>=a?(o+=ra(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+ra(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=ra(r))),e.s<0?"-"+o:o}function aM(e,t){if(e.length>t)return e.length=t,!0}function UB(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(hs+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return oM(a,o.toString())}else if(typeof o!="string")throw Error(hs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Ibe.test(o))oM(a,o);else throw Error(hs+o)}if(i.prototype=Ae,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=UB,i.config=i.set=Rbe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(hs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(hs+n+": "+r);return this}var q_=UB(Dbe);Tr=new q_(1);const yt=q_;function Lbe(e){return zbe(e)||Wbe(e)||Fbe(e)||Bbe()}function Bbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fbe(e,t){if(e){if(typeof e=="string")return C0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C0(e,t)}}function Wbe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function zbe(e){if(Array.isArray(e))return C0(e)}function C0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,sM(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function rxe(e){if(Array.isArray(e))return e}function qB(e){var t=vf(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function XB(e,t,n){if(e.lte(0))return new yt(0);var r=Kg.getDigitCount(e.toNumber()),i=new yt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new yt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?l:new yt(Math.ceil(l))}function ixe(e,t,n){var r=1,i=new yt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new yt(10).pow(Kg.getDigitCount(e)-1),i=new yt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new yt(Math.floor(e)))}else e===0?i=new yt(Math.floor((t-1)/2)):n||(i=new yt(Math.floor(e)));var a=Math.floor((t-1)/2),s=Hbe(Kbe(function(l){return i.add(new yt(l-a).mul(r)).toNumber()}),A0);return s(0,t)}function ZB(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new yt(0),tickMin:new yt(0),tickMax:new yt(0)};var o=XB(new yt(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new yt(0):(a=new yt(e).add(t).div(2),a=a.sub(new yt(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new yt(t).sub(a).div(o).toNumber()),u=s+l+1;return u>n?ZB(e,t,n,r,i+1):(u0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:o,tickMin:a.sub(new yt(s).mul(o)),tickMax:a.add(new yt(l).mul(o))})}function oxe(e){var t=vf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=qB([n,r]),l=vf(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(T0(A0(0,i-1).map(function(){return 1/0}))):[].concat(T0(A0(0,i-1).map(function(){return-1/0})),[f]);return n>r?P0(d):d}if(u===f)return ixe(u,i,o);var p=ZB(u,f,a,o),m=p.step,g=p.tickMin,v=p.tickMax,y=Kg.rangeStep(g,v.add(new yt(.1).mul(m)),m);return n>r?P0(y):y}function axe(e,t){var n=vf(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=qB([r,i]),s=vf(a,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var f=Math.max(t,2),d=XB(new yt(u).sub(l).div(f-1),o,0),p=[].concat(T0(Kg.rangeStep(new yt(l),new yt(u).sub(new yt(.99).mul(d)),d)),[u]);return r>i?P0(p):p}var sxe=GB(oxe),lxe=GB(axe),uxe=process.env.NODE_ENV==="production",Cb="Invariant failed";function cr(e,t){if(uxe)throw new Error(Cb);var n=typeof t=="function"?t():t,r=n?"".concat(Cb,": ").concat(n):Cb;throw new Error(r)}var cxe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Hl(e){"@babel/helpers - typeof";return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(e)}function Qp(){return Qp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bxe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,p=u>=s-1?i[0].coordinate:i[u+1].coordinate,m=void 0;if(Jn(d-f)!==Jn(p-d)){var g=[];if(Jn(p-d)===Jn(l[1]-l[0])){m=p;var v=d+l[1]-l[0];g[0]=Math.min(v,(v+f)/2),g[1]=Math.max(v,(v+f)/2)}else{m=f;var y=p+l[1]-l[0];g[0]=Math.min(d,(y+d)/2),g[1]=Math.max(d,(y+d)/2)}var x=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>x[0]&&t<=x[1]||t>=g[0]&&t<=g[1]){a=i[u].index;break}}else{var w=Math.min(f,p),S=Math.max(f,p);if(t>(w+d)/2&&t<=(S+d)/2){a=i[u].index;break}}}else for(var A=0;A0&&A(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===s-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){a=r[A].index;break}return a},X_=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ut(Ut({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,l;switch(i){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},Ixe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),l=0,u=s.length;l=0});if(x&&x.length){var w=x[0].type.defaultProps,S=w!==void 0?Ut(Ut({},w),x[0].props):x[0].props,A=S.barSize,_=S[y];a[_]||(a[_]=[]);var C=Fe(A)?n:A;a[_].push({item:x[0],stackList:x.slice(1),barSize:Fe(C)?void 0:Qn(C,r,0)})}}return a},Rxe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,l=a.length;if(l<1)return null;var u=Qn(n,i,0,!0),f,d=[];if(a[0].barSize===+a[0].barSize){var p=!1,m=i/l,g=a.reduce(function(A,_){return A+_.barSize||0},0);g+=(l-1)*u,g>=i&&(g-=(l-1)*u,u=0),g>=i&&m>0&&(p=!0,m*=.9,g=l*m);var v=(i-g)/2>>0,y={offset:v-u,size:0};f=a.reduce(function(A,_){var C={item:_.item,position:{offset:y.offset+y.size+u,size:p?m:_.barSize}},E=[].concat(cM(A),[C]);return y=E[E.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(k){E.push({item:k,position:y})}),E},d)}else{var x=Qn(r,i,0,!0);i-2*x-(l-1)*u<=0&&(u=0);var w=(i-2*x-(l-1)*u)/l;w>1&&(w>>=0);var S=s===+s?Math.min(w,s):w;f=a.reduce(function(A,_,C){var E=[].concat(cM(A),[{item:_.item,position:{offset:x+(w+u)*C+(w-S)/2,size:S}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(k){E.push({item:k,position:E[E.length-1].position})}),E},d)}return f},Lxe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),u=tF({children:o,legendWidth:l});if(u){var f=i||{},d=f.width,p=f.height,m=u.align,g=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&m!=="center"&&ve(t[m]))return Ut(Ut({},t),{},Pl({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&g!=="middle"&&ve(t[g]))return Ut(Ut({},t),{},Pl({},g,t[g]+(p||0)))}return t},Bxe=function(t,n,r){return Fe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},nF=function(t,n,r,i,o){var a=n.props.children,s=kr(a,hd).filter(function(u){return Bxe(i,o,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=Yt(f,r);if(Fe(d))return u;var p=Array.isArray(d)?[Vg(d),sa(d)]:[d,d],m=l.reduce(function(g,v){var y=Yt(f,v,0),x=p[0]-Math.abs(Array.isArray(y)?y[0]:y),w=p[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,g[0]),Math.max(w,g[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},Fxe=function(t,n,r,i,o){var a=n.map(function(s){return nF(t,s,r,o,i)}).filter(function(s){return!Fe(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},rF=function(t,n,r,i,o){var a=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&nF(t,l,u,i)||Ic(t,u,r,o)});if(r==="number")return a.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,u){for(var f=0,d=u.length;f=2?Jn(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var p=o?o.indexOf(d):d;return{coordinate:i(p)+u,value:d,offset:u}});return f.filter(function(d){return!Pu(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+u,value:d,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,p){return{coordinate:i(d)+u,value:o?o[d]:d,index:p,offset:u}})},Ab=new WeakMap,kh=function(t,n){if(typeof n!="function")return t;Ab.has(t)||Ab.set(t,new WeakMap);var r=Ab.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},aF=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:df(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Yp(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Dc(),realScaleType:"point"}:o==="category"?{scale:df(),realScaleType:"band"}:{scale:Yp(),realScaleType:"linear"};if(sd(i)){var l="scale".concat(Eg(i));return{scale:(iM[l]||Dc)(),realScaleType:iM[l]?l:"point"}}return Be(i)?{scale:i}:{scale:Dc(),realScaleType:"point"}},dM=1e-4,sF=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-dM,a=Math.max(i[0],i[1])+dM,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},Wxe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},Uxe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},Kxe={sign:Vxe,expand:cse,none:Ll,silhouette:fse,wiggle:dse,positive:Uxe},Hxe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=Kxe[r],a=use().keys(i).value(function(s,l){return+Yt(s,l,0)}).order(n0).offset(o);return a(t)},Gxe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,l={},u=s.reduce(function(d,p){var m,g=(m=p.type)!==null&&m!==void 0&&m.defaultProps?Ut(Ut({},p.type.defaultProps),p.props):p.props,v=g.stackId,y=g.hide;if(y)return d;var x=g[r],w=d[x]||{hasStack:!1,stackGroups:{}};if(fn(v)){var S=w.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(p),w.hasStack=!0,w.stackGroups[v]=S}else w.stackGroups[$s("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Ut(Ut({},d),{},Pl({},x,w))},l),f={};return Object.keys(u).reduce(function(d,p){var m=u[p];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,y){var x=m.stackGroups[y];return Ut(Ut({},v),{},Pl({},y,{numericAxisId:r,cateAxisId:i,items:x.items,stackedData:Hxe(t,x.items,o)}))},g)}return Ut(Ut({},d),{},Pl({},p,m))},f)},lF=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=sxe(u,o,s);return t.domain([Vg(f),sa(f)]),{niceTicks:f}}if(o&&i==="number"){var d=t.domain(),p=lxe(d,o,s);return{niceTicks:p}}return null};function tm(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Fe(i[t.dataKey])){var s=Pp(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=Yt(i,Fe(a)?t.dataKey:a);return Fe(l)?null:t.scale(l)}var hM=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=Yt(a,n.dataKey,n.domain[s]);return Fe(l)?null:n.scale(l)-o/2+i},Yxe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},qxe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ut(Ut({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(fn(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},Xxe=function(t){return t.reduce(function(n,r){return[Vg(r.concat([n[0]]).filter(ve)),sa(r.concat([n[1]]).filter(ve))]},[1/0,-1/0])},uF=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,l=s.reduce(function(u,f){var d=Xxe(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},pM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,mM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,j0=function(t,n,r){if(Be(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ve(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(pM.test(t[0])){var o=+pM.exec(t[0])[1];i[0]=n[0]-o}else Be(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ve(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(mM.test(t[1])){var a=+mM.exec(t[1])[1];i[1]=n[1]+a}else Be(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},nm=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=S_(n,function(d){return d.coordinate}),a=1/0,s=1,l=o.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},o0e=function(t,n,r,i,o){var a=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=Qn(t.cx,a,a/2),d=Qn(t.cy,s,s/2),p=dF(a,s,r),m=Qn(t.innerRadius,p,0),g=Qn(t.outerRadius,p,p*.8),v=Object.keys(n);return v.reduce(function(y,x){var w=n[x],S=w.domain,A=w.reversed,_;if(Fe(w.range))i==="angleAxis"?_=[l,u]:i==="radiusAxis"&&(_=[m,g]),A&&(_=[_[1],_[0]]);else{_=w.range;var C=_,E=Qxe(C,2);l=E[0],u=E[1]}var k=aF(w,o),M=k.realScaleType,D=k.scale;D.domain(S).range(_),sF(D);var $=lF(D,oo(oo({},w),{},{realScaleType:M})),N=oo(oo(oo({},w),$),{},{range:_,radius:g,realScaleType:M,scale:D,cx:f,cy:d,innerRadius:m,outerRadius:g,startAngle:l,endAngle:u});return oo(oo({},y),{},fF({},x,N))},{})},a0e=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-a,2))},s0e=function(t,n){var r=t.x,i=t.y,o=n.cx,a=n.cy,s=a0e({x:r,y:i},{x:o,y:a});if(s<=0)return{radius:s};var l=(r-o)/s,u=Math.acos(l);return i>a&&(u=2*Math.PI-u),{radius:s,angle:i0e(u),angleInRadian:u}},l0e=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},u0e=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},bM=function(t,n){var r=t.x,i=t.y,o=s0e({x:r,y:i},n),a=o.radius,s=o.angle,l=n.innerRadius,u=n.outerRadius;if(au)return!1;if(a===0)return!0;var f=l0e(n),d=f.startAngle,p=f.endAngle,m=s,g;if(d<=p){for(;m>p;)m-=360;for(;m=d&&m<=p}else{for(;m>d;)m-=360;for(;m=p&&m<=d}return g?oo(oo({},n),{},{radius:a,angle:u0e(m,n)}):null},hF=function(t){return!O.isValidElement(t)&&!Be(t)&&typeof t!="boolean"?t.className:""};function _f(e){"@babel/helpers - typeof";return _f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_f(e)}var c0e=["offset"];function f0e(e){return m0e(e)||p0e(e)||h0e(e)||d0e()}function d0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h0e(e,t){if(e){if(typeof e=="string")return N0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N0(e,t)}}function p0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m0e(e){if(Array.isArray(e))return N0(e)}function N0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function y0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t=0?1:-1,S,A;i==="insideStart"?(S=m+w*a,A=v):i==="insideEnd"?(S=g-w*a,A=!v):i==="end"&&(S=g+w*a,A=v),A=x<=0?A:!A;var _=Pt(u,f,y,S),C=Pt(u,f,y,S+(A?1:-1)*359),E="M".concat(_.x,",").concat(_.y,` + A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`, + `).concat(C.x,",").concat(C.y),k=Fe(t.id)?$s("recharts-radial-line-"):t.id;return O.createElement("text",Sf({},r,{dominantBaseline:"central",className:Ue("recharts-radial-bar-label",s)}),O.createElement("defs",null,O.createElement("path",{id:k,d:E})),O.createElement("textPath",{xlinkHref:"#".concat(k)},n))},O0e=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,l=o.innerRadius,u=o.outerRadius,f=o.startAngle,d=o.endAngle,p=(f+d)/2;if(i==="outside"){var m=Pt(a,s,u+r,p),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+u)/2,x=Pt(a,s,y,p),w=x.x,S=x.y;return{x:w,y:S,textAnchor:"middle",verticalAnchor:"middle"}},C0e=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,l=a.y,u=a.width,f=a.height,d=f>=0?1:-1,p=d*i,m=d>0?"end":"start",g=d>0?"start":"end",v=u>=0?1:-1,y=v*i,x=v>0?"end":"start",w=v>0?"start":"end";if(o==="top"){var S={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:m};return an(an({},S),r?{height:Math.max(l-r.y,0),width:u}:{})}if(o==="bottom"){var A={x:s+u/2,y:l+f+p,textAnchor:"middle",verticalAnchor:g};return an(an({},A),r?{height:Math.max(r.y+r.height-(l+f),0),width:u}:{})}if(o==="left"){var _={x:s-y,y:l+f/2,textAnchor:x,verticalAnchor:"middle"};return an(an({},_),r?{width:Math.max(_.x-r.x,0),height:f}:{})}if(o==="right"){var C={x:s+u+y,y:l+f/2,textAnchor:w,verticalAnchor:"middle"};return an(an({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:f}:{})}var E=r?{width:u,height:f}:{};return o==="insideLeft"?an({x:s+y,y:l+f/2,textAnchor:w,verticalAnchor:"middle"},E):o==="insideRight"?an({x:s+u-y,y:l+f/2,textAnchor:x,verticalAnchor:"middle"},E):o==="insideTop"?an({x:s+u/2,y:l+p,textAnchor:"middle",verticalAnchor:g},E):o==="insideBottom"?an({x:s+u/2,y:l+f-p,textAnchor:"middle",verticalAnchor:m},E):o==="insideTopLeft"?an({x:s+y,y:l+p,textAnchor:w,verticalAnchor:g},E):o==="insideTopRight"?an({x:s+u-y,y:l+p,textAnchor:x,verticalAnchor:g},E):o==="insideBottomLeft"?an({x:s+y,y:l+f-p,textAnchor:w,verticalAnchor:m},E):o==="insideBottomRight"?an({x:s+u-y,y:l+f-p,textAnchor:x,verticalAnchor:m},E):Su(o)&&(ve(o.x)||rs(o.x))&&(ve(o.y)||rs(o.y))?an({x:s+Qn(o.x,u),y:l+Qn(o.y,f),textAnchor:"end",verticalAnchor:"end"},E):an({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},E)},A0e=function(t){return"cx"in t&&ve(t.cx)};function cn(e){var t=e.offset,n=t===void 0?5:t,r=g0e(e,c0e),i=an({offset:n},r),o=i.viewBox,a=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!o||Fe(s)&&Fe(l)&&!O.isValidElement(u)&&!Be(u))return null;if(O.isValidElement(u))return O.cloneElement(u,i);var m;if(Be(u)){if(m=O.createElement(u,i),O.isValidElement(m))return m}else m=w0e(i);var g=A0e(o),v=Te(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return S0e(i,m,v);var y=g?O0e(i):C0e(i);return O.createElement(_s,Sf({className:Ue("recharts-label",d)},v,y,{breakAll:p}),m)}cn.displayName="Label";var pF=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,m=t.top,g=t.left,v=t.width,y=t.height,x=t.clockWise,w=t.labelViewBox;if(w)return w;if(ve(v)&&ve(y)){if(ve(d)&&ve(p))return{x:d,y:p,width:v,height:y};if(ve(m)&&ve(g))return{x:m,y:g,width:v,height:y}}return ve(d)&&ve(p)?{x:d,y:p,width:0,height:0}:ve(n)&&ve(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},P0e=function(t,n){return t?t===!0?O.createElement(cn,{key:"label-implicit",viewBox:n}):fn(t)?O.createElement(cn,{key:"label-implicit",viewBox:n,value:t}):O.isValidElement(t)?t.type===cn?O.cloneElement(t,{key:"label-implicit",viewBox:n}):O.createElement(cn,{key:"label-implicit",content:t,viewBox:n}):Be(t)?O.createElement(cn,{key:"label-implicit",content:t,viewBox:n}):Su(t)?O.createElement(cn,Sf({viewBox:n},t,{key:"label-implicit"})):null:null},T0e=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=pF(t),a=kr(i,cn).map(function(l,u){return O.cloneElement(l,{viewBox:n||o,key:"label-".concat(u)})});if(!r)return a;var s=P0e(t.label,n||o);return[s].concat(f0e(a))};cn.parseViewBox=pF;cn.renderCallByParent=T0e;function E0e(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var k0e=E0e;const M0e=Qe.getDefaultExportFromCjs(k0e);function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Of(e)}var j0e=["valueAccessor"],N0e=["data","dataKey","clockWise","id","textBreakAll"];function $0e(e){return L0e(e)||R0e(e)||I0e(e)||D0e()}function D0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I0e(e,t){if(e){if(typeof e=="string")return $0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $0(e,t)}}function R0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L0e(e){if(Array.isArray(e))return $0(e)}function $0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var V0e=function(t){return Array.isArray(t.value)?M0e(t.value):t.value};function Di(e){var t=e.valueAccessor,n=t===void 0?V0e:t,r=SM(e,j0e),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,u=SM(r,N0e);return!i||!i.length?null:O.createElement(et,{className:"recharts-label-list"},i.map(function(f,d){var p=Fe(o)?n(f,d):Yt(f&&f.payload,o),m=Fe(s)?{}:{id:"".concat(s,"-").concat(d)};return O.createElement(cn,im({},Te(f,!0),u,m,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:cn.parseViewBox(Fe(a)?f:_M(_M({},f),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Di.displayName="LabelList";function U0e(e,t){return e?e===!0?O.createElement(Di,{key:"labelList-implicit",data:t}):O.isValidElement(e)||Be(e)?O.createElement(Di,{key:"labelList-implicit",data:t,content:e}):Su(e)?O.createElement(Di,im({data:t},e,{key:"labelList-implicit"})):null:null}function K0e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=kr(r,Di).map(function(a,s){return O.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=U0e(e.label,t);return[o].concat($0e(i))}Di.renderCallByParent=K0e;function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}function D0(){return D0=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>u),`, + `).concat(d.x,",").concat(d.y,` + `);if(i>0){var m=Pt(n,r,i,a),g=Pt(n,r,i,u);p+="L ".concat(g.x,",").concat(g.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(a<=u),`, + `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},X0e=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Jn(f-u),p=Mh({cx:n,cy:r,radius:o,angle:u,sign:d,cornerRadius:a,cornerIsExternal:l}),m=p.circleTangency,g=p.lineTangency,v=p.theta,y=Mh({cx:n,cy:r,radius:o,angle:f,sign:-d,cornerRadius:a,cornerIsExternal:l}),x=y.circleTangency,w=y.lineTangency,S=y.theta,A=l?Math.abs(u-f):Math.abs(u-f)-v-S;if(A<0)return s?"M ".concat(g.x,",").concat(g.y,` + a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 + a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 + `):mF({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f});var _="M ".concat(g.x,",").concat(g.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,` + A`).concat(o,",").concat(o,",0,").concat(+(A>180),",").concat(+(d<0),",").concat(x.x,",").concat(x.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(w.x,",").concat(w.y,` + `);if(i>0){var C=Mh({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),E=C.circleTangency,k=C.lineTangency,M=C.theta,D=Mh({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),$=D.circleTangency,N=D.lineTangency,F=D.theta,L=l?Math.abs(u-f):Math.abs(u-f)-M-F;if(L<0&&a===0)return"".concat(_,"L").concat(n,",").concat(r,"Z");_+="L".concat(N.x,",").concat(N.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat($.x,",").concat($.y,` + A`).concat(i,",").concat(i,",0,").concat(+(L>180),",").concat(+(d>0),",").concat(E.x,",").concat(E.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else _+="L".concat(n,",").concat(r,"Z");return _},Z0e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},gF=function(t){var n=CM(CM({},Z0e),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,p=n.className;if(a0&&Math.abs(f-d)<360?y=X0e({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,g/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:d}):y=mF({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:f,endAngle:d}),O.createElement("path",D0({},Te(n,!0),{className:m,d:y,role:"img"}))};function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function I0(){return I0=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Y(te,ne,ie,ce,ae){for(var le=te[ne],re=0;re0?", expected one of type ["+Q.join(", ")+"]":"";return new v("Invalid "+le+" `"+re+"` supplied to "+("`"+ae+"`"+Re+"."))}return y(ne)}function D(){function K(Y,te,ne,ie,ce){return L(Y[te])?null:new v("Invalid "+ie+" `"+ce+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return y(K)}function $(K,Y,te,ne,ie){return new v((K||"React class")+": "+Y+" type `"+te+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function N(K){function Y(te,ne,ie,ce,ae){var le=te[ne],re=B(le);if(re!=="object")return new v("Invalid "+ce+" `"+ae+"` of type `"+re+"` "+("supplied to `"+ie+"`, expected `object`."));for(var Q in K){var fe=K[Q];if(typeof fe!="function")return $(ie,ce,ae,Q,z(fe));var ye=fe(le,Q,ie,ce,ae+"."+Q,n);if(ye)return ye}return null}return y(Y)}function F(K){function Y(te,ne,ie,ce,ae){var le=te[ne],re=B(le);if(re!=="object")return new v("Invalid "+ce+" `"+ae+"` of type `"+re+"` "+("supplied to `"+ie+"`, expected `object`."));var Q=t({},te[ne],K);for(var fe in Q){var ye=K[fe];if(r(K,fe)&&typeof ye!="function")return $(ie,ce,ae,fe,z(ye));if(!ye)return new v("Invalid "+ce+" `"+ae+"` key `"+fe+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(te[ne],null," ")+` +Valid keys: `+JSON.stringify(Object.keys(K),null," "));var X=ye(le,fe,ie,ce,ae+"."+fe,n);if(X)return X}return null}return y(Y)}function L(K){switch(typeof K){case"number":case"string":case"undefined":return!0;case"boolean":return!K;case"object":if(Array.isArray(K))return K.every(L);if(K===null||s(K))return!0;var Y=d(K);if(Y){var te=Y.call(K),ne;if(Y!==K.entries){for(;!(ne=te.next()).done;)if(!L(ne.value))return!1}else for(;!(ne=te.next()).done;){var ie=ne.value;if(ie&&!L(ie[1]))return!1}}else return!1;return!0;default:return!1}}function W(K,Y){return K==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function B(K){var Y=typeof K;return Array.isArray(K)?"array":K instanceof RegExp?"object":W(Y,K)?"symbol":Y}function z(K){if(typeof K>"u"||K===null)return""+K;var Y=B(K);if(Y==="object"){if(K instanceof Date)return"date";if(K instanceof RegExp)return"regexp"}return Y}function H(K){var Y=z(K);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function U(K){return!K.constructor||!K.constructor.name?p:K.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},Mb}var jb,RM;function lwe(){if(RM)return jb;RM=1;var e=Z_();function t(){}function n(){}return n.resetWarningCache=t,jb=function(){function r(a,s,l,u,f,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},jb}if(process.env.NODE_ENV!=="production"){var uwe=yF(),cwe=!0;R0.exports=swe()(uwe.isElement,cwe)}else R0.exports=lwe()();var fwe=R0.exports;const Ge=Qe.getDefaultExportFromCjs(fwe);var dwe=Object.getOwnPropertyNames,hwe=Object.getOwnPropertySymbols,pwe=Object.prototype.hasOwnProperty;function LM(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function $h(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var o=i.cache,a=o.get(n),s=o.get(r);if(a&&s)return a===r&&s===n;o.set(n,r),o.set(r,n);var l=e(n,r,i);return o.delete(n),o.delete(r),l}}function BM(e){return dwe(e).concat(hwe(e))}var bF=Object.hasOwn||function(e,t){return pwe.call(e,t)};function $u(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var xF="_owner",FM=Object.getOwnPropertyDescriptor,WM=Object.keys;function mwe(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function gwe(e,t){return $u(e.getTime(),t.getTime())}function zM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var l=t.entries(),u=!1,f=0;(s=l.next())&&!s.done;){var d=a.value,p=d[0],m=d[1],g=s.value,v=g[0],y=g[1];!u&&!r[f]&&(u=n.equals(p,v,o,f,e,t,n)&&n.equals(m,y,p,v,e,t,n))&&(r[f]=!0),f++}if(!u)return!1;o++}return!0}function ywe(e,t,n){var r=WM(e),i=r.length;if(WM(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===xF&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!bF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function mc(e,t,n){var r=BM(e),i=r.length;if(BM(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===xF&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!bF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=FM(e,o),s=FM(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function vwe(e,t){return $u(e.valueOf(),t.valueOf())}function bwe(e,t){return e.source===t.source&&e.flags===t.flags}function VM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),l=!1,u=0;(a=s.next())&&!a.done;)!l&&!r[u]&&(l=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[u]=!0),u++;if(!l)return!1}return!0}function xwe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var wwe="[object Arguments]",_we="[object Boolean]",Swe="[object Date]",Owe="[object Map]",Cwe="[object Number]",Awe="[object Object]",Pwe="[object RegExp]",Twe="[object Set]",Ewe="[object String]",kwe=Array.isArray,UM=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,KM=Object.assign,Mwe=Object.prototype.toString.call.bind(Object.prototype.toString);function jwe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(f,d,p){if(f===d)return!0;if(f==null||d==null||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;var m=f.constructor;if(m!==d.constructor)return!1;if(m===Object)return i(f,d,p);if(kwe(f))return t(f,d,p);if(UM!=null&&UM(f))return l(f,d,p);if(m===Date)return n(f,d,p);if(m===RegExp)return a(f,d,p);if(m===Map)return r(f,d,p);if(m===Set)return s(f,d,p);var g=Mwe(f);return g===Swe?n(f,d,p):g===Pwe?a(f,d,p):g===Owe?r(f,d,p):g===Twe?s(f,d,p):g===Awe?typeof f.then!="function"&&typeof d.then!="function"&&i(f,d,p):g===wwe?i(f,d,p):g===_we||g===Cwe||g===Ewe?o(f,d,p):!1}}function Nwe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?mc:mwe,areDatesEqual:gwe,areMapsEqual:r?LM(zM,mc):zM,areObjectsEqual:r?mc:ywe,arePrimitiveWrappersEqual:vwe,areRegExpsEqual:bwe,areSetsEqual:r?LM(VM,mc):VM,areTypedArraysEqual:r?mc:xwe};if(n&&(i=KM({},i,n(i))),t){var o=$h(i.areArraysEqual),a=$h(i.areMapsEqual),s=$h(i.areObjectsEqual),l=$h(i.areSetsEqual);i=KM({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}function $we(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function Dwe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(l,u){var f=r(),d=f.cache,p=d===void 0?t?new WeakMap:void 0:d,m=f.meta;return n(l,u,{cache:p,equals:i,meta:m,strict:o})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(l,u){return n(l,u,a)}}var Iwe=ka();ka({strict:!0});ka({circular:!0});ka({circular:!0,strict:!0});ka({createInternalComparator:function(){return $u}});ka({strict:!0,createInternalComparator:function(){return $u}});ka({circular:!0,createInternalComparator:function(){return $u}});ka({circular:!0,createInternalComparator:function(){return $u},strict:!0});function ka(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=Nwe(e),l=jwe(s),u=r?r(l):$we(l);return Dwe({circular:n,comparator:l,createState:i,equals:u,strict:a})}function Rwe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function HM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):Rwe(i)};requestAnimationFrame(r)}function L0(e){"@babel/helpers - typeof";return L0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L0(e)}function Lwe(e){return zwe(e)||Wwe(e)||Fwe(e)||Bwe()}function Bwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fwe(e,t){if(e){if(typeof e=="string")return GM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GM(e,t)}}function GM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&y<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",n);var d=ZM(i,a),p=ZM(o,s),m=i1e(i,a),g=function(x){return x>1?1:x<0?0:x},v=function(x){for(var w=x>1?1:x,S=w,A=0;A<8;++A){var _=d(S)-w,C=m(S);if(Math.abs(_-w)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,l=function(f,d,p){var m=-(f-d)*r,g=p*o,v=p+(m-g)*s/1e3,y=p*s/1e3+f;return Math.abs(y-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x1e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Nb(e){return O1e(e)||S1e(e)||_1e(e)||w1e()}function w1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _1e(e,t){if(e){if(typeof e=="string")return V0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V0(e,t)}}function S1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O1e(e){if(Array.isArray(e))return V0(e)}function V0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lm(e){return lm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lm(e)}var yi=function(e){E1e(n,e);var t=k1e(n);function n(r,i){var o;C1e(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,l=a.attributeName,u=a.from,f=a.to,d=a.steps,p=a.children,m=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(H0(o)),o.changeStyle=o.changeStyle.bind(H0(o)),!s||m<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:f}),K0(o);if(d&&d.length)o.state={style:d[0].style};else if(u){if(typeof p=="function")return o.state={style:u},K0(o);o.state={style:l?_c({},l,u):u}}else o.state={style:{}};return o}return P1e(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,l=o.attributeName,u=o.shouldReAnimate,f=o.to,d=o.from,p=this.state.style;if(s){if(!a){var m={style:l?_c({},l,f):f};this.state&&p&&(l&&p[l]!==f||!l&&p!==f)&&this.setState(m);return}if(!(Iwe(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||u?d:i.to;if(this.state&&p){var y={style:l?_c({},l,v):v};(l&&p[l]!==v||!l&&p!==v)&&this.setState(y)}this.runAnimation(ii(ii({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,m=y1e(a,s,a1e(u),l,this.changeStyle),g=function(){o.stopJSAnimation=m()};this.manager.start([p,f,g,l,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,l=i.onAnimationStart,u=a[0],f=u.style,d=u.duration,p=d===void 0?0:d,m=function(v,y,x){if(x===0)return v;var w=y.duration,S=y.easing,A=S===void 0?"ease":S,_=y.style,C=y.properties,E=y.onAnimationEnd,k=x>0?a[x-1]:y,M=C||Object.keys(_);if(typeof A=="function"||A==="spring")return[].concat(Nb(v),[o.runJSAnimation.bind(o,{from:k.style,to:_,duration:w,easing:A}),w]);var D=XM(M,w,A),$=ii(ii(ii({},k.style),_),{},{transition:D});return[].concat(Nb(v),[$,w,E]).filter(Gwe)};return this.manager.start([l].concat(Nb(a.reduce(m,[f,Math.max(p,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Vwe());var o=i.begin,a=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,m=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var v=s?_c({},s,l):l,y=XM(Object.keys(v),a,u);g.start([f,o,ii(ii({},v),{},{transition:y}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=b1e(i,v1e),u=O.Children.count(o),f=this.state.style;if(typeof o=="function")return o(f);if(!s||u===0||a<=0)return o;var d=function(m){var g=m.props,v=g.style,y=v===void 0?{}:v,x=g.className,w=O.cloneElement(m,ii(ii({},l),{},{style:ii(ii({},y),f),className:x}));return w};return u===1?d(O.Children.only(o)):O.createElement("div",null,O.Children.map(o,function(p){return d(p)}))}}]),n}(O.PureComponent);yi.displayName="Animate";yi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};yi.propTypes={from:Ge.oneOfType([Ge.object,Ge.string]),to:Ge.oneOfType([Ge.object,Ge.string]),attributeName:Ge.string,duration:Ge.number,begin:Ge.number,easing:Ge.oneOfType([Ge.string,Ge.func]),steps:Ge.arrayOf(Ge.shape({duration:Ge.number.isRequired,style:Ge.object.isRequired,easing:Ge.oneOfType([Ge.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ge.func]),properties:Ge.arrayOf("string"),onAnimationEnd:Ge.func})),children:Ge.oneOfType([Ge.node,Ge.func]),isActive:Ge.bool,canBegin:Ge.bool,onAnimationEnd:Ge.func,shouldReAnimate:Ge.bool,onAnimationStart:Ge.func,onAnimationReStart:Ge.func};Ge.object,Ge.object,Ge.object,Ge.element;Ge.object,Ge.object,Ge.object,Ge.oneOfType([Ge.array,Ge.element]),Ge.any;function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function um(){return um=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],p=0,m=4;pa?a:o[p];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),f+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, + `).concat(t+r,",").concat(n+s*d[1])),f+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, + `).concat(t+r-l*d[2],",").concat(n+i)),f+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, + `).concat(t,",").concat(n+i-s*d[3])),f+="Z"}else if(a>0&&o===+o&&o>0){var g=Math.min(a,o);f="M ".concat(t,",").concat(n+s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+l*g,",").concat(n,` + L `).concat(t+r-l*g,",").concat(n,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*g,` + L `).concat(t+r,",").concat(n+i-s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r-l*g,",").concat(n+i,` + L `).concat(t+l*g,",").concat(n+i,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},F1e=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(o,o+s),f=Math.max(o,o+s),d=Math.min(a,a+l),p=Math.max(a,a+l);return r>=u&&r<=f&&i>=d&&i<=p}return!1},W1e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},J_=function(t){var n=ij(ij({},W1e),t),r=O.useRef(),i=O.useState(-1),o=j1e(i,2),a=o[0],s=o[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&s(A)}catch{}},[]);var l=n.x,u=n.y,f=n.width,d=n.height,p=n.radius,m=n.className,g=n.animationEasing,v=n.animationDuration,y=n.animationBegin,x=n.isAnimationActive,w=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var S=Ue("recharts-rectangle",m);return w?O.createElement(yi,{canBegin:a>0,from:{width:f,height:d,x:l,y:u},to:{width:f,height:d,x:l,y:u},duration:v,animationEasing:g,isActive:w},function(A){var _=A.width,C=A.height,E=A.x,k=A.y;return O.createElement(yi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,isActive:x,easing:g},O.createElement("path",um({},Te(n,!0),{className:S,d:oj(E,k,_,C,p),ref:r})))}):O.createElement("path",um({},Te(n,!0),{className:S,d:oj(l,u,f,d,p)}))},z1e=["points","className","baseLinePoints","connectNulls"];function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function aj(e){return Y1e(e)||G1e(e)||H1e(e)||K1e()}function K1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H1e(e,t){if(e){if(typeof e=="string")return G0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G0(e,t)}}function G1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y1e(e){if(Array.isArray(e))return G0(e)}function G0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){sj(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),sj(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Lc=function(t,n){var r=q1e(t);n&&(r=[r.reduce(function(o,a){return[].concat(aj(o),aj(a))},[])]);var i=r.map(function(o){return o.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},X1e=function(t,n,r){var i=Lc(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Lc(n.reverse(),r).slice(1))},Z1e=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,a=V1e(t,z1e);if(!n||!n.length)return null;var s=Ue("recharts-polygon",r);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",u=X1e(n,i,o);return O.createElement("g",{className:s},O.createElement("path",gl({},Te(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:u})),l?O.createElement("path",gl({},Te(a,!0),{fill:"none",d:Lc(n,o)})):null,l?O.createElement("path",gl({},Te(a,!0),{fill:"none",d:Lc(i,o)})):null)}var f=Lc(n,o);return O.createElement("path",gl({},Te(a,!0),{fill:f.slice(-1)==="Z"?a.fill:"none",className:s,d:f}))};function Y0(){return Y0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var o_e=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},a_e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,l=t.left,u=l===void 0?0:l,f=t.width,d=f===void 0?0:f,p=t.height,m=p===void 0?0:p,g=t.className,v=r_e(t,J1e),y=Q1e({x:r,y:o,top:s,left:u,width:d,height:m},v);return!ve(r)||!ve(o)||!ve(d)||!ve(m)||!ve(s)||!ve(u)?null:O.createElement("path",q0({},Te(y,!0),{className:Ue("recharts-cross",g),d:o_e(r,o,d,m,s,u)}))},s_e=zg,l_e=LB,u_e=Ki;function c_e(e,t){return e&&e.length?s_e(e,u_e(t),l_e):void 0}var f_e=c_e;const d_e=Qe.getDefaultExportFromCjs(f_e);var h_e=zg,p_e=Ki,m_e=BB;function g_e(e,t){return e&&e.length?h_e(e,p_e(t),m_e):void 0}var y_e=g_e;const v_e=Qe.getDefaultExportFromCjs(y_e);var b_e=["cx","cy","angle","ticks","axisLine"],x_e=["ticks","tick","angle","tickFormatter","stroke"];function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function w_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function __e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fj(e,t){for(var n=0;npj?a=i==="outer"?"start":"end":o<-pj?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,u=Ha(Ha({},Te(this.props,!1)),{},{fill:"none"},Te(s,!1));if(l==="circle")return O.createElement(pd,es({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:o,r:a}));var f=this.props.ticks,d=f.map(function(p){return Pt(i,o,a,p.coordinate)});return O.createElement(Z1e,es({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,f=Te(this.props,!1),d=Te(a,!1),p=Ha(Ha({},f),{},{fill:"none"},Te(s,!1)),m=o.map(function(g,v){var y=r.getTickLineCoord(g),x=r.getTickTextAnchor(g),w=Ha(Ha(Ha({textAnchor:x},f),{},{stroke:"none",fill:u},d),{},{index:v,payload:g,x:y.x2,y:y.y2});return O.createElement(et,es({className:Ue("recharts-polar-angle-axis-tick",hF(a)),key:"tick-".concat(g.coordinate)},ws(r.props,g,v)),s&&O.createElement("line",es({className:"recharts-polar-angle-axis-tick-line"},p,y)),a&&t.renderTickItem(a,w,l?l(g.value,v):g.value))});return O.createElement(et,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,a=r.axisLine;return o<=0||!i||!i.length?null:O.createElement(et,{className:Ue("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var a;return O.isValidElement(r)?a=O.cloneElement(r,i):Be(r)?a=r(i):a=O.createElement(_s,es({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}])}(O.PureComponent);Yg(qg,"displayName","PolarAngleAxis");Yg(qg,"axisType","angleAxis");Yg(qg,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var R_e=NL,L_e=R_e(Object.getPrototypeOf,Object),B_e=L_e,F_e=Do,W_e=B_e,z_e=Io,V_e="[object Object]",U_e=Function.prototype,K_e=Object.prototype,MF=U_e.toString,H_e=K_e.hasOwnProperty,G_e=MF.call(Object);function Y_e(e){if(!z_e(e)||F_e(e)!=V_e)return!1;var t=W_e(e);if(t===null)return!0;var n=H_e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&MF.call(n)==G_e}var q_e=Y_e;const X_e=Qe.getDefaultExportFromCjs(q_e);var Z_e=Do,J_e=Io,Q_e="[object Boolean]";function eSe(e){return e===!0||e===!1||J_e(e)&&Z_e(e)==Q_e}var tSe=eSe;const nSe=Qe.getDefaultExportFromCjs(tSe);function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function dm(){return dm=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:u},to:{upperWidth:f,lowerWidth:d,height:p,x:l,y:u},duration:v,animationEasing:g,isActive:x},function(S){var A=S.upperWidth,_=S.lowerWidth,C=S.height,E=S.x,k=S.y;return O.createElement(yi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:g},O.createElement("path",dm({},Te(n,!0),{className:w,d:vj(E,k,A,_,C),ref:r})))}):O.createElement("g",null,O.createElement("path",dm({},Te(n,!0),{className:w,d:vj(l,u,f,d,p)})))},hSe=["option","shapeType","propTransformer","activeClassName","isActive"];function jf(e){"@babel/helpers - typeof";return jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jf(e)}function pSe(e,t){if(e==null)return{};var n=mSe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hm(e){for(var t=1;t0?Er(S,"paddingAngle",0):0;if(_){var E=un(_.endAngle-_.startAngle,S.endAngle-S.startAngle),k=Ot(Ot({},S),{},{startAngle:w+C,endAngle:w+E(v)+C});y.push(k),w=k.endAngle}else{var M=S.endAngle,D=S.startAngle,$=un(0,M-D),N=$(v),F=Ot(Ot({},S),{},{startAngle:w+C,endAngle:w+N+C});y.push(F),w=F.endAngle}}),O.createElement(et,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,o=r.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!Ss(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,o=i.hide,a=i.sectors,s=i.className,l=i.label,u=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,m=i.isAnimationActive,g=this.state.isAnimationFinished;if(o||!a||!a.length||!ve(u)||!ve(f)||!ve(d)||!ve(p))return null;var v=Ue("recharts-pie",s);return O.createElement(et,{tabIndex:this.props.rootTabIndex,className:v,ref:function(x){r.pieRef=x}},this.renderSectors(),l&&this.renderLabels(a),cn.renderCallByParent(this.props,null,!1),(!m||g)&&Di.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r=360?w:w-1)*l,A=y-w*m-S,_=i.reduce(function(k,M){var D=Yt(M,x,0);return k+(ve(D)?D:0)},0),C;if(_>0){var E;C=i.map(function(k,M){var D=Yt(k,x,0),$=Yt(k,f,M),N=(ve(D)?D:0)/_,F;M?F=E.endAngle+Jn(v)*l*(D!==0?1:0):F=a;var L=F+Jn(v)*((D!==0?m:0)+N*A),W=(F+L)/2,B=(g.innerRadius+g.outerRadius)/2,z=[{name:$,value:D,payload:k,dataKey:x,type:p}],H=Pt(g.cx,g.cy,B,W);return E=Ot(Ot(Ot({percent:N,cornerRadius:o,name:$,tooltipPayload:z,midAngle:W,middleRadius:B,tooltipPosition:H},k),g),{},{value:Yt(k,x),startAngle:F,endAngle:L,payload:k,paddingAngle:Jn(v)*l}),E})}return Ot(Ot({},g),{},{sectors:C,data:i})});var ISe=Math.ceil,RSe=Math.max;function LSe(e,t,n,r){for(var i=-1,o=RSe(ISe((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var BSe=LSe,FSe=JL,Sj=1/0,WSe=17976931348623157e292;function zSe(e){if(!e)return e===0?e:0;if(e=FSe(e),e===Sj||e===-Sj){var t=e<0?-1:1;return t*WSe}return e===e?e:0}var DF=zSe,VSe=BSe,USe=Dg,$b=DF;function KSe(e){return function(t,n,r){return r&&typeof r!="number"&&USe(t,n,r)&&(n=r=void 0),t=$b(t),n===void 0?(n=t,t=0):n=$b(n),r=r===void 0?t0&&r.handleDrag(i.changedTouches[0])}),Sr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Sr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Sr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Sr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Sr(r,"handleSlideDragStart",function(i){var o=Tj(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return oOe(t,e),tOe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,d=Math.min(i,o),p=Math.max(i,o),m=t.getIndexInRange(a,d),g=t.getIndexInRange(a,p);return{startIndex:m-m%l,endIndex:g===f?f:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=Yt(o[r],s,r);return Be(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,l=this.props,u=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,m=l.endIndex,g=l.onChange,v=r.pageX-o;v>0?v=Math.min(v,u+f-d-s,u+f-d-a):v<0&&(v=Math.max(v,u-a,u-s));var y=this.getIndex({startX:a+v,endX:s+v});(y.startIndex!==p||y.endIndex!==m)&&g&&g(y),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=Tj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[a],f=this.props,d=f.x,p=f.width,m=f.travellerWidth,g=f.onChange,v=f.gap,y=f.data,x={startX:this.state.startX,endX:this.state.endX},w=r.pageX-o;w>0?w=Math.min(w,d+p-m-u):w<0&&(w=Math.max(w,d-u)),x[a]=u+w;var S=this.getIndex(x),A=S.startIndex,_=S.endIndex,C=function(){var k=y.length-1;return a==="startX"&&(s>l?A%v===0:_%v===0)||sl?_%v===0:A%v===0)||s>l&&_===k};this.setState(Sr(Sr({},a,u+w),"brushMoveStartX",r.pageX),function(){g&&C()&&g(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,u=a.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var m=s[p];i==="startX"&&m>=u||i==="endX"&&m<=l||this.setState(Sr({},i,m),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.fill,u=r.stroke;return O.createElement("rect",{stroke:u,fill:l,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.data,u=r.children,f=r.padding,d=O.Children.only(u);return d?O.cloneElement(d,{x:i,y:o,width:a,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,l=this.props,u=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,m=l.ariaLabel,g=l.data,v=l.startIndex,y=l.endIndex,x=Math.max(r,this.props.x),w=Db(Db({},Te(this.props,!1)),{},{x,y:u,width:f,height:d}),S=m||"Min value: ".concat((o=g[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[y])===null||a===void 0?void 0:a.name);return O.createElement(et,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),s.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,w))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,l=o.stroke,u=o.travellerWidth,f=Math.min(r,i)+u,d=Math.max(Math.abs(i-r)-u,0);return O.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,p=f.endX,m=5,g={pointerEvents:"none",fill:u};return O.createElement(et,{className:"recharts-brush-texts"},O.createElement(_s,gm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-m,y:a+s/2},g),this.getTextOfTick(i)),O.createElement(_s,gm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+m,y:a+s/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,l=r.y,u=r.width,f=r.height,d=r.alwaysShowText,p=this.state,m=p.startX,g=p.endX,v=p.isTextActive,y=p.isSlideMoving,x=p.isTravellerMoving,w=p.isTravellerFocused;if(!i||!i.length||!ve(s)||!ve(l)||!ve(u)||!ve(f)||u<=0||f<=0)return null;var S=Ue("recharts-brush",o),A=O.Children.count(a)===1,_=QSe("userSelect","none");return O.createElement(et,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(m,g),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(g,"endX"),(v||y||x||w||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,l=r.stroke,u=Math.floor(o+s/2)-1;return O.createElement(O.Fragment,null,O.createElement("rect",{x:i,y:o,width:a,height:s,fill:l,stroke:"none"}),O.createElement("line",{x1:i+1,y1:u,x2:i+a-1,y2:u,fill:"none",stroke:"#fff"}),O.createElement("line",{x1:i+1,y1:u+2,x2:i+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return O.isValidElement(r)?o=O.cloneElement(r,i):Be(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(o!==i.prevData||u!==i.prevUpdateId)return Db({prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a},o&&o.length?sOe({data:o,width:a,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+a-l]);var p=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>i?s=l:a=l}return i>=r[s]?s:a}}])}(O.PureComponent);Sr(Jl,"displayName","Brush");Sr(Jl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var lOe=__;function uOe(e,t){var n;return lOe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var cOe=uOe,fOe=CL,dOe=Ki,hOe=cOe,pOe=hr,mOe=Dg;function gOe(e,t,n){var r=pOe(e)?fOe:hOe;return n&&mOe(e,t,n)&&(t=void 0),r(e,dOe(t))}var yOe=gOe;const vOe=Qe.getDefaultExportFromCjs(yOe);var Ii=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},Ej=GL;function bOe(e,t,n){t=="__proto__"&&Ej?Ej(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var xOe=bOe,wOe=xOe,_Oe=KL,SOe=Ki;function OOe(e,t){var n={};return t=SOe(t),_Oe(e,function(r,i,o){wOe(n,i,t(r,i,o))}),n}var COe=OOe;const AOe=Qe.getDefaultExportFromCjs(COe);function POe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function KOe(e,t){var n=e.x,r=e.y,i=VOe(e,BOe),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),p=parseInt(d,10);return gc(gc(gc(gc(gc({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function Mj(e){return O.createElement(jF,ew({shapeType:"rectangle",propTransformer:KOe,activeClassName:"recharts-active-bar"},e))}var HOe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?cr(!1,"minPointSize callback function received a value with type of ".concat(Ql(r),". Currently only numbers are supported.")):cr()),n)}},GOe=["value","background"],FF;function eu(e){"@babel/helpers - typeof";return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eu(e)}function YOe(e,t){if(e==null)return{};var n=qOe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vm(){return vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(W)0&&Math.abs(L)0&&(F=Math.min((ie||0)-(L[ce-1]||0),F))}),Number.isFinite(F)){var W=F/N,B=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(E=W*B/2),v.padding==="no-gap"){var z=Qn(t.barCategoryGap,W*B),H=W*B/2;E=H-z-(H-z)/B*z}}}i==="xAxis"?k=[r.left+(S.left||0)+(E||0),r.left+r.width-(S.right||0)-(E||0)]:i==="yAxis"?k=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(E||0),r.top+r.height-(S.bottom||0)-(E||0)]:k=v.range,_&&(k=[k[1],k[0]]);var U=aF(v,o,p),K=U.scale,Y=U.realScaleType;K.domain(x).range(k),sF(K);var te=lF(K,li(li({},v),{},{realScaleType:Y}));i==="xAxis"?($=y==="top"&&!A||y==="bottom"&&A,M=r.left,D=d[C]-$*v.height):i==="yAxis"&&($=y==="left"&&!A||y==="right"&&A,M=d[C]-$*v.width,D=r.top);var ne=li(li(li({},v),te),{},{realScaleType:Y,x:M,y:D,scale:K,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return ne.bandSize=nm(ne,te),!v.hide&&i==="xAxis"?d[C]+=($?-1:1)*ne.height:v.hide||(d[C]+=($?-1:1)*ne.width),li(li({},m),{},Jg({},g,ne))},{})},UF=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},aCe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return UF({x:n,y:r},{x:i,y:o})},KF=function(){function e(t){rCe(this,e),this.scale=t}return iCe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Jg(KF,"EPS",1e-4);var eS=function(t){var n=Object.keys(t).reduce(function(r,i){return li(li({},r),{},Jg({},i,KF.create(t[i])))},{});return li(li({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return AOe(i,function(l,u){return n[u].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return BF(i,function(o,a){return n[a].isInRange(o)})}})};function sCe(e){return(e%180+180)%180}var lCe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=sCe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?i[o?t[a]:a]:void 0}}var hCe=dCe,pCe=DF;function mCe(e){var t=pCe(e),n=t%1;return t===t?n?t-n:t:0}var gCe=mCe,yCe=BL,vCe=Ki,bCe=gCe,xCe=Math.max;function wCe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:bCe(n);return i<0&&(i=xCe(r+i,0)),yCe(e,vCe(t),i)}var _Ce=wCe,SCe=hCe,OCe=_Ce,CCe=SCe(OCe),ACe=CCe;const PCe=Qe.getDefaultExportFromCjs(ACe);var TCe=Tie(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function xm(e){"@babel/helpers - typeof";return xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xm(e)}var tS=O.createContext(void 0),nS=O.createContext(void 0),HF=O.createContext(void 0),GF=O.createContext({}),YF=O.createContext(void 0),qF=O.createContext(0),XF=O.createContext(0),Ij=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,l=t.width,u=t.height,f=TCe(o);return O.createElement(tS.Provider,{value:r},O.createElement(nS.Provider,{value:i},O.createElement(GF.Provider,{value:o},O.createElement(HF.Provider,{value:f},O.createElement(YF.Provider,{value:a},O.createElement(qF.Provider,{value:u},O.createElement(XF.Provider,{value:l},s)))))))},ECe=function(){return O.useContext(YF)};function ZF(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var JF=function(t){var n=O.useContext(tS);n==null&&(process.env.NODE_ENV!=="production"?cr(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):cr());var r=n[t];return r==null&&(process.env.NODE_ENV!=="production"?cr(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(xm(t),"]. ").concat(ZF(n))):cr()),r},kCe=function(){var t=O.useContext(tS);return ia(t)},MCe=function(){var t=O.useContext(nS),n=PCe(t,function(r){return BF(r.domain,Number.isFinite)});return n||ia(t)},QF=function(t){var n=O.useContext(nS);n==null&&(process.env.NODE_ENV!=="production"?cr(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):cr());var r=n[t];return r==null&&(process.env.NODE_ENV!=="production"?cr(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(xm(t),"]. ").concat(ZF(n))):cr()),r},jCe=function(){var t=O.useContext(HF);return t},NCe=function(){return O.useContext(GF)},rS=function(){return O.useContext(XF)},iS=function(){return O.useContext(qF)};function tu(e){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function $Ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DCe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function gAe(e,t){return aW(e,t+1)}function yAe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,u=1,f=a,d=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:aW(r,u)};var v=l,y,x=function(){return y===void 0&&(y=n(g,v)),y},w=g.coordinate,S=l===0||Om(e,w,x,f,s);S||(l=0,f=a,u+=1),S&&(f=w+e*(x()/2+i),l+=u)},p;u<=o.length;)if(p=d(),p)return p.v;return[]}function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function Uj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t0?m.coordinate-y*e:m.coordinate})}else o[p]=m=Wn(Wn({},m),{},{tickCoord:m.coordinate});var x=Om(e,m.tickCoord,v,s,l);x&&(l=m.tickCoord-e*(v()/2+i),o[p]=Wn(Wn({},m),{},{isShow:!0}))},f=a-1;f>=0;f--)u(f);return o}function _Ae(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,u=t.end;if(o){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-u);a[s-1]=f=Wn(Wn({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var m=Om(e,f.tickCoord,function(){return d},l,u);m&&(u=f.tickCoord-e*(d/2+i),a[s-1]=Wn(Wn({},f),{},{isShow:!0}))}for(var g=o?s-1:s,v=function(w){var S=a[w],A,_=function(){return A===void 0&&(A=n(S,w)),A};if(w===0){var C=e*(S.coordinate-e*_()/2-l);a[w]=S=Wn(Wn({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[w]=S=Wn(Wn({},S),{},{tickCoord:S.coordinate});var E=Om(e,S.tickCoord,_,l,u);E&&(l=S.tickCoord+e*(_()/2+i),a[w]=Wn(Wn({},S),{},{isShow:!0}))},y=0;y=2?Jn(i[1].coordinate-i[0].coordinate):1,x=mAe(o,y,m);return l==="equidistantPreserveStart"?yAe(y,x,v,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=_Ae(y,x,v,i,a,l==="preserveStartEnd"):p=wAe(y,x,v,i,a),p.filter(function(w){return w.isShow}))}var SAe=["viewBox"],OAe=["viewBox"],CAe=["ticks"];function iu(e){"@babel/helpers - typeof";return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hj(e,t){for(var n=0;n0?l(this.props):l(m)),a<=0||s<=0||!g||!g.length?null:O.createElement(et,{className:Ue("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),cn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return O.isValidElement(r)?a=O.cloneElement(r,i):Be(r)?a=r(i):a=O.createElement(_s,vl({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(O.Component);lS(Du,"displayName","CartesianAxis");lS(Du,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var $Ae=["x1","y1","x2","y2","key"],DAe=["offset"];function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function Gj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var FAe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,l=t.ry;return O.createElement("rect",{x:i,y:o,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function uW(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(Be(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=Yj(t,$Ae),u=Te(l,!1);u.offset;var f=Yj(u,DAe);n=O.createElement("line",as({},f,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function WAe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=Vn(Vn({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return uW(i,u)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function zAe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=Vn(Vn({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return uW(i,u)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function VAe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==f[0]&&f.unshift(0);var d=f.map(function(p,m){var g=!f[m+1],v=g?i+a-p:f[m+1]-p;if(v<=0)return null;var y=m%t.length;return O.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:v,width:o,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function UAe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(p){return Math.round(p+o-o)}).sort(function(p,m){return p-m});o!==f[0]&&f.unshift(0);var d=f.map(function(p,m){var g=!f[m+1],v=g?o+s-p:f[m+1]-p;if(v<=0)return null;var y=m%r.length;return O.createElement("rect",{key:"react-".concat(m),x:p,y:a,width:v,height:l,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var KAe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return oF(sS(Vn(Vn(Vn({},Du.defaultProps),r),{},{ticks:po(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},HAe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return oF(sS(Vn(Vn(Vn({},Du.defaultProps),r),{},{ticks:po(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},rl={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function ry(e){var t,n,r,i,o,a,s=rS(),l=iS(),u=NCe(),f=Vn(Vn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:rl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:rl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:rl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:rl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:rl.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:rl.verticalFill,x:ve(e.x)?e.x:u.left,y:ve(e.y)?e.y:u.top,width:ve(e.width)?e.width:u.width,height:ve(e.height)?e.height:u.height}),d=f.x,p=f.y,m=f.width,g=f.height,v=f.syncWithTicks,y=f.horizontalValues,x=f.verticalValues,w=kCe(),S=MCe();if(!ve(m)||m<=0||!ve(g)||g<=0||!ve(d)||d!==+d||!ve(p)||p!==+p)return null;var A=f.verticalCoordinatesGenerator||KAe,_=f.horizontalCoordinatesGenerator||HAe,C=f.horizontalPoints,E=f.verticalPoints;if((!C||!C.length)&&Be(_)){var k=y&&y.length,M=_({yAxis:S?Vn(Vn({},S),{},{ticks:k?y:S.ticks}):void 0,width:s,height:l,offset:u},k?!0:v);mi(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Cs(M),"]")),Array.isArray(M)&&(C=M)}if((!E||!E.length)&&Be(A)){var D=x&&x.length,$=A({xAxis:w?Vn(Vn({},w),{},{ticks:D?x:w.ticks}):void 0,width:s,height:l,offset:u},D?!0:v);mi(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Cs($),"]")),Array.isArray($)&&(E=$)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(FAe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),O.createElement(WAe,as({},f,{offset:u,horizontalPoints:C,xAxis:w,yAxis:S})),O.createElement(zAe,as({},f,{offset:u,verticalPoints:E,xAxis:w,yAxis:S})),O.createElement(VAe,as({},f,{horizontalPoints:C})),O.createElement(UAe,as({},f,{verticalPoints:E})))}ry.displayName="CartesianGrid";var GAe=["type","layout","connectNulls","ref"],YAe=["key"];function ou(e){"@babel/helpers - typeof";return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ou(e)}function qj(e,t){if(e==null)return{};var n=qAe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){m=[].concat(il(l.slice(0,g)),[d-v]);break}var y=m.length%2===0?[0,p]:[p];return[].concat(il(t.repeat(l,f)),il(m),y).map(function(x){return"".concat(x,"px")}).join(", ")}),ui(n,"id",$s("recharts-line-")),ui(n,"pathRef",function(a){n.mainCurve=a}),ui(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),ui(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return oPe(t,e),tPe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,l=o.yAxis,u=o.layout,f=o.children,d=kr(f,hd);if(!d)return null;var p=function(v,y){return{x:v.x,y:v.y,value:v.value,errorVal:Yt(v.payload,y)}},m={clipPath:r?"url(#clipPath-".concat(i,")"):null};return O.createElement(et,m,d.map(function(g){return O.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:s,yAxis:l,layout:u,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,f=s.dataKey,d=Te(this.props,!1),p=Te(l,!0),m=u.map(function(v,y){var x=_r(_r(_r({key:"dot-".concat(y),r:3},d),p),{},{value:v.value,dataKey:f,cx:v.x,cy:v.y,index:y,payload:v.payload});return t.renderDotItem(l,x)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return O.createElement(et,Fc({className:"recharts-line-dots",key:"dots"},g),m)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,l=s.type,u=s.layout,f=s.connectNulls;s.ref;var d=qj(s,GAe),p=_r(_r(_r({},Te(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:l,layout:u,connectNulls:f});return O.createElement(ps,Fc({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,l=a.strokeDasharray,u=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,p=a.animationEasing,m=a.animationId,g=a.animateNewValues,v=a.width,y=a.height,x=this.state,w=x.prevPoints,S=x.totalLength;return O.createElement(yi,{begin:f,duration:d,isActive:u,easing:p,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var _=A.t;if(w){var C=w.length/s.length,E=s.map(function(N,F){var L=Math.floor(F*C);if(w[L]){var W=w[L],B=un(W.x,N.x),z=un(W.y,N.y);return _r(_r({},N),{},{x:B(_),y:z(_)})}if(g){var H=un(v*2,N.x),U=un(y/2,N.y);return _r(_r({},N),{},{x:H(_),y:U(_)})}return _r(_r({},N),{},{x:N.x,y:N.y})});return o.renderCurveStatically(E,r,i)}var k=un(0,S),M=k(_),D;if(l){var $="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});D=o.getStrokeDasharray(M,S,$)}else D=o.generateSimpleStrokeDasharray(S,M);return o.renderCurveStatically(s,r,i,{strokeDasharray:D})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,l=this.state,u=l.prevPoints,f=l.totalLength;return s&&a&&a.length&&(!u&&f>0||!Ss(u,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,u=i.xAxis,f=i.yAxis,d=i.top,p=i.left,m=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(o||!s||!s.length)return null;var x=this.state.isAnimationFinished,w=s.length===1,S=Ue("recharts-line",l),A=u&&u.allowDataOverflow,_=f&&f.allowDataOverflow,C=A||_,E=Fe(y)?this.id:y,k=(r=Te(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,D=M===void 0?3:M,$=k.strokeWidth,N=$===void 0?2:$,F=X2(a)?a:{},L=F.clipDot,W=L===void 0?!0:L,B=D*2+N;return O.createElement(et,{className:S},A||_?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(E)},O.createElement("rect",{x:A?p:p-m/2,y:_?d:d-g/2,width:A?m:m*2,height:_?g:g*2})),!W&&O.createElement("clipPath",{id:"clipPath-dots-".concat(E)},O.createElement("rect",{x:p-B/2,y:d-B/2,width:m+B,height:g+B}))):null,!w&&this.renderCurve(C,E),this.renderErrorBar(C,E),(w||a)&&this.renderDots(C,W,E),(!v||x)&&Di.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(il(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Ss(f,a)||!Ss(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,u=i.top,f=i.left,d=i.xAxis,p=i.yAxis,m=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(o||!s||!s.length)return null;var x=this.state.isAnimationFinished,w=s.length===1,S=Ue("recharts-area",l),A=d&&d.allowDataOverflow,_=p&&p.allowDataOverflow,C=A||_,E=Fe(y)?this.id:y,k=(r=Te(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,D=M===void 0?3:M,$=k.strokeWidth,N=$===void 0?2:$,F=X2(a)?a:{},L=F.clipDot,W=L===void 0?!0:L,B=D*2+N;return O.createElement(et,{className:S},A||_?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(E)},O.createElement("rect",{x:A?f:f-m/2,y:_?u:u-g/2,width:A?m:m*2,height:_?g:g*2})),!W&&O.createElement("clipPath",{id:"clipPath-dots-".concat(E)},O.createElement("rect",{x:f-B/2,y:u-B/2,width:m+B,height:g+B}))):null,w?null:this.renderArea(C,E),(a||w)&&this.renderDots(C,W,E),(!v||x)&&Di.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(O.PureComponent);dW=Ma;Ti(Ma,"displayName","Area");Ti(Ma,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!gi.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ti(Ma,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(ve(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Ti(Ma,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,m=t.layout,g=u&&u.length,v=dW.getBaseValue(t,n,r,i),y=m==="horizontal",x=!1,w=d.map(function(A,_){var C;g?C=u[f+_]:(C=Yt(A,l),Array.isArray(C)?x=!0:C=[v,C]);var E=C[1]==null||g&&Yt(A,l)==null;return y?{x:tm({axis:r,ticks:o,bandSize:s,entry:A,index:_}),y:E?null:i.scale(C[1]),value:C,payload:A}:{x:E?null:r.scale(C[1]),y:tm({axis:i,ticks:a,bandSize:s,entry:A,index:_}),value:C,payload:A}}),S;return g||x?S=w.map(function(A){var _=Array.isArray(A.value)?A.value[0]:null;return y?{x:A.x,y:_!=null&&A.y!=null?i.scale(_):null}:{x:_!=null?r.scale(_):null,y:A.y}}):S=y?i.scale(v):r.scale(v),ea({points:w,baseLine:S,layout:m,isRange:x},p)});Ti(Ma,"renderDotItem",function(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(Be(e))n=e(t);else{var r=Ue("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=hW(t,lPe);n=O.createElement(pd,ss({},o,{key:i,className:r}))}return n});function su(e){"@babel/helpers - typeof";return su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}function yPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vPe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aTe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ve(i)&&ve(o)?t.slice(i,o+1):[]};function EW(e){return e==="number"?[0,"auto"]:void 0}var xw=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=iy(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(l,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(a.dataKey&&!a.allowDuplicatedCategory){var m=d===void 0?s:d;p=Pp(m,a.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(cu(l),[cF(u,p)]):l},[])},oN=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=vTe(o,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=Dxe(a,s,u,l);if(f>=0&&u){var d=u[f]&&u[f].value,p=xw(t,n,f,d),m=bTe(r,s,f,o);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:m}}return null},xTe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,m=iF(f,o);return r.reduce(function(g,v){var y,x=v.type.defaultProps!==void 0?se(se({},v.type.defaultProps),v.props):v.props,w=x.type,S=x.dataKey,A=x.allowDataOverflow,_=x.allowDuplicatedCategory,C=x.scale,E=x.ticks,k=x.includeHidden,M=x[a];if(g[M])return g;var D=iy(t.data,{graphicalItems:i.filter(function(te){var ne,ie=a in te.props?te.props[a]:(ne=te.type.defaultProps)===null||ne===void 0?void 0:ne[a];return ie===M}),dataStartIndex:l,dataEndIndex:u}),$=D.length,N,F,L;HPe(x.domain,A,w)&&(N=j0(x.domain,null,A),m&&(w==="number"||C!=="auto")&&(L=Ic(D,S,"category")));var W=EW(w);if(!N||N.length===0){var B,z=(B=x.domain)!==null&&B!==void 0?B:W;if(S){if(N=Ic(D,S,w),w==="category"&&m){var H=Coe(N);_&&H?(F=N,N=mm(0,$)):_||(N=gM(z,N,v).reduce(function(te,ne){return te.indexOf(ne)>=0?te:[].concat(cu(te),[ne])},[]))}else if(w==="category")_?N=N.filter(function(te){return te!==""&&!Fe(te)}):N=gM(z,N,v).reduce(function(te,ne){return te.indexOf(ne)>=0||ne===""||Fe(ne)?te:[].concat(cu(te),[ne])},[]);else if(w==="number"){var U=Fxe(D,i.filter(function(te){var ne,ie,ce=a in te.props?te.props[a]:(ne=te.type.defaultProps)===null||ne===void 0?void 0:ne[a],ae="hide"in te.props?te.props.hide:(ie=te.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return ce===M&&(k||!ae)}),S,o,f);U&&(N=U)}m&&(w==="number"||C!=="auto")&&(L=Ic(D,S,"category"))}else m?N=mm(0,$):s&&s[M]&&s[M].hasStack&&w==="number"?N=p==="expand"?[0,1]:uF(s[M].stackGroups,l,u):N=rF(D,i.filter(function(te){var ne=a in te.props?te.props[a]:te.type.defaultProps[a],ie="hide"in te.props?te.props.hide:te.type.defaultProps.hide;return ne===M&&(k||!ie)}),w,f,!0);if(w==="number")N=yw(d,N,M,o,E),z&&(N=j0(z,N,A));else if(w==="category"&&z){var K=z,Y=N.every(function(te){return K.indexOf(te)>=0});Y&&(N=K)}}return se(se({},g),{},Le({},M,se(se({},x),{},{axisType:o,domain:N,categoricalDomain:L,duplicateDomain:F,originalDomain:(y=x.domain)!==null&&y!==void 0?y:W,isCategorical:m,layout:f})))},{})},wTe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=iy(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),m=p.length,g=iF(f,o),v=-1;return r.reduce(function(y,x){var w=x.type.defaultProps!==void 0?se(se({},x.type.defaultProps),x.props):x.props,S=w[a],A=EW("number");if(!y[S]){v++;var _;return g?_=mm(0,m):s&&s[S]&&s[S].hasStack?(_=uF(s[S].stackGroups,l,u),_=yw(d,_,S,o)):(_=j0(A,rF(p,r.filter(function(C){var E,k,M=a in C.props?C.props[a]:(E=C.type.defaultProps)===null||E===void 0?void 0:E[a],D="hide"in C.props?C.props.hide:(k=C.type.defaultProps)===null||k===void 0?void 0:k.hide;return M===S&&!D}),"number",f),i.defaultProps.allowDataOverflow),_=yw(d,_,S,o)),se(se({},y),{},Le({},S,se(se({axisType:o},i.defaultProps),{},{hide:!0,orientation:Er(gTe,"".concat(o,".").concat(v%2),null),domain:_,originalDomain:A,isCategorical:g,layout:f})))}return y},{})},_Te=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=kr(f,o),m={};return p&&p.length?m=xTe(t,{axes:p,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):a&&a.length&&(m=wTe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},STe=function(t){var n=ia(t),r=po(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:S_(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:nm(n,r)}},aN=function(t){var n=t.children,r=t.defaultShowTooltip,i=Or(n,Jl),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},OTe=function(t){return!t||!t.length?!1:t.some(function(n){var r=xo(n&&n.type);return r&&r.indexOf("Bar")>=0})},sN=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},CTe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,f=r.height,d=r.children,p=r.margin||{},m=Or(d,Jl),g=Or(d,wo),v=Object.keys(l).reduce(function(_,C){var E=l[C],k=E.orientation;return!E.mirror&&!E.hide?se(se({},_),{},Le({},k,_[k]+E.width)):_},{left:p.left||0,right:p.right||0}),y=Object.keys(a).reduce(function(_,C){var E=a[C],k=E.orientation;return!E.mirror&&!E.hide?se(se({},_),{},Le({},k,Er(_,"".concat(k))+E.height)):_},{top:p.top||0,bottom:p.bottom||0}),x=se(se({},y),v),w=x.bottom;m&&(x.bottom+=m.props.height||Jl.defaultProps.height),g&&n&&(x=Lxe(x,i,r,n));var S=u-x.left-x.right,A=f-x.top-x.bottom;return se(se({brushBottom:w},x),{},{width:Math.max(S,0),height:Math.max(A,0)})},ATe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},oy=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,p=function(x,w){var S=w.graphicalItems,A=w.stackGroups,_=w.offset,C=w.updateId,E=w.dataStartIndex,k=w.dataEndIndex,M=x.barSize,D=x.layout,$=x.barGap,N=x.barCategoryGap,F=x.maxBarSize,L=sN(D),W=L.numericAxisName,B=L.cateAxisName,z=OTe(S),H=[];return S.forEach(function(U,K){var Y=iy(x.data,{graphicalItems:[U],dataStartIndex:E,dataEndIndex:k}),te=U.type.defaultProps!==void 0?se(se({},U.type.defaultProps),U.props):U.props,ne=te.dataKey,ie=te.maxBarSize,ce=te["".concat(W,"Id")],ae=te["".concat(B,"Id")],le={},re=l.reduce(function(Se,ze){var Lt,at,Wt=w["".concat(ze.axisType,"Map")],$r=te["".concat(ze.axisType,"Id")];Wt&&Wt[$r]||ze.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?cr(!1,"Specifying a(n) ".concat(ze.axisType,"Id requires a corresponding ").concat(ze.axisType,"Id on the targeted graphical component ").concat((Lt=U==null||(at=U.type)===null||at===void 0?void 0:at.displayName)!==null&&Lt!==void 0?Lt:"")):cr());var pn=Wt[$r];return se(se({},Se),{},Le(Le({},ze.axisType,pn),"".concat(ze.axisType,"Ticks"),po(pn)))},le),Q=re[B],fe=re["".concat(B,"Ticks")],ye=A&&A[ce]&&A[ce].hasStack&&qxe(U,A[ce].stackGroups),X=xo(U.type).indexOf("Bar")>=0,Re=nm(Q,fe),pe=[],Ie=z&&Ixe({barSize:M,stackGroups:A,totalSize:ATe(re,B)});if(X){var Ze,tt,In=Fe(ie)?F:ie,Me=(Ze=(tt=nm(Q,fe,!0))!==null&&tt!==void 0?tt:In)!==null&&Ze!==void 0?Ze:0;pe=Rxe({barGap:$,barCategoryGap:N,bandSize:Me!==Re?Me:Re,sizeList:Ie[ae],maxBarSize:In}),Me!==Re&&(pe=pe.map(function(Se){return se(se({},Se),{},{position:se(se({},Se.position),{},{offset:Se.position.offset-Me/2})})}))}var nt=U&&U.type&&U.type.getComposedData;nt&&H.push({props:se(se({},nt(se(se({},re),{},{displayedData:Y,props:x,dataKey:ne,item:U,bandSize:Re,barPosition:pe,offset:_,stackedData:ye,layout:D,dataStartIndex:E,dataEndIndex:k}))),{},Le(Le(Le({key:U.key||"item-".concat(K)},W,re[W]),B,re[B]),"animationId",C)),childIndex:Ioe(U,x.children),item:U})}),H},m=function(x,w){var S=x.props,A=x.dataStartIndex,_=x.dataEndIndex,C=x.updateId;if(!cE({props:S}))return null;var E=S.children,k=S.layout,M=S.stackOffset,D=S.data,$=S.reverseStackOrder,N=sN(k),F=N.numericAxisName,L=N.cateAxisName,W=kr(E,r),B=Gxe(D,W,"".concat(F,"Id"),"".concat(L,"Id"),M,$),z=l.reduce(function(te,ne){var ie="".concat(ne.axisType,"Map");return se(se({},te),{},Le({},ie,_Te(S,se(se({},ne),{},{graphicalItems:W,stackGroups:ne.axisType===F&&B,dataStartIndex:A,dataEndIndex:_}))))},{}),H=CTe(se(se({},z),{},{props:S,graphicalItems:W}),w==null?void 0:w.legendBBox);Object.keys(z).forEach(function(te){z[te]=f(S,z[te],H,te.replace("Map",""),n)});var U=z["".concat(L,"Map")],K=STe(U),Y=p(S,se(se({},z),{},{dataStartIndex:A,dataEndIndex:_,updateId:C,graphicalItems:W,stackGroups:B,offset:H}));return se(se({formattedGraphicalItems:Y,graphicalItems:W,offset:H,stackGroups:B},K),z)},g=function(y){function x(w){var S,A,_;return oTe(this,x),_=lTe(this,x,[w]),Le(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Le(_,"accessibilityManager",new KPe),Le(_,"handleLegendBBoxUpdate",function(C){if(C){var E=_.state,k=E.dataStartIndex,M=E.dataEndIndex,D=E.updateId;_.setState(se({legendBBox:C},m({props:_.props,dataStartIndex:k,dataEndIndex:M,updateId:D},se(se({},_.state),{},{legendBBox:C}))))}}),Le(_,"handleReceiveSyncEvent",function(C,E,k){if(_.props.syncId===C){if(k===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(E)}}),Le(_,"handleBrushChange",function(C){var E=C.startIndex,k=C.endIndex;if(E!==_.state.dataStartIndex||k!==_.state.dataEndIndex){var M=_.state.updateId;_.setState(function(){return se({dataStartIndex:E,dataEndIndex:k},m({props:_.props,dataStartIndex:E,dataEndIndex:k,updateId:M},_.state))}),_.triggerSyncEvent({dataStartIndex:E,dataEndIndex:k})}}),Le(_,"handleMouseEnter",function(C){var E=_.getMouseInfo(C);if(E){var k=se(se({},E),{},{isTooltipActive:!0});_.setState(k),_.triggerSyncEvent(k);var M=_.props.onMouseEnter;Be(M)&&M(k,C)}}),Le(_,"triggeredAfterMouseMove",function(C){var E=_.getMouseInfo(C),k=E?se(se({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(k),_.triggerSyncEvent(k);var M=_.props.onMouseMove;Be(M)&&M(k,C)}),Le(_,"handleItemMouseEnter",function(C){_.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Le(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),Le(_,"handleMouseMove",function(C){C.persist(),_.throttleTriggeredAfterMouseMove(C)}),Le(_,"handleMouseLeave",function(C){_.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};_.setState(E),_.triggerSyncEvent(E);var k=_.props.onMouseLeave;Be(k)&&k(E,C)}),Le(_,"handleOuterEvent",function(C){var E=Doe(C),k=Er(_.props,"".concat(E));if(E&&Be(k)){var M,D;/.*touch.*/i.test(E)?D=_.getMouseInfo(C.changedTouches[0]):D=_.getMouseInfo(C),k((M=D)!==null&&M!==void 0?M:{},C)}}),Le(_,"handleClick",function(C){var E=_.getMouseInfo(C);if(E){var k=se(se({},E),{},{isTooltipActive:!0});_.setState(k),_.triggerSyncEvent(k);var M=_.props.onClick;Be(M)&&M(k,C)}}),Le(_,"handleMouseDown",function(C){var E=_.props.onMouseDown;if(Be(E)){var k=_.getMouseInfo(C);E(k,C)}}),Le(_,"handleMouseUp",function(C){var E=_.props.onMouseUp;if(Be(E)){var k=_.getMouseInfo(C);E(k,C)}}),Le(_,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Le(_,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.handleMouseDown(C.changedTouches[0])}),Le(_,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.handleMouseUp(C.changedTouches[0])}),Le(_,"triggerSyncEvent",function(C){_.props.syncId!==void 0&&Rb.emit(Lb,_.props.syncId,C,_.eventEmitterSymbol)}),Le(_,"applySyncEvent",function(C){var E=_.props,k=E.layout,M=E.syncMethod,D=_.state.updateId,$=C.dataStartIndex,N=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)_.setState(se({dataStartIndex:$,dataEndIndex:N},m({props:_.props,dataStartIndex:$,dataEndIndex:N,updateId:D},_.state)));else if(C.activeTooltipIndex!==void 0){var F=C.chartX,L=C.chartY,W=C.activeTooltipIndex,B=_.state,z=B.offset,H=B.tooltipTicks;if(!z)return;if(typeof M=="function")W=M(H,C);else if(M==="value"){W=-1;for(var U=0;U=0){var ye,X;if(F.dataKey&&!F.allowDuplicatedCategory){var Re=typeof F.dataKey=="function"?fe:"payload.".concat(F.dataKey.toString());ye=Pp(U,Re,W),X=K&&Y&&Pp(Y,Re,W)}else ye=U==null?void 0:U[L],X=K&&Y&&Y[L];if(ae||ce){var pe=C.props.activeIndex!==void 0?C.props.activeIndex:L;return[O.cloneElement(C,se(se(se({},M.props),re),{},{activeIndex:pe})),null,null]}if(!Fe(ye))return[Q].concat(cu(_.renderActivePoints({item:M,activePoint:ye,basePoint:X,childIndex:L,isRange:K})))}else{var Ie,Ze=(Ie=_.getItemByXY(_.state.activeCoordinate))!==null&&Ie!==void 0?Ie:{graphicalItem:Q},tt=Ze.graphicalItem,In=tt.item,Me=In===void 0?C:In,nt=tt.childIndex,Se=se(se(se({},M.props),re),{},{activeIndex:nt});return[O.cloneElement(Me,Se),null,null]}return K?[Q,null,null]:[Q,null]}),Le(_,"renderCustomized",function(C,E,k){return O.cloneElement(C,se(se({key:"recharts-customized-".concat(k)},_.props),_.state))}),Le(_,"renderMap",{CartesianGrid:{handler:Ih,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:Ih},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:Ih},YAxis:{handler:Ih},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((S=w.id)!==null&&S!==void 0?S:$s("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=QL(_.triggeredAfterMouseMove,(A=w.throttleDelay)!==null&&A!==void 0?A:1e3/60),_.state={},_}return fTe(x,y),sTe(x,[{key:"componentDidMount",value:function(){var S,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,A=S.children,_=S.data,C=S.height,E=S.layout,k=Or(A,Cr);if(k){var M=k.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,$=xw(this.state,_,M,D),N=this.state.tooltipTicks[M].coordinate,F=(this.state.offset.top+C)/2,L=E==="horizontal",W=L?{x:N,y:F}:{y:N,x:F},B=this.state.formattedGraphicalItems.find(function(H){var U=H.item;return U.type.name==="Scatter"});B&&(W=se(se({},W),B.props.points[M].tooltipPosition),$=B.props.points[M].tooltipPayload);var z={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:D,activePayload:$,activeCoordinate:W};this.setState(z),this.renderCursor(k),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var _,C;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){Gx([Or(S.children,Cr)],[Or(this.props.children,Cr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Or(this.props.children,Cr);if(S&&typeof S.props.shared=="boolean"){var A=S.props.shared?"axis":"item";return s.indexOf(A)>=0?A:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var A=this.container,_=A.getBoundingClientRect(),C=uge(_),E={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},k=_.width/A.offsetWidth||1,M=this.inRange(E.chartX,E.chartY,k);if(!M)return null;var D=this.state,$=D.xAxisMap,N=D.yAxisMap,F=this.getTooltipEventType();if(F!=="axis"&&$&&N){var L=ia($).scale,W=ia(N).scale,B=L&&L.invert?L.invert(E.chartX):null,z=W&&W.invert?W.invert(E.chartY):null;return se(se({},E),{},{xValue:B,yValue:z})}var H=oN(this.state,this.props.data,this.props.layout,M);return H?se(se({},E),H):null}},{key:"inRange",value:function(S,A){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,E=S/_,k=A/_;if(C==="horizontal"||C==="vertical"){var M=this.state.offset,D=E>=M.left&&E<=M.left+M.width&&k>=M.top&&k<=M.top+M.height;return D?{x:E,y:k}:null}var $=this.state,N=$.angleAxisMap,F=$.radiusAxisMap;if(N&&F){var L=ia(N);return bM({x:E,y:k},L)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,A=this.getTooltipEventType(),_=Or(S,Cr),C={};_&&A==="axis"&&(_.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var E=Tp(this.props,this.handleOuterEvent);return se(se({},E),C)}},{key:"addListener",value:function(){Rb.on(Lb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Rb.removeListener(Lb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,A,_){for(var C=this.state.formattedGraphicalItems,E=0,k=C.length;En.length?T.jsx("div",{ref:a,className:G("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>T.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&T.jsx("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:s.color}}),T.jsx("span",{className:"capitalize",style:{fontSize:o},children:s[i]})]},s.value))}):null);kW.displayName="ChartLegendContent";const MW=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g(),T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{const w=f||y.color||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"size-2.5":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});MW.displayName="ChartTooltipContent";const MTe=({data:e,dataKeys:t=[],colors:n=[],layout:r="horizontal",stacked:i=!1,showXAxis:o=!0,showYAxis:a=!0,showTooltip:s=!0,tooltipIndicator:l="dot",tooltipLabelKey:u,showLegend:f=!1,showCartesianGrid:d=!0,tickFormatter:p,xAxisDataKey:m,yAxisDataKey:g,xAxisFontSize:v="sm",xAxisFontColor:y="#4B5563",yAxisFontColor:x="#4B5563",chartWidth:w=350,chartHeight:S=200,borderRadius:A=8})=>{const _=[{fill:"#7DD3FC"},{fill:"#2563EB"}],C=n.length>0?n:_,E={sm:"12px",md:"14px",lg:"16px"},k=E[v]||E.sm;return!e||e.length===0?T.jsx(Kf,{size:"sm",variant:"help",children:"No data available"}):T.jsx(eB,{width:w,height:S,children:T.jsxs(TTe,{data:e,margin:{left:14,right:14},layout:r,children:[d&&T.jsx(ry,{vertical:!1}),r==="horizontal"&&o&&T.jsx(Mo,{dataKey:m,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:p,tick:{fontSize:k,fill:y}}),r==="horizontal"&&a&&T.jsx(Ri,{dataKey:g,tickLine:!1,tickMargin:10,axisLine:!1,tick:{fontSize:k,fill:x}}),r==="vertical"&&T.jsxs(T.Fragment,{children:[T.jsx(Mo,{type:"number",dataKey:m,hide:!0}),T.jsx(Ri,{dataKey:g,type:"category",tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:p,tick:{fontSize:k,fill:x}})]}),a&&T.jsx(Ri,{dataKey:g}),s&&T.jsx(Cr,{content:T.jsx(MW,{indicator:l,labelKey:u})}),f&&T.jsx(wo,{content:T.jsx(kW,{fontSizeVariant:k})}),t.map((M,D)=>{var N;let $;return i?D===0?$=[0,0,4,4]:D===t.length-1?$=[4,4,0,0]:$=0:$=A,T.jsx(Rs,{dataKey:M,fill:(N=C[D])==null?void 0:N.fill,radius:$,stackId:i?"a":void 0},M)})]})})},jW=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g(),T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{const w=f||y.color||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"size-2.5 ":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});jW.displayName="ChartTooltipContent";const jTe=({data:e,dataKeys:t=[],colors:n=[],showXAxis:r=!0,showYAxis:i=!0,showTooltip:o=!0,tooltipIndicator:a="dot",tooltipLabelKey:s,showCartesianGrid:l=!0,tickFormatter:u,xAxisDataKey:f,yAxisDataKey:d,xAxisFontSize:p="sm",xAxisFontColor:m="#4B5563",yAxisFontColor:g="#4B5563",chartWidth:v=350,chartHeight:y=200,withDots:x=!1})=>{const w=[{stroke:"#2563EB"},{stroke:"#38BDF8"}],S=n.length>0?n:w,A={sm:"12px",md:"14px",lg:"16px"},_=A[p]||A.sm;return!e||e.length===0?T.jsx(Kf,{size:"sm",variant:"help",children:"No data available"}):T.jsxs(PTe,{width:v,height:y,data:e,margin:{left:14,right:14},children:[l&&T.jsx(ry,{vertical:!1}),r&&T.jsx(Mo,{dataKey:f,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:u,tick:{fontSize:_,fill:m}}),i&&T.jsx(Ri,{dataKey:d,tickLine:!1,axisLine:!1,tickMargin:8,tick:{fontSize:_,fill:g}}),o&&T.jsx(Cr,{content:T.jsx(jW,{indicator:a,labelKey:s})}),t.map((C,E)=>T.jsx(md,{type:"natural",dataKey:C,stroke:S[E].stroke,fill:S[E].stroke,strokeWidth:2,dot:x},C))]})},NW=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g(),T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{var S;const w=y.color||((S=y.payload)==null?void 0:S.fill)||f||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"h-2.5 w-2.5 ":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});NW.displayName="ChartTooltipContent";const $W=O.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:i="value"},o)=>n.length?T.jsx("div",{ref:o,className:G("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(a=>T.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&T.jsx("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:a.color}}),T.jsx("span",{className:"capitalize",children:a[i]})]},a.value))}):null);$W.displayName="ChartLegendContent";const NTe=({data:e,dataKey:t,type:n="simple",showTooltip:r=!0,tooltipIndicator:i="dot",tooltipLabelKey:o,label:a=!1,labelName:s="",labelNameColor:l="#9CA3AF",labelValue:u,showLegend:f=!1,chartWidth:d=300,pieOuterRadius:p=90,pieInnerRadius:m=60})=>{const g=n==="donut",v=p,y=g?m:0;return!e||e.length===0?T.jsx(Kf,{size:"sm",variant:"help",children:"No data available"}):T.jsxs(ETe,{width:d,height:d,children:[r&&T.jsx(Cr,{content:T.jsx(NW,{indicator:i,labelKey:o})}),f&&T.jsx(wo,{content:T.jsx($W,{})}),T.jsx(Lo,{data:e,cx:"50%",cy:"50%",innerRadius:y,outerRadius:v,dataKey:t,children:g&&a&&T.jsx(cn,{content:({viewBox:x})=>{if(x&&"cx"in x&&"cy"in x)return T.jsxs("text",{x:x.cx,y:x.cy,textAnchor:"middle",dominantBaseline:"middle",className:"space-y-3",children:[T.jsx("tspan",{x:x.cx,dy:"-4",className:"fill-foreground text-xl font-bold",children:u}),T.jsx("tspan",{x:x.cx,dy:"24",className:"text-sm",style:{fill:l},children:s})]})}})})]})},DW=O.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:i="value",fontSizeVariant:o},a)=>n.length?T.jsx("div",{ref:a,className:G("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>T.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&T.jsx("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:s.color}}),T.jsx("span",{className:"capitalize",style:{fontSize:o},children:s[i]})]},s.value))}):null);DW.displayName="ChartLegendContent";const IW=O.forwardRef(({active:e,payload:t,className:n,indicator:r,hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=O.useMemo(()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null},[a,s,t,i,l,p]);if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g,T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{const w=f||y.color||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"size-2.5":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});IW.displayName="ChartTooltipContent";const $Te=({data:e,dataKeys:t,colors:n=[],variant:r="solid",showXAxis:i=!0,showYAxis:o=!0,showTooltip:a=!0,tooltipIndicator:s="dot",tooltipLabelKey:l,showLegend:u=!0,showCartesianGrid:f=!0,tickFormatter:d,xAxisDataKey:p,yAxisDataKey:m,xAxisFontSize:g="sm",xAxisFontColor:v="#4B5563",chartWidth:y=350,chartHeight:x=200})=>{const[w,S]=O.useState(y),[A,_]=O.useState(x),C=[{stroke:"#2563EB",fill:"#BFDBFE"},{stroke:"#38BDF8",fill:"#BAE6FD"}],E=n.length>0?n:C;O.useEffect(()=>{S(y),_(x)},[y,x]);const k={sm:"12px",md:"14px",lg:"16px"},M=k[g]||k.sm,D=()=>T.jsx("defs",{children:E.map(($,N)=>T.jsxs("linearGradient",{id:`fill${N}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[T.jsx("stop",{offset:"5%",stopColor:$.fill,stopOpacity:.8}),T.jsx("stop",{offset:"95%",stopColor:$.fill,stopOpacity:.1})]},`gradient${N}`))});return!e||e.length===0?T.jsx(Kf,{size:"sm",variant:"help",children:"No data available"}):T.jsx(eB,{width:w,height:A,children:T.jsxs(kTe,{data:e,margin:{left:14,right:14},children:[f&&T.jsx(ry,{vertical:!1}),i&&T.jsx(Mo,{dataKey:p,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:d,tick:{fontSize:M,fill:v}}),o&&T.jsx(Ri,{dataKey:m,tickLine:!1,axisLine:!1,tickMargin:8,tick:{fontSize:M,fill:v}}),a&&T.jsx(Cr,{content:T.jsx(IW,{indicator:s,labelKey:l})}),u&&T.jsx(wo,{content:T.jsx(DW,{fontSizeVariant:M})}),r==="gradient"&&D(),t.map(($,N)=>T.jsx(Ma,{type:"monotone",dataKey:$,stroke:E[N%E.length].stroke,fill:r==="gradient"?`url(#fill${N})`:E[N%E.length].fill,stackId:"1"},$))]})})};exports.Accordion=Kte;exports.Alert=cX;exports.AreaChart=$Te;exports.Avatar=fG;exports.Badge=Uf;exports.BarChart=MTe;exports.Breadcrumb=Aa;exports.Button=zn;exports.ButtonGroup=yG;exports.Checkbox=wN;exports.Container=v1;exports.DatePicker=Ute;exports.Dialog=Wi;exports.Drawer=Vi;exports.DropdownMenu=ks;exports.EditorInput=oR;exports.Input=n$;exports.Label=Kf;exports.LineChart=jTe;exports.Loader=r$;exports.Menu=No;exports.Pagination=Ms;exports.PieChart=NTe;exports.ProgressBar=pG;exports.ProgressSteps=aR;exports.RadioButton=uG;exports.SearchBox=zi;exports.Select=qf;exports.Sidebar=HJ;exports.Skeleton=KJ;exports.Switch=_w;exports.Tabs=ng;exports.TextArea=t$;exports.Title=hG;exports.Toaster=Z7;exports.Tooltip=Rw;exports.Topbar=xu;exports.toast=G7; diff --git a/dist/force-ui.d.ts b/dist/force-ui.d.ts new file mode 100644 index 00000000..fca20437 --- /dev/null +++ b/dist/force-ui.d.ts @@ -0,0 +1,2451 @@ +/// + +import { Boundary } from '@floating-ui/react'; +import { default as default_2 } from 'react'; +import { EditorState } from 'lexical'; +import { ElementType } from 'react'; +import { FloatingPortalProps } from '@floating-ui/react'; +import { ForwardRefExoticComponent } from 'react'; +import { JSX as JSX_2 } from 'react/jsx-runtime'; +import { LexicalEditor } from 'lexical'; +import { NamedExoticComponent } from 'react'; +import { OffsetOptions } from '@floating-ui/react'; +import { ReactElement } from 'react'; +import { ReactNode } from 'react'; +import { RefAttributes } from 'react'; + +export declare const Accordion: { + ({ type, defaultValue, autoClose, disabled, children, className, }: AccordionProps): JSX_2.Element; + displayName: string; +} & { + Item: { + ({ isOpen, onToggle, type, disabled, children, className, }: AccordionItemProps): JSX_2.Element; + displayName: string; + }; + Trigger: { + ({ onToggle, isOpen, iconType, disabled, tag, type, children, className, ...props }: AccordionTriggerProps): JSX_2.Element; + displayName: string; + }; + Content: { + ({ isOpen, disabled, type, children, className, }: AccordionContentProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface AccordionContentProps extends CommonProps_4 { + /** Determines if the content is open */ + isOpen?: boolean; + /** Accordion type (same as parent) */ + type?: 'simple' | 'separator' | 'boxed'; +} + +/** + * Props for an AccordionItem component. + */ +declare interface AccordionItemProps extends CommonProps_4 { + /** Determines if the item is open */ + isOpen?: boolean; + /** Callback to toggle the item's state */ + onToggle?: () => void; + /** Accordion type (same as parent) */ + type?: 'simple' | 'separator' | 'boxed'; + /** The value associated with the accordion item */ + value?: string; +} + +declare interface AccordionProps extends CommonProps_4 { + /** Type of accordion: 'simple', 'separator', or 'boxed' */ + type?: 'simple' | 'separator' | 'boxed'; + /** Initial active item(s) */ + defaultValue?: string | string[]; + /** Automatically close other items when one is opened */ + autoClose?: boolean; +} + +declare interface AccordionTriggerProps extends CommonProps_4 { + /** Callback for toggling item state */ + onToggle?: () => void; + /** Indicates if the item is open */ + isOpen?: boolean; + /** Type of icon to display */ + iconType?: 'arrow' | 'plus-minus'; + /** Element to render trigger as */ + tag?: ElementType; + /** Accordion type (same as parent) */ + type?: 'simple' | 'separator' | 'boxed'; +} + +declare interface AdditionalProps { + /** Additional props */ + [key: string]: unknown; +} + +export declare const Alert: ({ design, theme, variant, className, title, content, icon, onClose, action, }: AlertProps) => JSX.Element; + +declare interface AlertProps { + /** Defines the style variant of the alert. */ + variant?: 'neutral' | 'info' | 'warning' | 'error' | 'success'; + /** Defines the theme of the alert. */ + theme?: 'light' | 'dark'; + /** Defines the design of the alert. */ + design?: 'inline' | 'stack'; + /** Defines the title of the alert. */ + title?: React.ReactNode; + /** Defines the content of the alert. */ + content?: React.ReactNode; + /** Defines the extra classes. */ + className?: string; + /** Callback function for close event. */ + onClose?: () => void; + /** Custom Icon for the alert. */ + icon?: React.ReactElement | null; + /** Defines the action of the alert. */ + action?: { + label: string; + onClick: (close: () => void) => void; + type: 'link' | 'button'; + }; +} + +export declare const AreaChart: ({ data, dataKeys, colors, variant, showXAxis, showYAxis, showTooltip, tooltipIndicator, tooltipLabelKey, showLegend, showCartesianGrid, tickFormatter, xAxisDataKey, yAxisDataKey, xAxisFontSize, xAxisFontColor, chartWidth, chartHeight, }: AreaChartProps) => JSX_2.Element; + +declare interface AreaChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem_4[]; + /** An array of strings representing the keys to access data in each data object. Used for identifying different data series. */ + dataKeys: string[]; + /** An array of color strings that determine the colors for each data series in the chart. */ + colors?: Color_3[]; + /** Defines the variant of Area Chart. */ + variant?: 'solid' | 'gradient'; + /** Whether to render the `` component for the x-axis. */ + showXAxis?: boolean; + /** Whether to render the `` component for the y-axis. */ + showYAxis?: boolean; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line` or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** An array of objects representing the source data for the chart. */ + tooltipLabelKey?: string; + /** Whether to render the `` component to identify data series. */ + showLegend?: boolean; + /** Whether to display the ``, adding horizontal and vertical grid lines. */ + showCartesianGrid?: boolean; + /** A function used to format the ticks on the axes, e.g., for formatting dates or numbers. */ + tickFormatter?: (value: string) => string; + /** The key in the data objects representing values for the x-axis. This is used to access the x-axis values from each data entry. */ + xAxisDataKey?: string; + /** The key in the data objects representing values for the y-axis. This is used to access the y-axis values from each data entry. */ + yAxisDataKey?: string; + /** Font size for the labels on the x-axis. */ + xAxisFontSize?: 'sm' | 'md' | 'lg'; + /** Font color for the labels on the x-axis. */ + xAxisFontColor?: string; + /** Width of the chart container. */ + chartWidth?: number; + /** Height of the chart container. */ + chartHeight?: number; +} + +export declare const Avatar: default_2.ForwardRefExoticComponent<{ + /** Defines the style variant of the avatar. */ + variant?: "primary" | "dark" | "gray" | "white" | "primary-light" | undefined; + /** Defines the size of the avatar. */ + size?: "xs" | "sm" | "md" | "lg" | "xxs" | undefined; + /** Defines the border of the avatar. */ + border?: "none" | "subtle" | "ring" | undefined; + /** The URL of the Avatar image */ + url?: string | undefined; + /** Defines the children of the avatar. */ + children?: ReactNode; + /** Defines the extra classes */ + className?: string | undefined; + /** The URL of the Avatar image. */ + src?: string | undefined; + /** Alt text for the avatar image. */ + alt?: string | undefined; +} & Pick, "title"> & default_2.RefAttributes>; + +export declare const Badge: ForwardRefExoticComponent>; + +declare interface BadgeProps { + /** + * Defines the Label of the badge. + */ + label?: string; + /** + * Defines the size of the badge. + */ + size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg'; + /** + * Defines the extra classes + */ + className?: string; + /** + * Defines the type of the badge. + */ + type?: 'pill' | 'rounded'; + /** + * Defines the style variant of the badge. + */ + variant?: 'neutral' | 'red' | 'yellow' | 'green' | 'blue' | 'inverse'; + /** + * Custom Icon for the badge. + */ + icon?: ReactNode; + /** + * Defines if the badge is disabled. + */ + disabled?: boolean; + /** + * Callback function for close event + */ + onClose?: (event: React.MouseEvent) => void; + /** + * Defines if the badge is closable. + */ + closable?: boolean; + /** + * Callback function for mouse down event. + */ + onMouseDown?: () => void; +} + +export declare const BarChart: ({ data, dataKeys, colors, layout, stacked, showXAxis, showYAxis, showTooltip, tooltipIndicator, tooltipLabelKey, showLegend, showCartesianGrid, tickFormatter, xAxisDataKey, yAxisDataKey, xAxisFontSize, xAxisFontColor, yAxisFontColor, chartWidth, chartHeight, borderRadius, }: BarChartProps) => JSX_2.Element; + +declare interface BarChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem[]; + /** An array of strings representing the keys to access data in each data object. Used for identifying different data series. */ + dataKeys: string[]; + /** An array of color strings that determine the colors for each data series in the chart. */ + colors?: Color[]; + /** Defines the layout of Bar Chart. if you want to check how layout `vertical` works, then you need to clear the xAxisDataKey value and set showCartesianGrid to false. */ + layout?: 'horizontal' | 'vertical'; + /** Defines are the chart bars are stacked. */ + stacked?: boolean; + /** Whether to render the `` component for the x-axis. */ + showXAxis?: boolean; + /** Whether to render the `` component for the y-axis. */ + showYAxis?: boolean; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line` or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** Present tooltip lable key. E.g. for this data element: `{ month: 'January', desktop: 186, mobile: 80 }` if set lableKye to 'month' the tooltip will display the month name (like 'January'). */ + tooltipLabelKey?: string; + /** Whether to render the `` component to identify data series. */ + showLegend?: boolean; + /** Whether to display the ``, adding horizontal and vertical grid lines. */ + showCartesianGrid?: boolean; + /** A function used to format the ticks on the axes, e.g., ```const monthFormatter = ( value: string ) => value.slice( 0, 3 );``` */ + tickFormatter?: (value: string) => string; + /** The key in the data objects representing values for the x-axis. This is used to access the x-axis values from each data entry. */ + xAxisDataKey?: string; + /** The key in the data objects representing values for the y-axis. This is used to access the y-axis values from each data entry. */ + yAxisDataKey?: string; + /** Font size for the labels on the x-axis. */ + xAxisFontSize?: 'sm' | 'md' | 'lg'; + /** Font color for the labels on the x-axis. */ + xAxisFontColor?: string; + /** Font color for the labels on the y-axis. */ + yAxisFontColor?: string; + /** Width of the chart container. */ + chartWidth?: number; + /** Height of the chart container. */ + chartHeight?: number; + /** Border radius of chart bar. */ + borderRadius?: number; +} + +declare interface BaseMenuProps { + /** Additional CSS classes for the component. */ + className?: string; +} + +declare interface BaseSearchBoxProps { + /** Additional class names for styling. */ + className?: string; + /** Size of the SearchBox. */ + size?: 'sm' | 'md' | 'lg'; + /** Whether the dropdown is open. */ + open?: boolean; + /** Callback when dropdown state changes. */ + onOpenChange?: (open: boolean) => void; + /** Whether to show loading state. */ + loading?: boolean; + /** Child components to be rendered. */ + children?: ReactNode; +} + +export declare const Breadcrumb: { + ({ children, size }: BreadcrumbProps): JSX_2.Element; + displayName: string; + List: { + ({ children }: BreadcrumbCommonProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ children }: BreadcrumbCommonProps): JSX_2.Element; + displayName: string; + }; + Link: { + ({ href, children, className, as: AsElement, ...props }: BreadcrumbLinkProps): JSX_2.Element; + displayName: string; + }; + Separator: { + ({ type }: BreadcrumbSeparatorProps): JSX_2.Element; + displayName: string; + }; + Ellipsis: { + (): JSX_2.Element; + displayName: string; + }; + Page: { + ({ children }: BreadcrumbCommonProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface BreadcrumbCommonProps { + /** Defines the children of the breadcrumb. */ + children: ReactNode; +} + +declare interface BreadcrumbLinkProps extends BreadcrumbCommonProps { + /** Defines the href of the link. */ + href: string; + /** Defines the class name of the link. */ + className?: string; + /** Defines the element type of the link. */ + as?: ElementType; +} + +declare interface BreadcrumbProps extends BreadcrumbCommonProps { + /** Defines the size of the breadcrumb. */ + size?: 'sm' | 'md'; +} + +declare interface BreadcrumbSeparatorProps { + /** + * Defines the type of separator. + * + * Available options: + * - arrow + * - slash + */ + type: 'arrow' | 'slash'; +} + +export declare const Button: default_2.FunctionComponent; + +export declare const ButtonGroup: { + Group: ({ children, activeItem, onChange, className, size, iconPosition, }: ButtonGroupProps) => JSX_2.Element; + Button: default_2.ForwardRefExoticComponent>; +}; + +/** Props for the ButtonGroup component. */ +declare interface ButtonGroupProps extends CommonProps { + /** Child elements, typically Button components. */ + children: ReactNode; + /** Active item slug in the group. */ + activeItem?: string | null; + /** Callback when the active item changes. */ + onChange?: (value: ButtonValue) => void; + /** Size of the buttons in the group. */ + size?: 'xs' | 'sm' | 'md'; + /** Position of the icon inside the button. */ + iconPosition?: 'left' | 'right'; +} + +declare interface ButtonProps { + /** + * Defines the style variant of the button. + */ + variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'link'; + /** + * Defines the size of the button. + */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** + * Defines the type of the button. + */ + type?: 'button' | 'submit' | 'reset'; + /** + * Defines the tag of the button. + */ + tag?: ElementType; + /** + * The class name of the button + */ + className?: string; + /** + * The children of the button + */ + children?: ReactNode; + /** + * Defines if the button is disabled. + */ + disabled?: boolean; + /** + * Defines if the button is destructive. + */ + destructive?: boolean; + /** + * Custom Icon for the button. + */ + icon?: ReactNode; + /** + * Defines the position of the icon. + */ + iconPosition?: 'left' | 'right'; + /** + * Defines if the button is loading. + */ + loading?: boolean; + /** On click event. */ + onClick?: (event: default_2.MouseEvent) => void; +} + +/** Props for the Button component. */ +declare interface ButtonProps_2 extends CommonProps { + /** Unique slug identifying the button. */ + slug: string; + /** Text content of the button. */ + text: string; + /** Icon displayed inside the button. */ + icon?: ReactElement; + /** Marks the button as disabled. */ + disabled?: boolean; + /** Indicates if the button is the first child in the group. */ + isFirstChild?: boolean; + /** Indicates if the button is the last child in the group. */ + isLastChild?: boolean; +} + +/** Type for the value passed to the onChange callback. */ +declare interface ButtonValue { + event: default_2.MouseEvent; + value: { + slug: string; + text: string; + }; +} + +export declare const Checkbox: ForwardRefExoticComponent>; + +declare interface CheckboxProps { + /** Defines the content associated with the checkbox. */ + label?: { + heading?: string; + description?: string; + } | undefined; + /** ID of the checkbox input. */ + id?: string; + /** Default checked state (uncontrolled). */ + defaultChecked?: boolean; + /** Controlled checked state. */ + checked?: boolean; + /** Change event handler. */ + onChange?: (checked: boolean) => void; + /** If true, renders indeterminate state. */ + indeterminate?: boolean; + /** If true, disables the checkbox. */ + disabled?: boolean; + /** Size of the checkbox (sm or md). */ + size?: 'sm' | 'md'; + /** Custom className for the checkbox. */ + className?: string; +} + +declare interface Color { + fill: string; +} + +declare interface Color_2 { + stroke: string; +} + +declare interface Color_3 { + stroke: string; + fill: string; +} + +/** Defines the common props shared by components. */ +declare interface CommonProps { + /** Additional class names for styling. */ + className?: string; +} + +declare interface CommonProps_2 { + /** Additional class name. */ + className?: string; + /** Additional inline styles. */ + style?: React.CSSProperties; +} + +declare interface CommonProps_3 { + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface CommonProps_4 { + /** Custom class names for additional styling */ + className?: string; + /** Disables the component */ + disabled?: boolean; + /** Children components */ + children: ReactNode; +} + +export declare const Container: { + ({ containerType, gap, gapX, gapY, direction, justify, align, wrap, cols, className, children, ...extraProps }: FlexContainerProps & GridContainerProps): JSX_2.Element; + Item: { + ({ grow, shrink, order, alignSelf, justifySelf, className, children, ...props }: FlexItemProps & GridItemProps): JSX_2.Element; + displayName: string; + }; + displayName: string; +}; + +declare interface ContainerCommonProps extends ContainerCoreCommonProps { + /** + * Defines the number of columns (if using a grid container). + * + * For responsive columns, use an object with screen sizes as keys and column values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + cols?: TCols; + /** + * Gap between container items. This will apply gap in both horizontal and vertical directions. + * + * For responsive gap, use an object with screen sizes as keys and gap values as values. + * Example: `{ sm: 'sm', md: 'md', lg: 'lg' }` + */ + gap?: TGap; + /** + * Horizontal gap between container items. Use when need to apply gap only in horizontal direction. + * + * For responsive horizontal gap, use an object with screen sizes as keys and gap values as values. + * Example: `{ sm: 'sm', md: 'md', lg: 'lg' }` + */ + gapX?: TGap; + /** + * Vertical gap between container items. Use when need to apply gap only in vertical direction. + * + * For responsive vertical gap, use an object with screen sizes as keys and gap values as values. + * Example: `{ sm: 'sm', md: 'md', lg: 'lg' }` + */ + gapY?: TGap; + /** + * Alignment of container items along the cross axis. + * + * For responsive alignment, use an object with screen sizes as keys and alignment values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + align?: TAlign; + /** + * Justification of container items along the main axis. + * + * For responsive justification, use an object with screen sizes as keys and justification values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + justify?: TJustify; +} + +declare interface ContainerCoreCommonProps { + /** Defines any additional CSS classes for the container. */ + className?: string; + /** Defines the children of the container. */ + children?: ReactNode; +} + +declare interface DataItem { + [key: string]: number | string; +} + +declare interface DataItem_2 { + [key: string]: number | string; +} + +declare interface DataItem_3 { + [key: string]: number | string; +} + +declare interface DataItem_4 { + [key: string]: number | string; +} + +export declare const DatePicker: ({ selectionType, variant, presets: customPresets, onCancel, onApply, onDateSelect, applyButtonText, cancelButtonText, showOutsideDays, isFooter, ...props }: DatePickerProps) => JSX_2.Element | undefined; + +declare interface DatePickerProps { + /** Defines the selection selectionType of the date picker: single, range, or multiple dates. */ + selectionType?: 'single' | 'range' | 'multiple'; + /** Defines the variant of the date picker: normal, dualdate, or presets. */ + variant?: 'normal' | 'dualdate' | 'presets'; + /** An array of custom presets. */ + presets?: { + label: string; + range: { + from: Date; + to: Date; + }; + }[]; + /** Callback function to be executed when the cancel button is clicked. */ + onCancel?: () => void; + /** Callback function to be executed when the apply button is clicked. */ + onApply?: (selectedDates: Date | { + from: Date; + to: Date; + } | Date[]) => void; + /** Callback function to be executed when a date is selected. */ + onDateSelect?: (date: Date | Date[] | TDateRange | null) => void; + /** Text displayed on the Apply button. */ + applyButtonText?: string; + /** Text displayed on the Cancel button. */ + cancelButtonText?: string; + /** Show or hide days outside of the current month. */ + showOutsideDays?: boolean; + /** Show or hide the footer. */ + isFooter?: boolean; +} + +export declare const Dialog: { + ({ open, setOpen, children, trigger, className, exitOnClickOutside, exitOnEsc, design, scrollLock, }: DialogProps): JSX.Element; + displayName: string; + Panel: { + ({ children, className, }: DialogPanelProps): JSX.Element; + displayName: string; + }; + Title: { + ({ children, as: Tag, className, ...props }: DialogTitleProp): JSX.Element; + displayName: string; + }; + Description: { + ({ children, as: Tag, className, ...props }: DialogDescriptionProp): JSX.Element; + displayName: string; + }; + CloseButton: { + ({ children, as: Tag, ...props }: DialogCloseButtonProps): JSX.Element | ReactNode; + displayName: string; + }; + Header: { + ({ children, className, ...props }: DialogHeaderProps): JSX.Element; + displayName: string; + }; + Body: { + ({ children, className, ...props }: DialogBodyProps): JSX.Element; + displayName: string; + }; + Footer: { + ({ children, className, }: DialogFooterProps): JSX.Element; + displayName: string; + }; + Backdrop: { + ({ className, ...props }: CommonProps_2): JSX.Element | null; + displayName: string; + }; +}; + +declare interface DialogBodyProps extends CommonProps_2 { + /** Children of the dialog body. */ + children: ReactNode; +} + +declare interface DialogCloseButtonProps extends CommonProps_2 { + /** Children of the dialog close button. */ + children?: ReactNode; + /** Additional class name for the dialog close button. */ + as?: ElementType; + /** Additional class name for the dialog close button. */ + className?: string; + /** Additional props based on the as value. */ + [key: string]: unknown; +} + +declare interface DialogDescriptionProp extends CommonProps_2 { + /** Children of the dialog description. */ + children: ReactNode; + /** Additional class name for the dialog description. */ + as?: ElementType; +} + +declare interface DialogFooterProps extends CommonProps_2 { + /** Children of the dialog footer. */ + children?: ReactNode | ((props: { + close: () => void; + }) => ReactNode); +} + +declare interface DialogHeaderProps extends CommonProps_2 { + /** Children of the dialog header. */ + children: ReactNode; +} + +declare interface DialogPanelProps extends CommonProps_2 { + /** Children of the dialog panel. */ + children: ReactNode | ((param: { + close: () => void; + }) => ReactNode); +} + +declare interface DialogProps extends CommonProps_2 { + /** Control the dialog open state. If not provided, the dialog will be controlled internally. */ + open?: boolean; + /** Control the dialog open state. If not provided, the dialog will be controlled internally. */ + setOpen?: (open: boolean) => void; + /** Children of the dialog. */ + children: ReactNode; + /** Trigger element for the dialog. */ + trigger?: ReactNode | ((props: { + onClick: () => void; + }) => React.ReactElement); + /** Close the dialog on clicking outside the dialog. */ + exitOnClickOutside?: boolean; + /** Close the dialog on pressing the escape key. */ + exitOnEsc?: boolean; + /** Design of the dialog. */ + design?: 'simple' | 'footer-divided'; + /** Lock the scroll when the dialog is open. */ + scrollLock?: boolean; +} + +declare interface DialogTitleProp extends CommonProps_2 { + /** Children of the dialog title. */ + children: ReactNode; + /** Additional class name for the dialog title. */ + as?: ElementType; +} + +export declare const Drawer: { + ({ open, setOpen, children, trigger, className, exitOnClickOutside, exitOnEsc, design, position, transitionDuration, scrollLock, }: DrawerProps): JSX_2.Element; + displayName: string; + Panel: { + ({ children, className }: DrawerPanelProps): JSX_2.Element; + displayName: string; + }; + Header: { + ({ children, className, ...props }: DrawerHeaderProps): JSX_2.Element; + displayName: string; + }; + Title: { + ({ children, as: Tag, className, ...props }: DrawerTitleProps): JSX_2.Element; + displayName: string; + }; + Description: { + ({ children, as: Tag, className, ...props }: DrawerDescriptionProps): JSX_2.Element; + displayName: string; + }; + Body: { + ({ children, className, ...props }: DrawerBodyProps): JSX_2.Element; + displayName: string; + }; + CloseButton: { + ({ children, as: Tag, ...props }: DrawerCloseButtonProps): string | number | boolean | Iterable | JSX_2.Element | null | undefined; + displayName: string; + }; + Footer: { + ({ children, className }: DrawerFooterProps): JSX_2.Element; + displayName: string; /** Trigger element to open the drawer. Required for uncontrolled component. */ + }; + Backdrop: { + ({ className, ...props }: DrawerBackdropProps): default_2.ReactPortal | null; + displayName: string; + }; +}; + +declare interface DrawerBackdropProps { + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerBodyProps { + /** Body content. */ + children: ReactNode; + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerCloseButtonProps extends CommonProps_3 { + /** Button content. */ + children?: ReactNode | (({ close }: { + close: () => void; + }) => ReactNode); + /** Button tag. */ + as?: ElementType; +} + +declare interface DrawerDescriptionProps { + /** Description tag. */ + as?: ElementType; + /** Description content. */ + children: ReactNode; + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerFooterProps { + /** Footer content. */ + children: ReactNode | (({ close }: { + close: () => void; + }) => ReactNode); + /** Additional class names. */ + className?: string; +} + +declare interface DrawerHeaderProps { + /** Header content. */ + children: ReactNode; + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerPanelProps { + /** Drawer content. */ + children: ReactNode | ((props: { + close: () => void; + }) => ReactNode); + /** Additional class names. */ + className?: string; +} + +declare interface DrawerProps { + /** Open state of the drawer. Optional for uncontrolled component. */ + open?: boolean; + /** Set open state of the drawer. Optional for uncontrolled component. */ + setOpen?: (open: boolean) => void; + /** Drawer content. */ + children: ReactNode; + /** Trigger element to open the drawer. Required for uncontrolled component. */ + trigger?: ReactNode | ((props: { + onClick: () => void; + }) => ReactNode); + /** Additional class names. */ + className?: string; + /** Close drawer when clicking outside of the drawer. */ + exitOnClickOutside?: boolean; + /** Close drawer when pressing the escape key. */ + exitOnEsc?: boolean; + /** Design of the drawer. */ + design?: 'simple' | 'footer-divided'; + /** Position of the drawer. */ + position?: 'left' | 'right'; + /** Duration of the drawer transition. */ + transitionDuration?: number; + /** Lock the scroll when the drawer is open. */ + scrollLock?: boolean; +} + +declare interface DrawerTitleProps { + /** Title content. */ + children: ReactNode; + /** HTML element to render. */ + as?: ElementType; + /** Additional class names. */ + className?: string; +} + +declare interface DropdownCommonProps { + /** Children of the component */ + children: ReactNode; + /** Additional class name */ + className?: string; +} + +export declare const DropdownMenu: { + ({ placement, offset: offsetValue, boundary, dropdownPortalRoot, dropdownPortalId, children, className, }: DropdownMenuProps): JSX_2.Element; + displayName: string; + Trigger: default_2.ForwardRefExoticComponent>; + Content: { + ({ children, className, ...props }: DropdownCommonProps & AdditionalProps): JSX_2.Element; + displayName: string; + }; + List: { + (props: DropdownMenuListProps): JSX_2.Element; + displayName: string; + }; + Item: default_2.FC; + Separator: { + (props: DropdownMenuSeparatorProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface DropdownMenuItemProps { + /** Content of the dropdown menu item. */ + children: ReactNode; + /** Tag of the dropdown menu item. Use your custom component or HTML tag if needed instead of the default `li`. */ + as?: ElementType; + /** Click handler. */ + onClick?: () => void; + /** Additional class name. */ + className?: string; +} + +declare type DropdownMenuListProps = MenuListProps; + +declare interface DropdownMenuProps extends DropdownCommonProps { + /** Defines the position of the dropdown menu. */ + placement?: 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end'; + /** Defines the offset of the dropdown menu. */ + offset?: OffsetOptions; + /** Defines the boundary of the dropdown menu. */ + boundary?: Boundary; + /** Defines the trigger element of the dropdown menu. */ + dropdownPortalRoot?: FloatingPortalProps['root']; + /** Defines the trigger element of the dropdown menu. */ + dropdownPortalId?: FloatingPortalProps['id']; + /** Additional class name */ + className?: string; +} + +declare type DropdownMenuSeparatorProps = MenuSeparatorProps; + +declare const EditorCombobox: { + ({ size, className, children }: EditorComboboxProps): JSX_2.Element; + displayName: string; + Item: ForwardRefExoticComponent>; +}; + +declare interface EditorComboboxItemProps extends React.HTMLAttributes { + /** The size of the combobox item. */ + size: 'sm' | 'md' | 'lg'; + /** The class name of the combobox item. */ + className?: string; + /** The children of the combobox item. */ + children: ReactNode; + /** Whether the combobox item is selected. */ + selected?: boolean; +} + +declare interface EditorComboboxProps { + /** The size of the combobox. */ + size: 'sm' | 'md' | 'lg'; + /** The class name of the combobox. */ + className?: string; + /** The children of the combobox. */ + children: ReactNode; +} + +export declare const EditorInput: ForwardRefExoticComponent & RefAttributes>; + +declare const editorInputClassNames: { + sm: string; + md: string; + lg: string; +}; + +declare interface EditorInputProps { + /** Default value for the editor input field. */ + defaultValue?: string; + /** Placeholder text for the editor input field. */ + placeholder?: string; + /** Callback function that is called when the value of the input changes. The function receives the updated value as an argument. */ + onChange?: (editorState: EditorState, editor: LexicalEditor) => void; + /** Defines the sizes of the editor input. */ + size?: keyof typeof editorInputClassNames; + /** Defines if the editor input is focused automatically. */ + autoFocus?: boolean; + /** Array of options to be displayed in the editor input. Each option should be an object or string. */ + options: T[]; + /** The key to be used to display the label of the option in the editor input and in the editor after selecting any mention/tag option. */ + by?: T extends Record ? keyof T : string; + /** The trigger to be used to show the mention options. */ + trigger?: string; + /** The component to be used for the mention menu. */ + menuComponent?: TMenuComponent; + /** The component to be used for the mention menu items. */ + menuItemComponent?: TMenuItemComponent; + /** Additional class names to be added to the editor input. */ + className?: string; + /** Additional class names to be added to the editor input wrapper. */ + wrapperClassName?: string; + /** Defines if the editor input is disabled. */ + disabled?: boolean; + /** Defines if the editor input should add a space after selecting a mention/tag option. */ + autoSpaceAfterMention?: boolean; +} + +declare interface FlexContainerProps extends ContainerCommonProps { + /** Defines the type of the container (default: 'flex'). */ + containerType?: TContainerType; + /** + * Defines the flex direction of the container. + * + * For responsive direction, use an object with screen sizes as keys and direction values as values. + * Example: `{ sm: 'row', md: 'column', lg: 'row-reverse' }` + */ + direction?: TDirection; + /** + * Defines the wrapping behavior of child elements. + * + * For responsive wrap, use an object with screen sizes as keys and wrap values as values. + * Example: `{ sm: 'nowrap', md: 'wrap', lg: 'wrap-reverse' }` + */ + wrap?: TWrap; +} + +declare interface FlexItemProps extends ContainerCoreCommonProps { + /** + * Defines how much the item will grow relative to others. `(For Flex container only.)` + * + * For responsive grow, use an object with screen sizes as keys and grow values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + grow?: 0 | 1; + /** + * Defines how much the item will shrink relative to others. `(For Flex container only.)` + * + * For responsive shrink, use an object with screen sizes as keys and shrink values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + shrink?: 0 | 1; + /** + * Defines the order of the item in the container. `(For Flex container only.)` + * + * For responsive order, use an object with screen sizes as keys and order values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + order?: TRange | 'first' | 'last' | 'none'; + /** + * Defines the alignment of the item along the cross axis. `(For Flex container only.)` + * + * For responsive alignment, use an object with screen sizes as keys and alignment values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + alignSelf?: TAlignSelf; + /** + * Defines the justification of the item along the main axis. `(For Flex container only.)` + * + * For responsive justification, use an object with screen sizes as keys and justification values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + justifySelf?: TJustifySelf; +} + +declare interface GridContainerProps extends ContainerCommonProps { + /** + * CSS grid-flow property. + * + * For responsive grid flow, use an object with screen sizes as keys and flow values as values. + * Example: `{ sm: 'row', md: 'column', lg: 'row-dense' }` + */ + gridFlow?: TFlow; + /** + * Enables subgrid columns. + * + * For responsive subgrid columns, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + colsSubGrid?: boolean; + /** + * Enables subgrid rows. + * + * For responsive subgrid rows, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + rowsSubGrid?: boolean; + /** + * Enables auto rows. + * + * For responsive auto rows, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + autoRows?: boolean; + /** + * Enables auto columns. + * + * For responsive auto columns, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + autoCols?: boolean; +} + +declare interface GridItemProps extends ContainerCoreCommonProps { + /** + * Column span for the item. `(For Grid container only.)` + * + * For responsive column span, use an object with screen sizes as keys and column span values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + colSpan?: TRange; + /** + * Starting column for the item. `(For Grid container only.)` + * + * For responsive column start, use an object with screen sizes as keys and column start values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + colStart?: TRange; + /** + * Alignment along the cross axis. `(For Grid container only.)` + * + * For responsive alignment, use an object with screen sizes as keys and alignment values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + alignSelf?: TAlignSelf; + /** + * Justification along the main axis. `(For Grid container only.)` + * + * For responsive justification, use an object with screen sizes as keys and justification values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + justifySelf?: TJustifySelf; +} + +export declare const Input: default_2.ForwardRefExoticComponent, "size" | "prefix"> & default_2.RefAttributes>; + +declare interface InputProps { + /** Unique identifier for the input element. */ + id?: string; + /** Specifies the type of the input element (e.g., text, file). */ + type?: 'text' | 'password' | 'email' | 'file'; + /** Initial value of the input element. */ + defaultValue?: string; + /** Controlled value of the input element. */ + value?: string; + /** Defines the size of the input (e.g., 'sm', 'md', 'lg'). */ + size?: 'sm' | 'md' | 'lg'; + /** Additional custom classes for styling. */ + className?: string; + /** Disables the input element when true. */ + disabled?: boolean; + /** Function called when the input value changes. */ + onChange?: (value: string | null) => void; + /** Indicates whether the input has an error state. */ + error?: boolean; + /** Function called when the input encounters an error. */ + onError?: () => void; + /** React node displayed as a prefix inside the input. */ + prefix?: ReactNode; + /** React node displayed as a suffix inside the input. */ + suffix?: ReactNode; + /** Label displayed above the input field. */ + label?: string; + /** Placeholder text for the input field. */ + placeholder?: string; +} + +export declare const Label: default_2.ForwardRefExoticComponent>; + +declare interface LabelProps { + /** The content of the label. */ + children: ReactNode; + /** Defines the HTML tag to use for the label. */ + tag?: string | ElementType; + /** Defines the size of the label. */ + size?: 'xs' | 'sm' | 'md'; + /** Defines the extra classes. */ + className?: string; + /** Defines the style variant of the label. */ + variant?: 'neutral' | 'help' | 'error' | 'disabled'; + /** Defines if the label is required. */ + required?: boolean; +} + +export declare const LineChart: ({ data, dataKeys, colors, showXAxis, showYAxis, showTooltip, tooltipIndicator, tooltipLabelKey, showCartesianGrid, tickFormatter, xAxisDataKey, yAxisDataKey, xAxisFontSize, xAxisFontColor, yAxisFontColor, chartWidth, chartHeight, withDots, }: LineChartProps) => JSX_2.Element; + +declare interface LineChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem_2[]; + /** An array of strings representing the keys to access data in each data object. Used for identifying different data series. */ + dataKeys: string[]; + /** An array of color objects that determine the stroke colors for each data series in the chart. */ + colors?: Color_2[]; + /** Whether to render the `` component for the x-axis. */ + showXAxis?: boolean; + /** Whether to render the `` component for the y-axis. */ + showYAxis?: boolean; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line`, or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** The key to use for the tooltip label. */ + tooltipLabelKey?: string; + /** Whether to display the ``, adding horizontal and vertical grid lines. */ + showCartesianGrid?: boolean; + /** A function used to format the ticks on the x-axis, e.g., for formatting dates or numbers. */ + tickFormatter?: (value: string) => string; + /** The key in the data objects representing values for the x-axis. */ + xAxisDataKey?: string; + /** The key in the data objects representing values for the y-axis. */ + yAxisDataKey?: string; + /** Font size for the labels on the x-axis. */ + xAxisFontSize?: 'sm' | 'md' | 'lg'; + /** Font color for the labels on the x-axis. */ + xAxisFontColor?: string; + /** Font color for the labels on the y-axis. */ + yAxisFontColor?: string; + /** Width of the chart container. */ + chartWidth?: number; + /** Height of the chart container. */ + chartHeight?: number; + /** Determines whether dots are shown on each data point. */ + withDots?: boolean; +} + +export declare const Loader: ({ variant, size, icon, className, }: LoaderProps) => JSX_2.Element; + +declare interface LoaderProps { + /** Defines the variant of the loader. Options are 'primary' or 'secondary'. */ + variant?: 'primary' | 'secondary'; + /** Defines the size of the loader. Options are 'sm', 'md', 'lg', or 'xl'. */ + size?: 'sm' | 'md' | 'lg' | 'xl'; + /** Optional icon to display instead of the default loader icon. */ + icon?: ReactNode; + /** Additional custom classes for styling. */ + className?: string; +} + +export declare const Menu: { + ({ size, children, className }: MenuProps): JSX_2.Element; + displayName: string; + List: { + ({ heading, arrow, showArrowOnHover, open: initialOpen, onClick, children, className, }: MenuListProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ disabled, active, onClick, children, className, }: MenuItemProps): JSX_2.Element; + displayName: string; + }; + Separator: { + ({ variant, className, }: MenuSeparatorProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface MenuItemProps extends BaseMenuProps { + /** Disables the menu item if true. */ + disabled?: boolean; + /** Marks the menu item as active. */ + active?: boolean; + /** Callback function triggered when the menu item is clicked. */ + onClick?: () => void; + /** Child elements of the menu item. */ + children: ReactNode; +} + +declare interface MenuListProps extends BaseMenuProps { + /** Heading for the menu list. */ + heading?: string; + /** Displays an arrow next to the heading. */ + arrow?: boolean; + /** Controls the initial open state of the menu list. */ + open?: boolean; + /** Callback function triggered when the menu list is clicked. */ + onClick?: (isOpen: boolean) => void; + /** Child elements of the menu list. */ + children: ReactNode; + /** Shows the arrow only when hovering. */ + showArrowOnHover?: boolean; +} + +declare interface MenuProps extends BaseMenuProps { + /** Defines the size of the menu (e.g., 'sm', 'md'). */ + size?: 'sm' | 'md'; + /** Child elements of the menu. */ + children: ReactNode; +} + +declare interface MenuSeparatorProps extends BaseMenuProps { + /** Defines the style of the separator (e.g., 'solid', 'dashed'). */ + variant?: 'solid' | 'dashed' | 'dotted' | 'double' | 'hidden' | 'none'; +} + +declare type MultiTypeChildren = ReactElement | ReactNode | SelectFunctionChildren; + +declare type OnChangeValue = { + slug: string; + text: string; +}; + +export declare const Pagination: { + ({ size, disabled, children, className, ...props }: PaginationProps): JSX_2.Element; + displayName: string; + Content: ForwardRefExoticComponent>; + Item: ForwardRefExoticComponent>; + Previous: { + (props: PaginationButtonProps): JSX_2.Element; + displayName: string; + }; + Next: { + (props: PaginationButtonProps): JSX_2.Element; + displayName: string; + }; + Ellipsis: { + (props: PaginationCommonProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface PaginationButtonProps extends PaginationCommonProps { + /** The element type of the pagination button. */ + as?: ElementType; + /** Marks the button as active. */ + isActive?: boolean; + /** Disables the button. */ + disabled?: boolean; + /** Optional click handler for the button. */ + onClick?: React.MouseEventHandler; + /** The HTML tag to be rendered for the pagination button. */ + tag?: 'a' | 'button'; +} + +declare interface PaginationCommonProps { + /** Defines the children of the pagination component. */ + children?: ReactNode; + /** Additional CSS classes. */ + className?: string; +} + +declare interface PaginationItemProps extends PaginationCommonProps { + /** Marks the pagination item as active. */ + isActive?: boolean; +} + +declare interface PaginationProps extends PaginationCommonProps { + /** Defines the size of pagination items. */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** Disables all pagination controls. */ + disabled?: boolean; +} + +export declare const PieChart: ({ data, dataKey, type, showTooltip, tooltipIndicator, tooltipLabelKey, label, labelName, labelNameColor, labelValue, showLegend, chartWidth, pieOuterRadius, pieInnerRadius, }: PieChartProps) => JSX_2.Element; + +declare interface PieChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem_3[]; + /** A string which representing the key to access data in each data object. Used for identifying different data series. */ + dataKey: string; + /** Type of pie chart. It can be `simple` or `donut` */ + type?: 'simple' | 'donut'; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line`, or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** The key to use for the tooltip label. */ + tooltipLabelKey?: string; + /** When is true it show the label inside `donut` pie chart */ + label?: boolean; + /** Label name which will be displayed inside donut pie chart. */ + labelName?: string; + /** Label name color which will be displayed inside donut pie chart. */ + labelNameColor?: string; + /** Label value which will be displayed inside donut pie chart. */ + labelValue?: number | string; + /** Whether to render the `` component to identify data series. */ + showLegend?: boolean; + /** Width of the chart container. */ + chartWidth?: number; + /** Outer radius of the pie chart. */ + pieOuterRadius?: number; + /** Inner radius of the pie chart. */ + pieInnerRadius?: number; +} + +export declare const ProgressBar: ({ progress, speed, className, }: ProgressBarProps) => JSX_2.Element; + +declare interface ProgressBarProps { + /** Current progress value (0 to 100). */ + progress?: number; + /** Speed of the progress transition in milliseconds. */ + speed?: number; + /** Additional custom classes for styling. */ + className?: string; +} + +declare interface ProgressCommonProps { + /** Defines the children of the progress steps. */ + children: ReactNode; + /** Defines the class name for the component. */ + className?: string; +} + +declare interface ProgressStepProps extends ProgressCommonProps { + /** Text label for the step. */ + labelText?: string; + /** Custom icon for the step. */ + icon?: ReactNode; + /** Indicates if this step is currently active. */ + isCurrent?: boolean; + /** Indicates if this step has been completed. */ + isCompleted?: boolean; + /** Defines the layout type: 'inline' or 'stack'. */ + type?: 'inline' | 'stack'; + /** Specifies the variant style: 'dot', 'number', or 'icon'. */ + variant?: 'dot' | 'number' | 'icon'; + /** Size-specific CSS classes for the step. */ + sizeClasses?: StepSizeClasses; + /** Defines the size of the step: 'sm', 'md', or 'lg'. */ + size: 'sm' | 'md' | 'lg'; + /** Indicates if this step is the last in the sequence. */ + isLast?: boolean; + /** The index of the step in the sequence. */ + index?: number; + /** Additional class names for the connecting line. */ + lineClassName?: string; +} + +export declare const ProgressSteps: { + ({ variant, size, type, currentStep, children, className, lineClassName, ...rest }: ProgressStepsProps): JSX_2.Element; + Step: { + ({ labelText, icon, isCurrent, isCompleted, className, type, variant, sizeClasses, size, isLast, index, lineClassName, ...rest }: ProgressStepProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface ProgressStepsProps extends ProgressCommonProps { + /** Defines the variant of the progress step. */ + variant?: 'dot' | 'number' | 'icon'; + /** Defines the size of the progress step. */ + size?: 'sm' | 'md' | 'lg'; + /** Defines the type of layout. */ + type?: 'inline' | 'stack'; + /** Defines the current step number. `-1` keeps all steps completed. */ + currentStep?: number; + /** Additional props for the connecting line. */ + lineClassName?: string; +} + +export declare const RadioButton: default_2.ForwardRefExoticComponent> & { + Group: { + ({ children, name, style, size, value, defaultValue, by, as: AsElement, onChange, className, disableGroup, vertical, columns, multiSelection, gapClassName, }: RadioButtonGroupProps): JSX_2.Element; + displayName: string; + }; + Button: default_2.ForwardRefExoticComponent>; +}; + +/** Common props used across the radio button components */ +declare interface RadioButtonCommonProps { + /** Custom class names for additional styling */ + className?: string; + /** HTML element or React component to render the element as */ + as?: ElementType; + /** Children components (usually RadioButton.Button instances) */ + children?: ReactNode; + /** Disables the radio button */ + disabled?: boolean; +} + +/** Props for the RadioButtonGroup component */ +declare interface RadioButtonGroupProps extends RadioButtonCommonProps { + /** Name used for form submission */ + name?: string; + /** Style of the radio button group: 'simple' or 'tile' */ + style?: 'simple' | 'tile'; + /** Size of the radio buttons: 'sm' or 'md' */ + size?: 'sm' | 'md'; + /** Controlled value of the group */ + value?: string | string[]; + /** Default value if the group is uncontrolled */ + defaultValue?: string | string[]; + /** Attribute to compare selected values, typically 'id' */ + by?: string; + /** Handler invoked on value change */ + onChange?: (value: string | string[]) => void; + /** Disables all radio buttons in the group */ + disableGroup?: boolean; + /** Arranges the radio buttons vertically */ + vertical?: boolean; + /** Number of columns for arranging the buttons */ + columns?: number; + /** Enables multi-selection mode */ + multiSelection?: boolean; + /** Gap between radio buttons */ + gapClassName?: string; +} + +/** Props for an individual RadioButton */ +declare interface RadioButtonProps extends RadioButtonCommonProps { + /** Unique identifier for the radio button */ + id?: string; + /** Label content for the radio button */ + label?: { + heading: string; + description?: string; + }; + /** Value of the radio button */ + value: string; + /** Disables the radio button */ + disabled?: boolean; + /** Custom icon to display */ + icon?: ReactNode; + /** Aligns icon inline with the label */ + inlineIcon?: boolean; + /** Hides the selection indicator */ + hideSelection?: boolean; + /** Reverses the position of icon and label */ + reversePosition?: boolean; + /** Adds a border around the button */ + borderOn?: boolean; + /** Adds a border when the button is active */ + borderOnActive?: boolean; + /** Badge element to display */ + badgeItem?: ReactNode; + /** Uses a switch for selection instead of radio input */ + useSwitch?: boolean; + /** Info object with heading and description */ + info?: { + heading: string; + description?: string; + }; + /** Ensures the button has minimum width */ + minWidth?: boolean; + /** Custom classes for the button wrapper */ + buttonWrapperClasses?: string; + /** Checked state of the radio button */ + checked?: boolean; +} + +export declare const SearchBox: SearchBoxComponent; + +declare type SearchBoxComponent = default_2.ForwardRefExoticComponent> & { + Input: typeof SearchBoxInput; + Loading: typeof SearchBoxLoading; + Separator: typeof SearchBoxSeparator; + Content: typeof SearchBoxContent; + List: typeof SearchBoxList; + Empty: typeof SearchBoxEmpty; + Group: typeof SearchBoxGroup; + Item: typeof SearchBoxItem; +}; + +declare const SearchBoxContent: { + ({ className, dropdownPortalRoot, dropdownPortalId, children, ...props }: SearchBoxContentProps): JSX_2.Element | null; + displayName: string; +}; + +declare interface SearchBoxContentProps { + /** Additional class names for styling. */ + className?: string; + /** Root element where the dropdown will be rendered. */ + dropdownPortalRoot?: HTMLElement | null; + /** Id of the dropdown portal where the dropdown will be rendered. */ + dropdownPortalId?: string; + /** Child components to be rendered inside the dropdown. */ + children: ReactNode; +} + +declare const SearchBoxEmpty: { + ({ children, }: SearchBoxEmptyProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxEmptyProps { + /** Content to display when there are no results. */ + children?: ReactNode; +} + +declare const SearchBoxGroup: { + ({ heading, children }: SearchBoxGroupProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxGroupProps { + /** Heading for the group. */ + heading?: string; + /** Child components to be rendered in the group. */ + children: ReactNode; +} + +declare const SearchBoxInput: default_2.ForwardRefExoticComponent>; + +declare interface SearchBoxInputProps extends BaseSearchBoxProps { + /** Type of the input (e.g., text, search). */ + type?: string; + /** Placeholder text for the input. */ + placeholder?: string; + /** Style variant of the input. */ + variant?: 'primary' | 'secondary' | 'ghost'; + /** Whether the input is disabled. */ + disabled?: boolean; + /** Callback for input changes. */ + onChange?: (value: string) => void; + /** Child components to be rendered. */ + children?: ReactNode; +} + +declare const SearchBoxItem: default_2.ForwardRefExoticComponent>; + +declare interface SearchBoxItemProps { + /** Additional class names for styling. */ + className?: string; + /** Icon to display next to the item. */ + icon?: ReactNode; + /** Child components to be rendered. */ + children: ReactNode; +} + +declare const SearchBoxList: { + ({ filter, children, }: SearchBoxListProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxListProps { + /** Whether to filter children based on the search term. */ + filter?: boolean; + /** Child components to be rendered. */ + children: ReactNode; +} + +declare const SearchBoxLoading: { + ({ loadingIcon, }: SearchBoxLoadingProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxLoadingProps { + /** Loading icon to display while loading. */ + loadingIcon?: ReactNode & { + size?: string; + }; +} + +declare const SearchBoxSeparator: default_2.ForwardRefExoticComponent>; + +declare interface SearchBoxSeparatorProps { + /** Additional class names for styling. */ + className?: string; +} + +export declare const Select: { + ({ id, size: sizeValue, value, defaultValue, onChange, by, children, multiple, combobox, disabled, }: SelectProps): JSX_2.Element; + Portal: typeof SelectPortal; + Button: typeof SelectButton; + Options: typeof SelectOptions; + Option: typeof SelectItem; +}; + +declare function SelectButton({ children, icon, // Icon to show in the select button. + placeholder, // Placeholder text. + optionIcon, // Icon to show in the selected option. + displayBy, // Used to display the value. Default is 'name'. + label, // Label for the select component. + className, }: SelectButtonProps): JSX_2.Element; + +declare namespace SelectButton { + var displayName: string; +} + +declare interface SelectButtonProps { + /** Expects the `Select.Button` children of the Select Component. */ + children?: MultiTypeChildren; + /** Option Icon to show at the right of the option trigger/button. By default it will show chevron down icon. */ + icon?: ReactNode | null; + /** Placeholder text when no option is selected. */ + placeholder?: string; + /** Icon to show in the selected option badge (Multi-select mode only). By default it won't show unknown icon. */ + optionIcon?: ReactNode | null; + /** Key to display selected item when the selected value is an object. Default value is `name`. */ + displayBy?: string; + /** Label for the Select component. */ + label?: string; + /** Additional class name for the Select Button. */ + className?: string; +} + +declare type SelectFunctionChildren = ({ value, onClose, }: { + value: SelectOptionValue; + onClose?: (event: React.MouseEvent) => void; +}) => React.JSX.Element; + +declare function SelectItem({ value, selected, children, className, ...props }: SelectOptionProps): JSX_2.Element; + +declare namespace SelectItem { + var displayName: string; +} + +declare type SelectOnChange = (value: SelectOptionValue | SelectOptionValue[]) => void; + +declare interface SelectOptionProps { + /** Value of the option. */ + value: SelectOptionValue; + /** Selected state of the option. */ + selected?: boolean; + /** Expects the `Select.Option` children of the Select Component. */ + children?: ReactNode; + /** Additional class name for the Select Option. */ + className?: string; + /** Additional Props */ + [key: string]: unknown; +} + +declare function SelectOptions({ children, searchBy, // Used to identify searched value using the key. Default is 'id'. + searchPlaceholder, // Placeholder text for search box. + className, }: SelectOptionsProps): JSX_2.Element; + +declare namespace SelectOptions { + var displayName: string; +} + +declare interface SelectOptionsProps { + /** Expects the `Select.Option` children of the Select.Options Component. */ + children?: ReactNode; + /** Key used to identify searched value using the key. Default is 'id'. */ + searchBy?: string; + /** Placeholder text for search box. */ + searchPlaceholder?: string; + /** Additional class name for the Select Options wrapper. */ + className?: string; +} + +declare type SelectOptionValue = string | number | Record; + +declare function SelectPortal({ children, root, id }: SelectPortalProps): JSX_2.Element; + +declare namespace SelectPortal { + var displayName: string; +} + +declare interface SelectPortalProps { + /** Expects the `Select.Options` children of the Select.Portal Component. */ + children?: ReactNode; + /** + * Root element where the `Select.Options` will be rendered. If not provided Select.Options will be rendered in the body. + */ + root?: HTMLElement; + /** + * Root element ID where the `Select.Options` will be rendered. If not provided Select.Options will be rendered in the body. + */ + id?: string; +} + +declare type SelectProps = { + /** Select Component unique ID. */ + id?: string; + /** Defines the size of the Select Component. */ + size?: SelectSizes; + /** When the value is an object, a key is required to compare the selected value. The default value is `id`. */ + by?: string; + /** Expects the `Select.Portal`/`Select.Options` and `Select.Button` children of the Select Component. */ + children?: ReactNode; + /** Combobox mode. */ + combobox?: boolean; + /** Disables the Select Component. */ + disabled?: boolean; + /** Multi select mode. */ + multiple?: boolean; + /** Defines the width of the Select Component. */ + value?: SelectOptionValue | SelectOptionValue[]; + /** onChange event to be triggered when the value of the Select Component changes. */ + onChange: SelectOnChange; + /** Defines the default value of the Select Component. */ + defaultValue?: SelectOptionValue | SelectOptionValue[]; +}; + +declare type SelectSizes = 'sm' | 'md' | 'lg'; + +export declare const Sidebar: { + ({ children, className, onCollapseChange, collapsible, screenHeight, borderOn, ...props }: SidebarProps): JSX_2.Element; + displayName: string; +} & { + Header: { + ({ children }: SidebarCommonProps): JSX_2.Element; + displayName: string; + }; + Body: { + ({ children }: SidebarCommonProps): JSX_2.Element; + displayName: string; + }; + Footer: { + ({ children }: SidebarCommonProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ children, className }: SidebarItemProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface SidebarCommonProps { + /** Content to render inside the Sidebar. Typically includes Sidebar.Header, Sidebar.Body, and Sidebar.Footer components. */ + children: ReactNode; +} + +declare interface SidebarItemProps extends SidebarCommonProps { + /** Optional custom CSS classes for styling the Sidebar item. */ + className?: string; + /** Click event handler */ + onClick?: () => void; +} + +declare interface SidebarProps extends SidebarCommonProps { + /** Optional custom CSS classes to apply to the Sidebar container for styling. */ + className?: string; + /** Callback function triggered when the Sidebar collapse state changes. */ + onCollapseChange?: (isCollapsed: boolean) => void; + /** Determines if the Sidebar can be collapsed or not. If true, a collapse button is shown. */ + collapsible?: boolean; + /** Determines whether the Sidebar should occupy the full screen height. */ + screenHeight?: boolean; + /** Controls whether a border should appear on the right of the Sidebar. */ + borderOn?: boolean; +} + +declare const sizeClassnames: { + sm: { + dot: string; + ring: string; + numberIcon: string; + icon: string; + label: string; + }; + md: { + dot: string; + ring: string; + numberIcon: string; + icon: string; + label: string; + }; + lg: { + dot: string; + ring: string; + numberIcon: string; + icon: string; + label: string; + }; +}; + +export declare const Skeleton: ({ variant, className, ...props }: SkeletonProps) => JSX.Element; + +declare interface SkeletonProps { + /** Defines the style variant of the skeleton. */ + variant?: 'rectangular' | 'circular'; + /** Allows you to pass custom classes to control the size and styles. */ + className?: string; +} + +declare type StepSizeClasses = typeof sizeClassnames; + +export declare const Switch: ForwardRefExoticComponent>; + +declare interface SwitchProps { + /** Unique identifier for the switch component. */ + id?: string; + /** Callback function triggered when the switch value changes. */ + onChange?: (checked: boolean) => void; + /** Controlled value of the switch (checked or unchecked). */ + value?: boolean; + /** Initial value of the switch (checked or unchecked) when used as an uncontrolled component. */ + defaultValue?: boolean; + /** Defines the size of the switch (e.g., 'sm', 'md', 'lg'). */ + size?: 'sm' | 'md' | 'lg'; + /** Disables the switch if true. */ + disabled?: boolean; + /** Defines the label for the switch, can include heading and description. */ + label?: { + /** Heading for the label. */ + heading?: string; + /** Description for the label. */ + description?: string; + }; + /** Name attribute for the switch input. */ + name?: string; + /** Additional CSS classes for the switch component. */ + className?: string; +} + +declare interface TabPanelProps { + /** Unique identifier for the tab panel that is used for the tab. */ + slug: string; + /** Content to display in the tab panel. */ + children: ReactNode; +} + +declare interface TabProps { + /** Unique identifier for the tab. */ + slug: string; + /** Text to display in the tab. */ + text: string; + /** Icon to display in the tab. */ + icon?: ReactNode; + /** Additional class names for styling. */ + className?: string; + /** Disables the tab. */ + disabled?: boolean; + /** Badge to display in the tab. */ + badge?: ReactNode; +} + +export declare const Tabs: { + ({ activeItem, children }: TabsProps): JSX_2.Element; + Group: { + ({ children, activeItem: activeTabSlug, onChange, className, size, orientation, variant, iconPosition, width, }: TabsGroupProps): JSX_2.Element; + displayName: string; + }; + Tab: default_2.ForwardRefExoticComponent>; + Panel: { + ({ slug, children }: TabPanelProps): JSX_2.Element | null; + displayName: string; + }; +}; + +declare interface TabsGroupProps { + /** Controls the active tab. */ + activeItem?: string | null; + /** Callback when the active item changes. */ + onChange?: ({ event, value, }: { + event: default_2.MouseEvent; + value: OnChangeValue; + }) => void; + /** Additional class names for styling. */ + className?: string; + /** Defines the size of the tabs. */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** Defines the orientation of the tabs. */ + orientation?: 'horizontal' | 'vertical'; + /** Defines the style variant of the tabs. */ + variant?: 'pill' | 'rounded' | 'underline'; + /** Defines the position of the icon. */ + iconPosition?: 'left' | 'right'; + /** Defines the width of the tabs. */ + width?: 'auto' | 'full'; + /** Tabs to display in the group. */ + children: ReactNode; +} + +declare interface TabsProps { + /** The active tab value to identify active tab. */ + activeItem: string | null; + /** Tabs and their content to display. */ + children: ReactNode; +} + +declare type TAlign = 'start' | 'center' | 'end' | 'stretch'; + +declare type TAlignSelf = 'start' | 'center' | 'end' | 'baseline' | 'stretch'; + +declare type TCols = TRange; + +declare type TContainerType = 'grid' | 'flex'; + +declare type TDateRange = { + from: Date | null; + to: Date | null; +}; + +declare type TDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse'; + +export declare const TextArea: ForwardRefExoticComponent>; + +declare interface TextAreaProps { + /** ID of the textarea element. */ + id?: string; + /** Default value when used in uncontrolled mode. */ + defaultValue?: string; + /** Value when used in controlled mode. */ + value?: string; + /** Size of the textarea (sm, md, lg). */ + size?: 'sm' | 'md' | 'lg'; + /** Additional class names for the textarea. */ + className?: string; + /** Disables the textarea if true. */ + disabled?: boolean; + /** Handles changes in the textarea value. */ + onChange?: (value: string) => void; + /** Marks the field with an error state. */ + error?: boolean; + /** Callback triggered when the field is invalid. */ + onError?: () => void; +} + +declare type TFlow = 'row' | 'column' | 'row-dense' | 'column-dense'; + +declare type TGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; + +export declare const Title: ({ title, description, icon, iconPosition, tag, size, className, }: TitleProps) => JSX_2.Element | null; + +/** + * Title component. + */ +/** + * Props for the Title component. + */ +declare interface TitleProps { + /** The main title text to render. */ + title?: string; + /** Optional description text to display below the title. */ + description?: string; + /** Icon element to display alongside the title. */ + icon?: ReactNode; + /** Determines the position of the icon relative to the title. */ + iconPosition?: 'left' | 'right'; + /** HTML tag to use for the title (e.g., h1, h2, h3). */ + tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + /** Size variant of the title (affects both title and description styles) - xs, sm, md, lg. */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** Additional class names to apply to the root element. */ + className?: string; +} + +declare type TJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' | 'stretch'; + +declare type TJustifySelf = 'auto' | 'start' | 'center' | 'end' | 'baseline' | 'stretch'; + +declare type TMenuComponent = default_2.ComponentType>; + +declare type TMenuItemComponent = default_2.ComponentType>; + +export declare const toast: ((message: string | default_2.ReactElement, options: ToastType) => number | undefined) & { + success: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + error: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + warning: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + info: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + custom: (jsx: ToastType['jsx'], options?: Partial) => number | undefined; + dismiss: (id: number) => number; + update: (id: number, data: Partial) => void; +} & { + getHistory: () => ToastType[]; +}; + +declare type ToastAction = { + label: string; + onClick: (callback?: (toast: ToastType) => void) => void; + type?: 'button' | 'link'; +}; + +declare type ToastDesign = 'stack' | 'inline'; + +export declare const Toaster: NamedExoticComponent; + +declare type ToastTheme = 'light' | 'dark'; + +declare interface ToastType { + id?: number; + title?: string | React.ReactElement; + description?: string | React.ReactElement; + type?: ToastVariant; + jsx?: ({ close, action, }: { + close: () => void; + action?: ToastAction | null; + }) => JSX.Element; + render?: string | (() => JSX.Element); + autoDismiss?: boolean; + dismissAfter?: number; + theme?: ToastTheme; + design?: ToastDesign; + dismiss?: boolean; + icon?: React.ReactElement; + action?: ToastAction; +} + +declare type ToastVariant = 'neutral' | 'success' | 'error' | 'warning' | 'info' | 'custom'; + +export declare const Tooltip: ({ variant, placement, title, content, arrow, open, setOpen, children, className, tooltipPortalRoot, tooltipPortalId, boundary, strategy, offset: offsetValue, triggers, interactive, }: TooltipProps) => JSX_2.Element; + +declare interface TooltipProps { + /** Defines the visual variant of the tooltip. */ + variant?: 'light' | 'dark'; + /** Specifies the position of the tooltip relative to its target. */ + placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end'; + /** The title displayed at the top of the tooltip. */ + title?: string; + /** The main content to be displayed within the tooltip. */ + content?: ReactNode; + /** Indicates whether to show an arrow pointing to the target element. */ + arrow?: boolean; + /** Controls the visibility of the tooltip in a controlled manner. */ + open?: boolean; + /** Function to set the visibility state of the tooltip. */ + setOpen?: (isOpen: boolean) => void; + /** The child element to which the tooltip is attached. */ + children: ReactNode; + /** Additional CSS classes to apply to the tooltip for custom styling. */ + className?: string; + /** The root element where the tooltip will be rendered. */ + tooltipPortalRoot?: HTMLElement | null; + /** The ID of the tooltip portal. */ + tooltipPortalId?: string; + /** Specifies the positioning strategy for the tooltip. */ + strategy?: 'fixed' | 'absolute'; + /** Offset distance (in pixels) from the target element to the tooltip. */ + offset?: number; + /** Events that trigger the tooltip. */ + triggers?: ('click' | 'hover' | 'focus')[]; + /** Indicates whether the tooltip content is interactive. Keeps the tooltip open while the user interacts with its content. */ + interactive?: boolean; + /** Defines the boundary for positioning the tooltip, accepting 'viewport', 'clippingAncestors', or an HTML element reference. */ + boundary?: 'viewport' | 'clippingAncestors' | HTMLElement | null; +} + +export declare const Topbar: { + ({ children, gap, className, ...props }: TopbarProps): JSX_2.Element; + displayName: string; + Left: { + ({ gap, children, className }: TopbarProps): JSX_2.Element; + displayName: string; + }; + Middle: { + ({ gap, children, align, className, }: TopbarMiddleProps): JSX_2.Element; + displayName: string; + }; + Right: { + ({ gap, children, className }: TopbarProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ children, className }: TopbarCommonProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface TopbarCommonProps { + /** Children to be rendered inside the Topbar. */ + children?: ReactNode; + /** Additional classes to be added to the Topbar. */ + className?: string; +} + +declare interface TopbarMiddleProps extends TopbarProps { + /** Defines how the content inside the Middle section is aligned. */ + align?: 'left' | 'center' | 'right'; +} + +declare interface TopbarProps extends TopbarCommonProps { + /** Defines the gap between items. */ + gap?: '0' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; +} + +declare type TOptionItem = Record | string; + +declare type TRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; + +declare type TWrap = 'nowrap' | 'wrap' | 'wrap-reverse'; + +export { } + + +declare namespace defaultTheme { + let content: string[]; + namespace theme { + namespace extend { + let colors: { + 'brand-background-50': string; + 'brand-background-hover-100': string; + 'brand-200': string; + 'brand-border-300': string; + 'brand-400': string; + 'brand-500': string; + 'brand-primary-600': string; + 'brand-hover-700': string; + 'brand-800': string; + 'brand-900': string; + 'brand-text-950': string; + 'background-primary': string; + 'background-secondary': string; + 'background-inverse': string; + 'background-brand': string; + 'background-important': string; + 'field-primary-background': string; + 'field-secondary-background': string; + 'field-primary-hover': string; + 'field-secondary-hover': string; + 'field-dropzone-background': string; + 'field-border': string; + 'field-dropzone-background-hover': string; + 'field-dropzone-color': string; + 'field-label': string; + 'field-input': string; + 'field-helper': string; + 'field-background-disabled': string; + 'field-color-disabled': string; + 'field-placeholder': string; + 'field-border-disabled': string; + 'field-color-error': string; + 'field-border-error': string; + 'field-background-error': string; + 'field-required': string; + 'border-interactive': string; + 'border-subtle': string; + 'border-strong': string; + 'border-inverse': string; + 'border-disabled': string; + 'border-muted': string; + 'border-error': string; + 'border-transparent-subtle': string; + 'border-white': string; + 'text-primary': string; + 'text-secondary': string; + 'text-tertiary': string; + 'text-on-color': string; + 'text-error': string; + 'text-error-inverse': string; + 'text-inverse': string; + 'text-disabled': string; + 'text-on-button-disabled': string; + 'link-primary': string; + 'link-primary-hover': string; + 'link-inverse': string; + 'link-visited': string; + 'link-visited-inverse': string; + 'link-inverse-hover': string; + 'icon-primary': string; + 'icon-secondary': string; + 'icon-on-color': string; + 'icon-inverse': string; + 'icon-interactive': string; + 'icon-on-color-disabled': string; + 'icon-disabled': string; + 'support-error': string; + 'support-success': string; + 'support-warning': string; + 'support-info': string; + 'support-error-inverse': string; + 'support-success-inverse': string; + 'support-warning-inverse': string; + 'support-info-inverse': string; + 'button-primary': string; + 'button-primary-hover': string; + 'button-secondary': string; + 'button-secondary-hover': string; + 'button-tertiary': string; + 'button-tertiary-hover': string; + 'button-danger': string; + 'button-danger-secondary': string; + 'button-danger-hover': string; + 'button-disabled': string; + 'button-tertiary-border': string; + 'button-tertiary-color': string; + focus: string; + 'focus-inset': string; + 'focus-inverse': string; + 'focus-inverse-inset': string; + 'focus-error': string; + 'focus-border': string; + 'focus-error-border': string; + 'misc-highlight': string; + 'misc-overlay': string; + 'misc-skeleton-background': string; + 'misc-skeleton-element': string; + 'misc-popup-button-hover': string; + 'misc-tab-item-hover': string; + 'misc-dropdown-hover': string; + 'misc-loader-base': string; + 'misc-loader-color': string; + 'misc-progress-background': string; + 'badge-background-gray': string; + 'badge-color-gray': string; + 'badge-hover-gray': string; + 'badge-border-gray': string; + 'badge-background-red': string; + 'badge-color-red': string; + 'badge-hover-red': string; + 'badge-border-red': string; + 'badge-background-yellow': string; + 'badge-color-yellow': string; + 'badge-hover-yellow': string; + 'badge-border-yellow': string; + 'badge-hover-green': string; + 'badge-border-green': string; + 'badge-background-green': string; + 'badge-color-green': string; + 'badge-background-sky': string; + 'badge-color-sky': string; + 'badge-hover-sky': string; + 'badge-border-sky': string; + 'badge-background-disabled': string; + 'badge-color-disabled': string; + 'badge-hover-disabled': string; + 'badge-border-disabled': string; + 'badge-background-important': string; + 'alert-background-neutral': string; + 'alert-border-neutral': string; + 'alert-background-danger': string; + 'alert-border-danger': string; + 'alert-background-warning': string; + 'alert-border-warning': string; + 'alert-background-green': string; + 'alert-border-green': string; + 'alert-background-info': string; + 'alert-border-info': string; + 'tab-background': string; + 'tab-border': string; + 'tooltip-background-light': string; + 'tooltip-background-dark': string; + 'toggle-off': string; + 'toggle-on': string; + 'toggle-dial-background': string; + 'toggle-off-hover': string; + 'toggle-off-border': string; + 'toggle-on-hover': string; + 'toggle-on-border': string; + 'toggle-on-disabled': string; + 'toggle-off-disabled': string; + }; + let width: { + '1/7': string; + '1/8': string; + '1/9': string; + '1/10': string; + '1/11': string; + '1/12': string; + }; + let boxShadow: { + 'soft-shadow-sm': string; + 'soft-shadow': string; + 'soft-shadow-md': string; + 'soft-shadow-lg': string; + 'soft-shadow-xl': string; + 'soft-shadow-2xl': string; + 'soft-shadow-inner': string; + }; + namespace fontSize { + let tiny: string; + } + let spacing: { + 120: string; + 95: string; + 141.5: string; + 188: string; + }; + let zIndex: { + 999999: string; + }; + } + } + let plugins: never[]; + namespace corePlugins { + let preflight: boolean; + } +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} diff --git a/dist/force-ui.js b/dist/force-ui.js new file mode 100644 index 00000000..3e699dd8 --- /dev/null +++ b/dist/force-ui.js @@ -0,0 +1,47283 @@ +var A8 = Object.defineProperty; +var QA = (e) => { + throw TypeError(e); +}; +var P8 = (e, t, n) => t in e ? A8(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; +var ca = (e, t, n) => P8(e, typeof t != "symbol" ? t + "" : t, n), eP = (e, t, n) => t.has(e) || QA("Cannot " + n); +var Dr = (e, t, n) => (eP(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Iv = (e, t, n) => t.has(e) ? QA("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), rs = (e, t, n, r) => (eP(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n); +import { jsxs as ge, jsx as k, Fragment as Lt } from "react/jsx-runtime"; +import * as ee from "react"; +import I, { forwardRef as $t, useMemo as ze, useState as We, useCallback as nt, isValidElement as ht, createElement as Vl, useLayoutEffect as Ni, useEffect as Je, useRef as Ot, cloneElement as St, createContext as At, Fragment as Ta, useContext as Ge, useId as jw, Component as Lw, useInsertionEffect as A$, Children as wr, memo as T8, Suspense as C8, PureComponent as di, useImperativeHandle as E8 } from "react"; +import * as P$ from "react-dom"; +import { flushSync as T$, createPortal as Bw } from "react-dom"; +import { c as xo, g as Et } from "./_commonjsHelpers-DaMA6jEr.js"; +const Fw = "-", k8 = (e) => { + const t = N8(e), { + conflictingClassGroups: n, + conflictingClassGroupModifiers: r + } = e; + return { + getClassGroupId: (a) => { + const s = a.split(Fw); + return s[0] === "" && s.length !== 1 && s.shift(), C$(s, t) || M8(a); + }, + getConflictingClassGroupIds: (a, s) => { + const l = n[a] || []; + return s && r[a] ? [...l, ...r[a]] : l; + } + }; +}, C$ = (e, t) => { + var a; + if (e.length === 0) + return t.classGroupId; + const n = e[0], r = t.nextPart.get(n), i = r ? C$(e.slice(1), r) : void 0; + if (i) + return i; + if (t.validators.length === 0) + return; + const o = e.join(Fw); + return (a = t.validators.find(({ + validator: s + }) => s(o))) == null ? void 0 : a.classGroupId; +}, tP = /^\[(.+)\]$/, M8 = (e) => { + if (tP.test(e)) { + const t = tP.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":")); + if (n) + return "arbitrary.." + n; + } +}, N8 = (e) => { + const { + theme: t, + prefix: n + } = e, r = { + nextPart: /* @__PURE__ */ new Map(), + validators: [] + }; + return D8(Object.entries(e.classGroups), n).forEach(([o, a]) => { + n0(a, r, o, t); + }), r; +}, n0 = (e, t, n, r) => { + e.forEach((i) => { + if (typeof i == "string") { + const o = i === "" ? t : nP(t, i); + o.classGroupId = n; + return; + } + if (typeof i == "function") { + if ($8(i)) { + n0(i(r), t, n, r); + return; + } + t.validators.push({ + validator: i, + classGroupId: n + }); + return; + } + Object.entries(i).forEach(([o, a]) => { + n0(a, nP(t, o), n, r); + }); + }); +}, nP = (e, t) => { + let n = e; + return t.split(Fw).forEach((r) => { + n.nextPart.has(r) || n.nextPart.set(r, { + nextPart: /* @__PURE__ */ new Map(), + validators: [] + }), n = n.nextPart.get(r); + }), n; +}, $8 = (e) => e.isThemeGetter, D8 = (e, t) => t ? e.map(([n, r]) => { + const i = r.map((o) => typeof o == "string" ? t + o : typeof o == "object" ? Object.fromEntries(Object.entries(o).map(([a, s]) => [t + a, s])) : o); + return [n, i]; +}) : e, I8 = (e) => { + if (e < 1) + return { + get: () => { + }, + set: () => { + } + }; + let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); + const i = (o, a) => { + n.set(o, a), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map()); + }; + return { + get(o) { + let a = n.get(o); + if (a !== void 0) + return a; + if ((a = r.get(o)) !== void 0) + return i(o, a), a; + }, + set(o, a) { + n.has(o) ? n.set(o, a) : i(o, a); + } + }; +}, E$ = "!", R8 = (e) => { + const { + separator: t, + experimentalParseClassName: n + } = e, r = t.length === 1, i = t[0], o = t.length, a = (s) => { + const l = []; + let c = 0, f = 0, d; + for (let y = 0; y < s.length; y++) { + let x = s[y]; + if (c === 0) { + if (x === i && (r || s.slice(y, y + o) === t)) { + l.push(s.slice(f, y)), f = y + o; + continue; + } + if (x === "/") { + d = y; + continue; + } + } + x === "[" ? c++ : x === "]" && c--; + } + const p = l.length === 0 ? s : s.substring(f), m = p.startsWith(E$), g = m ? p.substring(1) : p, v = d && d > f ? d - f : void 0; + return { + modifiers: l, + hasImportantModifier: m, + baseClassName: g, + maybePostfixModifierPosition: v + }; + }; + return n ? (s) => n({ + className: s, + parseClassName: a + }) : a; +}, j8 = (e) => { + if (e.length <= 1) + return e; + const t = []; + let n = []; + return e.forEach((r) => { + r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r); + }), t.push(...n.sort()), t; +}, L8 = (e) => ({ + cache: I8(e.cacheSize), + parseClassName: R8(e), + ...k8(e) +}), B8 = /\s+/, F8 = (e, t) => { + const { + parseClassName: n, + getClassGroupId: r, + getConflictingClassGroupIds: i + } = t, o = [], a = e.trim().split(B8); + let s = ""; + for (let l = a.length - 1; l >= 0; l -= 1) { + const c = a[l], { + modifiers: f, + hasImportantModifier: d, + baseClassName: p, + maybePostfixModifierPosition: m + } = n(c); + let g = !!m, v = r(g ? p.substring(0, m) : p); + if (!v) { + if (!g) { + s = c + (s.length > 0 ? " " + s : s); + continue; + } + if (v = r(p), !v) { + s = c + (s.length > 0 ? " " + s : s); + continue; + } + g = !1; + } + const y = j8(f).join(":"), x = d ? y + E$ : y, w = x + v; + if (o.includes(w)) + continue; + o.push(w); + const S = i(v, g); + for (let A = 0; A < S.length; ++A) { + const _ = S[A]; + o.push(x + _); + } + s = c + (s.length > 0 ? " " + s : s); + } + return s; +}; +function W8() { + let e = 0, t, n, r = ""; + for (; e < arguments.length; ) + (t = arguments[e++]) && (n = k$(t)) && (r && (r += " "), r += n); + return r; +} +const k$ = (e) => { + if (typeof e == "string") + return e; + let t, n = ""; + for (let r = 0; r < e.length; r++) + e[r] && (t = k$(e[r])) && (n && (n += " "), n += t); + return n; +}; +function z8(e, ...t) { + let n, r, i, o = a; + function a(l) { + const c = t.reduce((f, d) => d(f), e()); + return n = L8(c), r = n.cache.get, i = n.cache.set, o = s, s(l); + } + function s(l) { + const c = r(l); + if (c) + return c; + const f = F8(l, n); + return i(l, f), f; + } + return function() { + return o(W8.apply(null, arguments)); + }; +} +const zt = (e) => { + const t = (n) => n[e] || []; + return t.isThemeGetter = !0, t; +}, M$ = /^\[(?:([a-z-]+):)?(.+)\]$/i, V8 = /^\d+\/\d+$/, U8 = /* @__PURE__ */ new Set(["px", "full", "screen"]), K8 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, H8 = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, G8 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Y8 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, q8 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, mo = (e) => Il(e) || U8.has(e) || V8.test(e), ua = (e) => Pc(e, "length", rK), Il = (e) => !!e && !Number.isNaN(Number(e)), Rv = (e) => Pc(e, "number", Il), mu = (e) => !!e && Number.isInteger(Number(e)), X8 = (e) => e.endsWith("%") && Il(e.slice(0, -1)), Xe = (e) => M$.test(e), fa = (e) => K8.test(e), Z8 = /* @__PURE__ */ new Set(["length", "size", "percentage"]), J8 = (e) => Pc(e, Z8, N$), Q8 = (e) => Pc(e, "position", N$), eK = /* @__PURE__ */ new Set(["image", "url"]), tK = (e) => Pc(e, eK, oK), nK = (e) => Pc(e, "", iK), gu = () => !0, Pc = (e, t, n) => { + const r = M$.exec(e); + return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1; +}, rK = (e) => ( + // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. + // For example, `hsl(0 0% 0%)` would be classified as a length without this check. + // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. + H8.test(e) && !G8.test(e) +), N$ = () => !1, iK = (e) => Y8.test(e), oK = (e) => q8.test(e), aK = () => { + const e = zt("colors"), t = zt("spacing"), n = zt("blur"), r = zt("brightness"), i = zt("borderColor"), o = zt("borderRadius"), a = zt("borderSpacing"), s = zt("borderWidth"), l = zt("contrast"), c = zt("grayscale"), f = zt("hueRotate"), d = zt("invert"), p = zt("gap"), m = zt("gradientColorStops"), g = zt("gradientColorStopPositions"), v = zt("inset"), y = zt("margin"), x = zt("opacity"), w = zt("padding"), S = zt("saturate"), A = zt("scale"), _ = zt("sepia"), O = zt("skew"), T = zt("space"), C = zt("translate"), E = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", Xe, t], N = () => [Xe, t], F = () => ["", mo, ua], L = () => ["auto", Il, Xe], W = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], B = () => ["solid", "dashed", "dotted", "double", "none"], z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], H = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", Xe], K = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [Il, Xe]; + return { + cacheSize: 500, + separator: ":", + theme: { + colors: [gu], + spacing: [mo, ua], + blur: ["none", "", fa, Xe], + brightness: Y(), + borderColor: [e], + borderRadius: ["none", "", "full", fa, Xe], + borderSpacing: N(), + borderWidth: F(), + contrast: Y(), + grayscale: U(), + hueRotate: Y(), + invert: U(), + gap: N(), + gradientColorStops: [e], + gradientColorStopPositions: [X8, ua], + inset: $(), + margin: $(), + opacity: Y(), + padding: N(), + saturate: Y(), + scale: Y(), + sepia: U(), + skew: Y(), + space: N(), + translate: N() + }, + classGroups: { + // Layout + /** + * Aspect Ratio + * @see https://tailwindcss.com/docs/aspect-ratio + */ + aspect: [{ + aspect: ["auto", "square", "video", Xe] + }], + /** + * Container + * @see https://tailwindcss.com/docs/container + */ + container: ["container"], + /** + * Columns + * @see https://tailwindcss.com/docs/columns + */ + columns: [{ + columns: [fa] + }], + /** + * Break After + * @see https://tailwindcss.com/docs/break-after + */ + "break-after": [{ + "break-after": K() + }], + /** + * Break Before + * @see https://tailwindcss.com/docs/break-before + */ + "break-before": [{ + "break-before": K() + }], + /** + * Break Inside + * @see https://tailwindcss.com/docs/break-inside + */ + "break-inside": [{ + "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] + }], + /** + * Box Decoration Break + * @see https://tailwindcss.com/docs/box-decoration-break + */ + "box-decoration": [{ + "box-decoration": ["slice", "clone"] + }], + /** + * Box Sizing + * @see https://tailwindcss.com/docs/box-sizing + */ + box: [{ + box: ["border", "content"] + }], + /** + * Display + * @see https://tailwindcss.com/docs/display + */ + display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"], + /** + * Floats + * @see https://tailwindcss.com/docs/float + */ + float: [{ + float: ["right", "left", "none", "start", "end"] + }], + /** + * Clear + * @see https://tailwindcss.com/docs/clear + */ + clear: [{ + clear: ["left", "right", "both", "none", "start", "end"] + }], + /** + * Isolation + * @see https://tailwindcss.com/docs/isolation + */ + isolation: ["isolate", "isolation-auto"], + /** + * Object Fit + * @see https://tailwindcss.com/docs/object-fit + */ + "object-fit": [{ + object: ["contain", "cover", "fill", "none", "scale-down"] + }], + /** + * Object Position + * @see https://tailwindcss.com/docs/object-position + */ + "object-position": [{ + object: [...W(), Xe] + }], + /** + * Overflow + * @see https://tailwindcss.com/docs/overflow + */ + overflow: [{ + overflow: D() + }], + /** + * Overflow X + * @see https://tailwindcss.com/docs/overflow + */ + "overflow-x": [{ + "overflow-x": D() + }], + /** + * Overflow Y + * @see https://tailwindcss.com/docs/overflow + */ + "overflow-y": [{ + "overflow-y": D() + }], + /** + * Overscroll Behavior + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + overscroll: [{ + overscroll: E() + }], + /** + * Overscroll Behavior X + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + "overscroll-x": [{ + "overscroll-x": E() + }], + /** + * Overscroll Behavior Y + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + "overscroll-y": [{ + "overscroll-y": E() + }], + /** + * Position + * @see https://tailwindcss.com/docs/position + */ + position: ["static", "fixed", "absolute", "relative", "sticky"], + /** + * Top / Right / Bottom / Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + inset: [{ + inset: [v] + }], + /** + * Right / Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + "inset-x": [{ + "inset-x": [v] + }], + /** + * Top / Bottom + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + "inset-y": [{ + "inset-y": [v] + }], + /** + * Start + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + start: [{ + start: [v] + }], + /** + * End + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + end: [{ + end: [v] + }], + /** + * Top + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + top: [{ + top: [v] + }], + /** + * Right + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + right: [{ + right: [v] + }], + /** + * Bottom + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + bottom: [{ + bottom: [v] + }], + /** + * Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + left: [{ + left: [v] + }], + /** + * Visibility + * @see https://tailwindcss.com/docs/visibility + */ + visibility: ["visible", "invisible", "collapse"], + /** + * Z-Index + * @see https://tailwindcss.com/docs/z-index + */ + z: [{ + z: ["auto", mu, Xe] + }], + // Flexbox and Grid + /** + * Flex Basis + * @see https://tailwindcss.com/docs/flex-basis + */ + basis: [{ + basis: $() + }], + /** + * Flex Direction + * @see https://tailwindcss.com/docs/flex-direction + */ + "flex-direction": [{ + flex: ["row", "row-reverse", "col", "col-reverse"] + }], + /** + * Flex Wrap + * @see https://tailwindcss.com/docs/flex-wrap + */ + "flex-wrap": [{ + flex: ["wrap", "wrap-reverse", "nowrap"] + }], + /** + * Flex + * @see https://tailwindcss.com/docs/flex + */ + flex: [{ + flex: ["1", "auto", "initial", "none", Xe] + }], + /** + * Flex Grow + * @see https://tailwindcss.com/docs/flex-grow + */ + grow: [{ + grow: U() + }], + /** + * Flex Shrink + * @see https://tailwindcss.com/docs/flex-shrink + */ + shrink: [{ + shrink: U() + }], + /** + * Order + * @see https://tailwindcss.com/docs/order + */ + order: [{ + order: ["first", "last", "none", mu, Xe] + }], + /** + * Grid Template Columns + * @see https://tailwindcss.com/docs/grid-template-columns + */ + "grid-cols": [{ + "grid-cols": [gu] + }], + /** + * Grid Column Start / End + * @see https://tailwindcss.com/docs/grid-column + */ + "col-start-end": [{ + col: ["auto", { + span: ["full", mu, Xe] + }, Xe] + }], + /** + * Grid Column Start + * @see https://tailwindcss.com/docs/grid-column + */ + "col-start": [{ + "col-start": L() + }], + /** + * Grid Column End + * @see https://tailwindcss.com/docs/grid-column + */ + "col-end": [{ + "col-end": L() + }], + /** + * Grid Template Rows + * @see https://tailwindcss.com/docs/grid-template-rows + */ + "grid-rows": [{ + "grid-rows": [gu] + }], + /** + * Grid Row Start / End + * @see https://tailwindcss.com/docs/grid-row + */ + "row-start-end": [{ + row: ["auto", { + span: [mu, Xe] + }, Xe] + }], + /** + * Grid Row Start + * @see https://tailwindcss.com/docs/grid-row + */ + "row-start": [{ + "row-start": L() + }], + /** + * Grid Row End + * @see https://tailwindcss.com/docs/grid-row + */ + "row-end": [{ + "row-end": L() + }], + /** + * Grid Auto Flow + * @see https://tailwindcss.com/docs/grid-auto-flow + */ + "grid-flow": [{ + "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] + }], + /** + * Grid Auto Columns + * @see https://tailwindcss.com/docs/grid-auto-columns + */ + "auto-cols": [{ + "auto-cols": ["auto", "min", "max", "fr", Xe] + }], + /** + * Grid Auto Rows + * @see https://tailwindcss.com/docs/grid-auto-rows + */ + "auto-rows": [{ + "auto-rows": ["auto", "min", "max", "fr", Xe] + }], + /** + * Gap + * @see https://tailwindcss.com/docs/gap + */ + gap: [{ + gap: [p] + }], + /** + * Gap X + * @see https://tailwindcss.com/docs/gap + */ + "gap-x": [{ + "gap-x": [p] + }], + /** + * Gap Y + * @see https://tailwindcss.com/docs/gap + */ + "gap-y": [{ + "gap-y": [p] + }], + /** + * Justify Content + * @see https://tailwindcss.com/docs/justify-content + */ + "justify-content": [{ + justify: ["normal", ...H()] + }], + /** + * Justify Items + * @see https://tailwindcss.com/docs/justify-items + */ + "justify-items": [{ + "justify-items": ["start", "end", "center", "stretch"] + }], + /** + * Justify Self + * @see https://tailwindcss.com/docs/justify-self + */ + "justify-self": [{ + "justify-self": ["auto", "start", "end", "center", "stretch"] + }], + /** + * Align Content + * @see https://tailwindcss.com/docs/align-content + */ + "align-content": [{ + content: ["normal", ...H(), "baseline"] + }], + /** + * Align Items + * @see https://tailwindcss.com/docs/align-items + */ + "align-items": [{ + items: ["start", "end", "center", "baseline", "stretch"] + }], + /** + * Align Self + * @see https://tailwindcss.com/docs/align-self + */ + "align-self": [{ + self: ["auto", "start", "end", "center", "stretch", "baseline"] + }], + /** + * Place Content + * @see https://tailwindcss.com/docs/place-content + */ + "place-content": [{ + "place-content": [...H(), "baseline"] + }], + /** + * Place Items + * @see https://tailwindcss.com/docs/place-items + */ + "place-items": [{ + "place-items": ["start", "end", "center", "baseline", "stretch"] + }], + /** + * Place Self + * @see https://tailwindcss.com/docs/place-self + */ + "place-self": [{ + "place-self": ["auto", "start", "end", "center", "stretch"] + }], + // Spacing + /** + * Padding + * @see https://tailwindcss.com/docs/padding + */ + p: [{ + p: [w] + }], + /** + * Padding X + * @see https://tailwindcss.com/docs/padding + */ + px: [{ + px: [w] + }], + /** + * Padding Y + * @see https://tailwindcss.com/docs/padding + */ + py: [{ + py: [w] + }], + /** + * Padding Start + * @see https://tailwindcss.com/docs/padding + */ + ps: [{ + ps: [w] + }], + /** + * Padding End + * @see https://tailwindcss.com/docs/padding + */ + pe: [{ + pe: [w] + }], + /** + * Padding Top + * @see https://tailwindcss.com/docs/padding + */ + pt: [{ + pt: [w] + }], + /** + * Padding Right + * @see https://tailwindcss.com/docs/padding + */ + pr: [{ + pr: [w] + }], + /** + * Padding Bottom + * @see https://tailwindcss.com/docs/padding + */ + pb: [{ + pb: [w] + }], + /** + * Padding Left + * @see https://tailwindcss.com/docs/padding + */ + pl: [{ + pl: [w] + }], + /** + * Margin + * @see https://tailwindcss.com/docs/margin + */ + m: [{ + m: [y] + }], + /** + * Margin X + * @see https://tailwindcss.com/docs/margin + */ + mx: [{ + mx: [y] + }], + /** + * Margin Y + * @see https://tailwindcss.com/docs/margin + */ + my: [{ + my: [y] + }], + /** + * Margin Start + * @see https://tailwindcss.com/docs/margin + */ + ms: [{ + ms: [y] + }], + /** + * Margin End + * @see https://tailwindcss.com/docs/margin + */ + me: [{ + me: [y] + }], + /** + * Margin Top + * @see https://tailwindcss.com/docs/margin + */ + mt: [{ + mt: [y] + }], + /** + * Margin Right + * @see https://tailwindcss.com/docs/margin + */ + mr: [{ + mr: [y] + }], + /** + * Margin Bottom + * @see https://tailwindcss.com/docs/margin + */ + mb: [{ + mb: [y] + }], + /** + * Margin Left + * @see https://tailwindcss.com/docs/margin + */ + ml: [{ + ml: [y] + }], + /** + * Space Between X + * @see https://tailwindcss.com/docs/space + */ + "space-x": [{ + "space-x": [T] + }], + /** + * Space Between X Reverse + * @see https://tailwindcss.com/docs/space + */ + "space-x-reverse": ["space-x-reverse"], + /** + * Space Between Y + * @see https://tailwindcss.com/docs/space + */ + "space-y": [{ + "space-y": [T] + }], + /** + * Space Between Y Reverse + * @see https://tailwindcss.com/docs/space + */ + "space-y-reverse": ["space-y-reverse"], + // Sizing + /** + * Width + * @see https://tailwindcss.com/docs/width + */ + w: [{ + w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", Xe, t] + }], + /** + * Min-Width + * @see https://tailwindcss.com/docs/min-width + */ + "min-w": [{ + "min-w": [Xe, t, "min", "max", "fit"] + }], + /** + * Max-Width + * @see https://tailwindcss.com/docs/max-width + */ + "max-w": [{ + "max-w": [Xe, t, "none", "full", "min", "max", "fit", "prose", { + screen: [fa] + }, fa] + }], + /** + * Height + * @see https://tailwindcss.com/docs/height + */ + h: [{ + h: [Xe, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Min-Height + * @see https://tailwindcss.com/docs/min-height + */ + "min-h": [{ + "min-h": [Xe, t, "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Max-Height + * @see https://tailwindcss.com/docs/max-height + */ + "max-h": [{ + "max-h": [Xe, t, "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Size + * @see https://tailwindcss.com/docs/size + */ + size: [{ + size: [Xe, t, "auto", "min", "max", "fit"] + }], + // Typography + /** + * Font Size + * @see https://tailwindcss.com/docs/font-size + */ + "font-size": [{ + text: ["base", fa, ua] + }], + /** + * Font Smoothing + * @see https://tailwindcss.com/docs/font-smoothing + */ + "font-smoothing": ["antialiased", "subpixel-antialiased"], + /** + * Font Style + * @see https://tailwindcss.com/docs/font-style + */ + "font-style": ["italic", "not-italic"], + /** + * Font Weight + * @see https://tailwindcss.com/docs/font-weight + */ + "font-weight": [{ + font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Rv] + }], + /** + * Font Family + * @see https://tailwindcss.com/docs/font-family + */ + "font-family": [{ + font: [gu] + }], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-normal": ["normal-nums"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-ordinal": ["ordinal"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-slashed-zero": ["slashed-zero"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-figure": ["lining-nums", "oldstyle-nums"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-spacing": ["proportional-nums", "tabular-nums"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-fraction": ["diagonal-fractions", "stacked-fractons"], + /** + * Letter Spacing + * @see https://tailwindcss.com/docs/letter-spacing + */ + tracking: [{ + tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", Xe] + }], + /** + * Line Clamp + * @see https://tailwindcss.com/docs/line-clamp + */ + "line-clamp": [{ + "line-clamp": ["none", Il, Rv] + }], + /** + * Line Height + * @see https://tailwindcss.com/docs/line-height + */ + leading: [{ + leading: ["none", "tight", "snug", "normal", "relaxed", "loose", mo, Xe] + }], + /** + * List Style Image + * @see https://tailwindcss.com/docs/list-style-image + */ + "list-image": [{ + "list-image": ["none", Xe] + }], + /** + * List Style Type + * @see https://tailwindcss.com/docs/list-style-type + */ + "list-style-type": [{ + list: ["none", "disc", "decimal", Xe] + }], + /** + * List Style Position + * @see https://tailwindcss.com/docs/list-style-position + */ + "list-style-position": [{ + list: ["inside", "outside"] + }], + /** + * Placeholder Color + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/placeholder-color + */ + "placeholder-color": [{ + placeholder: [e] + }], + /** + * Placeholder Opacity + * @see https://tailwindcss.com/docs/placeholder-opacity + */ + "placeholder-opacity": [{ + "placeholder-opacity": [x] + }], + /** + * Text Alignment + * @see https://tailwindcss.com/docs/text-align + */ + "text-alignment": [{ + text: ["left", "center", "right", "justify", "start", "end"] + }], + /** + * Text Color + * @see https://tailwindcss.com/docs/text-color + */ + "text-color": [{ + text: [e] + }], + /** + * Text Opacity + * @see https://tailwindcss.com/docs/text-opacity + */ + "text-opacity": [{ + "text-opacity": [x] + }], + /** + * Text Decoration + * @see https://tailwindcss.com/docs/text-decoration + */ + "text-decoration": ["underline", "overline", "line-through", "no-underline"], + /** + * Text Decoration Style + * @see https://tailwindcss.com/docs/text-decoration-style + */ + "text-decoration-style": [{ + decoration: [...B(), "wavy"] + }], + /** + * Text Decoration Thickness + * @see https://tailwindcss.com/docs/text-decoration-thickness + */ + "text-decoration-thickness": [{ + decoration: ["auto", "from-font", mo, ua] + }], + /** + * Text Underline Offset + * @see https://tailwindcss.com/docs/text-underline-offset + */ + "underline-offset": [{ + "underline-offset": ["auto", mo, Xe] + }], + /** + * Text Decoration Color + * @see https://tailwindcss.com/docs/text-decoration-color + */ + "text-decoration-color": [{ + decoration: [e] + }], + /** + * Text Transform + * @see https://tailwindcss.com/docs/text-transform + */ + "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], + /** + * Text Overflow + * @see https://tailwindcss.com/docs/text-overflow + */ + "text-overflow": ["truncate", "text-ellipsis", "text-clip"], + /** + * Text Wrap + * @see https://tailwindcss.com/docs/text-wrap + */ + "text-wrap": [{ + text: ["wrap", "nowrap", "balance", "pretty"] + }], + /** + * Text Indent + * @see https://tailwindcss.com/docs/text-indent + */ + indent: [{ + indent: N() + }], + /** + * Vertical Alignment + * @see https://tailwindcss.com/docs/vertical-align + */ + "vertical-align": [{ + align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", Xe] + }], + /** + * Whitespace + * @see https://tailwindcss.com/docs/whitespace + */ + whitespace: [{ + whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] + }], + /** + * Word Break + * @see https://tailwindcss.com/docs/word-break + */ + break: [{ + break: ["normal", "words", "all", "keep"] + }], + /** + * Hyphens + * @see https://tailwindcss.com/docs/hyphens + */ + hyphens: [{ + hyphens: ["none", "manual", "auto"] + }], + /** + * Content + * @see https://tailwindcss.com/docs/content + */ + content: [{ + content: ["none", Xe] + }], + // Backgrounds + /** + * Background Attachment + * @see https://tailwindcss.com/docs/background-attachment + */ + "bg-attachment": [{ + bg: ["fixed", "local", "scroll"] + }], + /** + * Background Clip + * @see https://tailwindcss.com/docs/background-clip + */ + "bg-clip": [{ + "bg-clip": ["border", "padding", "content", "text"] + }], + /** + * Background Opacity + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/background-opacity + */ + "bg-opacity": [{ + "bg-opacity": [x] + }], + /** + * Background Origin + * @see https://tailwindcss.com/docs/background-origin + */ + "bg-origin": [{ + "bg-origin": ["border", "padding", "content"] + }], + /** + * Background Position + * @see https://tailwindcss.com/docs/background-position + */ + "bg-position": [{ + bg: [...W(), Q8] + }], + /** + * Background Repeat + * @see https://tailwindcss.com/docs/background-repeat + */ + "bg-repeat": [{ + bg: ["no-repeat", { + repeat: ["", "x", "y", "round", "space"] + }] + }], + /** + * Background Size + * @see https://tailwindcss.com/docs/background-size + */ + "bg-size": [{ + bg: ["auto", "cover", "contain", J8] + }], + /** + * Background Image + * @see https://tailwindcss.com/docs/background-image + */ + "bg-image": [{ + bg: ["none", { + "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] + }, tK] + }], + /** + * Background Color + * @see https://tailwindcss.com/docs/background-color + */ + "bg-color": [{ + bg: [e] + }], + /** + * Gradient Color Stops From Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-from-pos": [{ + from: [g] + }], + /** + * Gradient Color Stops Via Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-via-pos": [{ + via: [g] + }], + /** + * Gradient Color Stops To Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-to-pos": [{ + to: [g] + }], + /** + * Gradient Color Stops From + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-from": [{ + from: [m] + }], + /** + * Gradient Color Stops Via + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-via": [{ + via: [m] + }], + /** + * Gradient Color Stops To + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-to": [{ + to: [m] + }], + // Borders + /** + * Border Radius + * @see https://tailwindcss.com/docs/border-radius + */ + rounded: [{ + rounded: [o] + }], + /** + * Border Radius Start + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-s": [{ + "rounded-s": [o] + }], + /** + * Border Radius End + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-e": [{ + "rounded-e": [o] + }], + /** + * Border Radius Top + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-t": [{ + "rounded-t": [o] + }], + /** + * Border Radius Right + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-r": [{ + "rounded-r": [o] + }], + /** + * Border Radius Bottom + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-b": [{ + "rounded-b": [o] + }], + /** + * Border Radius Left + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-l": [{ + "rounded-l": [o] + }], + /** + * Border Radius Start Start + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-ss": [{ + "rounded-ss": [o] + }], + /** + * Border Radius Start End + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-se": [{ + "rounded-se": [o] + }], + /** + * Border Radius End End + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-ee": [{ + "rounded-ee": [o] + }], + /** + * Border Radius End Start + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-es": [{ + "rounded-es": [o] + }], + /** + * Border Radius Top Left + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-tl": [{ + "rounded-tl": [o] + }], + /** + * Border Radius Top Right + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-tr": [{ + "rounded-tr": [o] + }], + /** + * Border Radius Bottom Right + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-br": [{ + "rounded-br": [o] + }], + /** + * Border Radius Bottom Left + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-bl": [{ + "rounded-bl": [o] + }], + /** + * Border Width + * @see https://tailwindcss.com/docs/border-width + */ + "border-w": [{ + border: [s] + }], + /** + * Border Width X + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-x": [{ + "border-x": [s] + }], + /** + * Border Width Y + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-y": [{ + "border-y": [s] + }], + /** + * Border Width Start + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-s": [{ + "border-s": [s] + }], + /** + * Border Width End + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-e": [{ + "border-e": [s] + }], + /** + * Border Width Top + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-t": [{ + "border-t": [s] + }], + /** + * Border Width Right + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-r": [{ + "border-r": [s] + }], + /** + * Border Width Bottom + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-b": [{ + "border-b": [s] + }], + /** + * Border Width Left + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-l": [{ + "border-l": [s] + }], + /** + * Border Opacity + * @see https://tailwindcss.com/docs/border-opacity + */ + "border-opacity": [{ + "border-opacity": [x] + }], + /** + * Border Style + * @see https://tailwindcss.com/docs/border-style + */ + "border-style": [{ + border: [...B(), "hidden"] + }], + /** + * Divide Width X + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-x": [{ + "divide-x": [s] + }], + /** + * Divide Width X Reverse + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-x-reverse": ["divide-x-reverse"], + /** + * Divide Width Y + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-y": [{ + "divide-y": [s] + }], + /** + * Divide Width Y Reverse + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-y-reverse": ["divide-y-reverse"], + /** + * Divide Opacity + * @see https://tailwindcss.com/docs/divide-opacity + */ + "divide-opacity": [{ + "divide-opacity": [x] + }], + /** + * Divide Style + * @see https://tailwindcss.com/docs/divide-style + */ + "divide-style": [{ + divide: B() + }], + /** + * Border Color + * @see https://tailwindcss.com/docs/border-color + */ + "border-color": [{ + border: [i] + }], + /** + * Border Color X + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-x": [{ + "border-x": [i] + }], + /** + * Border Color Y + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-y": [{ + "border-y": [i] + }], + /** + * Border Color S + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-s": [{ + "border-s": [i] + }], + /** + * Border Color E + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-e": [{ + "border-e": [i] + }], + /** + * Border Color Top + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-t": [{ + "border-t": [i] + }], + /** + * Border Color Right + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-r": [{ + "border-r": [i] + }], + /** + * Border Color Bottom + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-b": [{ + "border-b": [i] + }], + /** + * Border Color Left + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-l": [{ + "border-l": [i] + }], + /** + * Divide Color + * @see https://tailwindcss.com/docs/divide-color + */ + "divide-color": [{ + divide: [i] + }], + /** + * Outline Style + * @see https://tailwindcss.com/docs/outline-style + */ + "outline-style": [{ + outline: ["", ...B()] + }], + /** + * Outline Offset + * @see https://tailwindcss.com/docs/outline-offset + */ + "outline-offset": [{ + "outline-offset": [mo, Xe] + }], + /** + * Outline Width + * @see https://tailwindcss.com/docs/outline-width + */ + "outline-w": [{ + outline: [mo, ua] + }], + /** + * Outline Color + * @see https://tailwindcss.com/docs/outline-color + */ + "outline-color": [{ + outline: [e] + }], + /** + * Ring Width + * @see https://tailwindcss.com/docs/ring-width + */ + "ring-w": [{ + ring: F() + }], + /** + * Ring Width Inset + * @see https://tailwindcss.com/docs/ring-width + */ + "ring-w-inset": ["ring-inset"], + /** + * Ring Color + * @see https://tailwindcss.com/docs/ring-color + */ + "ring-color": [{ + ring: [e] + }], + /** + * Ring Opacity + * @see https://tailwindcss.com/docs/ring-opacity + */ + "ring-opacity": [{ + "ring-opacity": [x] + }], + /** + * Ring Offset Width + * @see https://tailwindcss.com/docs/ring-offset-width + */ + "ring-offset-w": [{ + "ring-offset": [mo, ua] + }], + /** + * Ring Offset Color + * @see https://tailwindcss.com/docs/ring-offset-color + */ + "ring-offset-color": [{ + "ring-offset": [e] + }], + // Effects + /** + * Box Shadow + * @see https://tailwindcss.com/docs/box-shadow + */ + shadow: [{ + shadow: ["", "inner", "none", fa, nK] + }], + /** + * Box Shadow Color + * @see https://tailwindcss.com/docs/box-shadow-color + */ + "shadow-color": [{ + shadow: [gu] + }], + /** + * Opacity + * @see https://tailwindcss.com/docs/opacity + */ + opacity: [{ + opacity: [x] + }], + /** + * Mix Blend Mode + * @see https://tailwindcss.com/docs/mix-blend-mode + */ + "mix-blend": [{ + "mix-blend": [...z(), "plus-lighter", "plus-darker"] + }], + /** + * Background Blend Mode + * @see https://tailwindcss.com/docs/background-blend-mode + */ + "bg-blend": [{ + "bg-blend": z() + }], + // Filters + /** + * Filter + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/filter + */ + filter: [{ + filter: ["", "none"] + }], + /** + * Blur + * @see https://tailwindcss.com/docs/blur + */ + blur: [{ + blur: [n] + }], + /** + * Brightness + * @see https://tailwindcss.com/docs/brightness + */ + brightness: [{ + brightness: [r] + }], + /** + * Contrast + * @see https://tailwindcss.com/docs/contrast + */ + contrast: [{ + contrast: [l] + }], + /** + * Drop Shadow + * @see https://tailwindcss.com/docs/drop-shadow + */ + "drop-shadow": [{ + "drop-shadow": ["", "none", fa, Xe] + }], + /** + * Grayscale + * @see https://tailwindcss.com/docs/grayscale + */ + grayscale: [{ + grayscale: [c] + }], + /** + * Hue Rotate + * @see https://tailwindcss.com/docs/hue-rotate + */ + "hue-rotate": [{ + "hue-rotate": [f] + }], + /** + * Invert + * @see https://tailwindcss.com/docs/invert + */ + invert: [{ + invert: [d] + }], + /** + * Saturate + * @see https://tailwindcss.com/docs/saturate + */ + saturate: [{ + saturate: [S] + }], + /** + * Sepia + * @see https://tailwindcss.com/docs/sepia + */ + sepia: [{ + sepia: [_] + }], + /** + * Backdrop Filter + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/backdrop-filter + */ + "backdrop-filter": [{ + "backdrop-filter": ["", "none"] + }], + /** + * Backdrop Blur + * @see https://tailwindcss.com/docs/backdrop-blur + */ + "backdrop-blur": [{ + "backdrop-blur": [n] + }], + /** + * Backdrop Brightness + * @see https://tailwindcss.com/docs/backdrop-brightness + */ + "backdrop-brightness": [{ + "backdrop-brightness": [r] + }], + /** + * Backdrop Contrast + * @see https://tailwindcss.com/docs/backdrop-contrast + */ + "backdrop-contrast": [{ + "backdrop-contrast": [l] + }], + /** + * Backdrop Grayscale + * @see https://tailwindcss.com/docs/backdrop-grayscale + */ + "backdrop-grayscale": [{ + "backdrop-grayscale": [c] + }], + /** + * Backdrop Hue Rotate + * @see https://tailwindcss.com/docs/backdrop-hue-rotate + */ + "backdrop-hue-rotate": [{ + "backdrop-hue-rotate": [f] + }], + /** + * Backdrop Invert + * @see https://tailwindcss.com/docs/backdrop-invert + */ + "backdrop-invert": [{ + "backdrop-invert": [d] + }], + /** + * Backdrop Opacity + * @see https://tailwindcss.com/docs/backdrop-opacity + */ + "backdrop-opacity": [{ + "backdrop-opacity": [x] + }], + /** + * Backdrop Saturate + * @see https://tailwindcss.com/docs/backdrop-saturate + */ + "backdrop-saturate": [{ + "backdrop-saturate": [S] + }], + /** + * Backdrop Sepia + * @see https://tailwindcss.com/docs/backdrop-sepia + */ + "backdrop-sepia": [{ + "backdrop-sepia": [_] + }], + // Tables + /** + * Border Collapse + * @see https://tailwindcss.com/docs/border-collapse + */ + "border-collapse": [{ + border: ["collapse", "separate"] + }], + /** + * Border Spacing + * @see https://tailwindcss.com/docs/border-spacing + */ + "border-spacing": [{ + "border-spacing": [a] + }], + /** + * Border Spacing X + * @see https://tailwindcss.com/docs/border-spacing + */ + "border-spacing-x": [{ + "border-spacing-x": [a] + }], + /** + * Border Spacing Y + * @see https://tailwindcss.com/docs/border-spacing + */ + "border-spacing-y": [{ + "border-spacing-y": [a] + }], + /** + * Table Layout + * @see https://tailwindcss.com/docs/table-layout + */ + "table-layout": [{ + table: ["auto", "fixed"] + }], + /** + * Caption Side + * @see https://tailwindcss.com/docs/caption-side + */ + caption: [{ + caption: ["top", "bottom"] + }], + // Transitions and Animation + /** + * Tranisition Property + * @see https://tailwindcss.com/docs/transition-property + */ + transition: [{ + transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", Xe] + }], + /** + * Transition Duration + * @see https://tailwindcss.com/docs/transition-duration + */ + duration: [{ + duration: Y() + }], + /** + * Transition Timing Function + * @see https://tailwindcss.com/docs/transition-timing-function + */ + ease: [{ + ease: ["linear", "in", "out", "in-out", Xe] + }], + /** + * Transition Delay + * @see https://tailwindcss.com/docs/transition-delay + */ + delay: [{ + delay: Y() + }], + /** + * Animation + * @see https://tailwindcss.com/docs/animation + */ + animate: [{ + animate: ["none", "spin", "ping", "pulse", "bounce", Xe] + }], + // Transforms + /** + * Transform + * @see https://tailwindcss.com/docs/transform + */ + transform: [{ + transform: ["", "gpu", "none"] + }], + /** + * Scale + * @see https://tailwindcss.com/docs/scale + */ + scale: [{ + scale: [A] + }], + /** + * Scale X + * @see https://tailwindcss.com/docs/scale + */ + "scale-x": [{ + "scale-x": [A] + }], + /** + * Scale Y + * @see https://tailwindcss.com/docs/scale + */ + "scale-y": [{ + "scale-y": [A] + }], + /** + * Rotate + * @see https://tailwindcss.com/docs/rotate + */ + rotate: [{ + rotate: [mu, Xe] + }], + /** + * Translate X + * @see https://tailwindcss.com/docs/translate + */ + "translate-x": [{ + "translate-x": [C] + }], + /** + * Translate Y + * @see https://tailwindcss.com/docs/translate + */ + "translate-y": [{ + "translate-y": [C] + }], + /** + * Skew X + * @see https://tailwindcss.com/docs/skew + */ + "skew-x": [{ + "skew-x": [O] + }], + /** + * Skew Y + * @see https://tailwindcss.com/docs/skew + */ + "skew-y": [{ + "skew-y": [O] + }], + /** + * Transform Origin + * @see https://tailwindcss.com/docs/transform-origin + */ + "transform-origin": [{ + origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", Xe] + }], + // Interactivity + /** + * Accent Color + * @see https://tailwindcss.com/docs/accent-color + */ + accent: [{ + accent: ["auto", e] + }], + /** + * Appearance + * @see https://tailwindcss.com/docs/appearance + */ + appearance: [{ + appearance: ["none", "auto"] + }], + /** + * Cursor + * @see https://tailwindcss.com/docs/cursor + */ + cursor: [{ + cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", Xe] + }], + /** + * Caret Color + * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities + */ + "caret-color": [{ + caret: [e] + }], + /** + * Pointer Events + * @see https://tailwindcss.com/docs/pointer-events + */ + "pointer-events": [{ + "pointer-events": ["none", "auto"] + }], + /** + * Resize + * @see https://tailwindcss.com/docs/resize + */ + resize: [{ + resize: ["none", "y", "x", ""] + }], + /** + * Scroll Behavior + * @see https://tailwindcss.com/docs/scroll-behavior + */ + "scroll-behavior": [{ + scroll: ["auto", "smooth"] + }], + /** + * Scroll Margin + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-m": [{ + "scroll-m": N() + }], + /** + * Scroll Margin X + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mx": [{ + "scroll-mx": N() + }], + /** + * Scroll Margin Y + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-my": [{ + "scroll-my": N() + }], + /** + * Scroll Margin Start + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-ms": [{ + "scroll-ms": N() + }], + /** + * Scroll Margin End + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-me": [{ + "scroll-me": N() + }], + /** + * Scroll Margin Top + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mt": [{ + "scroll-mt": N() + }], + /** + * Scroll Margin Right + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mr": [{ + "scroll-mr": N() + }], + /** + * Scroll Margin Bottom + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mb": [{ + "scroll-mb": N() + }], + /** + * Scroll Margin Left + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-ml": [{ + "scroll-ml": N() + }], + /** + * Scroll Padding + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-p": [{ + "scroll-p": N() + }], + /** + * Scroll Padding X + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-px": [{ + "scroll-px": N() + }], + /** + * Scroll Padding Y + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-py": [{ + "scroll-py": N() + }], + /** + * Scroll Padding Start + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-ps": [{ + "scroll-ps": N() + }], + /** + * Scroll Padding End + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pe": [{ + "scroll-pe": N() + }], + /** + * Scroll Padding Top + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pt": [{ + "scroll-pt": N() + }], + /** + * Scroll Padding Right + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pr": [{ + "scroll-pr": N() + }], + /** + * Scroll Padding Bottom + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pb": [{ + "scroll-pb": N() + }], + /** + * Scroll Padding Left + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pl": [{ + "scroll-pl": N() + }], + /** + * Scroll Snap Align + * @see https://tailwindcss.com/docs/scroll-snap-align + */ + "snap-align": [{ + snap: ["start", "end", "center", "align-none"] + }], + /** + * Scroll Snap Stop + * @see https://tailwindcss.com/docs/scroll-snap-stop + */ + "snap-stop": [{ + snap: ["normal", "always"] + }], + /** + * Scroll Snap Type + * @see https://tailwindcss.com/docs/scroll-snap-type + */ + "snap-type": [{ + snap: ["none", "x", "y", "both"] + }], + /** + * Scroll Snap Type Strictness + * @see https://tailwindcss.com/docs/scroll-snap-type + */ + "snap-strictness": [{ + snap: ["mandatory", "proximity"] + }], + /** + * Touch Action + * @see https://tailwindcss.com/docs/touch-action + */ + touch: [{ + touch: ["auto", "none", "manipulation"] + }], + /** + * Touch Action X + * @see https://tailwindcss.com/docs/touch-action + */ + "touch-x": [{ + "touch-pan": ["x", "left", "right"] + }], + /** + * Touch Action Y + * @see https://tailwindcss.com/docs/touch-action + */ + "touch-y": [{ + "touch-pan": ["y", "up", "down"] + }], + /** + * Touch Action Pinch Zoom + * @see https://tailwindcss.com/docs/touch-action + */ + "touch-pz": ["touch-pinch-zoom"], + /** + * User Select + * @see https://tailwindcss.com/docs/user-select + */ + select: [{ + select: ["none", "text", "all", "auto"] + }], + /** + * Will Change + * @see https://tailwindcss.com/docs/will-change + */ + "will-change": [{ + "will-change": ["auto", "scroll", "contents", "transform", Xe] + }], + // SVG + /** + * Fill + * @see https://tailwindcss.com/docs/fill + */ + fill: [{ + fill: [e, "none"] + }], + /** + * Stroke Width + * @see https://tailwindcss.com/docs/stroke-width + */ + "stroke-w": [{ + stroke: [mo, ua, Rv] + }], + /** + * Stroke + * @see https://tailwindcss.com/docs/stroke + */ + stroke: [{ + stroke: [e, "none"] + }], + // Accessibility + /** + * Screen Readers + * @see https://tailwindcss.com/docs/screen-readers + */ + sr: ["sr-only", "not-sr-only"], + /** + * Forced Color Adjust + * @see https://tailwindcss.com/docs/forced-color-adjust + */ + "forced-color-adjust": [{ + "forced-color-adjust": ["auto", "none"] + }] + }, + conflictingClassGroups: { + overflow: ["overflow-x", "overflow-y"], + overscroll: ["overscroll-x", "overscroll-y"], + inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"], + "inset-x": ["right", "left"], + "inset-y": ["top", "bottom"], + flex: ["basis", "grow", "shrink"], + gap: ["gap-x", "gap-y"], + p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"], + px: ["pr", "pl"], + py: ["pt", "pb"], + m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"], + mx: ["mr", "ml"], + my: ["mt", "mb"], + size: ["w", "h"], + "font-size": ["leading"], + "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"], + "fvn-ordinal": ["fvn-normal"], + "fvn-slashed-zero": ["fvn-normal"], + "fvn-figure": ["fvn-normal"], + "fvn-spacing": ["fvn-normal"], + "fvn-fraction": ["fvn-normal"], + "line-clamp": ["display", "overflow"], + rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"], + "rounded-s": ["rounded-ss", "rounded-es"], + "rounded-e": ["rounded-se", "rounded-ee"], + "rounded-t": ["rounded-tl", "rounded-tr"], + "rounded-r": ["rounded-tr", "rounded-br"], + "rounded-b": ["rounded-br", "rounded-bl"], + "rounded-l": ["rounded-tl", "rounded-bl"], + "border-spacing": ["border-spacing-x", "border-spacing-y"], + "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"], + "border-w-x": ["border-w-r", "border-w-l"], + "border-w-y": ["border-w-t", "border-w-b"], + "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"], + "border-color-x": ["border-color-r", "border-color-l"], + "border-color-y": ["border-color-t", "border-color-b"], + "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"], + "scroll-mx": ["scroll-mr", "scroll-ml"], + "scroll-my": ["scroll-mt", "scroll-mb"], + "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"], + "scroll-px": ["scroll-pr", "scroll-pl"], + "scroll-py": ["scroll-pt", "scroll-pb"], + touch: ["touch-x", "touch-y", "touch-pz"], + "touch-x": ["touch"], + "touch-y": ["touch"], + "touch-pz": ["touch"] + }, + conflictingClassGroupModifiers: { + "font-size": ["leading"] + } + }; +}, sK = /* @__PURE__ */ z8(aK); +function $$(e) { + var t, n, r = ""; + if (typeof e == "string" || typeof e == "number") r += e; + else if (typeof e == "object") if (Array.isArray(e)) { + var i = e.length; + for (t = 0; t < i; t++) e[t] && (n = $$(e[t])) && (r && (r += " "), r += n); + } else for (n in e) e[n] && (r && (r += " "), r += n); + return r; +} +function Ye() { + for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = $$(e)) && (r && (r += " "), r += t); + return r; +} +const G = (...e) => sK(Ye(...e)), rf = (...e) => (...t) => e.forEach((n) => n == null ? void 0 : n(...t)), Km = (e) => { + const t = { + 0: "gap-0", + xxs: "gap-1", + xs: "gap-2", + sm: "gap-3", + md: "gap-4", + lg: "gap-5", + xl: "gap-6", + "2xl": "gap-8" + }; + return t[e] || t.md; +}, lK = { + 1: "grid-cols-1", + 2: "grid-cols-2", + 3: "grid-cols-3", + 4: "grid-cols-4", + 5: "grid-cols-5", + 6: "grid-cols-6", + 7: "grid-cols-7", + 8: "grid-cols-8", + 9: "grid-cols-9", + 10: "grid-cols-10", + 11: "grid-cols-11", + 12: "grid-cols-12" +}, cK = () => { + var i, o; + const e = ((o = (i = window.navigator) == null ? void 0 : i.userAgentData) == null ? void 0 : o.platform) || window.navigator.platform, t = [ + "macOS", + "Macintosh", + "MacIntel", + "MacPPC", + "Mac68K" + ], n = ["Win32", "Win64", "Windows", "WinCE"]; + let r = "null"; + return t.includes(e) ? r = "Mac OS" : n.includes(e) && (r = "Windows"), r; +}, sr = $t( + (e, t) => { + const { + variant: n = "primary", + // primary, secondary, outline, ghost, link + size: r = "md", + // xs, sm, md, lg + type: i = "button", + tag: o = "button", + className: a, + children: s, + disabled: l = !1, + destructive: c = !1, + // true, false + icon: f = null, + // icon component + iconPosition: d = "left", + // left, right, + loading: p = !1, + ...m + } = e, g = "outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled", v = p ? "opacity-50 disabled:cursor-not-allowed" : "", y = { + primary: "text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled", + secondary: "text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled", + outline: "text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled", + ghost: "text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover", + link: "outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none" + }[n], x = c && !l ? { + primary: "bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover", + secondary: "bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover", + outline: "text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error", + ghost: "text-button-danger hover:bg-field-background-error", + link: "text-button-danger hover:text-button-danger-secondary" + }[n] : "", w = { + xs: "p-1 rounded [&>svg]:size-4", + sm: "p-2 rounded [&>svg]:size-4 gap-0.5", + md: "p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1", + lg: "p-3 rounded-lg text-base [&>svg]:size-6 gap-1" + }[r]; + let S, A = null, _ = ""; + return f && (_ = "flex items-center justify-center", d === "left" ? S = f : A = f), /* @__PURE__ */ ge( + o, + { + ref: t, + type: i, + className: G( + _, + g, + w, + y, + x, + v, + { + "cursor-default": l + }, + a + ), + disabled: l, + ...m, + children: [ + S, + s ? /* @__PURE__ */ k("span", { className: "px-1", children: s }) : null, + A + ] + } + ); + } +), uK = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; +let La = (e = 21) => { + let t = "", n = crypto.getRandomValues(new Uint8Array(e)); + for (; e--; ) + t += uK[n[e] & 63]; + return t; +}; +const fK = ({ + label: e, + switchId: t, + disabled: n = !1, + children: r, + size: i +}) => { + const o = { + sm: "text-sm leading-4 font-medium", + md: "text-base leading-5 font-medium", + lg: "text-lg leading-6 font-medium" + }; + if (ht(e)) + return /* @__PURE__ */ ge( + "div", + { + className: G("inline-flex items-center gap-3", "items-start"), + children: [ + r, + e + ] + } + ); + const s = () => { + const { heading: f = "", description: d = "" } = e || {}; + return /* @__PURE__ */ ge("div", { className: "space-y-1.5", children: [ + f && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-primary m-0", + // text-base font-medium leading-4 + o[i], + n && "text-text-disabled" + ), + children: f + } + ), + d && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-secondary text-sm font-normal leading-5 m-0", + n && "text-text-disabled" + ), + children: d + } + ) + ] }); + }, l = !(e != null && e.heading) && !(e != null && e.description), c = !(e != null && e.heading) || !(e != null && e.description) ? "items-center" : "items-start"; + return l ? r : /* @__PURE__ */ ge("div", { className: G("inline-flex", c, "gap-3"), children: [ + r, + /* @__PURE__ */ k( + "label", + { + htmlFor: t, + className: G(!n && "cursor-pointer"), + children: s() + } + ) + ] }); +}, dK = ({ + id: e, + onChange: t, + value: n, + defaultValue: r = !1, + size: i = "lg", + disabled: o = !1, + label: a = { heading: "", description: "" }, + name: s, + className: l, + ...c +}, f) => { + const d = ze(() => typeof n < "u", [n]), p = ze(() => e || `switch-${La()}`, []), [m, g] = We(r), v = "primary", y = nt( + () => d ? n : m, + [d, n, m] + ), x = (_) => { + if (o) + return; + const O = _.target.checked; + d || g(O), typeof t == "function" && t(O); + }, w = { + primary: { + input: "bg-toggle-off hover:bg-toggle-off-hover checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-4 checked:hover:bg-toggle-on border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border", + toggleDial: "bg-toggle-dial-background shadow-toggleDial" + } + }, S = { + lg: { + container: "w-11 h-6", + toggleDial: "size-4 peer-checked:translate-x-5" + }, + md: { + container: "w-10 h-5", + toggleDial: "size-3 peer-checked:translate-x-5" + }, + sm: { + container: "w-8 h-4", + toggleDial: "size-2.5 peer-checked:translate-x-3.5" + } + }, A = { + input: "bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled", + toggleDial: "peer-disabled:cursor-not-allowed" + }; + return /* @__PURE__ */ k( + fK, + { + label: a, + switchId: p, + disabled: o, + size: i, + children: /* @__PURE__ */ ge( + "div", + { + className: G( + "relative inline-block cursor-pointer rounded-full shrink-0", + S[i].container, + l + ), + children: [ + /* @__PURE__ */ k( + "input", + { + ref: f, + id: p, + type: "checkbox", + className: G( + "peer appearance-none absolute bg-blue-gray-100 rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]", + w[v].input, + o && A.input + ), + checked: y(), + onChange: x, + disabled: o, + name: s, + ...c + } + ), + /* @__PURE__ */ k( + "label", + { + htmlFor: p, + className: G( + "bg-white border border-blue-gray-100 rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 left-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 before:left-2/4 before:-translate-y-2/4 before:-translate-x-2/4", + S[i].toggleDial, + w[v].toggleDial, + o && A.toggleDial + ) + } + ) + ] + } + ) + } + ); +}, D$ = $t(dK); +D$.displayName = "Switch"; +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const hK = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), I$ = (...e) => e.filter((t, n, r) => !!t && r.indexOf(t) === n).join(" "); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +var pK = { + xmlns: "http://www.w3.org/2000/svg", + width: 24, + height: 24, + viewBox: "0 0 24 24", + fill: "none", + stroke: "currentColor", + strokeWidth: 2, + strokeLinecap: "round", + strokeLinejoin: "round" +}; +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const mK = $t( + ({ + color: e = "currentColor", + size: t = 24, + strokeWidth: n = 2, + absoluteStrokeWidth: r, + className: i = "", + children: o, + iconNode: a, + ...s + }, l) => Vl( + "svg", + { + ref: l, + ...pK, + width: t, + height: t, + stroke: e, + strokeWidth: r ? Number(n) * 24 / Number(t) : n, + className: I$("lucide", i), + ...s + }, + [ + ...a.map(([c, f]) => Vl(c, f)), + ...Array.isArray(o) ? o : [o] + ] + ) +); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const $n = (e, t) => { + const n = $t( + ({ className: r, ...i }, o) => Vl(mK, { + ref: o, + iconNode: t, + className: I$(`lucide-${hK(e)}`, r), + ...i + }) + ); + return n.displayName = `${e}`, n; +}; +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const td = $n("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const Ww = $n("ChevronDown", [ + ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const R$ = $n("ChevronLeft", [ + ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const zw = $n("ChevronRight", [ + ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const gK = $n("ChevronsUpDown", [ + ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }], + ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const yK = $n("Ellipsis", [ + ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }], + ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }], + ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const r0 = $n("Info", [ + ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], + ["path", { d: "M12 16v-4", key: "1dtifu" }], + ["path", { d: "M12 8h.01", key: "e9boi3" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const vK = $n("LoaderCircle", [ + ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const j$ = $n("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const bK = $n("PanelLeftClose", [ + ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }], + ["path", { d: "M9 3v18", key: "fh3hqa" }], + ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const xK = $n("PanelLeftOpen", [ + ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }], + ["path", { d: "M9 3v18", key: "fh3hqa" }], + ["path", { d: "m14 9 3 3-3 3", key: "8010ee" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const L$ = $n("Plus", [ + ["path", { d: "M5 12h14", key: "1ays0h" }], + ["path", { d: "M12 5v14", key: "s699le" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const B$ = $n("Search", [ + ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }], + ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const wK = $n("Trash2", [ + ["path", { d: "M3 6h18", key: "d0wm0j" }], + ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }], + ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }], + ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }], + ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const _K = $n("TriangleAlert", [ + [ + "path", + { + d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3", + key: "wmoenq" + } + ], + ["path", { d: "M12 9v4", key: "juzpu7" }], + ["path", { d: "M12 17h.01", key: "p32p05" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const rP = $n("Upload", [ + ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }], + ["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }], + ["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const SK = $n("User", [ + ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }], + ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const Ca = $n("X", [ + ["path", { d: "M18 6 6 18", key: "1bl5f8" }], + ["path", { d: "m6 6 12 12", key: "d8bk6v" }] +]), OK = ({ + id: e, + label: t, + defaultChecked: n = !1, + checked: r, + onChange: i, + indeterminate: o, + disabled: a, + size: s = "md", + className: l, + ...c +}, f) => { + var O, T; + const d = ze(() => e || `checkbox-${La()}`, [e]), p = ze( + () => typeof r < "u", + [r] + ), [m, g] = We(n || !1), v = "primary", y = { + sm: { + checkbox: "size-4 rounded gap-1", + icon: "size-3", + text: "text-sm", + // text class for sm + description: "text-xs", + gap: "gap-0.5" + }, + md: { + checkbox: "size-5 rounded gap-1", + icon: "size-4", + text: "text-base", + // text class for md + description: "text-sm", + gap: "gap-1" + } + }, x = { + primary: { + checkbox: "border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus", + icon: "text-white" + } + }, w = { + checkbox: "cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled", + icon: "cursor-not-allowed peer-disabled:text-border-disabled" + }, S = nt( + () => p ? r : m, + [p, r, m] + ), A = (C) => { + if (a) + return; + const E = C.target.checked; + p || g(E), typeof i == "function" && i(E); + }, _ = nt(() => ht(t) ? t : !(t != null && t.heading) && !(t != null && t.description) ? null : /* @__PURE__ */ ge("div", { className: y[s].gap, children: [ + (t == null ? void 0 : t.heading) && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-primary font-medium leading-4 m-0", + y[s].text, + y[s].gap, + a && "text-text-disabled" + ), + children: t == null ? void 0 : t.heading + } + ), + (t == null ? void 0 : t.description) && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-secondary font-normal leading-5 m-0", + y[s].description, + a && "text-text-disabled" + ), + children: t == null ? void 0 : t.description + } + ) + ] }), [t, s, a]); + return /* @__PURE__ */ ge( + "div", + { + className: G( + "inline-flex items-center gap-2", + !!t && "items-start", + a && "cursor-not-allowed" + ), + children: [ + /* @__PURE__ */ ge( + "label", + { + className: G( + "relative flex items-center rounded-full p-0.5", + !a && "cursor-pointer" + ), + htmlFor: d, + children: [ + /* @__PURE__ */ k( + "input", + { + ref: f, + id: d, + type: "checkbox", + className: G( + "peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid", + x[v].checkbox, + y[s].checkbox, + a && w.checkbox, + l + ), + checked: S(), + onChange: A, + disabled: a, + ...c + } + ), + /* @__PURE__ */ k( + "span", + { + className: G( + "pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100", + x[v].icon, + a && w.icon + ), + children: o ? /* @__PURE__ */ k(j$, { className: G((O = y[s]) == null ? void 0 : O.icon) }) : /* @__PURE__ */ k(td, { className: G((T = y[s]) == null ? void 0 : T.icon) }) + } + ) + ] + } + ), + !!t && /* @__PURE__ */ k( + "label", + { + className: G( + "cursor-pointer", + a && "cursor-not-allowed" + ), + htmlFor: d, + children: _() + } + ) + ] + } + ); +}, AK = $t(OK); +AK.displayName = "Checkbox"; +const iP = { + primary: { + checkbox: "border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus", + icon: "text-white" + } +}, oP = { + checkbox: "disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed", + icon: "peer-disabled:text-border-disabled cursor-not-allowed" +}, PK = { + sm: "text-sm leading-5", + md: "text-base leading-6" +}, jv = { + sm: { + checkbox: "size-4", + icon: "size-1.5", + info: "size-4" + }, + md: { + checkbox: "size-5", + icon: "size-2", + info: "size-5" + } +}, aP = { + sm: { + switch: "mt-1", + radio: "mt-0.5" + }, + md: { + switch: "mt-0.5", + radio: "mt-px" + } +}, TK = { + xs: "py-1 px-1 text-sm gap-0.5 [&>svg]:size-4", + sm: "py-1 px-1.5 text-base gap-1 [&>svg]:size-4", + md: "py-2 px-2.5 text-base gap-1 [&>svg]:size-5", + lg: "py-2.5 px-3 text-base gap-1 [&>svg]:size-6" +}, CK = "border-0 border-r border-border-subtle border-solid", EK = "bg-background-primary text-primary cursor-pointer flex items-center justify-center", kK = "hover:bg-button-tertiary-hover", MK = "focus:outline-none"; +function Hm() { + return typeof window < "u"; +} +function Ba(e) { + return F$(e) ? (e.nodeName || "").toLowerCase() : "#document"; +} +function Or(e) { + var t; + return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window; +} +function to(e) { + var t; + return (t = (F$(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement; +} +function F$(e) { + return Hm() ? e instanceof Node || e instanceof Or(e).Node : !1; +} +function Tt(e) { + return Hm() ? e instanceof Element || e instanceof Or(e).Element : !1; +} +function dn(e) { + return Hm() ? e instanceof HTMLElement || e instanceof Or(e).HTMLElement : !1; +} +function i0(e) { + return !Hm() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Or(e).ShadowRoot; +} +function nd(e) { + const { + overflow: t, + overflowX: n, + overflowY: r, + display: i + } = Ur(e); + return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(i); +} +function NK(e) { + return ["table", "td", "th"].includes(Ba(e)); +} +function Gm(e) { + return [":popover-open", ":modal"].some((t) => { + try { + return e.matches(t); + } catch { + return !1; + } + }); +} +function Vw(e) { + const t = Ym(), n = Tt(e) ? Ur(e) : e; + return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r)); +} +function $K(e) { + let t = Ro(e); + for (; dn(t) && !Ea(t); ) { + if (Vw(t)) + return t; + if (Gm(t)) + return null; + t = Ro(t); + } + return null; +} +function Ym() { + return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none"); +} +function Ea(e) { + return ["html", "body", "#document"].includes(Ba(e)); +} +function Ur(e) { + return Or(e).getComputedStyle(e); +} +function qm(e) { + return Tt(e) ? { + scrollLeft: e.scrollLeft, + scrollTop: e.scrollTop + } : { + scrollLeft: e.scrollX, + scrollTop: e.scrollY + }; +} +function Ro(e) { + if (Ba(e) === "html") + return e; + const t = ( + // Step into the shadow DOM of the parent of a slotted node. + e.assignedSlot || // DOM Element detected. + e.parentNode || // ShadowRoot detected. + i0(e) && e.host || // Fallback. + to(e) + ); + return i0(t) ? t.host : t; +} +function W$(e) { + const t = Ro(e); + return Ea(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : dn(t) && nd(t) ? t : W$(t); +} +function Oa(e, t, n) { + var r; + t === void 0 && (t = []), n === void 0 && (n = !0); + const i = W$(e), o = i === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Or(i); + if (o) { + const s = o0(a); + return t.concat(a, a.visualViewport || [], nd(i) ? i : [], s && n ? Oa(s) : []); + } + return t.concat(i, Oa(i, [], n)); +} +function o0(e) { + return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null; +} +function Oi(e) { + let t = e.activeElement; + for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) { + var n; + t = t.shadowRoot.activeElement; + } + return t; +} +function fn(e, t) { + if (!e || !t) + return !1; + const n = t.getRootNode == null ? void 0 : t.getRootNode(); + if (e.contains(t)) + return !0; + if (n && i0(n)) { + let r = t; + for (; r; ) { + if (e === r) + return !0; + r = r.parentNode || r.host; + } + } + return !1; +} +function z$() { + const e = navigator.userAgentData; + return e != null && e.platform ? e.platform : navigator.platform; +} +function V$() { + const e = navigator.userAgentData; + return e && Array.isArray(e.brands) ? e.brands.map((t) => { + let { + brand: n, + version: r + } = t; + return n + "/" + r; + }).join(" ") : navigator.userAgent; +} +function U$(e) { + return e.mozInputSource === 0 && e.isTrusted ? !0 : a0() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType; +} +function Uw(e) { + return DK() ? !1 : !a0() && e.width === 0 && e.height === 0 || a0() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height. + e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch"; +} +function Kw() { + return /apple/i.test(navigator.vendor); +} +function a0() { + const e = /android/i; + return e.test(z$()) || e.test(V$()); +} +function K$() { + return z$().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints; +} +function DK() { + return V$().includes("jsdom/"); +} +function of(e, t) { + const n = ["mouse", "pen"]; + return t || n.push("", void 0), n.includes(e); +} +function IK(e) { + return "nativeEvent" in e; +} +function RK(e) { + return e.matches("html,body"); +} +function Vn(e) { + return (e == null ? void 0 : e.ownerDocument) || document; +} +function Lv(e, t) { + if (t == null) + return !1; + if ("composedPath" in e) + return e.composedPath().includes(t); + const n = e; + return n.target != null && t.contains(n.target); +} +function wo(e) { + return "composedPath" in e ? e.composedPath()[0] : e.target; +} +const jK = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"; +function Hw(e) { + return dn(e) && e.matches(jK); +} +function zn(e) { + e.preventDefault(), e.stopPropagation(); +} +function s0(e) { + return e ? e.getAttribute("role") === "combobox" && Hw(e) : !1; +} +const ka = Math.min, Br = Math.max, ap = Math.round, Sl = Math.floor, Ui = (e) => ({ + x: e, + y: e +}), LK = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" +}, BK = { + start: "end", + end: "start" +}; +function l0(e, t, n) { + return Br(e, ka(t, n)); +} +function Tc(e, t) { + return typeof e == "function" ? e(t) : e; +} +function Ma(e) { + return e.split("-")[0]; +} +function Cc(e) { + return e.split("-")[1]; +} +function H$(e) { + return e === "x" ? "y" : "x"; +} +function Gw(e) { + return e === "y" ? "height" : "width"; +} +function Ms(e) { + return ["top", "bottom"].includes(Ma(e)) ? "y" : "x"; +} +function Yw(e) { + return H$(Ms(e)); +} +function FK(e, t, n) { + n === void 0 && (n = !1); + const r = Cc(e), i = Yw(e), o = Gw(i); + let a = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top"; + return t.reference[o] > t.floating[o] && (a = sp(a)), [a, sp(a)]; +} +function WK(e) { + const t = sp(e); + return [c0(e), t, c0(t)]; +} +function c0(e) { + return e.replace(/start|end/g, (t) => BK[t]); +} +function zK(e, t, n) { + const r = ["left", "right"], i = ["right", "left"], o = ["top", "bottom"], a = ["bottom", "top"]; + switch (e) { + case "top": + case "bottom": + return n ? t ? i : r : t ? r : i; + case "left": + case "right": + return t ? o : a; + default: + return []; + } +} +function VK(e, t, n, r) { + const i = Cc(e); + let o = zK(Ma(e), n === "start", r); + return i && (o = o.map((a) => a + "-" + i), t && (o = o.concat(o.map(c0)))), o; +} +function sp(e) { + return e.replace(/left|right|bottom|top/g, (t) => LK[t]); +} +function UK(e) { + return { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...e + }; +} +function G$(e) { + return typeof e != "number" ? UK(e) : { + top: e, + right: e, + bottom: e, + left: e + }; +} +function lp(e) { + const { + x: t, + y: n, + width: r, + height: i + } = e; + return { + width: r, + height: i, + top: n, + left: t, + right: t + r, + bottom: n + i, + x: t, + y: n + }; +} +/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/ +var KK = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], cp = /* @__PURE__ */ KK.join(","), Y$ = typeof Element > "u", Ul = Y$ ? function() { +} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, up = !Y$ && Element.prototype.getRootNode ? function(e) { + var t; + return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e); +} : function(e) { + return e == null ? void 0 : e.ownerDocument; +}, fp = function e(t, n) { + var r; + n === void 0 && (n = !0); + var i = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), o = i === "" || i === "true", a = o || n && t && e(t.parentNode); + return a; +}, HK = function(t) { + var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable"); + return r === "" || r === "true"; +}, GK = function(t, n, r) { + if (fp(t)) + return []; + var i = Array.prototype.slice.apply(t.querySelectorAll(cp)); + return n && Ul.call(t, cp) && i.unshift(t), i = i.filter(r), i; +}, YK = function e(t, n, r) { + for (var i = [], o = Array.from(t); o.length; ) { + var a = o.shift(); + if (!fp(a, !1)) + if (a.tagName === "SLOT") { + var s = a.assignedElements(), l = s.length ? s : a.children, c = e(l, !0, r); + r.flatten ? i.push.apply(i, c) : i.push({ + scopeParent: a, + candidates: c + }); + } else { + var f = Ul.call(a, cp); + f && r.filter(a) && (n || !t.includes(a)) && i.push(a); + var d = a.shadowRoot || // check for an undisclosed shadow + typeof r.getShadowRoot == "function" && r.getShadowRoot(a), p = !fp(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(a)); + if (d && p) { + var m = e(d === !0 ? a.children : d.children, !0, r); + r.flatten ? i.push.apply(i, m) : i.push({ + scopeParent: a, + candidates: m + }); + } else + o.unshift.apply(o, a.children); + } + } + return i; +}, q$ = function(t) { + return !isNaN(parseInt(t.getAttribute("tabindex"), 10)); +}, X$ = function(t) { + if (!t) + throw new Error("No node provided"); + return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || HK(t)) && !q$(t) ? 0 : t.tabIndex; +}, qK = function(t, n) { + var r = X$(t); + return r < 0 && n && !q$(t) ? 0 : r; +}, XK = function(t, n) { + return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex; +}, Z$ = function(t) { + return t.tagName === "INPUT"; +}, ZK = function(t) { + return Z$(t) && t.type === "hidden"; +}, JK = function(t) { + var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) { + return r.tagName === "SUMMARY"; + }); + return n; +}, QK = function(t, n) { + for (var r = 0; r < t.length; r++) + if (t[r].checked && t[r].form === n) + return t[r]; +}, eH = function(t) { + if (!t.name) + return !0; + var n = t.form || up(t), r = function(s) { + return n.querySelectorAll('input[type="radio"][name="' + s + '"]'); + }, i; + if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function") + i = r(window.CSS.escape(t.name)); + else + try { + i = r(t.name); + } catch (a) { + return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", a.message), !1; + } + var o = QK(i, t.form); + return !o || o === t; +}, tH = function(t) { + return Z$(t) && t.type === "radio"; +}, nH = function(t) { + return tH(t) && !eH(t); +}, rH = function(t) { + var n, r = t && up(t), i = (n = r) === null || n === void 0 ? void 0 : n.host, o = !1; + if (r && r !== t) { + var a, s, l; + for (o = !!((a = i) !== null && a !== void 0 && (s = a.ownerDocument) !== null && s !== void 0 && s.contains(i) || t != null && (l = t.ownerDocument) !== null && l !== void 0 && l.contains(t)); !o && i; ) { + var c, f, d; + r = up(i), i = (c = r) === null || c === void 0 ? void 0 : c.host, o = !!((f = i) !== null && f !== void 0 && (d = f.ownerDocument) !== null && d !== void 0 && d.contains(i)); + } + } + return o; +}, sP = function(t) { + var n = t.getBoundingClientRect(), r = n.width, i = n.height; + return r === 0 && i === 0; +}, iH = function(t, n) { + var r = n.displayCheck, i = n.getShadowRoot; + if (getComputedStyle(t).visibility === "hidden") + return !0; + var o = Ul.call(t, "details>summary:first-of-type"), a = o ? t.parentElement : t; + if (Ul.call(a, "details:not([open]) *")) + return !0; + if (!r || r === "full" || r === "legacy-full") { + if (typeof i == "function") { + for (var s = t; t; ) { + var l = t.parentElement, c = up(t); + if (l && !l.shadowRoot && i(l) === !0) + return sP(t); + t.assignedSlot ? t = t.assignedSlot : !l && c !== t.ownerDocument ? t = c.host : t = l; + } + t = s; + } + if (rH(t)) + return !t.getClientRects().length; + if (r !== "legacy-full") + return !0; + } else if (r === "non-zero-area") + return sP(t); + return !1; +}, oH = function(t) { + if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName)) + for (var n = t.parentElement; n; ) { + if (n.tagName === "FIELDSET" && n.disabled) { + for (var r = 0; r < n.children.length; r++) { + var i = n.children.item(r); + if (i.tagName === "LEGEND") + return Ul.call(n, "fieldset[disabled] *") ? !0 : !i.contains(t); + } + return !0; + } + n = n.parentElement; + } + return !1; +}, aH = function(t, n) { + return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor + // because we're limited in the type of selectors we can use in JSDom (see related + // note related to `candidateSelectors`) + fp(n) || ZK(n) || iH(n, t) || // For a details element with a summary, the summary element gets the focus + JK(n) || oH(n)); +}, u0 = function(t, n) { + return !(nH(n) || X$(n) < 0 || !aH(t, n)); +}, sH = function(t) { + var n = parseInt(t.getAttribute("tabindex"), 10); + return !!(isNaN(n) || n >= 0); +}, lH = function e(t) { + var n = [], r = []; + return t.forEach(function(i, o) { + var a = !!i.scopeParent, s = a ? i.scopeParent : i, l = qK(s, a), c = a ? e(i.candidates) : s; + l === 0 ? a ? n.push.apply(n, c) : n.push(s) : r.push({ + documentOrder: o, + tabIndex: l, + item: i, + isScope: a, + content: c + }); + }), r.sort(XK).reduce(function(i, o) { + return o.isScope ? i.push.apply(i, o.content) : i.push(o.content), i; + }, []).concat(n); +}, Xm = function(t, n) { + n = n || {}; + var r; + return n.getShadowRoot ? r = YK([t], n.includeContainer, { + filter: u0.bind(null, n), + flatten: !1, + getShadowRoot: n.getShadowRoot, + shadowRootFilter: sH + }) : r = GK(t, n.includeContainer, u0.bind(null, n)), lH(r); +}, cH = function(t, n) { + if (n = n || {}, !t) + throw new Error("No node provided"); + return Ul.call(t, cp) === !1 ? !1 : u0(n, t); +}; +function lP(e, t, n) { + let { + reference: r, + floating: i + } = e; + const o = Ms(t), a = Yw(t), s = Gw(a), l = Ma(t), c = o === "y", f = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, p = r[s] / 2 - i[s] / 2; + let m; + switch (l) { + case "top": + m = { + x: f, + y: r.y - i.height + }; + break; + case "bottom": + m = { + x: f, + y: r.y + r.height + }; + break; + case "right": + m = { + x: r.x + r.width, + y: d + }; + break; + case "left": + m = { + x: r.x - i.width, + y: d + }; + break; + default: + m = { + x: r.x, + y: r.y + }; + } + switch (Cc(t)) { + case "start": + m[a] -= p * (n && c ? -1 : 1); + break; + case "end": + m[a] += p * (n && c ? -1 : 1); + break; + } + return m; +} +const uH = async (e, t, n) => { + const { + placement: r = "bottom", + strategy: i = "absolute", + middleware: o = [], + platform: a + } = n, s = o.filter(Boolean), l = await (a.isRTL == null ? void 0 : a.isRTL(t)); + let c = await a.getElementRects({ + reference: e, + floating: t, + strategy: i + }), { + x: f, + y: d + } = lP(c, r, l), p = r, m = {}, g = 0; + for (let v = 0; v < s.length; v++) { + const { + name: y, + fn: x + } = s[v], { + x: w, + y: S, + data: A, + reset: _ + } = await x({ + x: f, + y: d, + initialPlacement: r, + placement: p, + strategy: i, + middlewareData: m, + rects: c, + platform: a, + elements: { + reference: e, + floating: t + } + }); + f = w ?? f, d = S ?? d, m = { + ...m, + [y]: { + ...m[y], + ...A + } + }, _ && g <= 50 && (g++, typeof _ == "object" && (_.placement && (p = _.placement), _.rects && (c = _.rects === !0 ? await a.getElementRects({ + reference: e, + floating: t, + strategy: i + }) : _.rects), { + x: f, + y: d + } = lP(c, p, l)), v = -1); + } + return { + x: f, + y: d, + placement: p, + strategy: i, + middlewareData: m + }; +}; +async function qw(e, t) { + var n; + t === void 0 && (t = {}); + const { + x: r, + y: i, + platform: o, + rects: a, + elements: s, + strategy: l + } = e, { + boundary: c = "clippingAncestors", + rootBoundary: f = "viewport", + elementContext: d = "floating", + altBoundary: p = !1, + padding: m = 0 + } = Tc(t, e), g = G$(m), y = s[p ? d === "floating" ? "reference" : "floating" : d], x = lp(await o.getClippingRect({ + element: (n = await (o.isElement == null ? void 0 : o.isElement(y))) == null || n ? y : y.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)), + boundary: c, + rootBoundary: f, + strategy: l + })), w = d === "floating" ? { + x: r, + y: i, + width: a.floating.width, + height: a.floating.height + } : a.reference, S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(s.floating)), A = await (o.isElement == null ? void 0 : o.isElement(S)) ? await (o.getScale == null ? void 0 : o.getScale(S)) || { + x: 1, + y: 1 + } : { + x: 1, + y: 1 + }, _ = lp(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({ + elements: s, + rect: w, + offsetParent: S, + strategy: l + }) : w); + return { + top: (x.top - _.top + g.top) / A.y, + bottom: (_.bottom - x.bottom + g.bottom) / A.y, + left: (x.left - _.left + g.left) / A.x, + right: (_.right - x.right + g.right) / A.x + }; +} +const fH = (e) => ({ + name: "arrow", + options: e, + async fn(t) { + const { + x: n, + y: r, + placement: i, + rects: o, + platform: a, + elements: s, + middlewareData: l + } = t, { + element: c, + padding: f = 0 + } = Tc(e, t) || {}; + if (c == null) + return {}; + const d = G$(f), p = { + x: n, + y: r + }, m = Yw(i), g = Gw(m), v = await a.getDimensions(c), y = m === "y", x = y ? "top" : "left", w = y ? "bottom" : "right", S = y ? "clientHeight" : "clientWidth", A = o.reference[g] + o.reference[m] - p[m] - o.floating[g], _ = p[m] - o.reference[m], O = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c)); + let T = O ? O[S] : 0; + (!T || !await (a.isElement == null ? void 0 : a.isElement(O))) && (T = s.floating[S] || o.floating[g]); + const C = A / 2 - _ / 2, E = T / 2 - v[g] / 2 - 1, D = ka(d[x], E), $ = ka(d[w], E), N = D, F = T - v[g] - $, L = T / 2 - v[g] / 2 + C, W = l0(N, L, F), B = !l.arrow && Cc(i) != null && L !== W && o.reference[g] / 2 - (L < N ? D : $) - v[g] / 2 < 0, z = B ? L < N ? L - N : L - F : 0; + return { + [m]: p[m] + z, + data: { + [m]: W, + centerOffset: L - W - z, + ...B && { + alignmentOffset: z + } + }, + reset: B + }; + } +}), dH = function(e) { + return e === void 0 && (e = {}), { + name: "flip", + options: e, + async fn(t) { + var n, r; + const { + placement: i, + middlewareData: o, + rects: a, + initialPlacement: s, + platform: l, + elements: c + } = t, { + mainAxis: f = !0, + crossAxis: d = !0, + fallbackPlacements: p, + fallbackStrategy: m = "bestFit", + fallbackAxisSideDirection: g = "none", + flipAlignment: v = !0, + ...y + } = Tc(e, t); + if ((n = o.arrow) != null && n.alignmentOffset) + return {}; + const x = Ma(i), w = Ms(s), S = Ma(s) === s, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), _ = p || (S || !v ? [sp(s)] : WK(s)), O = g !== "none"; + !p && O && _.push(...VK(s, v, g, A)); + const T = [s, ..._], C = await qw(t, y), E = []; + let D = ((r = o.flip) == null ? void 0 : r.overflows) || []; + if (f && E.push(C[x]), d) { + const L = FK(i, a, A); + E.push(C[L[0]], C[L[1]]); + } + if (D = [...D, { + placement: i, + overflows: E + }], !E.every((L) => L <= 0)) { + var $, N; + const L = ((($ = o.flip) == null ? void 0 : $.index) || 0) + 1, W = T[L]; + if (W) + return { + data: { + index: L, + overflows: D + }, + reset: { + placement: W + } + }; + let B = (N = D.filter((z) => z.overflows[0] <= 0).sort((z, H) => z.overflows[1] - H.overflows[1])[0]) == null ? void 0 : N.placement; + if (!B) + switch (m) { + case "bestFit": { + var F; + const z = (F = D.filter((H) => { + if (O) { + const U = Ms(H.placement); + return U === w || // Create a bias to the `y` side axis due to horizontal + // reading directions favoring greater width. + U === "y"; + } + return !0; + }).map((H) => [H.placement, H.overflows.filter((U) => U > 0).reduce((U, K) => U + K, 0)]).sort((H, U) => H[1] - U[1])[0]) == null ? void 0 : F[0]; + z && (B = z); + break; + } + case "initialPlacement": + B = s; + break; + } + if (i !== B) + return { + reset: { + placement: B + } + }; + } + return {}; + } + }; +}; +async function hH(e, t) { + const { + placement: n, + platform: r, + elements: i + } = e, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), a = Ma(n), s = Cc(n), l = Ms(n) === "y", c = ["left", "top"].includes(a) ? -1 : 1, f = o && l ? -1 : 1, d = Tc(t, e); + let { + mainAxis: p, + crossAxis: m, + alignmentAxis: g + } = typeof d == "number" ? { + mainAxis: d, + crossAxis: 0, + alignmentAxis: null + } : { + mainAxis: d.mainAxis || 0, + crossAxis: d.crossAxis || 0, + alignmentAxis: d.alignmentAxis + }; + return s && typeof g == "number" && (m = s === "end" ? g * -1 : g), l ? { + x: m * f, + y: p * c + } : { + x: p * c, + y: m * f + }; +} +const pH = function(e) { + return e === void 0 && (e = 0), { + name: "offset", + options: e, + async fn(t) { + var n, r; + const { + x: i, + y: o, + placement: a, + middlewareData: s + } = t, l = await hH(t, e); + return a === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : { + x: i + l.x, + y: o + l.y, + data: { + ...l, + placement: a + } + }; + } + }; +}, mH = function(e) { + return e === void 0 && (e = {}), { + name: "shift", + options: e, + async fn(t) { + const { + x: n, + y: r, + placement: i + } = t, { + mainAxis: o = !0, + crossAxis: a = !1, + limiter: s = { + fn: (y) => { + let { + x, + y: w + } = y; + return { + x, + y: w + }; + } + }, + ...l + } = Tc(e, t), c = { + x: n, + y: r + }, f = await qw(t, l), d = Ms(Ma(i)), p = H$(d); + let m = c[p], g = c[d]; + if (o) { + const y = p === "y" ? "top" : "left", x = p === "y" ? "bottom" : "right", w = m + f[y], S = m - f[x]; + m = l0(w, m, S); + } + if (a) { + const y = d === "y" ? "top" : "left", x = d === "y" ? "bottom" : "right", w = g + f[y], S = g - f[x]; + g = l0(w, g, S); + } + const v = s.fn({ + ...t, + [p]: m, + [d]: g + }); + return { + ...v, + data: { + x: v.x - n, + y: v.y - r, + enabled: { + [p]: o, + [d]: a + } + } + }; + } + }; +}, gH = function(e) { + return e === void 0 && (e = {}), { + name: "size", + options: e, + async fn(t) { + var n, r; + const { + placement: i, + rects: o, + platform: a, + elements: s + } = t, { + apply: l = () => { + }, + ...c + } = Tc(e, t), f = await qw(t, c), d = Ma(i), p = Cc(i), m = Ms(i) === "y", { + width: g, + height: v + } = o.floating; + let y, x; + d === "top" || d === "bottom" ? (y = d, x = p === (await (a.isRTL == null ? void 0 : a.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (x = d, y = p === "end" ? "top" : "bottom"); + const w = v - f.top - f.bottom, S = g - f.left - f.right, A = ka(v - f[y], w), _ = ka(g - f[x], S), O = !t.middlewareData.shift; + let T = A, C = _; + if ((n = t.middlewareData.shift) != null && n.enabled.x && (C = S), (r = t.middlewareData.shift) != null && r.enabled.y && (T = w), O && !p) { + const D = Br(f.left, 0), $ = Br(f.right, 0), N = Br(f.top, 0), F = Br(f.bottom, 0); + m ? C = g - 2 * (D !== 0 || $ !== 0 ? D + $ : Br(f.left, f.right)) : T = v - 2 * (N !== 0 || F !== 0 ? N + F : Br(f.top, f.bottom)); + } + await l({ + ...t, + availableWidth: C, + availableHeight: T + }); + const E = await a.getDimensions(s.floating); + return g !== E.width || v !== E.height ? { + reset: { + rects: !0 + } + } : {}; + } + }; +}; +function J$(e) { + const t = Ur(e); + let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0; + const i = dn(e), o = i ? e.offsetWidth : n, a = i ? e.offsetHeight : r, s = ap(n) !== o || ap(r) !== a; + return s && (n = o, r = a), { + width: n, + height: r, + $: s + }; +} +function Xw(e) { + return Tt(e) ? e : e.contextElement; +} +function Rl(e) { + const t = Xw(e); + if (!dn(t)) + return Ui(1); + const n = t.getBoundingClientRect(), { + width: r, + height: i, + $: o + } = J$(t); + let a = (o ? ap(n.width) : n.width) / r, s = (o ? ap(n.height) : n.height) / i; + return (!a || !Number.isFinite(a)) && (a = 1), (!s || !Number.isFinite(s)) && (s = 1), { + x: a, + y: s + }; +} +const yH = /* @__PURE__ */ Ui(0); +function Q$(e) { + const t = Or(e); + return !Ym() || !t.visualViewport ? yH : { + x: t.visualViewport.offsetLeft, + y: t.visualViewport.offsetTop + }; +} +function vH(e, t, n) { + return t === void 0 && (t = !1), !n || t && n !== Or(e) ? !1 : t; +} +function Ns(e, t, n, r) { + t === void 0 && (t = !1), n === void 0 && (n = !1); + const i = e.getBoundingClientRect(), o = Xw(e); + let a = Ui(1); + t && (r ? Tt(r) && (a = Rl(r)) : a = Rl(e)); + const s = vH(o, n, r) ? Q$(o) : Ui(0); + let l = (i.left + s.x) / a.x, c = (i.top + s.y) / a.y, f = i.width / a.x, d = i.height / a.y; + if (o) { + const p = Or(o), m = r && Tt(r) ? Or(r) : r; + let g = p, v = o0(g); + for (; v && r && m !== g; ) { + const y = Rl(v), x = v.getBoundingClientRect(), w = Ur(v), S = x.left + (v.clientLeft + parseFloat(w.paddingLeft)) * y.x, A = x.top + (v.clientTop + parseFloat(w.paddingTop)) * y.y; + l *= y.x, c *= y.y, f *= y.x, d *= y.y, l += S, c += A, g = Or(v), v = o0(g); + } + } + return lp({ + width: f, + height: d, + x: l, + y: c + }); +} +function Zw(e, t) { + const n = qm(e).scrollLeft; + return t ? t.left + n : Ns(to(e)).left + n; +} +function eD(e, t, n) { + n === void 0 && (n = !1); + const r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 : ( + // RTL scrollbar. + Zw(e, r) + )), o = r.top + t.scrollTop; + return { + x: i, + y: o + }; +} +function bH(e) { + let { + elements: t, + rect: n, + offsetParent: r, + strategy: i + } = e; + const o = i === "fixed", a = to(r), s = t ? Gm(t.floating) : !1; + if (r === a || s && o) + return n; + let l = { + scrollLeft: 0, + scrollTop: 0 + }, c = Ui(1); + const f = Ui(0), d = dn(r); + if ((d || !d && !o) && ((Ba(r) !== "body" || nd(a)) && (l = qm(r)), dn(r))) { + const m = Ns(r); + c = Rl(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop; + } + const p = a && !d && !o ? eD(a, l, !0) : Ui(0); + return { + width: n.width * c.x, + height: n.height * c.y, + x: n.x * c.x - l.scrollLeft * c.x + f.x + p.x, + y: n.y * c.y - l.scrollTop * c.y + f.y + p.y + }; +} +function xH(e) { + return Array.from(e.getClientRects()); +} +function wH(e) { + const t = to(e), n = qm(e), r = e.ownerDocument.body, i = Br(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), o = Br(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight); + let a = -n.scrollLeft + Zw(e); + const s = -n.scrollTop; + return Ur(r).direction === "rtl" && (a += Br(t.clientWidth, r.clientWidth) - i), { + width: i, + height: o, + x: a, + y: s + }; +} +function _H(e, t) { + const n = Or(e), r = to(e), i = n.visualViewport; + let o = r.clientWidth, a = r.clientHeight, s = 0, l = 0; + if (i) { + o = i.width, a = i.height; + const c = Ym(); + (!c || c && t === "fixed") && (s = i.offsetLeft, l = i.offsetTop); + } + return { + width: o, + height: a, + x: s, + y: l + }; +} +function SH(e, t) { + const n = Ns(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, o = dn(e) ? Rl(e) : Ui(1), a = e.clientWidth * o.x, s = e.clientHeight * o.y, l = i * o.x, c = r * o.y; + return { + width: a, + height: s, + x: l, + y: c + }; +} +function cP(e, t, n) { + let r; + if (t === "viewport") + r = _H(e, n); + else if (t === "document") + r = wH(to(e)); + else if (Tt(t)) + r = SH(t, n); + else { + const i = Q$(e); + r = { + x: t.x - i.x, + y: t.y - i.y, + width: t.width, + height: t.height + }; + } + return lp(r); +} +function tD(e, t) { + const n = Ro(e); + return n === t || !Tt(n) || Ea(n) ? !1 : Ur(n).position === "fixed" || tD(n, t); +} +function OH(e, t) { + const n = t.get(e); + if (n) + return n; + let r = Oa(e, [], !1).filter((s) => Tt(s) && Ba(s) !== "body"), i = null; + const o = Ur(e).position === "fixed"; + let a = o ? Ro(e) : e; + for (; Tt(a) && !Ea(a); ) { + const s = Ur(a), l = Vw(a); + !l && s.position === "fixed" && (i = null), (o ? !l && !i : !l && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || nd(a) && !l && tD(e, a)) ? r = r.filter((f) => f !== a) : i = s, a = Ro(a); + } + return t.set(e, r), r; +} +function AH(e) { + let { + element: t, + boundary: n, + rootBoundary: r, + strategy: i + } = e; + const a = [...n === "clippingAncestors" ? Gm(t) ? [] : OH(t, this._c) : [].concat(n), r], s = a[0], l = a.reduce((c, f) => { + const d = cP(t, f, i); + return c.top = Br(d.top, c.top), c.right = ka(d.right, c.right), c.bottom = ka(d.bottom, c.bottom), c.left = Br(d.left, c.left), c; + }, cP(t, s, i)); + return { + width: l.right - l.left, + height: l.bottom - l.top, + x: l.left, + y: l.top + }; +} +function PH(e) { + const { + width: t, + height: n + } = J$(e); + return { + width: t, + height: n + }; +} +function TH(e, t, n) { + const r = dn(t), i = to(t), o = n === "fixed", a = Ns(e, !0, o, t); + let s = { + scrollLeft: 0, + scrollTop: 0 + }; + const l = Ui(0); + if (r || !r && !o) + if ((Ba(t) !== "body" || nd(i)) && (s = qm(t)), r) { + const p = Ns(t, !0, o, t); + l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop; + } else i && (l.x = Zw(i)); + const c = i && !r && !o ? eD(i, s) : Ui(0), f = a.left + s.scrollLeft - l.x - c.x, d = a.top + s.scrollTop - l.y - c.y; + return { + x: f, + y: d, + width: a.width, + height: a.height + }; +} +function Bv(e) { + return Ur(e).position === "static"; +} +function uP(e, t) { + if (!dn(e) || Ur(e).position === "fixed") + return null; + if (t) + return t(e); + let n = e.offsetParent; + return to(e) === n && (n = n.ownerDocument.body), n; +} +function nD(e, t) { + const n = Or(e); + if (Gm(e)) + return n; + if (!dn(e)) { + let i = Ro(e); + for (; i && !Ea(i); ) { + if (Tt(i) && !Bv(i)) + return i; + i = Ro(i); + } + return n; + } + let r = uP(e, t); + for (; r && NK(r) && Bv(r); ) + r = uP(r, t); + return r && Ea(r) && Bv(r) && !Vw(r) ? n : r || $K(e) || n; +} +const CH = async function(e) { + const t = this.getOffsetParent || nD, n = this.getDimensions, r = await n(e.floating); + return { + reference: TH(e.reference, await t(e.floating), e.strategy), + floating: { + x: 0, + y: 0, + width: r.width, + height: r.height + } + }; +}; +function EH(e) { + return Ur(e).direction === "rtl"; +} +const kH = { + convertOffsetParentRelativeRectToViewportRelativeRect: bH, + getDocumentElement: to, + getClippingRect: AH, + getOffsetParent: nD, + getElementRects: CH, + getClientRects: xH, + getDimensions: PH, + getScale: Rl, + isElement: Tt, + isRTL: EH +}; +function MH(e, t) { + let n = null, r; + const i = to(e); + function o() { + var s; + clearTimeout(r), (s = n) == null || s.disconnect(), n = null; + } + function a(s, l) { + s === void 0 && (s = !1), l === void 0 && (l = 1), o(); + const { + left: c, + top: f, + width: d, + height: p + } = e.getBoundingClientRect(); + if (s || t(), !d || !p) + return; + const m = Sl(f), g = Sl(i.clientWidth - (c + d)), v = Sl(i.clientHeight - (f + p)), y = Sl(c), w = { + rootMargin: -m + "px " + -g + "px " + -v + "px " + -y + "px", + threshold: Br(0, ka(1, l)) || 1 + }; + let S = !0; + function A(_) { + const O = _[0].intersectionRatio; + if (O !== l) { + if (!S) + return a(); + O ? a(!1, O) : r = setTimeout(() => { + a(!1, 1e-7); + }, 1e3); + } + S = !1; + } + try { + n = new IntersectionObserver(A, { + ...w, + // Handle